disassociateEipFromVlan method

Future<DisassociateEipFromVlanResponse> disassociateEipFromVlan({
  1. required String associationId,
  2. required String environmentId,
  3. required String vlanName,
  4. String? clientToken,
})

Disassociates an Elastic IP address from 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 associationId : A unique ID for the Elastic IP address association.

Parameter environmentId : A unique ID for the environment containing the VLAN that the Elastic IP address disassociates from.

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<DisassociateEipFromVlanResponse> disassociateEipFromVlan({
  required String associationId,
  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.DisassociateEipFromVlan'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'associationId': associationId,
      'environmentId': environmentId,
      'vlanName': vlanName,
      'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return DisassociateEipFromVlanResponse.fromJson(jsonResponse.body);
}