Creates endpoint groups.
Operation description
-
CreateEndpointGroups 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 the task:
- If the endpoint groups are in the init state, the endpoint groups are being created. In this case, you can perform only query operations.
- If all endpoint groups are in the active state, the endpoint groups are created.
-
The CreateEndpointGroups operation cannot be repeatedly called for the same Global Accelerator (GA) instance within a specific period of time.
Debugging
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:
- The required resource types are displayed in bold characters.
- 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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
ga:CreateEndpointGroups | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the GA instance is deployed. 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 token, but you must make sure that the token is unique among different requests. The 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.
| 1F4B6A4A-C89E-489E-BAF1-52777EE148EF |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| true |
AcceleratorId | string | Yes | The ID of the GA instance. | ga-bp1odcab8tmno0hdq**** |
ListenerId | string | Yes | The ID of the listener. Note
If the listener protocol is HTTP or HTTPS, you can call the CreateEndpointGroups operation to create only one endpoint group.
| lsr-bp1bpn0kn908w4nbw**** |
EndpointGroupConfigurations | object [] | Yes | The configurations of the endpoint groups. | |
EndpointGroupName | string | No | The name of the endpoint group. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. You can specify the names of up to 10 endpoint groups. | group1 |
EndpointGroupDescription | string | No | The description of the endpoint group. The description can be up to 256 characters in length and cannot contain You can enter the descriptions of up to 10 endpoint groups. | group1 |
EndpointGroupRegion | string | Yes | The ID of the region where you want to create the endpoint group. You can enter the region IDs of up to 10 endpoint groups. | cn-hangzhou |
TrafficPercentage | long | No | The traffic distribution ratio. If a listener is associated with multiple endpoint groups, you can specify this parameter to distribute traffic to the endpoint groups based on ratios. Valid values: 1 to 100. Default value: 100. You can specify traffic distribution ratios for up to 10 endpoint groups. | 20 |
HealthCheckEnabled | boolean | No | Specifies whether to enable the health check feature. Valid values:
You can enable the health check feature for up to 10 endpoint groups. | false |
HealthCheckIntervalSeconds | long | No | The interval at which health checks are performed. Unit: seconds. You can specify up to 10 health check intervals. | 3 |
HealthCheckPath | string | No | The path to which health check requests are sent. You can specify up to 10 health check paths. | /healthcheck |
HealthCheckPort | long | No | The port that is used for health checks. Valid values: 1 to 65535. You can specify up to 10 ports for health checks. | 20 |
HealthCheckProtocol | string | No | The protocol over which health check requests are sent. Valid values:
You can specify up to 10 health check protocols. | tcp |
ThresholdCount | long | No | The number of consecutive health check failures that must occur before a healthy endpoint group is considered unhealthy, or the number of consecutive health check successes that must occur before an unhealthy endpoint group is considered healthy. Valid values: 2 to 10. Default value: 3. You can specify the number of successful consecutive health checks or failed consecutive health checks for up to 10 endpoint groups. | 3 |
EndpointConfigurations | object [] | No | The configurations of the endpoints. | |
Type | string | No | The type of the endpoint. Valid values:
Note
For more information, see Service linked roles. | Ip |
Weight | long | No | The weight of the endpoint. Valid values: 0 to 255. You can set the weights of up to 100 endpoints in an endpoint group. Note
| 20 |
Endpoint | string | No | The IP address, domain name, or instance ID based on the value of Type. You can specify up to 100 endpoint IP addresses or domain names in an endpoint group. Note
This parameter is required.
| 47.0.XX.XX |
SubAddress | string | No | The private IP address of the ENI. Note
If you set Type to ENI, you can specify this parameter. If you do not specify this parameter, the primary private IP address of the ENI is used.
| 172.168.XX.XX |
EndpointRequestProtocol | string | No | The protocol that is used by the backend service. Valid values:
You can specify up to 10 backend service protocols. Note
| HTTP |
EndpointGroupType | string | No | The type of the endpoint group. Valid values:
You can specify the types of up to 10 endpoint groups. Note
Only HTTP and HTTPS listeners support virtual endpoint groups.
| default |
PortOverrides | object [] | No | The port mapping. | |
ListenerPort | long | No | The listener port that is mapped to the endpoint port. You can specify up to five listener ports. Note
| 443 |
EndpointPort | long | No | The endpoint port that is mapped to the listener port. You can specify up to five endpoint ports. | 80 |
EnableClientIPPreservationToa | boolean | No | Specifies whether to preserve the IP addresses of clients that access the endpoint by using the TCP Option Address (TOA) module. Valid values:
You can specify this parameter for up to 10 endpoint groups. | false |
EnableClientIPPreservationProxyProtocol | boolean | No | Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values:
You can specify this parameter for up to 10 endpoint groups. | false |
Tag | object [] | No | The tags. | |
Key | string | No | The key of the tag. You can enter up to 20 tags. | tag-key |
Value | string | No | The value of the tag. You can enter up to 20 tags. | tag-value |
SystemTag | object [] | No | The system tag. | |
Key | string | No | The key of the system tag. You can enter up to 20 system tags. | system-tag-key |
Value | string | No | The value of the system tag. You can enter up to 20 system tags. | system-tag-value |
Scope | string | No | The visibility of the system tag. Valid values:
| public |
Response parameters
Examples
Sample success responses
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. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||
---|---|---|---|---|---|---|
2023-10-27 | The Error code has changed | see changesets | ||||
| ||||||
2023-09-14 | The Error code has changed | see changesets | ||||
| ||||||
2023-04-20 | The Error code has changed | see changesets | ||||
| ||||||
2023-04-13 | The Error code has changed | see changesets | ||||
|