Skip to content

describe_vpc_endpoints async

describe_vpc_endpoints(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    vpc_endpoint_ids: Optional[VpcEndpointIdList] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
) -> DescribeVpcEndpointsResult

Describes your VPC endpoints. The default is to describe all your VPC endpoints. Alternatively, you can specify specific VPC endpoint IDs or filter the results to include only the VPC endpoints that match specific criteria.

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.

  • vpc_endpoint_ids (Optional[VpcEndpointIdList], default: None ) –

    The IDs of the VPC endpoints.

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

    The filters.

    • ip-address-type - The IP address type (ipv4 | ipv6).

    • service-name - The name of the service.

    • service-region - The Region of the service.

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

    • vpc-id - The ID of the VPC in which the endpoint resides.

    • vpc-endpoint-id - The ID of the endpoint.

    • vpc-endpoint-state - The state of the endpoint (pendingAcceptance | pending | available | deleting | deleted | rejected | failed).

    • vpc-endpoint-type - The type of VPC endpoint (Interface | Gateway | GatewayLoadBalancer | Resource | ServiceNetwork | Tunnel).

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

    The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.

    Constraint: If the value is greater than 1,000, we return only 1,000 items.

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

    The token for the next set of items to return. (You received this token from a prior call.)

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def describe_vpc_endpoints(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    vpc_endpoint_ids: Optional[
        "capo_ec2.types.vpc_endpoint_id_list.VpcEndpointIdList"
    ] = None,
    filters: Optional["capo_ec2.types.filter_list.FilterList"] = None,
    max_results: Optional["capo_ec2.types.integer.Integer"] = None,
    next_token: Optional["capo_ec2.types.string.String"] = None,
) -> "capo_ec2.types.describe_vpc_endpoints_result.DescribeVpcEndpointsResult":
    """<p>Describes your VPC endpoints. The default is to describe all your VPC endpoints. Alternatively, you can specify specific VPC endpoint IDs or filter the results to include only the VPC endpoints that match specific criteria.</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>
        vpc_endpoint_ids: <p>The IDs of the VPC endpoints.</p>
        filters: <p>The filters.</p> <ul> <li> <p> <code>ip-address-type</code> - The IP address type (<code>ipv4</code> | <code>ipv6</code>).</p> </li> <li> <p> <code>service-name</code> - The name of the service.</p> </li> <li> <p> <code>service-region</code> - The Region of the service.</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> <li> <p> <code>vpc-id</code> - The ID of the VPC in which the endpoint resides.</p> </li> <li> <p> <code>vpc-endpoint-id</code> - The ID of the endpoint.</p> </li> <li> <p> <code>vpc-endpoint-state</code> - The state of the endpoint (<code>pendingAcceptance</code> | <code>pending</code> | <code>available</code> | <code>deleting</code> | <code>deleted</code> | <code>rejected</code> | <code>failed</code>).</p> </li> <li> <p> <code>vpc-endpoint-type</code> - The type of VPC endpoint (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code> | <code>Resource</code> | <code>ServiceNetwork</code> | <code>Tunnel</code>).</p> </li> </ul>
        max_results: <p>The maximum number of items to return for this request. The request returns a token that you can specify in a subsequent call to get the next set of results.</p> <p>Constraint: If the value is greater than 1,000, we return only 1,000 items.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a prior call.)</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.describe_vpc_endpoints_request.DescribeVpcEndpointsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.describe_vpc_endpoints_result.DescribeVpcEndpointsResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_vpc_endpoints

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeVpcEndpoints")
    )
    input_: capo_ec2.types.describe_vpc_endpoints_request.DescribeVpcEndpointsRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if vpc_endpoint_ids is not None:
        input_["vpc_endpoint_ids"] = vpc_endpoint_ids
    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

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