Skip to content

Commit

Permalink
feat(client-networkmanager): This release adds API support for Tunnel…
Browse files Browse the repository at this point in the history
…-less Connect (NoEncap Protocol) for AWS Cloud WAN
  • Loading branch information
awstools committed Oct 23, 2023
1 parent 7a37464 commit 2b13ffd
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface CreateConnectAttachmentCommandOutput extends CreateConnectAttac
* EdgeLocation: "STRING_VALUE", // required
* TransportAttachmentId: "STRING_VALUE", // required
* Options: { // ConnectAttachmentOptions
* Protocol: "GRE",
* Protocol: "GRE" || "NO_ENCAP",
* },
* Tags: [ // TagList
* { // Tag
Expand Down Expand Up @@ -98,7 +98,7 @@ export interface CreateConnectAttachmentCommandOutput extends CreateConnectAttac
* // },
* // TransportAttachmentId: "STRING_VALUE",
* // Options: { // ConnectAttachmentOptions
* // Protocol: "GRE",
* // Protocol: "GRE" || "NO_ENCAP",
* // },
* // },
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface CreateConnectPeerCommandOutput extends CreateConnectPeerRespons
* BgpOptions: { // BgpOptions
* PeerAsn: Number("long"),
* },
* InsideCidrBlocks: [ // ConstrainedStringList // required
* InsideCidrBlocks: [ // ConstrainedStringList
* "STRING_VALUE",
* ],
* Tags: [ // TagList
Expand All @@ -62,6 +62,7 @@ export interface CreateConnectPeerCommandOutput extends CreateConnectPeerRespons
* },
* ],
* ClientToken: "STRING_VALUE",
* SubnetArn: "STRING_VALUE",
* };
* const command = new CreateConnectPeerCommand(input);
* const response = await client.send(command);
Expand All @@ -79,7 +80,7 @@ export interface CreateConnectPeerCommandOutput extends CreateConnectPeerRespons
* // InsideCidrBlocks: [ // ConstrainedStringList
* // "STRING_VALUE",
* // ],
* // Protocol: "GRE",
* // Protocol: "GRE" || "NO_ENCAP",
* // BgpConfigurations: [ // ConnectPeerBgpConfigurationList
* // { // ConnectPeerBgpConfiguration
* // CoreNetworkAsn: Number("long"),
Expand All @@ -95,6 +96,7 @@ export interface CreateConnectPeerCommandOutput extends CreateConnectPeerRespons
* // Value: "STRING_VALUE",
* // },
* // ],
* // SubnetArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface DeleteConnectPeerCommandOutput extends DeleteConnectPeerRespons
* // InsideCidrBlocks: [ // ConstrainedStringList
* // "STRING_VALUE",
* // ],
* // Protocol: "GRE",
* // Protocol: "GRE" || "NO_ENCAP",
* // BgpConfigurations: [ // ConnectPeerBgpConfigurationList
* // { // ConnectPeerBgpConfiguration
* // CoreNetworkAsn: Number("long"),
Expand All @@ -79,6 +79,7 @@ export interface DeleteConnectPeerCommandOutput extends DeleteConnectPeerRespons
* // Value: "STRING_VALUE",
* // },
* // ],
* // SubnetArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export interface GetConnectAttachmentCommandOutput extends GetConnectAttachmentR
* // },
* // TransportAttachmentId: "STRING_VALUE",
* // Options: { // ConnectAttachmentOptions
* // Protocol: "GRE",
* // Protocol: "GRE" || "NO_ENCAP",
* // },
* // },
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface GetConnectPeerCommandOutput extends GetConnectPeerResponse, __M
* // InsideCidrBlocks: [ // ConstrainedStringList
* // "STRING_VALUE",
* // ],
* // Protocol: "GRE",
* // Protocol: "GRE" || "NO_ENCAP",
* // BgpConfigurations: [ // ConnectPeerBgpConfigurationList
* // { // ConnectPeerBgpConfiguration
* // CoreNetworkAsn: Number("long"),
Expand All @@ -79,6 +79,7 @@ export interface GetConnectPeerCommandOutput extends GetConnectPeerResponse, __M
* // Value: "STRING_VALUE",
* // },
* // ],
* // SubnetArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface ListConnectPeersCommandOutput extends ListConnectPeersResponse,
* // Value: "STRING_VALUE",
* // },
* // ],
* // SubnetArn: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
56 changes: 29 additions & 27 deletions clients/client-networkmanager/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,33 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/networkmanager.json */

const w="required",
x="fn",
y="argv",
z="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="stringEquals",
g="sigv4",
h="networkmanager",
i={[w]:false,"type":"String"},
j={[w]:true,"default":false,"type":"Boolean"},
k={[z]:"Endpoint"},
l={[x]:"booleanEquals",[y]:[{[z]:"UseFIPS"},true]},
m={[x]:"booleanEquals",[y]:[{[z]:"UseDualStack"},true]},
n={},
o={[x]:"getAttr",[y]:[{[z]:e},"name"]},
p={[x]:"booleanEquals",[y]:[{[z]:"UseFIPS"},false]},
q={[x]:"booleanEquals",[y]:[{[z]:"UseDualStack"},false]},
r={[x]:"booleanEquals",[y]:[true,{[x]:"getAttr",[y]:[{[z]:e},"supportsFIPS"]}]},
s={[x]:"booleanEquals",[y]:[true,{[x]:"getAttr",[y]:[{[z]:e},"supportsDualStack"]}]},
t=[l],
u=[m],
v=[{[z]:"Region"}];
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[x]:a,[y]:[k]}],type:b,rules:[{conditions:t,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:u,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:k,properties:n,headers:n},type:d}]},{conditions:[{[x]:a,[y]:v}],type:b,rules:[{conditions:[{[x]:"aws.partition",[y]:v,assign:e}],type:b,rules:[{conditions:[{[x]:f,[y]:[o,"aws"]},p,q],endpoint:{url:"https://networkmanager.us-west-2.amazonaws.com",properties:{authSchemes:[{name:g,signingName:h,signingRegion:"us-west-2"}]},headers:n},type:d},{conditions:[{[x]:f,[y]:[o,"aws-us-gov"]},p,q],endpoint:{url:"https://networkmanager.us-gov-west-1.amazonaws.com",properties:{authSchemes:[{name:g,signingName:h,signingRegion:"us-gov-west-1"}]},headers:n},type:d},{conditions:[l,m],type:b,rules:[{conditions:[r,s],type:b,rules:[{endpoint:{url:"https://networkmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:t,type:b,rules:[{conditions:[r],type:b,rules:[{endpoint:{url:"https://networkmanager-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:u,type:b,rules:[{conditions:[s],type:b,rules:[{endpoint:{url:"https://networkmanager.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://networkmanager.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
const y="required",
z="fn",
A="argv",
B="ref";
const a=true,
b="isSet",
c="booleanEquals",
d="error",
e="endpoint",
f="tree",
g="PartitionResult",
h="stringEquals",
i="sigv4",
j="networkmanager",
k={[y]:false,"type":"String"},
l={[y]:true,"default":false,"type":"Boolean"},
m={[B]:"Endpoint"},
n={[z]:c,[A]:[{[B]:"UseFIPS"},true]},
o={[z]:c,[A]:[{[B]:"UseDualStack"},true]},
p={},
q={[z]:"getAttr",[A]:[{[B]:g},"name"]},
r={[z]:c,[A]:[{[B]:"UseFIPS"},false]},
s={[z]:c,[A]:[{[B]:"UseDualStack"},false]},
t={[z]:"getAttr",[A]:[{[B]:g},"supportsFIPS"]},
u={[z]:c,[A]:[true,{[z]:"getAttr",[A]:[{[B]:g},"supportsDualStack"]}]},
v=[n],
w=[o],
x=[{[B]:"Region"}];
const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[z]:b,[A]:[m]}],rules:[{conditions:v,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:w,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:m,properties:p,headers:p},type:e}],type:f},{conditions:[{[z]:b,[A]:x}],rules:[{conditions:[{[z]:"aws.partition",[A]:x,assign:g}],rules:[{conditions:[{[z]:h,[A]:[q,"aws"]},r,s],endpoint:{url:"https://networkmanager.us-west-2.amazonaws.com",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-west-2"}]},headers:p},type:e},{conditions:[{[z]:h,[A]:[q,"aws-us-gov"]},r,s],endpoint:{url:"https://networkmanager.us-gov-west-1.amazonaws.com",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-gov-west-1"}]},headers:p},type:e},{conditions:[n,o],rules:[{conditions:[{[z]:c,[A]:[a,t]},u],rules:[{endpoint:{url:"https://networkmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:v,rules:[{conditions:[{[z]:c,[A]:[t,a]}],rules:[{endpoint:{url:"https://networkmanager-fips.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:w,rules:[{conditions:[u],rules:[{endpoint:{url:"https://networkmanager.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://networkmanager.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers:p},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
export const ruleSet: RuleSetObject = _data;
23 changes: 21 additions & 2 deletions clients/client-networkmanager/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,7 @@ export type ChangeType = (typeof ChangeType)[keyof typeof ChangeType];
*/
export const TunnelProtocol = {
GRE: "GRE",
NO_ENCAP: "NO_ENCAP",
} as const;

/**
Expand Down Expand Up @@ -1298,6 +1299,12 @@ export interface ConnectPeer {
* <p>The list of key-value tags associated with the Connect peer.</p>
*/
Tags?: Tag[];

/**
* @public
* <p>The subnet ARN for the Connect peer.</p>
*/
SubnetArn?: string;
}

/**
Expand Down Expand Up @@ -1346,6 +1353,12 @@ export interface ConnectPeerSummary {
* <p>The list of key-value tags associated with the Connect peer summary.</p>
*/
Tags?: Tag[];

/**
* @public
* <p>The subnet ARN for the Connect peer summary.</p>
*/
SubnetArn?: string;
}

/**
Expand Down Expand Up @@ -2011,7 +2024,7 @@ export interface CreateConnectPeerRequest {
* @public
* <p>The inside IP addresses used for BGP peering.</p>
*/
InsideCidrBlocks: string[] | undefined;
InsideCidrBlocks?: string[];

/**
* @public
Expand All @@ -2024,6 +2037,12 @@ export interface CreateConnectPeerRequest {
* <p>The client token associated with the request.</p>
*/
ClientToken?: string;

/**
* @public
* <p>The subnet ARN for the Connect peer.</p>
*/
SubnetArn?: string;
}

/**
Expand Down Expand Up @@ -4676,7 +4695,7 @@ export interface GetNetworkResourcesResponse {
export interface RouteTableIdentifier {
/**
* @public
* <p>The ARN of the transit gateway route table.</p>
* <p>The ARN of the transit gateway route table for the attachment request. For example, <code>"TransitGatewayRouteTableArn": "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456"</code>.</p>
*/
TransitGatewayRouteTableArn?: string;

Expand Down
3 changes: 3 additions & 0 deletions clients/client-networkmanager/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@ export const se_CreateConnectPeerCommand = async (
CoreNetworkAddress: [],
InsideCidrBlocks: (_) => _json(_),
PeerAddress: [],
SubnetArn: [],
Tags: (_) => _json(_),
})
);
Expand Down Expand Up @@ -8872,6 +8873,7 @@ const de_ConnectPeer = (output: any, context: __SerdeContext): ConnectPeer => {
CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
EdgeLocation: __expectString,
State: __expectString,
SubnetArn: __expectString,
Tags: _json,
}) as any;
};
Expand All @@ -8897,6 +8899,7 @@ const de_ConnectPeerSummary = (output: any, context: __SerdeContext): ConnectPee
CoreNetworkId: __expectString,
CreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
EdgeLocation: __expectString,
SubnetArn: __expectString,
Tags: _json,
}) as any;
};
Expand Down
Loading

0 comments on commit 2b13ffd

Please sign in to comment.