Updates the configuration of an endpoint group.
Operation description
- The UpdateEndpointGroup API is an asynchronous API. After you call this API, the system returns a request ID and starts the update in the background; the configuration is not modified immediately. Call DescribeEndpointGroup to check the status of the endpoint group:
If an endpoint group is in the updating status, its configuration is being modified, and you can only perform queries.
If an endpoint group is in the active status, the update is complete.
The UpdateEndpointGroup API does not support concurrent updates to 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 ID of the region where the Global Accelerator instance is deployed. Set the value to cn-hangzhou. |
cn-hangzhou |
| ClientToken |
string |
No |
A client-generated token to ensure the idempotence of the request. The token must be unique across requests and 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 is unique for each API 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 long, 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 long 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 the listener is associated with multiple endpoint groups. |
20 |
| HealthCheckIntervalSeconds |
integer |
No |
The interval between health checks, in seconds. Valid values: 1 to 50. |
3 |
| HealthCheckPath |
string |
No |
The path for health checks. |
/healthcheck |
| HealthCheckPort |
integer |
No |
The port used for health checks. Valid values: 1 to 65535. |
20 |
| HealthCheckProtocol |
string |
No |
The protocol for health checks. Valid values:
|
HTTPS |
| ThresholdCount |
integer |
No |
The number of consecutive successful or failed health checks required to change an endpoint's health status. 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 endpoint. Valid values:
Note
Note
For more information, see service-linked roles. |
Ip |
| EnableClientIPPreservation |
boolean |
No |
Specifies whether to preserve client source 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. Proceed with caution. |
20 |
| EnableProxyProtocol |
boolean |
No |
Specifies whether to use the Proxy Protocol to preserve client source IP addresses. Valid values:
Note
|
false |
| Endpoint |
string |
Yes |
Enter an IP address, a domain name, or an instance ID based on the value of the |
120.XX.XX.21 |
| SubAddress |
string |
No |
The private IP address of the elastic network interface. Note
If the endpoint type is ENI, you can specify this parameter. If you omit 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 at most one VPC ID for an endpoint group that is associated with an intelligent routing listener. Note
This parameter is required only when the endpoint type is IpTarget. |
vpc-2zen6t0u7xhm0k5iz**** |
| VSwitchIds |
array |
No |
A list of vSwitches in the VPC. |
|
|
string |
No |
The vSwitch ID. You can specify at most two vSwitch IDs for an endpoint group that is associated with an intelligent routing listener. Note
This parameter is required only when the endpoint type is IpTarget.
|
vsw-2ze2dbtkxabpvpqxc**** |
|
| Provider |
string |
No |
BAILIAN |
|
| ApiKeys |
array |
No |
||
|
string |
No |
sk-****** |
||
| EndpointRequestProtocol |
string |
No |
The backend service protocol. Valid values:
Note
|
HTTP |
| EndpointProtocolVersion |
string |
No |
The version of the backend service protocol. Valid values:
Note
You can configure this parameter only when |
HTTP1.1 |
| PortOverrides |
array<object> |
No |
The port override settings. |
|
|
object |
No |
The port override settings. |
||
| ListenerPort |
integer |
No |
The listener port in the port override settings. Note
|
443 |
| EndpointPort |
integer |
No |
The endpoint port in the port override settings. |
80 |
| HealthCheckEnabled |
boolean |
No |
Specifies whether to enable health checks. Valid values:
|
true |
| HealthCheckHost |
string |
No |
The domain name for the health check. |
www.taobao.com |
| EndpointIpVersion |
string |
No |
Specifies the IP protocol that Global Accelerator uses to communicate with endpoints. Valid values: ● IPv4 (default): Use IPv4. ● IPv6: Use IPv6. ● ProtocolAffinity: Use the same IP protocol as the client request. |
IPv4 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned in the response. |
||
| 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.