Skip to content

describe_public_ipv4_pools async

describe_public_ipv4_pools(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    pool_ids: Optional[PublicIpv4PoolIdStringList] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[PoolMaxResults] = None,
    filters: Optional[FilterList] = None,
) -> DescribePublicIpv4PoolsResult

Describes the specified IPv4 address pools.

Parameters:

  • pool_ids (Optional[PublicIpv4PoolIdStringList], default: None ) –

    The IDs of the address pools.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next page of results.

  • max_results (Optional[PoolMaxResults], default: None ) –

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

  • filters (Optional[FilterList], default: None ) –

    One or more filters.

    • tag: - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key Owner and the value TeamA, specify tag:Owner for the filter name and TeamA for the filter value.

    • tag-key - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_public_ipv4_pools(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    pool_ids: Optional[
        "capo_ec2.types.public_ipv4_pool_id_string_list.PublicIpv4PoolIdStringList"
    ] = None,
    next_token: Optional["capo_ec2.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ec2.types.pool_max_results.PoolMaxResults"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
) -> (
    "capo_ec2.types.describe_public_ipv4_pools_result.DescribePublicIpv4PoolsResult"
):
    """<p>Describes the specified IPv4 address pools.</p>

    Args:
        pool_ids: <p>The IDs of the address pools.</p>
        next_token: <p>The token for the next page of results.</p>
        max_results: <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
        filters: <p>One or more filters.</p> <ul> <li> <p> <code>tag</code>:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the key <code>Owner</code> and the value <code>TeamA</code>, specify <code>tag:Owner</code> for the filter name and <code>TeamA</code> for the filter value.</p> </li> <li> <p> <code>tag-key</code> - The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.</p> </li> </ul>

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

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.describe_public_ipv4_pools_request.DescribePublicIpv4PoolsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_public_ipv4_pools_result.DescribePublicIpv4PoolsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_public_ipv4_pools

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePublicIpv4Pools")
    )
    input_: capo_ec2.types.describe_public_ipv4_pools_request.DescribePublicIpv4PoolsRequest = {}
    if pool_ids is not None:
        input_["pool_ids"] = pool_ids
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if filters is not None:
        input_["filters"] = filters

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