createVpcEndpointAssociation method
Creates a firewall endpoint for an Network Firewall firewall. This type of
firewall endpoint is independent of the firewall endpoints that you
specify in the Firewall itself, and you define it in addition
to those endpoints after the firewall has been created. You can define a
VPC endpoint association using a different VPC than the one you used in
the firewall specifications.
May throw InsufficientCapacityException.
May throw InternalServerError.
May throw InvalidOperationException.
May throw InvalidRequestException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter firewallArn :
The Amazon Resource Name (ARN) of the firewall.
Parameter vpcId :
The unique identifier of the VPC where you want to create a firewall
endpoint.
Parameter description :
A description of the VPC endpoint association.
Parameter tags :
The key:value pairs to associate with the resource.
Implementation
Future<CreateVpcEndpointAssociationResponse> createVpcEndpointAssociation({
required String firewallArn,
required SubnetMapping subnetMapping,
required String vpcId,
String? description,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'NetworkFirewall_20201112.CreateVpcEndpointAssociation'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FirewallArn': firewallArn,
'SubnetMapping': subnetMapping,
'VpcId': vpcId,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
},
);
return CreateVpcEndpointAssociationResponse.fromJson(jsonResponse.body);
}