UpdateEndpointGroups

更新时间:
复制 MD 格式

Updates multiple endpoint groups for a listener.

Operation description

Usage

  • UpdateEndpointGroups is an asynchronous API. After you send a request, the system returns a request ID and performs the update in the background. You can call DescribeEndpointGroup or ListEndpointGroups to query the status of the endpoint group:
    • While an endpoint group is in the updating state, you can only perform queries on it.

    • When an endpoint group is in the active state, the update is complete.

  • You cannot use the UpdateEndpointGroups operation to concurrently update endpoint groups that belong to the same Global Accelerator 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:UpdateEndpointGroups

update

*EndpointGroup

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

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The ID of the region where the Global Accelerator instance is deployed. The value must be cn-hangzhou.

cn-hangzhou

ClientToken

string

No

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

You can generate the token from your client, but you must make sure that the token is unique among different requests. The ClientToken can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the RequestId of the request as the ClientToken. The RequestId of each request is different.

123e4567-e89b-12d3-a456-426655440000

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: Performs a dry run to check the request for issues, including required parameters, request format, and business limits. No endpoint groups are modified. If the request fails the dry run, an error message is returned. If the request is valid, a 2xx HTTP status code is returned.

  • false (default): Sends a normal request. If the request is valid, the operation is performed and a 2xx HTTP status code is returned.

true

EndpointGroupConfigurations

array<object>

Yes

The configurations of the endpoint groups.

array<object>

No

The configurations of the endpoint groups.

EndpointGroupName

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

EndpointGroupDescription

string

No

The description of the endpoint group.

The description can be up to 200 characters long and cannot start with http:// or https://.

group1

TrafficPercentage

integer

No

The percentage of traffic that is distributed to the endpoint group. This is specified when a listener is associated with multiple endpoint groups.

Valid values: 1 to 100.

20

HealthCheckEnabled

boolean

No

Specifies whether to enable health checks.

  • true: enables health checks.

  • false (default): disables health checks.

true

HealthCheckIntervalSeconds

integer

No

The health check interval. Unit: seconds. Valid values: 1 to 50.

3

HealthCheckPath

string

No

The destination path for health check requests.

/healthcheck

HealthCheckPort

integer

No

The port that is used for health checks.

Valid values: 1 to 65535.

20

HealthCheckProtocol

string

No

The protocol that is used for health check requests.

  • tcp or TCP: TCP

  • http or HTTP: HTTP

  • https or HTTPS: HTTPS

tcp

ThresholdCount

integer

No

The number of consecutive successful health checks required to mark an unhealthy endpoint as healthy, or the number of consecutive failed health checks required to mark a healthy endpoint as unhealthy.

Valid values: 2 to 10.

3

EndpointConfigurations

array<object>

No

The configurations of the endpoints.

object

Yes

The configurations of the endpoints.

Type

string

Yes

The type of endpoint.

  • Domain: a custom domain name.

  • Ip: a custom IP address.

  • IpTarget: a custom private IP address.

  • PublicIp: an Alibaba Cloud public IP address.

  • ECS: an Alibaba Cloud ECS instance.

  • SLB: an Alibaba Cloud SLB instance.

  • ALB: an Alibaba Cloud ALB instance.

  • OSS: an Alibaba Cloud OSS instance.

  • ENI: an Alibaba Cloud elastic network interface.

  • NLB: an Alibaba Cloud NLB instance.

Note
  • If the endpoint type is ECS, ENI, SLB, ALB, NLB, or IpTarget and the required service-linked role does not exist, the system automatically creates a service-linked role named AliyunServiceRoleForGaVpcEndpoint.

  • If the endpoint type is ALB and the required service-linked role does not exist, the system automatically creates a service-linked role named AliyunServiceRoleForGaAlb.

  • If the endpoint type is OSS and the required service-linked role does not exist, the system automatically creates a service-linked role named AliyunServiceRoleForGaOss.

Note

For more information, see service-linked roles.

Ip

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 routing traffic to the endpoint. Use this setting with caution.

20

Endpoint

string

Yes

The IP address, domain name, or instance ID that corresponds to the endpoint type.

