Help Center/ VPC Endpoint/ API Reference/ API/ VPC Endpoint Services/ Adding Backend Resources to a VPC Endpoint Service
Updated on 2025-11-20 GMT+08:00

Adding Backend Resources to a VPC Endpoint Service

Function

This API is used to add backend resources to a VPC endpoint service.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v2/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id}/add-server-resources

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

vpc_endpoint_service_id

Yes

String

Specifies ID of the VPC endpoint service.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. The token can be obtained by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

No

String

Specifies the MIME type of the request body. Default value application/json is recommended. For APIs used to upload objects or images, the MIME type varies depending on the flow type.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

server_resources

Yes

Array of ServerResource objects

Specifies the load balancer IDs and AZs.

Table 4 ServerResource

Parameter

Mandatory

Type

Description

resource_id

Yes

String

Specifies the load balancer ID.

availability_zone_id

No

String

Specifies the ID of the AZ where the load balancer is located.

Response Parameters

Status code: 204

Request processed.

None

Example Requests

Adding load balancers to a VPC endpoint service

POST https://{endpoint}/v2/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id}/add-server-resources

{
  "server_resources" : [ {
    "resource_id" : "20872649-163e-4302-83be-8ff6e31d9ab9",
    "availability_zone_id" : "xx-xxxxx-xxx"
  } ]
}

Example Responses

None

Status Codes

Status Code

Description

204

Request processed.

Error Codes

See Error Codes.