Skip to content

describe_secondary_subnets async

describe_secondary_subnets(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[DescribeSecondarySubnetsMaxResults] = None,
    next_token: Optional[String] = None,
    secondary_subnet_ids: Optional[SecondarySubnetIdList] = None,
) -> DescribeSecondarySubnetsResult

Describes one or more of your secondary subnets.

Parameters:

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

    Checks 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.

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

    The filters.

    • ipv4-cidr-block-association.association-id - The association ID for an IPv4 CIDR block associated with the secondary subnet.

    • ipv4-cidr-block-association.cidr-block - An IPv4 CIDR block associated with the secondary subnet.

    • ipv4-cidr-block-association.state - The state of an IPv4 CIDR block associated with the secondary subnet.

    • owner-id - The ID of the Amazon Web Services account that owns the secondary subnet.

    • secondary-network-id - The ID of the secondary network.

    • secondary-network-type - The type of the secondary network (rdma).

    • secondary-subnet-id - The ID of the secondary subnet.

    • secondary-subnet-arn - The ARN of the secondary subnet.

    • state - The state of the secondary subnet (create-in-progress | create-complete | create-failed | delete-in-progress | delete-complete | delete-failed).

    • 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.

  • max_results (Optional[DescribeSecondarySubnetsMaxResults], 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.

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

    The token for the next page of results.

  • secondary_subnet_ids (Optional[SecondarySubnetIdList], default: None ) –

    The IDs of the secondary subnets.

Raises:

Examples:

To describe specified secondary subnets This example describes the specified secondary subnets.

>>> await client.describe_secondary_subnets(secondary_subnet_ids=['ss-0123456789abcdef0', 'ss-0987654321fedcba0'])
Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_secondary_subnets(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_ec2.types.describe_secondary_subnets_max_results.DescribeSecondarySubnetsMaxResults"
    ] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
    secondary_subnet_ids: Optional[
        "capo_ec2.types.secondary_subnet_id_list.SecondarySubnetIdList"
    ] = None,
) -> "capo_ec2.types.describe_secondary_subnets_result.DescribeSecondarySubnetsResult":
    """<p>Describes one or more of your secondary subnets.</p>

    Args:
        dry_run: <p>Checks 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>
        filters: <p>The filters.</p> <ul> <li> <p> <code>ipv4-cidr-block-association.association-id</code> - The association ID for an IPv4 CIDR block associated with the secondary subnet.</p> </li> <li> <p> <code>ipv4-cidr-block-association.cidr-block</code> - An IPv4 CIDR block associated with the secondary subnet.</p> </li> <li> <p> <code>ipv4-cidr-block-association.state</code> - The state of an IPv4 CIDR block associated with the secondary subnet.</p> </li> <li> <p> <code>owner-id</code> - The ID of the Amazon Web Services account that owns the secondary subnet.</p> </li> <li> <p> <code>secondary-network-id</code> - The ID of the secondary network.</p> </li> <li> <p> <code>secondary-network-type</code> - The type of the secondary network (<code>rdma</code>).</p> </li> <li> <p> <code>secondary-subnet-id</code> - The ID of the secondary subnet.</p> </li> <li> <p> <code>secondary-subnet-arn</code> - The ARN of the secondary subnet.</p> </li> <li> <p> <code>state</code> - The state of the secondary subnet (<code>create-in-progress</code> | <code>create-complete</code> | <code>create-failed</code> | <code>delete-in-progress</code> | <code>delete-complete</code> | <code>delete-failed</code>).</p> </li> <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>
        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>
        next_token: <p>The token for the next page of results.</p>
        secondary_subnet_ids: <p>The IDs of the secondary subnets.</p>

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

    Examples:
        To describe specified secondary subnets
        This example describes the specified secondary subnets.

        >>> await client.describe_secondary_subnets(secondary_subnet_ids=['ss-0123456789abcdef0', 'ss-0987654321fedcba0'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.describe_secondary_subnets_request.DescribeSecondarySubnetsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_secondary_subnets_result.DescribeSecondarySubnetsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_secondary_subnets

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeSecondarySubnets")
    )
    input_: capo_ec2.types.describe_secondary_subnets_request.DescribeSecondarySubnetsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if secondary_subnet_ids is not None:
        input_["secondary_subnet_ids"] = secondary_subnet_ids

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