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 cn-huhehaote

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 token can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No false

Specifies whether to only precheck this request. Valid values:

  • true: prechecks the request without creating the resource. The system prechecks the required parameters, request syntax, and limits. If the request fails to pass the precheck, an error code is returned. If the request passes the precheck, the DryRunOperation error code is returned.
  • false (default): sends the API request. If the request passes the precheck, a 2xx HTTP status code is returned and the operation is performed.
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: yes
  • false (default): no
Payer String No Endpoint

The payer. Valid values:

  • Endpoint: the service consumer
  • EndpointService: the service provider
ZoneAffinityEnabled Boolean No false

Specifies whether to enable zone affinity. Valid values:

  • true: yes
  • false (default): no
ServiceResourceType String No slb

The type of the service resource.

Set the value to slb, which specifies the Classic Load Balancer (CLB) type.

Resource.N.ResourceType String No slb

The type of the service resource added to the endpoint service. Set the value to slb. Valid values of N: 1 to 20.

Note In regions where PrivateLink is supported, CLB instances in virtual private clouds (VPCs) can serve as service resources of the endpoint service. For more information, see Internal-facing CLB supports PrivateLink.
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
ServiceBusinessStatus String Normal

The business status of the endpoint service. Valid values:

  • Normal: normal
  • FinacialLocked: locked due to overdue payments
RequestId String 8D8992C1-6712-423C-BAC5-E5E817484C6B

The ID of the request.

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: being created
  • Pending: being modified
  • Active: available
  • Deleting: being deleted
  • Inactive: unavailable
ServiceDescription String This is my EndpointService.

The description of the endpoint service.

CreateTime String 2020-01-02T19:11:12Z

The time when the endpoint service was created.

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

The domain name of the endpoint service.

ZoneAffinityEnabled Boolean false

Indicates whether zone affinity is enabled. Valid values:

  • true: yes
  • false: no
AutoAcceptEnabled Boolean false

Indicates whether endpoint connection requests are automatically accepted. Valid values:

  • true: yes
  • false: no
ServiceId String epsrv-hp3vpx8yqxblby3i****

The ID of the endpoint service.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateVpcEndpointService

&RegionId=cn-huhehaote

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<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>false</ZoneAffinityEnabled>
    <AutoAcceptEnabled>false</AutoAcceptEnabled>
    <ServiceId>epsrv-hp3vpx8yqxblby3i****</ServiceId>
</CreateVpcEndpointServiceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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" : false,
  "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 CLB instance does not exist.
400 LoadBalancerNotSupportPrivateLink The specified SLB does not support PrivateLink. The error message returned because the specified CLB 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 reached the upper limit.
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 endpoint service is not supported in the zone.
400 IllegalParamFormat.%s The param format of %s is illegal. The error message returned because the specified format %s is invalid. Specify a valid value and try again.
400 MissingParam.%s The param of %s is missing. The error message returned because the %s parameter is not set.
400 ResourceNotFound.NatGateway The specified resource %s is not found. The error message returned because the specified resource %s does not exist.
400 Mismatch.ResourceType The %s is mismatched for %s and %s. The error message returned because %s does not correspond to %s and %s.

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