Modifies the service resource of 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 UpdateVpcEndpointServiceResourceAttribute

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

RegionId String Yes cn-hangzhou

The ID of the region where the service resource that you want to modify is deployed.

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: only prechecks the API 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 request. If the request passes the precheck, a 2xx HTTP status code is returned and the service resource is modified.
ServiceId String Yes epsrv-hp3vpx8yqxblby3i****

The ID of the endpoint service.

ResourceId String Yes lb-hp32z1wp5peaoox2q****

The ID of the service resource.

AutoAllocatedEnabled Boolean Yes true

Specifies whether to allow automatic resource allocation. Valid values:

  • true: yes
  • false: no

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateVpcEndpointServiceResourceAttribute
&RegionId=cn-hangzhou
&ServiceId=epsrv-hp3vpx8yqxblby3i****
&ResourceId=lb-hp32z1wp5peaoox2q****
&AutoAllocatedEnabled=true
&Common request parameters

Sample success responses

XML format

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

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

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 EndpointServiceLocked The specified Service is locked. The error message returned because the endpoint service is locked.
400 EndpointServiceOperationDenied The specified operation of endpoint service is not allowed. The error message returned because the operation is not allowed when the endpoint service is being processed.
400 EndpointServiceResourceNotFound The specified service resource is not found. The error message returned because the specified service resource of the endpoint service is not found.
400 ResourceAutoAllocateViolation The specified endpoint service must have at least one automatically allocated resource in one zone. The error message returned because a zone must contain at least one resource that supports automatic resource allocation.

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