DescribeVpcEndpointServicesCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, DescribeVpcEndpointServicesCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, DescribeVpcEndpointServicesCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // DescribeVpcEndpointServicesRequest
  DryRun: true || false,
  ServiceNames: [ // ValueStringList
    "STRING_VALUE",
  ],
  Filters: [ // FilterList
    { // Filter
      Name: "STRING_VALUE",
      Values: [
        "STRING_VALUE",
      ],
    },
  ],
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
  ServiceRegions: [
    "STRING_VALUE",
  ],
};
const command = new DescribeVpcEndpointServicesCommand(input);
const response = await client.send(command);
// { // DescribeVpcEndpointServicesResult
//   ServiceNames: [ // ValueStringList
//     "STRING_VALUE",
//   ],
//   ServiceDetails: [ // ServiceDetailSet
//     { // ServiceDetail
//       ServiceName: "STRING_VALUE",
//       ServiceId: "STRING_VALUE",
//       ServiceType: [ // ServiceTypeDetailSet
//         { // ServiceTypeDetail
//           ServiceType: "Interface" || "Gateway" || "GatewayLoadBalancer",
//         },
//       ],
//       ServiceRegion: "STRING_VALUE",
//       AvailabilityZones: [
//         "STRING_VALUE",
//       ],
//       Owner: "STRING_VALUE",
//       BaseEndpointDnsNames: [
//         "STRING_VALUE",
//       ],
//       PrivateDnsName: "STRING_VALUE",
//       PrivateDnsNames: [ // PrivateDnsDetailsSet
//         { // PrivateDnsDetails
//           PrivateDnsName: "STRING_VALUE",
//         },
//       ],
//       VpcEndpointPolicySupported: true || false,
//       AcceptanceRequired: true || false,
//       ManagesVpcEndpoints: true || false,
//       PayerResponsibility: "ServiceOwner",
//       Tags: [ // TagList
//         { // Tag
//           Key: "STRING_VALUE",
//           Value: "STRING_VALUE",
//         },
//       ],
//       PrivateDnsNameVerificationState: "pendingVerification" || "verified" || "failed",
//       SupportedIpAddressTypes: [ // SupportedIpAddressTypes
//         "ipv4" || "ipv6",
//       ],
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

DescribeVpcEndpointServicesCommand Input

Parameter
Type
Description
DryRun
boolean | undefined

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
Filter[] | undefined

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.

MaxResults
number | undefined

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.

NextToken
string | undefined

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

ServiceNames
string[] | undefined

The service names.

ServiceRegions
string[] | undefined

The service Regions.

DescribeVpcEndpointServicesCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
NextToken
string | undefined

The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

ServiceDetails
ServiceDetail[] | undefined

Information about the service.

ServiceNames
string[] | undefined

The supported services.

Throws

Name
Fault
Details
EC2ServiceException
Base exception class for all service exceptions from EC2 service.