UpdateEndpointGroup

Updated at:

Modifies the configuration of an endpoint group.

Operation description

  • The UpdateEndpointGroup operation is asynchronous. After you send the request, the system returns a request ID, but the configuration of the endpoint group is not immediately modified. The modification node is still running in the background. You can invoke the DescribeEndpointGroup operation to query the status of the endpoint group:
    • If the endpoint group is in the updating state, the configuration of the endpoint group is being modified. In this state, you can only execute query operations, and cannot execute other operations.

    • If the endpoint group is in the active state, the configuration of the endpoint group is modified.

  • The UpdateEndpointGroup operation does not support concurrent modifications to endpoint group configurations within the same Global Accelerator (GA) instance.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ga:UpdateEndpointGroup

update

*EndpointGroup

acs:ga:{#regionId}:{#accountId}:endpointgroup/{#endpointGroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the Global Accelerator (GA) 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.

You can use the client to generate the value, but you must ensure that it 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 RequestId of the API request as the ClientToken. The RequestId of each API request is unique.

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. It must 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 http:// or https://.

EndpointGroup

EndpointGroupRegion deprecated

string

No

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 two consecutive health checks. Unit: seconds. Valid values: 1 to 50.

3

HealthCheckPath

string

No

The Health Check Path.

/healthcheck

HealthCheckPort

integer

No

The port used for health checks. Valid values: 1 to 65535.

20

HealthCheckProtocol

string

No

The protocol used for health checks. Valid values:

  • tcp or TCP: TCP

  • http or HTTP: HTTP

  • https or HTTPS: HTTPS

HTTPS

ThresholdCount

integer

No

The number of consecutive health checks that must succeed or fail before the health check status changes. Specifically, this is the number of consecutive failed health checks required to change the status from healthy to unhealthy, or the number of consecutive successful health checks required to change the status from unhealthy to 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 endpoint type. Valid values:

  • Domain: custom domain name

  • Ip: custom IP address

  • IpTarget: custom private IP.

  • PublicIp: Alibaba Cloud public IP address

  • ECS: ECS instance

  • SLB: Server Load Balancer (SLB) instance

  • ALB: Application Load Balancer (ALB) instance

  • OSS: Object Storage Service (OSS) instance

  • ENI: Alibaba Cloud elastic network interface controller (NIC).

  • NLB: Network Load Balancer (NLB) instance

Note
  • If you set the value to ECS, ENI, SLB, ALB, NLB, or IpTarget and the associated service-linked role does not exist, the system performs automatic creation of a service-linked role named AliyunServiceRoleForGaVpcEndpoint.

  • If you set the value to ALB and the associated service-linked role does not exist, the system performs automatic creation of a service-linked role named AliyunServiceRoleForGaAlb.

  • If you set the value to OSS and the associated service-linked role does not exist, the system performs automatic creation of a service-linked role named AliyunServiceRoleForGaOss.

  • If you set the value to NLB and the associated service-linked role does not exist, the system performs automatic creation of a service-linked role named AliyunServiceRoleForGaNlb.

Note

For more information, see Service-linked roles.

Ip

EnableClientIPPreservation

boolean

No

Specifies whether to enable client IP address preservation by using the automatic retrieval method. Valid values:

  • true: enables client IP address preservation.

  • false (default): disables client IP address preservation.

Note
  • By default, client IP address preservation is disabled for endpoint groups associated with UDP or TCP listeners. You can configure this feature based on your business requirements.

  • By default, client IP address preservation is enabled for endpoint groups associated with HTTP or HTTPS listeners. The client IP address is obtained from the X-Forwarded-For header. You cannot disable this feature.

  • You cannot set both EnableClientIPPreservation and EnableProxyProtocol to true.

  • For more information, see Preserve client IP addresses.

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 enable client IP address preservation by using the Proxy Protocol. Valid values:

  • true: enables client IP address preservation.

  • false (default): disables client IP address preservation.

Note
  • This parameter is supported only for endpoint groups associated with TCP listeners.

  • You cannot set both EnableClientIPPreservation and EnableProxyProtocol to true.

  • For more information, see Preserve client IP addresses.

false

Endpoint

string

Yes

The IP address, domain name, or instance ID of the endpoint. Specify the value based on the endpoint type.

120.XX.XX.21

SubAddress

string

No

The private IP address of the elastic network interface controller (NIC).

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 elastic network interface controller (NIC) is used by default.

172.168.XX.XX

VpcId

string

No

The ID of the virtual private cloud (VPC).

You can specify at most one VPC ID for an endpoint group associated with an intelligent routing listener.

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 at most two vSwitch IDs for an endpoint group associated with an intelligent routing listener.

Note

This parameter is required and takes effect only when the endpoint type is IpTarget.

  • The vSwitch must belong to the VPC specified by the VpcId parameter.

vsw-2ze2dbtkxabpvpqxc****

Provider

string

No

The service provider in the endpoint configuration.

BAILIAN

ApiKeys

array

No

The API keys in the endpoint configuration.

string

No

The first API key in the endpoint configuration.

sk-******

EndpointRequestProtocol

string

No

The backend service protocol (network protocol, not Terms of Service). Valid values:

  • HTTP

  • HTTPS

Note
  • This parameter is supported only when you create an endpoint group for an HTTP or HTTPS listener instance.

  • For an HTTP listener instance, the backend service protocol supports and only supports HTTP.

HTTP

EndpointProtocolVersion

string

No

The backend service protocol version (network protocol, not Terms of Service). Valid values:

  • HTTP1.1

  • HTTP2

Note

You can specify the backend service protocol version only when the EndpointRequestProtocol parameter is set to HTTPS.

HTTP1.1

PortOverrides

array<object>

No

The port mapping rules.

object

No

The port mapping rules.

ListenerPort

integer

No

The listener port in the port mapping rule.

Note
  • For TCP listeners: Virtual endpoint groups do not support port mapping. If a virtual endpoint group already exists under the listener, you cannot configure port mapping for the default endpoint group. If port mapping is already configured for the default endpoint group, you cannot add a virtual endpoint group.

  • After you configure port mapping, the following limits apply to subsequent listener modifications: You cannot modify the listener protocol, except for switching between HTTP and HTTPS.

  • Listener port: The modified listener port range must cover all listener ports configured in the current port mapping rules. For example, if the listener port range is 80 to 82 and the port mapping maps to endpoint ports 100 to 102, you cannot change the listener port range to 80 to 81.

443

EndpointPort

integer

No

The endpoint port in the port mapping rule.

80

HealthCheckEnabled

boolean

No

Specifies whether to enable health checks. Valid values:

  • true: enables health checks.

  • false (default): disables health checks.

true

HealthCheckHost

string

No

The domain name used for health checks.

www.taobao.com

EndpointIpVersion

string

No

The IP version of the backend service. Valid values:

  • IPv4 (default): GA communicates with the endpoint service only over IPv4.

  • IPv6: GA communicates with the endpoint service only over IPv6.

  • ProtocolAffinity: GA communicates with the endpoint service by using the same IP version as the client request.

IPv4

ProxyTunnel

object

No

The proxy tunnel configuration.

ConnectAuthPrefix

string

No

The prefix for proxy tunnel connection authentication.

prefix-auth

ConnectAuthSuffix

string

No

The suffix for proxy tunnel connection authentication.

suffix-auth

ConnectSessionHashHdr

string

No

The connection session hash header.

X-Session-Hash

ConnectTunnelTimeout

integer

No

The timeout period for proxy tunnel connections.

5000

TunnelServerPort

integer

No

The tunnel server port.

8443

TunnelServerType

string

No

The tunnel server type.

domain

TunnelServer

string

No

The server address of the proxy tunnel.

tunnel.example.com

HealthCheckMethod

string

No

The method used for health checks.

GET

HealthCheckSuccessCodes

string

No

The HTTP status codes that indicate a successful health check.

http_2xx,http_3xx

Response elements

Element

Type

Description

Example

object

The returned information.

RequestId

string

The request ID.

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.