associateEipToVlan method
Associates an Elastic IP address with a public HCX VLAN. This operation is only allowed for public HCX VLANs at this time.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter allocationId :
The Elastic IP address allocation ID.
Parameter environmentId :
A unique ID for the environment containing the VLAN that the Elastic IP
address associates with.
Parameter vlanName :
The name of the VLAN. hcx is the only accepted VLAN name at
this time.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the environment creation request. If you do not specify a
client token, a randomly generated token is used for the request to ensure
idempotency.
Implementation
Future<AssociateEipToVlanResponse> associateEipToVlan({
required String allocationId,
required String environmentId,
required String vlanName,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AmazonElasticVMwareService.AssociateEipToVlan'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'allocationId': allocationId,
'environmentId': environmentId,
'vlanName': vlanName,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return AssociateEipToVlanResponse.fromJson(jsonResponse.body);
}