Skip to content

associate_resolver_endpoint_ip_address

associate_resolver_endpoint_ip_address(
    resolver_endpoint_id: ResourceId,
    ip_address: IpAddressUpdate,
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
) -> AssociateResolverEndpointIpAddressResponse

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.

Parameters:

  • resolver_endpoint_id (ResourceId) –

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

  • ip_address (IpAddressUpdate) –

    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.

Raises:

Source code in docs_src/capo_route53resolver/_services/route53_resolver.py
def associate_resolver_endpoint_ip_address(
    self,
    resolver_endpoint_id: "capo_route53resolver.types.resource_id.ResourceId",
    ip_address: "capo_route53resolver.types.ip_address_update.IpAddressUpdate",
    *,
    config_overrides: Optional[Route53ResolverClientConfig] = None,
) -> "capo_route53resolver.types.associate_resolver_endpoint_ip_address_response.AssociateResolverEndpointIpAddressResponse":
    """<p>Adds IP addresses to an inbound or an outbound Resolver endpoint. If you want to add more than one IP address, submit one <code>AssociateResolverEndpointIpAddress</code> request for each IP address.</p> <p>To remove an IP address from an endpoint, see <a href="https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_DisassociateResolverEndpointIpAddress.html">DisassociateResolverEndpointIpAddress</a>. </p>

    Args:
        resolver_endpoint_id: <p>The ID of the Resolver endpoint that you want to associate IP addresses with.</p>
        ip_address: <p>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.</p>

    Raises:
        capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
        capo_route53resolver.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters in this request are not valid.</p>
        capo_route53resolver.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</p>
        capo_route53resolver.errors.limit_exceeded_exception.LimitExceededException: <p>The request caused one or more limits to be exceeded.</p>
        capo_route53resolver.errors.resource_exists_exception.ResourceExistsException: <p>The resource that you tried to create already exists.</p>
        capo_route53resolver.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_route53resolver.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Try again in a few minutes.</p>
        capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_route53resolver.types.associate_resolver_endpoint_ip_address_request.AssociateResolverEndpointIpAddressRequest]",
    ) -> OperationResponse[
        "capo_route53resolver.types.associate_resolver_endpoint_ip_address_response.AssociateResolverEndpointIpAddressResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.associate_resolver_endpoint_ip_address

        output, http_response = (
            capo_route53resolver._operations.route53_resolver.associate_resolver_endpoint_ip_address.associate_resolver_endpoint_ip_address(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("AssociateResolverEndpointIpAddress")
    )
    input_: capo_route53resolver.types.associate_resolver_endpoint_ip_address_request.AssociateResolverEndpointIpAddressRequest = {
        "resolver_endpoint_id": resolver_endpoint_id,
        "ip_address": ip_address,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output