Modifies one or more endpoint groups that are associated with a listener.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateEndpointGroups

The operation that you want to perform. Set the value to UpdateEndpointGroups.

RegionId String Yes cn-hangzhou

The ID of the region where the Global Accelerator (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. Make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

DryRun Boolean No true

Specifies whether only to precheck the request. Valid values:

  • true: only prechecks the request. If this value is used, the system does not modify the specified endpoint groups when the request passes the precheck. The system checks the required parameters, request format, and service limits. If the request fails the precheck, the system returns an error code based on the cause of the failure. If the request passes the precheck, the system returns the DryRunOperation error code.
  • false: prechecks the request and then sends the request if the request passes the precheck. This value is the default value. After the request passes the precheck, the system returns a 2XX HTTP status code and modifies the specified endpoint groups.
ListenerId String Yes lsr-bp1bpn0kn908w4nbw****

The ID of the listener associated with the endpoint groups that you want to modify.

EndpointGroupConfigurations.N.EndpointGroupName String No group1

The name of the endpoint group.

EndpointGroupConfigurations.N.EndpointGroupDescription String No group1

The description of the endpoint group.

EndpointGroupConfigurations.N.TrafficPercentage Long No 20

The weight of the endpoint group. This parameter takes effect if the listener is associated with multiple endpoint groups.

EndpointGroupConfigurations.N.HealthCheckEnabled Boolean No true

Specifies whether to enable the health check feature. Valid values:

  • true: enables the health check feature.
  • false: disables the health check feature. This value is the default value.
EndpointGroupConfigurations.N.HealthCheckIntervalSeconds Long No 3

The interval between two consecutive health checks. Unit: seconds.

EndpointGroupConfigurations.N.HealthCheckPath String No /healthcheck

The path to which the health check requests are sent.

EndpointGroupConfigurations.N.HealthCheckPort Long No 20

The port that is used for health checks.

EndpointGroupConfigurations.N.HealthCheckProtocol String No tcp

The protocol over which health check requests are sent. Valid values:

  • tcp
  • http
  • https
EndpointGroupConfigurations.N.ThresholdCount Long No 3

The number of consecutive failed health checks that must occur before an endpoint is considered unhealthy.

EndpointGroupConfigurations.N.EndpointConfigurations.N.Type String No Ip

The type of the endpoint. Valid values:

  • Domain: a custom domain name
  • Ip: a custom IP address
  • PublicIp: an Alibaba Cloud public IP address
  • ECS: an Alibaba Cloud Elastic Compute Service (ECS) instance
  • SLB: an Alibaba Cloud Server Load Balancer (SLB) instance
EndpointGroupConfigurations.N.EndpointConfigurations.N.Weight Long No 20

The weight of the endpoint.

EndpointGroupConfigurations.N.EndpointConfigurations.N.Endpoint String No 120.XX.XX. 21

The IP address or domain name of the endpoint.

EndpointGroupConfigurations.N.EndpointRequestProtocol String No HTTP

The protocol used by the backend service. Valid values:

  • HTTP
  • HTTPS
EndpointGroupConfigurations.N.PortOverrides.N.ListenerPort Long No 443

The listening port.

EndpointGroupConfigurations.N.PortOverrides.N.EndpointPort Long No 80

The port that is used to connect to the endpoint.

EndpointGroupConfigurations.N.EnableClientIPPreservationToa Boolean No false

Specifies whether to use the TCP Option Address (TOA) module to preserve client IP addresses. Valid values: true and false. Default value: false.

EndpointGroupConfigurations.N.EnableClientIPPreservationProxyProtocol Boolean No false

Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values: true and false. Default value: false.

EndpointGroupConfigurations.N.EndpointGroupId String Yes ep-bp1d2utp8qqe2a44t3qeq

The ID of the endpoint.

Response parameters

Parameter Type Example Description
RequestId String 6FEA0CF3-D3B9-43E5-A304-D217037876A8

The ID of the request.

EndpointGroupIds Array of String ['epg-bp1dmlohjjz4kqaun****','epg-bp1v1u72cx35ogofe****', ...]

The IDs of endpoint groups.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateEndpointGroups
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&DryRun=true
&EndpointGroupConfigurations=[{"EndpointGroupName":"group1","EndpointGroupDescription":"group1","TrafficPercentage":20,"HealthCheckEnabled":true,"HealthCheckIntervalSeconds":3,"HealthCheckPath":"/healthcheck","HealthCheckPort":20,"HealthCheckProtocol":"tcp","ThresholdCount":3,"EndpointConfigurations":[{"Type":"Ip","Weight":20,"Endpoint":"120.XX.XX.21"}],"EndpointRequestProtocol":"HTTP","PortOverrides":[{"ListenerPort":443,"EndpointPort":80}],"EnableClientIPPreservationToa":false,"EnableClientIPPreservationProxyProtocol":false,"EndpointGroupId":"ep-bp1d2utp8qqe2a44t3qeq"}]
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateEndpointGroupsResponse>
    <RequestId>6FEA0CF3-D3B9-43E5-A304-D217037876A8</RequestId>
    <EndpointGroupIds>['epg-bp1dmlohjjz4kqaun****','epg-bp1v1u72cx35ogofe****', ...]</EndpointGroupIds>
</UpdateEndpointGroupsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "6FEA0CF3-D3B9-43E5-A304-D217037876A8",
  "EndpointGroupIds" : [ "['epg-bp1dmlohjjz4kqaun****','epg-bp1v1u72cx35ogofe****', ...]" ]
}

Error codes

HTTP status code Error code Error message Description
400 NoPermission.EnableHealthCheck You do not have permission to enable health check. The error message returned because you are not authorized to enable the health check feature. You must apply for the required permissions.
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 status.
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 in an unstable status.
400 NotExist.Accelerator The accelerated instance does not exist. The error message returned because the specified GA instance does not exist.
400 StateError.Accelerator The state of the accelerated instance is invalid. The error message returned because the specified GA instance is in an invalid status.
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 permission administrator to grant the current user the AliyunGlobalAccelerationFullAccess permission or custom permissions. The custom permissions must allow you to create the service-linked role. Configure the following information to customize a permission policy: 1. Set the service name to vpcendpoint.ga.aliyuncs.com. 2. Set the name of the service-linked role to AliyunServiceRoleForGaVpcEndpoint. 3. Set the required permissions to ram:CreateServiceLinkedRole.
400 QuotaExceeded.PortOverride The number of port override exceeds the limit. The error message returned because the number of port overrides has reached the upper limit.

For a list of error codes, visit the API Error Center.