Removes a service resource from 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 DetachResourceFromVpcEndpointService

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

RegionId String Yes cn-hangzhou

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

ResourceType String Yes slb

The type of the service resource.

Set the value to slb, which specifies that the service resource is a Classic Load Balancer (CLB) instance that supports PrivateLink. In addition, the CLB instance is deployed in a virtual private cloud (VPC).

ResourceId String Yes lb-hp32z1wp5peaoox2q****

The ID of the service resource.

ServiceId String Yes epsrv-hp3vpx8yqxblby3i****

The ID of the endpoint service from which you want to remove the service resource.

DryRun Boolean No false

Specifies whether to only precheck this request. Valid values:

  • true: only prechecks the request without performing the operation. The system checks whether your AccessKey pair is valid, whether the Resource Access Management (RAM) user is authorized, and whether required parameters are set. 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.
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.

Response parameters

Parameter Type Example Description
RequestId String 0ED8D006-F706-4D23-88ED-E11ED28DCAC0

The ID of the request.

Examples

Sample requests

https://[Endpoint]/?Action=DetachResourceFromVpcEndpointService
&RegionId=cn-hangzhou
&ResourceId=lb-hp32z1wp5peaoox2q****
&ResourceType=slb
&ServiceId=epsrv-hp3vpx8yqxblby3i****
&<Common request parameters>

Sample success responses

XML format

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

<DetachResourceFromVpcEndpointServiceResponse>
    <RequestId>0ED8D006-F706-4D23-88ED-E11ED28DCAC0</RequestId>
</DetachResourceFromVpcEndpointServiceResponse>

JSON format

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

{
  "RequestId" : "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}

Error codes

HttpCode Error code Error message Description
400 EndpointServiceNotFound The specified Service does not exist. The error message returned because the specified endpoint service does not exist.
400 EndpointServiceConnectionDependence You cannot delete EndpointService with Endpoint connected. The error message returned because you cannot delete an endpoint service with which an endpoint is associated.
400 EndpointServiceResourceNotFound The specified service resource is not found. The error message returned because the specified service resource for the endpoint service is not found.

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