Removes a service resource from an endpoint service.
Operation description
-
Before you remove a service resource from an endpoint service, make sure that the endpoint service is in the Active status. Call the GetVpcEndpointServiceAttribute operation to query the status of the endpoint service.
-
The DetachResourceFromVpcEndpointService operation does not support the concurrent removal of service resources from the same endpoint service instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
privatelink:DetachResourceFromVpcEndpointService |
update |
*VpcEndpointService
LoadBalancer
LoadBalancer
LoadBalancer
NatGateway
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the endpoint service is deployed. Call the DescribeRegions operation to get a region ID. |
cn-hangzhou |
| ResourceType |
string |
No |
The type of the service resource.
|
slb |
| ResourceId |
string |
Yes |
The ID of the service resource. |
lb-hp32z1wp5peaoox2q**** |
| ZoneId |
string |
No |
The ID of the zone. This parameter is required if the service resource is an ALB, a NLB, or a GWLB. Call the DescribeRegions operation to get a zone ID. |
cn-hangzhou-c |
| ServiceId |
string |
Yes |
The ID of the endpoint service from which you want to remove the service resource. |
epsrv-hp3vpx8yqxblby3i**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. Generate a unique token for each request. The token can contain only ASCII characters. |
0c593ea1-3bea-11e9-b96b-88e9fe637760 |
| RegionId |
string |
Yes |
The ID of the region where the endpoint service is deployed. Call the DescribeRegions operation to get a region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
0ED8D006-F706-4D23-88ED-E11ED28DCAC0 |
Examples
Success response
JSON format
{
"RequestId": "0ED8D006-F706-4D23-88ED-E11ED28DCAC0"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | EndpointServiceNotFound | The specified Service does not exist. | The specified Service does not exist. |
| 400 | EndpointServiceResourceNotFound | The specified service resource is not found. | |
| 400 | EndpointServiceResourceCannotRemove | The service resource cannot be removed. | |
| 400 | EndpointServiceConnectionDependence | You cannot delete EndpointService with Endpoint connected. | Cannot delete an EndpointService with Endpoint connected. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.