Skip to content

describe_vpc_endpoint_services

describe_vpc_endpoint_services(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    service_names: Optional[ValueStringList] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[Integer] = None,
    next_token: Optional[String] = None,
    service_regions: Optional[ValueStringList] = None,
) -> DescribeVpcEndpointServicesResult

Describes available services to which you can create a VPC endpoint.

When the service provider and the consumer have different accounts in multiple Availability Zones, and the consumer views the VPC endpoint service information, the response only includes the common Availability Zones. For example, when the service provider account uses us-east-1a and us-east-1c and the consumer uses us-east-1a and us-east-1b, the response includes the VPC endpoint services in the common Availability Zone, us-east-1a.

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.

  • service_names (Optional[ValueStringList], default: None ) –

    The service names.

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

    The filters.

    • owner - The ID or alias of the Amazon Web Services account that owns the service.

    • service-name - The name of the service.

    • service-region - The Region of the service.

    • service-type - The type of service (Interface | Gateway | GatewayLoadBalancer).

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

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

  • service_regions (Optional[ValueStringList], default: None ) –

    The service Regions.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def describe_vpc_endpoint_services(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    service_names: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = 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,
    service_regions: Optional[
        "capo_ec2.types.value_string_list.ValueStringList"
    ] = None,
) -> "capo_ec2.types.describe_vpc_endpoint_services_result.DescribeVpcEndpointServicesResult":
    """<p>Describes available services to which you can create a VPC endpoint.</p> <p>When the service provider and the consumer have different accounts in multiple Availability Zones, and the consumer views the VPC endpoint service information, the response only includes the common Availability Zones. For example, when the service provider account uses <code>us-east-1a</code> and <code>us-east-1c</code> and the consumer uses <code>us-east-1a</code> and <code>us-east-1b</code>, the response includes the VPC endpoint services in the common Availability Zone, <code>us-east-1a</code>.</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>
        service_names: <p>The service names.</p>
        filters: <p>The filters.</p> <ul> <li> <p> <code>owner</code> - The ID or alias of the Amazon Web Services account that owns the service.</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>service-type</code> - The type of service (<code>Interface</code> | <code>Gateway</code> | <code>GatewayLoadBalancer</code>).</p> </li> <li> <p> <code>supported-ip-address-types</code> - The IP address type (<code>ipv4</code> | <code>ipv6</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 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>
        service_regions: <p>The service Regions.</p>

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

    def _handler(
        req: "OperationRequest[capo_ec2.types.describe_vpc_endpoint_services_request.DescribeVpcEndpointServicesRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.describe_vpc_endpoint_services_result.DescribeVpcEndpointServicesResult"
    ]:
        import capo_ec2._operations.amazon_ec2.describe_vpc_endpoint_services

        output, http_response = (
            capo_ec2._operations.amazon_ec2.describe_vpc_endpoint_services.describe_vpc_endpoint_services(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeVpcEndpointServices")
    )
    input_: capo_ec2.types.describe_vpc_endpoint_services_request.DescribeVpcEndpointServicesRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if service_names is not None:
        input_["service_names"] = service_names
    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 service_regions is not None:
        input_["service_regions"] = service_regions

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output