UpdateEndpointGroups

Updated at: 2025-03-07 07:29

Modifies the endpoint groups that are associated with a listener.

Operation description

Description

  • UpdateEndpointGroups is an asynchronous operation. After a request is sent, the system returns a request ID and runs the task in the background. You can call the DescribeEndpointGroup or ListEndpointGroups operation to query the status of an endpoint group.

    • If the endpoint group is in the updating state, it indicates that the configuration of the endpoint group is being modified. In this case, you can perform only query operations.
    • If the endpoint group is in the active state, it indicates that the configuration of the endpoint group is modified.
  • The UpdateEndpointGroups operation holds an exclusive lock on the Global Accelerator (GA) instance. While the operation is in progress, you cannot call the same operation in the same Alibaba Cloud account.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
OperationAccess levelResource typeCondition keyAssociated operation
ga:UpdateEndpointGroupsupdate
*EndpointGroup
acs:ga:{#regionId}:{#accountId}:endpointgroup/{#endpointgroupId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the GA instance. Set the value to cn-hangzhou.

cn-hangzhou
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token 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 request ID as the client token. The request ID may be different for each request.
123e4567-e89b-12d3-a456-426655440000
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
true
EndpointGroupConfigurationsarray<object>Yes

The configurations of the endpoint groups.

objectYes

The configuration of the endpoint group.

EndpointGroupNamestringNo

The name of the endpoint group.

The name must be 1 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.

group1
EndpointGroupDescriptionstringNo

The description of the endpoint group.

The description cannot exceed 200 characters in length and cannot start with http:// or https://.

group1
TrafficPercentagelongNo

The traffic ratio of the endpoint group when the specified listener is associated with multiple endpoint groups.

Valid values: 1 to 100.

20
HealthCheckEnabledbooleanNo

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

  • true: enables the health check feature.
  • false (default): disables the health check feature.
true
HealthCheckIntervalSecondslongNo

The interval at which health checks are performed. Unit: seconds. Valid values: 1 to 50.

3
HealthCheckPathstringNo

The health check path.

/healthcheck
HealthCheckPortlongNo

The port that you want to use for health checks.

Valid values: 1 to 65535.

20
HealthCheckProtocolstringNo

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

  • tcp or TCP
  • http or HTTP
  • https or HTTPS
tcp
ThresholdCountlongNo

The number of failed consecutive health checks that must occur before a healthy endpoint group is considered unhealthy or the number of successful consecutive health checks that must occur before an unhealthy endpoint group is considered healthy.

Valid values: 2 to 10.

3
EndpointConfigurationsarray<object>No

The configurations of the endpoints in the endpoint group.

objectYes

The configuration of the endpoint in the endpoint group.

TypestringYes

The type of the endpoint. Valid values:

  • Domain: a custom domain name.
  • Ip: a custom IP address.
  • IpTarget: a custom private IP address.
  • PublicIp: a public IP address provided by Alibaba Cloud.
  • ECS: an Elastic Compute Service (ECS) instance.
  • SLB: a Server Load Balancer (SLB) instance.
  • ALB: an Application Load Balancer (ALB) instance.
  • OSS: an Object Storage Service (OSS) bucket.
  • ENI: an elastic network interface (ENI).
  • NLB: a Network Load Balancer (NLB) instance.
Note
  • If you set this parameter to ECS, ENI, SLB, ALB, NLB, or IpTarget and the AliyunServiceRoleForGaVpcEndpoint service-linked role does not exist, the system automatically creates the role.
  • If you set this parameter to ALB and the AliyunServiceRoleForGaAlb service-linked role does not exist, the system automatically creates the role.
  • If you set this parameter to OSS and the AliyunServiceRoleForGaOss service-linked role does not exist, the system automatically creates the role.
  • For more information, see Service-linked roles.

    Ip
    WeightlongYes

    The weight of the endpoint.

    Valid values: 0 to 255.

    Note
    If you set the weight of an endpoint to 0, GA stops distributing traffic to the endpoint. Proceed with caution.
    20
    EndpointstringYes

    The IP address, domain name, or instance ID based on the value of Type.

    47.0.XX.XX
    SubAddressstringNo

    The private IP address of the ENI.

    Note
    If you set the endpoint type to ENI, you can specify this parameter. If you leave this parameter empty, the primary private IP address of the ENI is used.
    172.168.XX.XX
    EnableClientIPPreservationbooleanNo

    Specifies whether to automatically preserve client IP addresses. Valid values:

    • true
    • false (default)
    Note
  • By default, client IP address preservation is disabled for an endpoint group of a UDP or TCP listener. You can configure this parameter based on your business requirements.
  • By default, client IP address preservation is enabled for an endpoint group of an HTTP or HTTP listener. You can obtain client IP addresses by using the X-Forwarded-For header. You cannot disable the feature.
  • EnableClientIPPreservation and EnableProxyProtocol cannot be set to true at the same time.
  • For more information, see Preserve client IP addresses.

    EnableProxyProtocolbooleanNo

    Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values:

    • true
    • false (default)
    Note
  • This parameter is available only to endpoint groups of TCP listeners.
  • EnableClientIPPreservation and EnableProxyProtocol cannot be set to true at the same time.
  • For more information, see Preserve client IP addresses.

    VpcIdstringNo

    The virtual private cloud (VPC) ID.

    You can specify one VPC ID for an endpoint group of an intelligent routing listener.

    Note
    This parameter is valid and required only if Type is set to IpTarget.
    vpc-uf66oesmrqge1t2gs****
    VSwitchIdsarrayNo

    The IDs of vSwitches that are deployed in the VPC.

    stringNo

    The IDs of vSwitches.

    You can specify up to two vSwitch IDs for an endpoint group of an intelligent routing listener.

    Note
  • This parameter is valid and required only if Type is set to IpTarget.
  • The vSwitch must belong to the VPC specified by VpcId.
  • vsw-uf6r0due94mypz1i9****
    EndpointRequestProtocolstringNo

    The backend service protocol. Valid values:

    • HTTP
    • HTTPS
    Note
  • You can specify this parameter only if the listener that is associated with the endpoint group uses HTTP or HTTPS.
  • The backend service protocol of an HTTP listener must be HTTP.
  • HTTP
    EndpointProtocolVersionstringNo

    The backend service protocol of the endpoint that is associated with the intelligent routing listener. Valid values:

    • HTTP1.1 (default)
    • HTTP2
    Note
    You can specify this parameter only if EndpointRequestProtocol is set to HTTPS.
    HTTP1.1
    PortOverridesarray<object>No

    The port mappings.

    objectNo

    The port mapping.

    ListenerPortlongNo

    The listener port.

    Valid values: 1 to 65499.

    Note
  • You cannot configure port mappings for virtual endpoint groups of TCP listeners. If a virtual endpoint group already exists on the listener, you cannot configure port mappings for the default endpoint group. If port mappings are configured for the default endpoint group, you cannot add a virtual endpoint group.
  • If you configure port mappings for a listener, you cannot modify the listener protocol. You can only switch between HTTP and HTTPS.
  • Listener port: When you modify the listener port range, make sure that the port range includes the ports configured in port mappings. For example, if you set the listener port range to 80 to 82 and map the listener ports to endpoint ports 100 to 102, you cannot change the listener port range to 80 to 81.
  • 443
    EndpointPortlongNo

    The endpoint port.

    Valid values: 1 to 65499.

    80
    EnableClientIPPreservationToabooleanNo

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

    • true
    • false
    false
    EnableClientIPPreservationProxyProtocolbooleanNo

    Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values:

    • true
    • false
    false
    EndpointGroupIdstringYes

    The endpoint ID.

    ep-bp1d2utp8qqe2a44t****
    ListenerIdstringYes

    The listener ID.

    lsr-bp1bpn0kn908w4nbw****

    Response parameters

    ParameterTypeDescriptionExample
    ParameterTypeDescriptionExample
    object

    The response parameters.

    RequestIdstring

    The request ID.

    6FEA0CF3-D3B9-43E5-A304-D217037876A8
    EndpointGroupIdsarray

    The IDs of the endpoint groups.

    endpointGroupIdsstring

    The endpoint group ID.

    ['epg-bp1dmlohjjz4kqaun****','epg-bp1v1u72cx35ogofe****', ...]

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    HTTP status codeError codeError messageDescription
    HTTP status codeError codeError messageDescription
    400NoPermission.EnableHealthCheckYou do not have permission to enable health check.The current account does not have the permissions to enable health checks.
    400NotExist.EndPointGroupThe endpoint group does not exist.The endpoint group does not exist.
    400StateError.EndPointGroupThe specified state of endpoint group is invalid.The endpoint group is in an invalid state.
    400NotExist.ListenerThe listener does not exist.The listener does not exist.
    400NotActive.ListenerThe state of the listener is not active.The listener is unstable.
    400NotExist.AcceleratorThe accelerated instance does not exist.The GA instance does not exist.
    400StateError.AcceleratorThe state of the accelerated instance is invalid.The status of the GA instance is invalid.
    400QuotaExceeded.EndPointThe maximum number of endpoints is exceeded.The maximum number of endpoints is exceeded.
    400NoPermission.VpcEndpointYou 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.
    400EndPointRequestProtocolIllegal.EndpointGroupendpoint group request protoco is illegal-
    400QuotaExceeded.PortOverrideThe number of port override exceeds the limit.The number of port override exceeds the limit.
    400NotExist.ListenerPortlistener port %s is not exist-

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    Change timeSummary of changesOperation
    2024-12-23The Error code has changedView Change Details
    2024-07-20The Error code has changedView Change Details
    2023-11-22The Error code has changedView Change Details
    2023-09-14The Error code has changedView Change Details
    • On this page (1)
    • Operation description
    • Description
    • Debugging
    • Authorization information
    • Request parameters
    • Response parameters
    • Examples
    • Error codes
    • Change history
    Feedback
    phone Contact Us