CreateEndpointGroups
Creates an endpoint group list.
Operation description
-
You can invoke this operation to create an endpoint group in batches. However, you cannot create default endpoint groups and virtual endpoint groups at the same time.
-
This operation does not support creating an endpoint group that is virtual for Layer 4 protocol listeners. To create an endpoint group that is virtual for a Layer 4 protocol listener, use CreateEndpointGroup.
-
The CreateEndpointGroups operation is asynchronous. The system returns a request ID, but the endpoint groups are not immediately created. The creation node in the background system is still in progress. You can invoke DescribeEndpointGroup or ListEndpointGroups to query the status of the endpoint groups:
-
If an endpoint group is in the init state, the endpoint groups are being created in batches. In this state, you can only perform query operations.
-
If all endpoint groups are in the active state, the endpoint groups are created.
-
-
The CreateEndpointGroups operation does not support concurrent operations to create an endpoint group within the same Alibaba Cloud Global Accelerator (GA) instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:CreateEndpointGroups |
create |
*EndpointGroup
*Accelerator
*Listener
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the Alibaba Cloud 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. |
1F4B6A4A-C89E-489E-BAF1-52777EE148EF |
| DryRun |
boolean |
No |
Specifies whether to only precheck the request. Valid values:
|
true |
| AcceleratorId |
string |
Yes |
The Alibaba Cloud Global Accelerator (GA) instance ID. |
ga-bp1odcab8tmno0hdq**** |
| ListenerId |
string |
Yes |
The listener ID. Note
If the listener protocol is HTTP or HTTPS, you can create only one endpoint group each time you call the CreateEndpointGroups operation. |
lsr-bp1bpn0kn908w4nbw**** |
| EndpointGroupConfigurations |
array<object> |
Yes |
The endpoint group configurations. You can specify up to 10 endpoint groups. |
|
|
array<object> |
No |
The endpoint group configurations. You can specify up to 10 endpoint groups. |
||
| EndpointGroupName |
string |
No |
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 (-). It must start with a letter or Chinese character. |
group1 |
| EndpointGroupDescription |
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 |
string |
Yes |
The region ID of the endpoint group. You can specify up to 10 region IDs. |
cn-hongkong |
| TrafficPercentage |
integer |
No |
The traffic distribution ratio. When a listener uses intelligent routing and has multiple endpoint groups, this parameter specifies the proportion of traffic distributed to each endpoint group. Valid values: 1 to 100. Default value: 100. You can specify the traffic distribution ratio for up to 10 endpoint groups. |
100 |
| HealthCheckEnabled |
boolean |
No |
Specifies whether to enable health checks for the endpoint group of a listener that uses intelligent routing. Valid values:
You can enable health checks for up to 10 endpoint groups. |
false |
| HealthCheckIntervalSeconds |
integer |
No |
The interval between two consecutive health checks. Unit: seconds. You can specify the health check interval for up to 10 endpoint groups. |
5 |
| HealthCheckPath |
string |
No |
The health check path. You can specify the health check path for up to 10 endpoint groups. |
/healthcheck |
| HealthCheckPort |
integer |
No |
The health check port. Valid values: 1 to 65535. You can specify the health check port for up to 10 endpoint groups. |
443 |
| HealthCheckProtocol |
string |
No |
The health check protocol. Valid values:
You can specify the health check protocol for up to 10 endpoint groups. |
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. Default value: 3. You can specify the threshold for up to 10 endpoint groups. |
3 |
| EndpointConfigurations |
array<object> |
No |
The endpoint configurations for a listener that uses intelligent routing. |
|
|
object |
No |
The endpoint configurations for a listener that uses intelligent routing. |
||
| Type |
string |
No |
The endpoint type for a listener that uses intelligent routing. Valid values:
You can specify up to 100 endpoints in an endpoint group of a listener that uses intelligent routing. Note
Note
For more information, see Service associate roles. |
Domain |
| Weight |
integer |
No |
The weight of the endpoint. Valid values: 0 to 255. Note
If the weight of an endpoint is set to 0, Global Accelerator stops distributing traffic to the endpoint. Proceed with caution. |
255 |
| Endpoint |
string |
No |
The IP address or domain name of the endpoint for a listener that uses intelligent routing. You can specify up to 100 IP addresses or domain names in an endpoint group of a listener that uses intelligent routing. |
1.1.1.1 |
| SubAddress |
string |
No |
The private IP of the elastic network interface controller (NIC). Note
If the endpoint type is ENI, you can configure this parameter. If you do not configure this parameter, the primary private IP of the elastic network interface controller (NIC) is used by default. |
172.168.XX.XX |
| EnableClientIPPreservation |
boolean |
No |
Specifies whether to enable client IP address preservation by using the automatic retrieval method. Valid values:
Note
|
false |
| EnableProxyProtocol |
boolean |
No |
Specifies whether to enable client IP address preservation by using the Proxy Protocol. Valid values:
Note
|
false |
| VpcId |
string |
No |
The VPC ID. You can specify only one VPC ID in an endpoint group of a listener that uses intelligent routing. Note
This parameter is valid and required only when the endpoint type is IpTarget. |
vpc-2zekzii824szm3hps**** |
| VSwitchIds |
array |
No |
The vSwitches in the VPC. |
|
|
string |
No |
The vSwitch ID. You can specify up to two vSwitch IDs in an endpoint group of a listener that uses intelligent routing. Note
This parameter is valid and required only when the endpoint type is IpTarget.
|
vsw-bp1b2qx7y2qqnbkan**** |
|
| Provider |
string |
No |
The provider configuration. |
BAILIAN |
| ApiKeys |
array |
No |
The API keys in the endpoint group configuration. |
|
|
string |
No |
The API keys in the endpoint group configuration. |
sk-****** |
|
| EndpointRequestProtocol |
string |
No |
The backend service Terms of Service. Valid values:
Note
|
HTTPS |
| EndpointProtocolVersion |
string |
No |
The backend service Terms of Service version for the endpoint of a listener that uses intelligent routing. Valid values:
Note
You can specify the backend service Terms of Service version only when the EndpointRequestProtocol (backend service Terms of Service) parameter is set to HTTPS. |
HTTP1.1 |
| EndpointGroupType |
string |
No |
The endpoint group type for a listener that uses intelligent routing. Valid values:
You can specify up to 10 endpoint group types. |
default |
| PortOverrides |
array<object> |
No |
The port mappings. |
|
|
object |
No |
The port mappings. |
||
| ListenerPort |
integer |
No |
The listener port. Valid values: 1 to 65499. Note
|
80 |
| EndpointPort |
integer |
No |
The endpoint port for port mapping. |
443 |
| Tag |
array<object> |
No |
The tags of the endpoint group. |
|
|
object |
No |
The tags of the endpoint group. |
||
| Key |
string |
No |
The tag key of the endpoint group. The tag key cannot be an empty string. The tag key can be up to 64 characters in length, and cannot start with You can specify up to 20 tag keys. |
tag-key |
| Value |
string |
No |
The tag value of the endpoint group. The tag value can be an empty string. The tag value can be up to 128 characters in length, and cannot start with You can specify up to 20 tag values. |
tag-value |
| SystemTag |
array<object> |
No |
This parameter is not used. You do not need to configure it. |
|
|
object |
No |
This parameter is not used. You do not need to configure it. |
||
| Key |
string |
No |
This parameter is not used. You do not need to configure it. |
- |
| Value |
string |
No |
This parameter is not used. You do not need to configure it. |
- |
| Scope |
string |
No |
This parameter is not used. You do not need to configure it. |
- |
| HealthCheckHost |
string |
No |
The domain name for health checks. |
www.taobao.com |
| EndpointIpVersion |
string |
No |
The IP version of the backend service. Valid values:
|
IPv4 |
| ProxyTunnel |
object |
No |
The proxy tunnel configuration. |
|
| ConnectAuthPrefix |
string |
No |
The proxy tunnel connection authentication prefix. |
prefix-auth |
| ConnectAuthSuffix |
string |
No |
The proxy tunnel connection authentication suffix. |
suffix-auth |
| ConnectSessionHashHdr |
string |
No |
The connection session hash header configuration. |
X-Session-Hash |
| ConnectTunnelTimeout |
integer |
No |
The proxy tunnel connection timeout period. |
5000 |
| TunnelServerPort |
integer |
No |
The tunnel server port. |
8443 |
| TunnelServerType |
string |
No |
The tunnel server type. |
domain |
| TunnelServer |
string |
No |
The tunnel server configuration. |
tunnel.example.com |
| HealthCheckMethod |
string |
No |
The health check method. |
GET |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned information. |
||
| RequestId |
string |
The request ID. |
6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
| EndpointGroupIds |
array |
The list of endpoint group IDs. |
|
|
string |
The list of endpoint group IDs. |
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 | Domain.NotFit | The domain is not fit the rule | The domain name does not have an ICP number. |
| 400 | Resource.QuotaFull | The resource quota is exceeded. | The number of resources has reached the upper limit. |
| 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 | NotSupportHealthCheck.Accelerator | Currently Accelerator does not support health check. | The current GA instance does not support health checks. |
| 400 | EndpointGroupExclusive.Listener | All endpoint group must under the same listener. | All the endpoint groups must be associated with the same listener. |
| 400 | RegionConflict.EndpointGroup | Endpoint group under the same listener must have different region. | The endpoint groups that are associated with the same listener must be deployed in different regions. |
| 400 | ListenerProtocolIllegal.EndpointGroup | Listener protocol is illegal, the https/http listener instance is only allowed to have one default endpoint group. | You can configure only one default endpoint group for an HTTPS or HTTP listener. |
| 400 | QuotaExceeded.EndpointGroup | The number of endpoint group exceeds the limit. | The number of endpoint groups has reached the upper limit. |
| 400 | ParamExclusive.EndpointGroupType | All endpoint group type group must be consistent. | |
| 400 | HealthCheckPath.Illegal | Health check path illegal. | The health check path is invalid. |
| 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 | NotExist.BusinessRegion | The business region does not exist. | The business region does not exist. |
| 400 | NotExist.BasicBandwidthPackage | You must specify the basic bandwidth package. | You must specify the basic bandwidth package. |
| 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 | |
| 400 | MixedVpc.EndPoint | VPC Endpoint cannot be mixed with other types of Endpoints. | You cannot use private endpoints with other types of endpoints. |
| 400 | IllegalPublicIp.EndPoint | The public IP address configured for the endpoint is invalid. Only an Alibaba Cloud public IP address in the region of the endpoint can be configured. | The public IP address configured for the endpoint is invalid. Only an Alibaba Cloud public IP address in the region of the endpoint can be configured. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.