disassociateResolverEndpointIpAddress method

Future<DisassociateResolverEndpointIpAddressResponse> disassociateResolverEndpointIpAddress({
  1. required IpAddressUpdate ipAddress,
  2. required String resolverEndpointId,
})

Removes IP addresses from an inbound or an outbound Resolver endpoint. If you want to remove more than one IP address, submit one DisassociateResolverEndpointIpAddress request for each IP address.

To add an IP address to an endpoint, see AssociateResolverEndpointIpAddress.

May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceExistsException. May throw InternalServiceErrorException. May throw ThrottlingException.

Parameter ipAddress : The IPv4 address that you want to remove from a Resolver endpoint.

Parameter resolverEndpointId : The ID of the Resolver endpoint that you want to disassociate an IP address from.

Implementation

Future<DisassociateResolverEndpointIpAddressResponse>
    disassociateResolverEndpointIpAddress({
  required IpAddressUpdate ipAddress,
  required String resolverEndpointId,
}) async {
  ArgumentError.checkNotNull(ipAddress, 'ipAddress');
  ArgumentError.checkNotNull(resolverEndpointId, 'resolverEndpointId');
  _s.validateStringLength(
    'resolverEndpointId',
    resolverEndpointId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.DisassociateResolverEndpointIpAddress'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'IpAddress': ipAddress,
      'ResolverEndpointId': resolverEndpointId,
    },
  );

  return DisassociateResolverEndpointIpAddressResponse.fromJson(
      jsonResponse.body);
}