Modifying a VPC endpoint service
Function
Function This API is used to modify a VPC endpoint service.
URI
PUT /v1/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
vpc_endpoint_service_id |
Yes |
String |
Specifies the ID of the VPC endpoint service. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
Yes |
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. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
approval_enabled |
No |
Boolean |
Specifies whether approval is required. ● false: No approval is required. The created VPC endpoint is in the accepted state by default. ● true: Approval is required. The created endpoint connection can be used only after being approved by the user of the VPC endpoint service. The default value is true. Default: true |
service_name |
No |
String |
Specifies the name of the VPC endpoint service. The name can contain a maximum of 16 characters, including letters, digits, underscores (_), and hyphens (-). Minimum: 0 Maximum: 16 |
ports |
No |
Array of PortList objects |
Specifies the port mappings opened by the VPC endpoint service. Duplicate port mappings are not allowed in the same VPC endpoint service. If multiple VPC endpoint services share one port ID, the combinations of server ports and protocols for all port mappings between VPC endpoint services must be unique.A maximum of 200 port mappings can be added at a time. |
port_id |
No |
String |
Specifies the ID of the backend resource of the VPC endpoint service. The ID is in the universally unique identifier (UUID) format. The options are as follows: ● Load balancer: Specifies the port ID of the private IP address of the shared load balancer. For details, see the vip_port_id field in the response parameters of section "Viewing Details of a Load Balancer" in the Elastic Load Balance API Reference. ● Virtual machine: Specifies the NIC ID of the ECS IP address. For details, see the port_id field in the response parameters of the section "Querying NICs of an ECS" in the Elastic Cloud Server API Reference. ● Virtual IP address: Specifies the NIC ID of the physical server where the virtual resource is located. Note: If the backend resource is a load balancer, configure this parameter to the vip_port_id value of another load balancer of the same type. For example, if the original load balancer is the shared one, the new load balancer cannot be the dedicated one. |
vip_port_id |
No |
String |
NIC ID of the virtual IP address. Minimum: 1 Maximum: 64 |
description |
No |
String |
Specifies the description field. The value can contain characters such as letters and digits, but cannot contain less than signs (<) and great than signs (>). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
client_port |
No |
Integer |
Specifies the port to be accessed by a VPC endpoint. This port is provided by the VPC endpoint, allowing you to access the VPC endpoint service. Supported range: 1 to 65535. Minimum: 1 Maximum: 65535 |
server_port |
No |
Integer |
Specifies the port for accessing the VPC endpoint service. This port is associated with backend resources to provide VPC endpoint services. Supported range: 1 to 65535 Minimum: 1 Maximum: 65535 |
protocol |
No |
String |
Port mapping protocol. TCP is supported. Default: TCP |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the unique ID of the VPC endpoint service. |
port_id |
String |
Specifies the ID of the backend resource of the VPC endpoint service. The ID is in the universally unique identifier (UUID) format. The options are as follows: ● Load balancer: Specifies the port ID of the private IP address of the shared load balancer. ● Virtual machine: Specifies the NIC ID of the ECS IP address. ● Virtual IP address: Specifies the NIC ID of the physical server where the virtual resource is located. |
vip_port_id |
String |
Specifies the ID of the virtual NIC to which the virtual IP address is bound. This parameter is returned only when port_id is set to VIP. |
service_name |
String |
Specifies the name of the VPC endpoint service. Minimum: 0 Maximum: 128 |
server_type |
String |
Specifies the resource type. ● VM: indicates a cloud server. ● VIP: indicates a virtual IP address. ● LB: indicates a shared load balancer. |
vpc_id |
String |
Specifies the ID of the VPC to which the backend resource of the VPC endpoint service belongs. |
pool_id |
String |
Specifies the cluster ID of the VPC endpoint service. |
approval_enabled |
Boolean |
Specifies whether approval is required. ● false: No approval is required. The created VPC endpoint is in the accepted state by default. ● true: Approval is required. The created VPC endpoint is in the pendingAcceptance state, and can be used only after being approved by the user of the VPC endpoint service. |
status |
String |
Specifies the status of the VPC endpoint service. ● creating: The VPC endpoint service is being created. ● available: The VPC endpoint service can be connected. ● failed: The VPC endpoint service fails to be created. |
service_type |
String |
Specifies the type of the VPC endpoint service. There are two types of VPC endpoint services: interface and gateway. ● gateway: VPC endpoint services of this type are configured by O&M personnel. You can use them directly without creating them by yourselves. ● interface: Cloud services configured by O&M personnel and private services created by yourselves are included. Cloud services configured by O&M personnel do not need to be created. You can use it directly. You can create a VPC endpoint for accessing gateway and interface VPC endpoint services. |
created_at |
String |
Specifies the creation time of the VPC endpoint service. The applied UTC time format is YYYY-MMDDTHH:MM:SSZ. |
updated_at |
String |
Specifies the update time of the VPC endpoint service. The applied UTC time format is YYYY-MMDDTHH:MM:SSZ. |
project_id |
String |
Project ID |
cidr_type |
String |
Specifies the CIDR block type. ● public: indicates a public CIDR block. ● internal: indicates a private CIDR block. The default value is internal. |
ports |
Array of PortList objects |
Specifies the port mappings opened by the VPC endpoint service. Duplicate port mappings are not allowed in the same VPC endpoint service. If multiple VPC endpoint services share one port ID,the combinations of server ports and protocols for all port mappings between VPC endpoint services must be unique. |
tcp_proxy |
String |
Specifies whether the client information, such as IP address, port number, and marker_id, is transmitted to the server. The following methods are supported: ● TCP TOA: transmits the client information inserted in the tcp option field to the server. Note: TCP TOA is supported only when the backend resource type is Object Storage Service (OBS). ● Proxy Protocol: transmits the client information inserted in the tcp payload field to the server. tcp_proxy is available only when the server can parse fields tcp option and tcp payload. The values are as follows: ● close: indicates that the proxy protocol is disabled. ● toa_open: indicates that the proxy protocol tcp_toa is enabled. ● proxy_open: indicates that the proxy protocol proxy_protocol is enabled. ● open: indicates that both tcp_toa and proxy_protocol are enabled. The default value is close. |
tags |
Array of TagList objects |
Resource tag list |
description |
String |
Specifies the description field. The value can contain characters such as letters and digits, but cannot contain less than signs (<) and great than signs (>). |
Parameter |
Type |
Description |
---|---|---|
client_port |
Integer |
Specifies the port to be accessed by a VPC endpoint. This port is provided by the VPC endpoint, allowing you to access the VPC endpoint service. Supported range: 1 to 65535. Minimum: 1 Maximum: 65535 |
server_port |
Integer |
Specifies the port for accessing the VPC endpoint service. This port is associated with backend resources to provide VPC endpoint services. Supported range: 1 to 65535 Minimum: 1 Maximum: 65535 |
protocol |
String |
Port mapping protocol. TCP is supported. Default: TCP |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Specifies the tag key. A tag key contains a maximum of 36 Unicode characters. It cannot be left blank. It cannot contain equal signs (=), asterisks (*), less than signs (<), greater than signs (>), backslashes (), commas (,), vertical bars (|), and slashes (/), and the first and last characters cannot be spaces. Minimum: 1 Maximum: 36 |
value |
String |
Specifies the tag key. A tag value contains a maximum of 43 Unicode characters and can be an empty string. It cannot contain equal signs (=), asterisks (*), less than signs(<), greater than signs (>), backslashes (), commas (,), vertical bars (|), and slashes (/), and the first and last characters cannot be spaces. Minimum: 1 Maximum: 43 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 405
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 406
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 407
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 408
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 409
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 501
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 502
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Parameter |
Type |
Description |
---|---|---|
message |
String |
Task error description |
code |
String |
Error code of a task exception. |
Status code: 504
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Specifies the error message returned when a task submission exception occurs. |
Example Requests
PUT https://{endpoint}/v1/{project_id}/vpc-endpoint-services/4189d3c2-8882-4871-a3c2- d380272eed88 { "approval_enabled" : true, "service_name" : "test", "ports" : [ { "client_port" : 8081, "server_port" : 22, "protocol" : "TCP" }, { "client_port" : 8082, "server_port" : 23, "protocol" : "TCP" } ] }
Example Responses
Status code: 200
The server has successfully processed the request.
{ "id" : "4189d3c2-8882-4871-a3c2-d380272eed83", "port_id" : "4189d3c2-8882-4871-a3c2-d380272eed88", "vpc_id" : "4189d3c2-8882-4871-a3c2-d380272eed80", "pool_id" : "5289d3c2-8882-4871-a3c2-d380272eed80", "status" : "available", "approval_enabled" : false, "service_name" : "test123", "service_type" : "interface", "server_type" : "VM", "project_id" : "6e9dfd51d1124e8d8498dce894923a0d", "created_at" : "2022-04-14T09:35:47Z", "ports" : [ { "client_port" : 8080, "server_port" : 90, "protocol" : "TCP" }, { "client_port" : 8081, "server_port" : 80, "protocol" : "TCP" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
The server has successfully processed the request. |
400 |
The request could not be understood by the server due to malformed syntax. |
401 |
The requested page requires a user name and password. |
403 |
The server understood the request, but is refusing to fulfill it. |
404 |
The requested page was not found. |
405 |
The method specified in the request line is not allowed for the resource identified by the request URI. |
406 |
The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request. |
407 |
The client must first authenticate itself with the proxy. |
408 |
The client did not produce a request within the time that the server was prepared to wait. |
409 |
The request could not be completed due to a conflict with the current state of the resource. |
500 |
Failed to complete the request. Service abnormality. |
501 |
Failed to complete the request. The server does not support the requested function. |
502 |
Failed to complete the request. because the server has received an invalid response. |
503 |
Failed to complete the request. because the system is unavailable. |
504 |
Gateway Timeout |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.