47.0.XX.XX

SubAddress

string

No

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

Note
  • This parameter is optional when the endpoint type is ENI. If you do not specify this parameter, the primary private IP address of the ENI is used.

172.168.XX.XX

EnableClientIPPreservation

boolean

No

Specifies whether to preserve client IP addresses. Valid values:

  • true: preserves client IP addresses.

  • false (default): does not preserve client IP addresses.

Note
  • By default, client IP preservation is disabled for endpoint groups for TCP and UDP listeners. You can enable this feature as needed.

  • By default, client IP preservation is enabled for endpoint groups for HTTP and HTTPS listeners. Client IP addresses are retrieved from the X-Forwarded-For header. You cannot disable this feature.

  • EnableClientIPPreservation and EnableProxyProtocol cannot both be set to true.

  • For more information, see Preserve client IP addresses.

EnableProxyProtocol

boolean

No

Specifies whether to use the Proxy Protocol to preserve client IP addresses. Valid values:

  • true: enables this feature.

  • false (default): disables this feature.

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

  • EnableClientIPPreservation and EnableProxyProtocol cannot both be set to true.

  • For more information, see Preserve client IP addresses.

VpcId

string

No

The ID of the virtual private cloud (VPC).

You can specify only one VPC ID for each endpoint group that is associated with an intelligent routing listener.

Note

This parameter is required only when the endpoint type is IpTarget.

vpc-uf66oesmrqge1t2gs****

VSwitchIds

array

No

The IDs of the vSwitches in the VPC.

string

No

The ID of the vSwitch.

You can specify up to two vSwitch IDs for each endpoint group that is associated with an intelligent routing listener.

Note

This parameter is required only when the endpoint type is IpTarget.

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

vsw-uf6r0due94mypz1i9****

Provider

string

No

BAILIAN

ApiKeys

array

No

string

No

sk-*******

EndpointRequestProtocol

string

No

The backend protocol. Valid values:

  • HTTP

  • HTTPS

Note
  • This parameter is supported only by endpoint groups for HTTP or HTTPS listeners.

  • For an HTTP listener, the backend protocol must be HTTP.

HTTP

EndpointProtocolVersion

string

No

The version of the backend protocol for endpoints that are associated with an intelligent routing listener. Valid values:

  • HTTP1.1 (default)

  • HTTP2

Note

You can configure this parameter only when the EndpointRequestProtocol parameter is set to HTTPS.

HTTP1.1

PortOverrides

array<object>

No

The port mapping.

object

No

The port mapping.

ListenerPort

integer

No

The listener port.

Valid values: 1 to 65499.

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

  • After you configure port mappings, you cannot change the listener protocol, except for switching between HTTP and HTTPS.

  • When you modify the listener port range, the new range must include all listener ports that are specified in the port mappings. For example, if the listener port range is 80-82 and port mappings are configured for this range, you cannot change the listener port range to 80-81.

443

EndpointPort

integer

No

The endpoint port.

Valid values: 1 to 65499.

80

EnableClientIPPreservationToa

boolean

No

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

  • true: enables this feature.

  • false (default): disables this feature.

false

EnableClientIPPreservationProxyProtocol

boolean

No

Specifies whether to use the Proxy Protocol to preserve client IP addresses. Valid values:

  • true: enables this feature.

  • false (default): disables this feature.

false

EndpointGroupId

string

Yes

The ID of the endpoint group.

ep-bp1d2utp8qqe2a44t****

HealthCheckHost

string

No

The domain name that is used for health checks.

EndpointIpVersion

string

No

The IP version of the endpoint. This parameter is available only when the endpoint type is Domain.

ListenerId

string

Yes

The ID of the listener.

lsr-bp1bpn0kn908w4nbw****

Response elements

Element

Type

Description

Example

object

The response data.

RequestId

string

The ID of the request.

6FEA0CF3-D3B9-43E5-A304-D217037876A8

EndpointGroupIds

array

The IDs of the endpoint groups.

string

The ID of the endpoint group.

epg-bp1dmlohjjz4kqaun****

Examples

Success response

JSON format

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

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.