Modifies the configurations of an endpoint group.
Operation description
- UpdateEndpointGroup is an asynchronous operation. After you send a request, the system returns a request ID, but the operation continues to run in the background. You can call DescribeEndpointGroup to query the state of an endpoint group:
If the endpoint group is in the updating state, its configurations are being modified. In this state, you can only perform query operations.
If the endpoint group is in the active state, its configurations have been modified.
You cannot concurrently call UpdateEndpointGroup to modify the configurations of endpoint groups in the same Global Accelerator instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:UpdateEndpointGroup |
update |
*EndpointGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Global Accelerator 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. Generate a parameter value from your client to make sure that the value is unique among different requests. The token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the RequestId of the request as the ClientToken. The RequestId may be different for each request. |
123e4567-e89b-12d3-a456-426655440000 |
| EndpointGroupId |
string |
Yes |
The ID of the endpoint group. |
epg-bp1dmlohjjz4kqaun**** |
| Name |
string |
No |
The name of the endpoint group. The name must be 1 to 128 characters in length, start with a letter or a Chinese character, and can contain digits, periods (.), underscores (_), and hyphens (-). |
group1 |
| Description |
string |
No |
The description of the endpoint group. The description can be up to 200 characters in length and cannot start with |
EndpointGroup |
| EndpointGroupRegion |
string |
Yes |
The ID of the region where the endpoint group is deployed. |
cn-hangzhou |
| TrafficPercentage |
integer |
No |
The weight of the endpoint group. When a listener is associated with multiple endpoint groups, traffic is distributed to the endpoint groups based on their weights. |
20 |
| HealthCheckIntervalSeconds |
integer |
No |
The interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. |
3 |
| HealthCheckPath |
string |
No |
The path for health checks. |
/healthcheck |
| HealthCheckPort |
integer |
No |
The port that is used for health checks. Valid values: 1 to 65535. |
20 |
| HealthCheckProtocol |
string |
No |
The protocol that is used for health checks. Valid values:
|
HTTPS |
| ThresholdCount |
integer |
No |
The number of consecutive health check failures that must occur before a healthy endpoint is considered unhealthy, or the number of consecutive health check successes that must occur before an unhealthy endpoint is considered healthy. Valid values: 2 to 10. |
3 |
| EndpointConfigurations |
array<object> |
No |
The configurations of the endpoints. |
|
|
object |
No |
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 |
| EnableClientIPPreservation |
boolean |
No |
Specifies whether to preserve client IP addresses. Valid values:
Note
|
false |
| Weight |
integer |
Yes |
The weight of the endpoint. Valid values: 0 to 255. Note
If you set the weight of an endpoint to 0, Global Accelerator stops distributing traffic to the endpoint. Handle this with care. |
20 |
| EnableProxyProtocol |
boolean |
No |
Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values:
Note
|
false |
| Endpoint |
string |
Yes |
The IP address, domain name, or instance ID of the endpoint, based on the value of Type. |
120.XX.XX.21 |
| SubAddress |
string |
No |
The private IP address of the ENI. Note
This parameter is available only when the endpoint type is ENI. If you do not specify this parameter, the primary private IP address of the ENI is used. |
172.168.XX.XX |
| VpcId |
string |
No |
The ID of the VPC. You can specify up to one VPC ID for an endpoint group that is associated with a listener that uses smart routing. Note
This parameter is required and takes effect only when the endpoint type is IpTarget. |
vpc-2zen6t0u7xhm0k5iz**** |
| VSwitchIds |
array |
No |
The vSwitches in the VPC. |
|
|
string |
No |
The ID of the vSwitch. You can specify up to two vSwitch IDs for an endpoint group that is associated with a listener that uses smart routing. Note
This parameter is required and takes effect only when the endpoint type is IpTarget.
|
vsw-2ze2dbtkxabpvpqxc**** |
|
| EndpointRequestProtocol |
string |
No |
The protocol of the backend service. Valid values:
Note
|
HTTP |
| EndpointProtocolVersion |
string |
No |
The version of the backend service protocol. Valid values:
Note
This parameter is available only when EndpointRequestProtocol is set to HTTPS. |
HTTP1.1 |
| PortOverrides |
array<object> |
No |
The port mapping. |
|
|
object |
No |
The port mapping. |
||
| ListenerPort |
integer |
No |
The listener port that is mapped to the endpoint port. Note
|
443 |
| EndpointPort |
integer |
No |
The endpoint port to which the listener port is mapped. |
80 |
| HealthCheckEnabled |
boolean |
No |
Specifies whether to enable the health check feature. Valid values:
|
true |
| HealthCheckHost |
string |
No |
The domain name that is used for health checks. |
www.taobao.com |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| RequestId |
string |
The ID of the request. |
6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
Examples
Success response
JSON format
{
"RequestId": "6FEA0CF3-D3B9-43E5-A304-D217037876A8\t"
}
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.