associateResolverEndpointIpAddress method
- required IpAddressUpdate ipAddress,
- required String resolverEndpointId,
Adds IP addresses to an inbound or an outbound Resolver endpoint. If you
want to add more than one IP address, submit one
AssociateResolverEndpointIpAddress
request for each IP
address.
To remove an IP address from an endpoint, see DisassociateResolverEndpointIpAddress.
May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceExistsException. May throw InternalServiceErrorException. May throw LimitExceededException. May throw ThrottlingException.
Parameter ipAddress
:
Either the IPv4 address that you want to add to a Resolver endpoint or a
subnet ID. If you specify a subnet ID, Resolver chooses an IP address for
you from the available IPs in the specified subnet.
Parameter resolverEndpointId
:
The ID of the Resolver endpoint that you want to associate IP addresses
with.
Implementation
Future<AssociateResolverEndpointIpAddressResponse>
associateResolverEndpointIpAddress({
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.AssociateResolverEndpointIpAddress'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'IpAddress': ipAddress,
'ResolverEndpointId': resolverEndpointId,
},
);
return AssociateResolverEndpointIpAddressResponse.fromJson(
jsonResponse.body);
}