Skip to content

delete_public_ipv4_pool async

delete_public_ipv4_pool(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    pool_id: Optional[Ipv4PoolEc2Id] = None,
    network_border_group: Optional[String] = None,
) -> DeletePublicIpv4PoolResult

Delete a public IPv4 pool. A public IPv4 pool is an EC2 IP address pool required for the public IPv4 CIDRs that you own and bring to Amazon Web Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, use IPAM pools only.

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.

  • pool_id (Optional[Ipv4PoolEc2Id], default: None ) –

    The ID of the public IPv4 pool you want to delete.

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

    The Availability Zone (AZ) or Local Zone (LZ) network border group that the resource that the IP address is assigned to is in. Defaults to an AZ network border group. For more information on available Local Zones, see Local Zone availability in the Amazon EC2 User Guide.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def delete_public_ipv4_pool(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    pool_id: Optional["capo_ec2.types.ipv4_pool_ec2_id.Ipv4PoolEc2Id"] = None,
    network_border_group: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.delete_public_ipv4_pool_result.DeletePublicIpv4PoolResult":
    """<p>Delete a public IPv4 pool. A public IPv4 pool is an EC2 IP address pool required for the public IPv4 CIDRs that you own and bring to Amazon Web Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, use IPAM pools only.</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>
        pool_id: <p>The ID of the public IPv4 pool you want to delete.</p>
        network_border_group: <p>The Availability Zone (AZ) or Local Zone (LZ) network border group that the resource that the IP address is assigned to is in. Defaults to an AZ network border group. For more information on available Local Zones, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#byoip-zone-avail">Local Zone availability</a> in the <i>Amazon EC2 User Guide</i>.</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.delete_public_ipv4_pool_request.DeletePublicIpv4PoolRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.delete_public_ipv4_pool_result.DeletePublicIpv4PoolResult"
    ]:
        import capo_ec2._operations.amazon_ec2.delete_public_ipv4_pool

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePublicIpv4Pool")
    )
    input_: capo_ec2.types.delete_public_ipv4_pool_request.DeletePublicIpv4PoolRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if pool_id is not None:
        input_["pool_id"] = pool_id
    if network_border_group is not None:
        input_["network_border_group"] = network_border_group

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