- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
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 |
---|
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 |
Filters | Filter[] | undefined | The filters.
|
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 |
---|
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 |
---|
Name | Fault | Details |
---|---|---|
EC2ServiceException | Base exception class for all service exceptions from EC2 service. |