UpdateEndpointGroup

更新时间:
复制 MD 格式

Updates the configuration of an endpoint group.

Operation description

  • The UpdateEndpointGroup API is an asynchronous API. After you call this API, the system returns a request ID and starts the update in the background; the configuration is not modified immediately. Call DescribeEndpointGroup to check the status of the endpoint group:
    • If an endpoint group is in the updating status, its configuration is being modified, and you can only perform queries.

    • If an endpoint group is in the active status, the update is complete.

  • The UpdateEndpointGroup API does not support concurrent updates to endpoint groups in 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:UpdateEndpointGroup

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. Set the value to cn-hangzhou.

cn-hangzhou

ClientToken

string

No

A client-generated token to ensure the idempotence of the request.

The token must be unique across requests and 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 is unique for each API request.

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 long, 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 long and cannot start with http:// or https://.

EndpointGroup

EndpointGroupRegion

string

Yes

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 health checks, in seconds. Valid values: 1 to 50.

3

HealthCheckPath

string

No

The path for health checks.

/healthcheck

HealthCheckPort

integer

No

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

20

HealthCheckProtocol

string

No

The protocol for health checks. Valid values:

  • tcp or TCP

  • http or HTTP

  • https or HTTPS

HTTPS

ThresholdCount

integer

No

The number of consecutive successful or failed health checks required to change an endpoint's health status.

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 type of endpoint. Valid values:

  • 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 ECS instance.

  • SLB: an SLB instance.

  • ALB: an ALB instance.

  • OSS: an OSS instance.

  • ENI: an elastic network interface.

  • NLB: an NLB instance.

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

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

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

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

Note

For more information, see service-linked roles.

Ip

EnableClientIPPreservation

boolean

No

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

  • true: Preserves client source IP addresses.

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

Note
  • For endpoint groups of TCP or UDP listeners, this feature is disabled by default but can be enabled if needed.

  • For endpoint groups of HTTP or HTTPS listeners, client source IP addresses are preserved by default. The client IP addresses are retrieved 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 source 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 use the Proxy Protocol to preserve client source IP addresses. Valid values:

  • true: Preserves client source IP addresses.

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

Note
  • You can configure this parameter only for endpoint groups of TCP listeners.

  • You cannot set both EnableClientIPPreservation and EnableProxyProtocol to true.

  • For more information, see preserve client source IP addresses.

false

Endpoint

string

Yes

Enter an IP address, a domain name, or an instance ID based on the value of the Type parameter.

120.XX.XX.21

SubAddress

string

No

The private IP address of the elastic network interface.

Note

If the endpoint type is ENI, you can specify this parameter. If you omit this parameter, the primary private IP address of the ENI is used.

172.168.XX.XX

VpcId

string

No

The ID of the VPC.

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

Note

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

vpc-2zen6t0u7xhm0k5iz****

VSwitchIds

array

No

A list of vSwitches in the VPC.

string

No

The vSwitch ID.

You can specify at most two vSwitch IDs for an 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-2ze2dbtkxabpvpqxc****

Provider

string

No

BAILIAN

ApiKeys

array

No

string

No

sk-******

EndpointRequestProtocol

string

No

The backend service protocol. Valid values:

  • HTTP

  • HTTPS

Note
  • You can configure this parameter only for endpoint groups of HTTP or HTTPS listeners.

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

HTTP

EndpointProtocolVersion

string

No

The version of the backend service protocol. Valid values:

  • HTTP1.1

  • HTTP2

Note

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

HTTP1.1

PortOverrides

array<object>

No

The port override settings.

object

No

The port override settings.

ListenerPort

integer

No

The listener port in the port override settings.

Note
  • For TCP listeners, virtual endpoint groups do not support port overrides. If a listener is already associated with a virtual endpoint group, you cannot configure port overrides for the default endpoint group. If the default endpoint group has port overrides configured, you cannot add a virtual endpoint group.

  • After you configure port overrides, you can change the listener protocol only between HTTP and HTTPS.

  • The updated listener port range must include all listener ports in the configured port overrides. For example, if the listener port range is 80-82 and port overrides are configured to map the ports to endpoint ports 100-102, you cannot update the listener port range to 80-81.

443

EndpointPort

integer

No

The endpoint port in the port override settings.

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 for the health check.

www.taobao.com

EndpointIpVersion

string

No

Specifies the IP protocol that Global Accelerator uses to communicate with endpoints. Valid values: ● IPv4 (default): Use IPv4. ● IPv6: Use IPv6. ● ProtocolAffinity: Use the same IP protocol as the client request.

IPv4

Response elements

Element

Type

Description

Example

object

The data returned in the response.

RequestId

string

The ID of the request.

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.