Skip to content

modify_ip_pools async

modify_ip_pools(
    *,
    config_overrides: Optional[AsyncElasticLoadBalancingv2ClientConfig] = None,
    load_balancer_arn: Optional[LoadBalancerArn] = None,
    ipam_pools: Optional[IpamPools] = None,
    remove_ipam_pools: Optional[RemoveIpamPools] = None,
) -> ModifyIpPoolsOutput

[Application Load Balancers] Modify the IP pool associated to a load balancer.

Parameters:

  • load_balancer_arn (Optional[LoadBalancerArn], default: None ) –

    The Amazon Resource Name (ARN) of the load balancer.

  • ipam_pools (Optional[IpamPools], default: None ) –

    The IPAM pools to be modified.

  • remove_ipam_pools (Optional[RemoveIpamPools], default: None ) –

    Remove the IP pools in use by the load balancer.

Raises:

Source code in docs_src/capo_elastic_load_balancing_v2/_services/async_elastic_load_balancingv2.py
async def modify_ip_pools(
    self,
    *,
    config_overrides: Optional[AsyncElasticLoadBalancingv2ClientConfig] = None,
    load_balancer_arn: Optional[
        "capo_elastic_load_balancing_v2.types.load_balancer_arn.LoadBalancerArn"
    ] = None,
    ipam_pools: Optional[
        "capo_elastic_load_balancing_v2.types.ipam_pools.IpamPools"
    ] = None,
    remove_ipam_pools: Optional[
        "capo_elastic_load_balancing_v2.types.remove_ipam_pools.RemoveIpamPools"
    ] = None,
) -> "capo_elastic_load_balancing_v2.types.modify_ip_pools_output.ModifyIpPoolsOutput":
    """<p>[Application Load Balancers] Modify the IP pool associated to a load balancer.</p>

    Args:
        load_balancer_arn: <p>The Amazon Resource Name (ARN) of the load balancer.</p>
        ipam_pools: <p>The IPAM pools to be modified.</p>
        remove_ipam_pools: <p>Remove the IP pools in use by the load balancer.</p>

    Raises:
        capo_elastic_load_balancing_v2.errors.load_balancer_not_found_exception.LoadBalancerNotFoundException: <p>The specified load balancer does not exist.</p>
        capo_elastic_load_balancing_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elastic_load_balancing_v2.types.modify_ip_pools_input.ModifyIpPoolsInput]",
    ) -> AsyncOperationResponse[
        "capo_elastic_load_balancing_v2.types.modify_ip_pools_output.ModifyIpPoolsOutput"
    ]:
        import capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.modify_ip_pools

        (
            output,
            http_response,
        ) = await capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.modify_ip_pools.async_modify_ip_pools(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyIpPools")
    )
    input_: capo_elastic_load_balancing_v2.types.modify_ip_pools_input.ModifyIpPoolsInput = {}
    if load_balancer_arn is not None:
        input_["load_balancer_arn"] = load_balancer_arn
    if ipam_pools is not None:
        input_["ipam_pools"] = ipam_pools
    if remove_ipam_pools is not None:
        input_["remove_ipam_pools"] = remove_ipam_pools

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output