Modifies the configurations of an endpoint group.
Description
- UpdateEndpointGroup is an asynchronous operation. After you send a request, the system returns a request
ID, but the operation is still being performed in the system background. You can call
the DescribeEndpointGroup operation to query the state of an endpoint group.
- If the endpoint group is in the updating state, it indicates that the configurations of the endpoint group are being modified. In this case, you can perform only query operations.
- If the endpoint group is in the active state, it indicates that the configurations of the endpoint group are modified.
- The UpdateEndpointGroup operation cannot be repeatedly called for the same Global Accelerator (GA) instance within a specific period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateEndpointGroup |
The operation that you want to perform. Set the value to UpdateEndpointGroup. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 |
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 make sure that it is unique among all requests. ClientToken can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
|
EndpointGroupId | String | Yes | epg-bp1dmlohjjz4kqaun**** |
The ID of the endpoint group. |
Name | String | No | group1 |
The name of the endpoint group. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. |
Description | String | No | EndpointGroup |
The description of the endpoint group. The description cannot exceed 256 characters in length and cannot contain |
EndpointGroupRegion | String | Yes | cn-hangzhou |
The ID of the region where the endpoint group is created. |
TrafficPercentage | Integer | No | 20 |
The weight of the endpoint group when the listener is associated with multiple endpoint groups. |
HealthCheckIntervalSeconds | Integer | No | 3 |
The interval between two consecutive health checks. Unit: seconds. Valid values: 1 to 50. |
HealthCheckPath | String | No | /healthcheck |
The path to which health check requests are sent. |
HealthCheckPort | Integer | No | 20 |
The port that is used for health checks. Valid values: 1 to 65535. |
HealthCheckProtocol | String | No | tcp |
The protocol over which health check requests are sent. Valid values:
|
ThresholdCount | Integer | No | 3 |
The number of consecutive health check failures that must occur before a healthy endpoint group is considered unhealthy, or the number of consecutive health check successes that must occur before an unhealthy endpoint group is considered healthy. Valid values: 2 to 10. |
EndpointConfigurations.N.Type | String | Yes | Ip |
The type of the endpoint. Valid values:
Note
For more information, see Service-linked roles. |
EndpointConfigurations.N.EnableClientIPPreservation | Boolean | No | false |
Specifies whether to reserve client IP addresses. Default value: false. Valid values:
|
EndpointConfigurations.N.Weight | Integer | Yes | 20 |
The weight of the endpoint. Valid values: 0 to 255. Note If the weight of an endpoint is set to 0, GA stops distributing network traffic to
the endpoint. Proceed with caution.
|
EndpointConfigurations.N.Endpoint | String | Yes | 120.XX.XX.21 |
The IP address or domain name of the endpoint. |
EndpointRequestProtocol | String | No | HTTP |
The protocol that is used by the backend service. Valid values:
Note
|
PortOverrides.N.ListenerPort | Integer | No | 443 |
The listener port that is mapped to the endpoint port. Note
|
PortOverrides.N.EndpointPort | Integer | No | 80 |
The endpoint port that is mapped to the listener port. |
HealthCheckEnabled | Boolean | No | true |
Specifies whether to enable the health check feature. Default value: true. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateEndpointGroup
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&EndpointGroupId=epg-bp1dmlohjjz4kqaun****
&Name=group1
&Description=EndpointGroup
&EndpointGroupRegion=cn-hangzhou
&TrafficPercentage=20
&HealthCheckIntervalSeconds=3
&HealthCheckPath=/healthcheck
&HealthCheckPort=20
&HealthCheckProtocol=tcp
&ThresholdCount=3
&EndpointConfigurations=[{"Type":"Ip","EnableClientIPPreservation":false,"Weight":20,"Endpoint":"120.XX.XX.21"}]
&EndpointRequestProtocol=HTTP
&PortOverrides=[{"ListenerPort":443,"EndpointPort":80}]
&HealthCheckEnabled=true
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateEndpointGroupResponse>
<RequestId>6FEA0CF3-D3B9-43E5-A304-D217037876A8 </RequestId>
</UpdateEndpointGroupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6FEA0CF3-D3B9-43E5-A304-D217037876A8\t"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | NotExist.EndPointGroup | The endpoint group does not exist. | The error message returned because the specified endpoint group does not exist. |
400 | StateError.EndPointGroup | The specified state of endpoint group is invalid. | The error message returned because the specified endpoint group is in an invalid state. |
400 | NotExist.Listener | The listener does not exist. | The error message returned because the specified listener does not exist. |
400 | NotActive.Listener | The state of the listener is not active. | The error message returned because the specified listener is unstable. |
400 | NotExist.Accelerator | The accelerated instance does not exist. | The error message returned because the GA instance does not exist. |
400 | QuotaExceeded.EndPoint | The maximum number of endpoints is exceeded. | The error message returned because the number of endpoints has reached the upper limit. |
400 | NoPermission.VpcEndpoint | You are not authorized to perform the operation. | The error message returned because you are not authorized to create the service-linked role. Contact the owner of the Alibaba Cloud account or the administrator to attach the AliyunGlobalAccelerationFullAccess policy or a custom permission policy that grants the permissions to create the required service-linked role to your RAM user. In the custom policy, the service name must be set to vpcendpoint.ga.aliyuncs.com, the service-linked role to AliyunServiceRoleForGaVpcEndpoint, and the permissions to ram:CreateServiceLinkedRole. |
400 | QuotaExceeded.PortOverride | The number of port override exceeds the limit. | The error message returned because the number of port mappings has reached the upper limit. |
For a list of error codes, visit the API Error Center.