Creates an endpoint service.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateVpcEndpointService

The operation that you want to perform. Set the value to CreateVpcEndpointService.

RegionId String Yes eu-west-1

The region ID of the endpoint service. You can call the DescribeRegions operation to query the most recent region list.

ClientToken String No 0c593ea1-3bea-11e9-b96b-88e9fe637760

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The ClientToken parameter can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to precheck this request. Valid values:

true: prechecks the API request. If you select this option, the specified endpoint service is not created after the request passes the precheck. The system checks whether the AccessKey pair is valid, whether the RAM user is authorized, and whether the required parameters are specified. If the request fails the precheck, the corresponding error message is returned. If the request passes the precheck, the DryRunOperation error code is returned.

false: sends the API request. After the request passes the check, a 2XX HTTP status code is returned, and the endpoint service is created. This is the default value.

ServiceDescription String No This is my EndpointService.

The description of the endpoint service.

AutoAcceptEnabled Boolean No false

Specifies whether to automatically accept endpoint connection requests. Valid values:

  • true: automatically accepts endpoint connection requests.
  • false: does not automatically accept endpoint connection requests. This is the default value.
Payer String No Endpoint

The payer of the endpoint service. Valid values:

  • Endpoint: the service user.
  • EndpointService: the service provider.
ZoneAffinityEnabled Boolean No true

Specifies whether to resolve domain names to the IP address of the nearest zone.

  • true: resolves domain names to the IP address of the nearest zone.
  • false: does not resolve domain names to the IP address of the nearest zone. This is the default value.
Resource.N.ResourceType String No slb

The type of service resource that is added to the endpoint service. Set the value to slb. You can only add Server Load Balancer (SLB) instances that support PrivateLink and are deployed in a virtual private networks (VPC).

Valid values of N: 1 to 20.

Note Only SLB instances that support PrivateLink and are deployed in a VPC can serve as service resources for endpoint services.
Resource.N.ResourceId String No lb-hp32z1wp5peaoox2q****

The ID of the service resource that is added to the endpoint service. Valid values of N: 1 to 20.

Response parameters

Parameter Type Example Description
AutoAcceptEnabled Boolean false

Indicates whether the endpoint service automatically accepts endpoint connection requests. Valid values:

  • true: automatically accepts endpoint connection requests.
  • false: does not automatically accept endpoint connection requests.
CreateTime String 2020-01-02T19:11:12Z

The time when the endpoint service was created.

RequestId String 8D8992C1-6712-423C-BAC5-E5E817484C6B

The ID of the request.

ServiceBusinessStatus String Normal

The business status of the endpoint service. Valid values:

  • Normal: normal
  • FinancialLocked: locked due to overdue payments
ServiceDescription String This is my EndpointService.

The description of the endpoint service.

ServiceDomain String epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com

The domain name of the endpoint service.

ServiceId String epsrv-hp3vpx8yqxblby3i****

The ID of the endpoint service.

ServiceName String com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****

The name of the endpoint service.

ServiceStatus String Active

The status of the endpoint service. Valid values:

  • Creating: The endpoint service is being created.
  • Pending: The endpoint service is being modified.
  • Active: The endpoint service is available.
  • Deleting: The endpoint service is being deleted.
  • Inactive: The endpoint service is unavailable.
ZoneAffinityEnabled Boolean true

Indicates whether to resolve domain names to the IP address of the nearest zone.

  • true: resolves domain names to the IP address of the nearest zone.
  • false: does not resolve domain names to the IP address of the nearest zone.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateVpcEndpointService
&RegionId=eu-west-1
&<Common request parameters>

Sample success responses

XML format

<CreateVpcEndpointServiceResponse>
  <ServiceBusinessStatus>Normal</ServiceBusinessStatus>
  <RequestId>8D8992C1-6712-423C-BAC5-E5E817484C6B</RequestId>
  <ServiceName>com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****</ServiceName>
  <ServiceStatus>Active</ServiceStatus>
  <ServiceDescription>This is my EndpointService.</ServiceDescription>
  <CreateTime>2020-01-02T19:11:12Z</CreateTime>
  <ServiceDomain>epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com</ServiceDomain>
  <ZoneAffinityEnabled>true</ZoneAffinityEnabled>
  <AutoAcceptEnabled>false</AutoAcceptEnabled>
  <ServiceId>epsrv-hp3vpx8yqxblby3i****</ServiceId>
</CreateVpcEndpointServiceResponse>

JSON format

{
    "ServiceBusinessStatus": "Normal",
    "RequestId": "8D8992C1-6712-423C-BAC5-E5E817484C6B",
    "ServiceName": "com.aliyuncs.privatelink.cn-huhehaote.epsrv-hp3vpx8yqxblby3i****",
    "ServiceStatus": "Active",
    "ServiceDescription": "This is my EndpointService.",
    "CreateTime": "2020-01-02T19:11:12Z",
    "ServiceDomain": "epsrv-hp3vpx8yqxblby3i****.cn-huhehaote.privatelink.aliyuncs.com",
    "ZoneAffinityEnabled": true,
    "AutoAcceptEnabled": false,
    "ServiceId": "epsrv-hp3vpx8yqxblby3i****"
}

Error codes

HttpCode Error code Error message Description
400 EndpointServiceExist The specified Endpoint Service already exists. The error message returned because the specified endpoint service already exists.
400 AlbNotFound The specified Alb does not exist. The error message returned because the specified Application Load Balancer (ALB) instance does not exist.
400 LoadBalancerNotFound The specified load balancer does not exist. The error message returned because the specified Server Load Balancer (SLB) instance does not exist.
400 LoadBalancerNotSupportPrivateLink The specified SLB does not support PrivateLink. The error message returned because the specified SLB instance does not support PrivateLink.
400 GenerateResourceIdFailed Failed to generate ResourceId. The error message returned because the system failed to generate the resource ID.
400 QuotaMisMatched The resource you applied for has exceeded the quota. The error message returned because the requested amount of resources has exceeded the quota.
400 VSwitchNotFound The specified VSwitch does not exist. The error message returned because the specified vSwitch is not found.
400 EndpointServicePayerForbidden The parameter EndpointServicePayer is forbidden. The user is not in the whitelist. The error message returned because the payer of the endpoint service is not in the whitelist.
400 NeedOpenProduct The product is not activated. The error message returned because the service is not activated.
400 EndpointServiceNotSupportedZone The specified endpoint service does not support the zone. The error message returned because the zone is unavailable for the endpoint service.

For a list of error codes, visit the API Error Center.