Skip to content

move_byoip_cidr_to_ipam async

move_byoip_cidr_to_ipam(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    cidr: Optional[String] = None,
    ipam_pool_id: Optional[IpamPoolId] = None,
    ipam_pool_owner: Optional[String] = None,
) -> MoveByoipCidrToIpamResult

Move a BYOIPv4 CIDR to IPAM from a public IPv4 pool.

If you already have a BYOIPv4 CIDR with Amazon Web Services, you can move the CIDR to IPAM from a public IPv4 pool. You cannot move an IPv6 CIDR to IPAM. If you are bringing a new IP address to Amazon Web Services for the first time, complete the steps in Tutorial: BYOIP address CIDRs to IPAM.

Parameters:

  • dry_run (Optional[Boolean], default: None ) –

    A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • cidr (Optional[String], default: None ) –

    The BYOIP CIDR.

  • ipam_pool_id (Optional[IpamPoolId], default: None ) –

    The IPAM pool ID.

  • ipam_pool_owner (Optional[String], default: None ) –

    The Amazon Web Services account ID of the owner of the IPAM pool.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def move_byoip_cidr_to_ipam(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    cidr: Optional["capo_ec2.types.string.String"] = None,
    ipam_pool_id: Optional["capo_ec2.types.ipam_pool_id.IpamPoolId"] = None,
    ipam_pool_owner: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.move_byoip_cidr_to_ipam_result.MoveByoipCidrToIpamResult":
    """<p>Move a BYOIPv4 CIDR to IPAM from a public IPv4 pool.</p> <p>If you already have a BYOIPv4 CIDR with Amazon Web Services, you can move the CIDR to IPAM from a public IPv4 pool. You cannot move an IPv6 CIDR to IPAM. If you are bringing a new IP address to Amazon Web Services for the first time, complete the steps in <a href="https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoip-ipam.html">Tutorial: BYOIP address CIDRs to IPAM</a>.</p>

    Args:
        dry_run: <p>A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
        cidr: <p>The BYOIP CIDR.</p>
        ipam_pool_id: <p>The IPAM pool ID.</p>
        ipam_pool_owner: <p>The Amazon Web Services account ID of the owner of the IPAM pool.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.move_byoip_cidr_to_ipam_request.MoveByoipCidrToIpamRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.move_byoip_cidr_to_ipam_result.MoveByoipCidrToIpamResult"
    ]:
        import capo_ec2._operations.amazon_ec2.move_byoip_cidr_to_ipam

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.move_byoip_cidr_to_ipam.async_move_byoip_cidr_to_ipam(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("MoveByoipCidrToIpam")
    )
    input_: capo_ec2.types.move_byoip_cidr_to_ipam_request.MoveByoipCidrToIpamRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if cidr is not None:
        input_["cidr"] = cidr
    if ipam_pool_id is not None:
        input_["ipam_pool_id"] = ipam_pool_id
    if ipam_pool_owner is not None:
        input_["ipam_pool_owner"] = ipam_pool_owner

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