Updates endpoint groups under a listener in batches.
Operation description
Usage notes
- The UpdateEndpointGroups operation is asynchronous. The system returns a request ID, but the endpoint group configurations are not immediately updated. The update task continues to run in the background. You can invoke the DescribeEndpointGroup or ListEndpointGroups operation to query the status of the endpoint groups:
If the endpoint group is in the updating state, the endpoint group configurations are being updated. In this state, you can only execute query operations.
If the endpoint group is in the active state, the endpoint group configurations are updated.
The UpdateEndpointGroups operation does not support concurrent updates to endpoint group configurations within the same Alibaba Cloud Global Accelerator (GA) instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:UpdateEndpointGroups |
update |
*EndpointGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Alibaba Cloud Global Accelerator (GA) instance. Set the value to cn-hangzhou. |
cn-hangzhou |
| ClientToken |
string |
No |
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 ensure that it is unique among different requests. The client token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request is unique. |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
true |
| EndpointGroupConfigurations |
array<object> |
Yes |
The configurations of the endpoint groups. |
|
|
array<object> |
No |
The configurations of the endpoint groups. |
||
| EndpointGroupName |
string |
No |
The name of the endpoint group. The name must be 1 to 128 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or a Chinese character. |
group1 |
| EndpointGroupDescription |
string |
No |
The description of the endpoint group. The description can be up to 200 characters in length, and cannot start with http:// or https://. |
group1 |
| TrafficPercentage |
integer |
No |
The traffic percentage that is distributed to the endpoint group when the listener has multiple endpoint groups. Valid values: 1 to 100. |
20 |
| HealthCheckEnabled |
boolean |
No |
Specifies whether to enable health checks. Valid values:
|
true |
| HealthCheckIntervalSeconds |
integer |
No |
The interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. |
3 |
| HealthCheckPath |
string |
No |
The health check path. |
/healthcheck |
| HealthCheckPort |
integer |
No |
The port for health checks. Valid values: 1 to 65535. |
20 |
| HealthCheckProtocol |
string |
No |
The protocol for health checks. Valid values:
|
tcp |
| ThresholdCount |
integer |
No |
The number of consecutive health checks that are required to change the health check status. This refers to the number of consecutive failed health checks required to change the status from healthy to unhealthy, or the number of consecutive successful health checks required to change the status from unhealthy to healthy. Valid values: 2 to 10. |
3 |
| EndpointConfigurations |
array<object> |
No |
The configurations of the endpoints. |
|
|
object |
Yes |
The configurations of the endpoints. |
||
| Type |
string |
Yes |
The type of the endpoint. Valid values:
Note
Note
For more information, see Service-linked roles. |
Ip |
| Weight |
integer |
Yes |
The weight of the endpoint. Valid values: 0 to 255. Note
If the weight of an endpoint is set to 0, Global Accelerator stops distributing traffic to the endpoint. Proceed with caution. |
20 |
| Endpoint |
string |
Yes |
The IP address, domain name, or instance ID of the endpoint. Specify the value based on the endpoint type. |
47.0.XX.XX |
| SubAddress |
string |
No |
The private IP address of the elastic network interface (ENI). Note
|
172.168.XX.XX |
| EnableClientIPPreservation |
boolean |
No |
Specifies whether to enable client IP address preservation by using the automatic retrieval method. Valid values:
Note
|
|
| EnableProxyProtocol |
boolean |
No |
Specifies whether to enable client IP address preservation by using the Proxy Protocol. Valid values:
Note
|
|
| VpcId |
string |
No |
The ID of the virtual private cloud (VPC). You can specify at most one VPC ID for an endpoint group associated with an intelligent routing listener. Note
This parameter is required and takes effect only when the endpoint type is set to IpTarget. |
vpc-uf66oesmrqge1t2gs**** |
| VSwitchIds |
array |
No |
The vSwitches in the VPC. |
|
|
string |
No |
The ID of the vSwitch. You can specify at most two vSwitch IDs for an endpoint group associated with an intelligent routing listener. Note
This parameter is required and takes effect only when the endpoint type is set to IpTarget.
|
vsw-uf6r0due94mypz1i9**** |
|
| Provider |
string |
No |
The service provider of the endpoint configuration. |
BAILIAN |
| ApiKeys |
array |
No |
The API keys in the endpoint group configuration. |
|
|
string |
No |
The API keys in the endpoint group configuration. |
sk-******* |
|
| EndpointRequestProtocol |
string |
No |
The protocol for the backend service. Valid values:
Note
|
HTTP |
| EndpointProtocolVersion |
string |
No |
The version of the protocol for the backend service for the endpoint associated with an intelligent routing listener. Valid values:
Note
You can specify the version of the protocol for the backend service only when the EndpointRequestProtocol parameter is set to HTTPS. |
HTTP1.1 |
| PortOverrides |
array<object> |
No |
The port mappings. |
|
|
object |
No |
The port mappings. |
||
| ListenerPort |
integer |
No |
The listener port. Valid values: 1 to 65499. Note
|
443 |
| EndpointPort |
integer |
No |
The endpoint port. Valid values: 1 to 65499. |
80 |
| EnableClientIPPreservationToa |
boolean |
No |
Specifies whether to use the TCP Option Address (TOA) method to preserve the client IP address. Valid values:
|
false |
| EnableClientIPPreservationProxyProtocol |
boolean |
No |
Specifies whether to use the Proxy Protocol to preserve the client IP address. Valid values:
|
false |
| EndpointGroupId |
string |
Yes |
The endpoint group ID. |
ep-bp1d2utp8qqe2a44t**** |
| HealthCheckHost |
string |
No |
The domain name for health checks. |
www.taobao.com |
| EndpointIpVersion |
string |
No |
The IP version of the backend service. Valid values:
|
IPv4 |
| ProxyTunnel |
object |
No |
The proxy tunnel configuration. |
|
| ConnectAuthPrefix |
string |
No |
The proxy tunnel connection authentication prefix. |
prefix-auth |
| ConnectAuthSuffix |
string |
No |
The proxy tunnel connection authentication suffix. |
suffix-auth |
| ConnectSessionHashHdr |
string |
No |
The connection session hash header configuration. |
X-Session-Hash |
| ConnectTunnelTimeout |
integer |
No |
The proxy tunnel connection timeout period. |
5000 |
| TunnelServerPort |
integer |
No |
The tunnel server port. |
8443 |
| TunnelServerType |
string |
No |
The tunnel server type. |
domain |
| TunnelServer |
string |
No |
The tunnel server configuration. |
tunnel.example.com |
| HealthCheckMethod |
string |
No |
The health check method of the endpoint group. |
GET |
| HealthCheckSuccessCodes |
string |
No |
The success status codes for health checks. |
http_2xx,http_3xx |
| ListenerId |
string |
Yes |
The listener instance ID. |
lsr-bp1bpn0kn908w4nbw**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned information. |
||
| RequestId |
string |
The request ID. |
6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
| EndpointGroupIds |
array |
The list of endpoint group IDs. |
|
|
string |
The endpoint group ID. |
epg-bp1dmlohjjz4kqaun**** |
Examples
Success response
JSON format
{
"RequestId": "6FEA0CF3-D3B9-43E5-A304-D217037876A8",
"EndpointGroupIds": [
"epg-bp1dmlohjjz4kqaun****"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NoPermission.EnableHealthCheck | You do not have permission to enable health check. | The current account does not have the permissions to enable health checks. |
| 400 | NotExist.EndPointGroup | The endpoint group does not exist. | The endpoint group does not exist. |
| 400 | StateError.EndPointGroup | The specified state of endpoint group is invalid. | The endpoint group is in an invalid state. |
| 400 | NotExist.Listener | The listener does not exist. | The listener does not exist. |
| 400 | NotActive.Listener | The state of the listener is not active. | The listener is unstable. |
| 400 | NotExist.Accelerator | The accelerated instance does not exist. | The GA instance does not exist. |
| 400 | StateError.Accelerator | The state of the accelerated instance is invalid. | The status of the GA instance is invalid. |
| 400 | QuotaExceeded.EndPoint | The maximum number of endpoints is exceeded. | The maximum number of endpoints is exceeded. |
| 400 | NoPermission.VpcEndpoint | You are not authorized to perform the operation. | The user does not have permissions to create service linked roles. Contact the Alibaba Cloud account owner or the permission administrator to grant the current user AliyunGlobalAccelerationFullAccess or create custom permission policies for service linked role. The following content describes the detailed information about custom permission policies: ServiceName: vpcendpoint.ga.aliyuncs.com. Service linked role name: AliyunServiceRoleForGaVpc. Endpoint Permission: ram:CreateServiceLinkedRole. |
| 400 | EndPointRequestProtocolIllegal.EndpointGroup | endpoint group request protoco is illegal | |
| 400 | QuotaExceeded.PortOverride | The number of port override exceeds the limit. | The number of port override exceeds the limit. |
| 400 | NotExist.ListenerPort | listener port %s is not exist |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.