AssociateResolverEndpointIpAddressCommand

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 .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { Route53ResolverClient, AssociateResolverEndpointIpAddressCommand } from "@aws-sdk/client-route53resolver"; // ES Modules import
// const { Route53ResolverClient, AssociateResolverEndpointIpAddressCommand } = require("@aws-sdk/client-route53resolver"); // CommonJS import
const client = new Route53ResolverClient(config);
const input = { // AssociateResolverEndpointIpAddressRequest
  ResolverEndpointId: "STRING_VALUE", // required
  IpAddress: { // IpAddressUpdate
    IpId: "STRING_VALUE",
    SubnetId: "STRING_VALUE",
    Ip: "STRING_VALUE",
    Ipv6: "STRING_VALUE",
  },
};
const command = new AssociateResolverEndpointIpAddressCommand(input);
const response = await client.send(command);
// { // AssociateResolverEndpointIpAddressResponse
//   ResolverEndpoint: { // ResolverEndpoint
//     Id: "STRING_VALUE",
//     CreatorRequestId: "STRING_VALUE",
//     Arn: "STRING_VALUE",
//     Name: "STRING_VALUE",
//     SecurityGroupIds: [ // SecurityGroupIds
//       "STRING_VALUE",
//     ],
//     Direction: "INBOUND" || "OUTBOUND",
//     IpAddressCount: Number("int"),
//     HostVPCId: "STRING_VALUE",
//     Status: "CREATING" || "OPERATIONAL" || "UPDATING" || "AUTO_RECOVERING" || "ACTION_NEEDED" || "DELETING",
//     StatusMessage: "STRING_VALUE",
//     CreationTime: "STRING_VALUE",
//     ModificationTime: "STRING_VALUE",
//     OutpostArn: "STRING_VALUE",
//     PreferredInstanceType: "STRING_VALUE",
//     ResolverEndpointType: "IPV6" || "IPV4" || "DUALSTACK",
//     Protocols: [ // ProtocolList
//       "DoH" || "Do53" || "DoH-FIPS",
//     ],
//   },
// };

AssociateResolverEndpointIpAddressCommand Input

Parameter
Type
Description
IpAddress
Required
IpAddressUpdate | undefined

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.

ResolverEndpointId
Required
string | undefined

The ID of the Resolver endpoint that you want to associate IP addresses with.

AssociateResolverEndpointIpAddressCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ResolverEndpoint
ResolverEndpoint | undefined

The response to an AssociateResolverEndpointIpAddress request.

Throws

Name
Fault
Details
InternalServiceErrorException
client

We encountered an unknown error. Try again in a few minutes.

InvalidParameterException
client

One or more parameters in this request are not valid.

InvalidRequestException
client

The request is invalid.

LimitExceededException
client

The request caused one or more limits to be exceeded.

ResourceExistsException
client

The resource that you tried to create already exists.

ResourceNotFoundException
client

The specified resource doesn't exist.

ThrottlingException
client

The request was throttled. Try again in a few minutes.

Route53ResolverServiceException
Base exception class for all service exceptions from Route53Resolver service.