createDirectConnectGatewayAssociationProposal method
- required String directConnectGatewayId,
- required String directConnectGatewayOwnerAccount,
- required String gatewayId,
- List<
RouteFilterPrefix> ? addAllowedPrefixesToDirectConnectGateway, - List<
RouteFilterPrefix> ? removeAllowedPrefixesToDirectConnectGateway,
Creates a proposal to associate the specified virtual private gateway or transit gateway with the specified Direct Connect gateway.
You can associate a Direct Connect gateway and virtual private gateway or transit gateway that is owned by any AWS account.
May throw DirectConnectServerException. May throw DirectConnectClientException.
Parameter directConnectGatewayId
:
The ID of the Direct Connect gateway.
Parameter directConnectGatewayOwnerAccount
:
The ID of the AWS account that owns the Direct Connect gateway.
Parameter gatewayId
:
The ID of the virtual private gateway or transit gateway.
Parameter addAllowedPrefixesToDirectConnectGateway
:
The Amazon VPC prefixes to advertise to the Direct Connect gateway.
Parameter removeAllowedPrefixesToDirectConnectGateway
:
The Amazon VPC prefixes to no longer advertise to the Direct Connect
gateway.
Implementation
Future<CreateDirectConnectGatewayAssociationProposalResult>
createDirectConnectGatewayAssociationProposal({
required String directConnectGatewayId,
required String directConnectGatewayOwnerAccount,
required String gatewayId,
List<RouteFilterPrefix>? addAllowedPrefixesToDirectConnectGateway,
List<RouteFilterPrefix>? removeAllowedPrefixesToDirectConnectGateway,
}) async {
ArgumentError.checkNotNull(
directConnectGatewayId, 'directConnectGatewayId');
ArgumentError.checkNotNull(
directConnectGatewayOwnerAccount, 'directConnectGatewayOwnerAccount');
ArgumentError.checkNotNull(gatewayId, 'gatewayId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'OvertureService.CreateDirectConnectGatewayAssociationProposal'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'directConnectGatewayId': directConnectGatewayId,
'directConnectGatewayOwnerAccount': directConnectGatewayOwnerAccount,
'gatewayId': gatewayId,
if (addAllowedPrefixesToDirectConnectGateway != null)
'addAllowedPrefixesToDirectConnectGateway':
addAllowedPrefixesToDirectConnectGateway,
if (removeAllowedPrefixesToDirectConnectGateway != null)
'removeAllowedPrefixesToDirectConnectGateway':
removeAllowedPrefixesToDirectConnectGateway,
},
);
return CreateDirectConnectGatewayAssociationProposalResult.fromJson(
jsonResponse.body);
}