All Products
Search
Document Center

Global Accelerator:CreateEndpointGroups

更新時間:Sep 09, 2024

Creates multiple endpoint groups at a time.

Operation description

  • You can call this operation to create multiple endpoint groups at a time. However, you cannot create a default endpoint group and a virtual endpoint group at the same time.

  • You cannot create a virtual endpoint group for a Layer 4 listener. To create a virtual endpoint group for a Layer 4 listener, call the CreateEndpointGroup operation.

  • 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 endpoint groups.

    • 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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
ga:CreateEndpointGroupscreate
  • EndpointGroup
    acs:ga:{#regionId}:{#accountId}:endpointgroup/*
  • Accelerator
    acs:ga:{#regionId}:{#accountId}:ga/{#acceleratorId}
  • Listener
    acs:ga:{#regionId}:{#accountId}:listener/{#listenerId}
  • ga:AcceleratorMainland
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou.

cn-hangzhou
ClientTokenstringNo

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 client 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
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
true
AcceleratorIdstringYes

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
ListenerIdstringYes

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****
EndpointGroupConfigurationsarray<object>Yes

The information about the endpoint groups.

You can enter the information about up to 10 endpoint groups.

objectYes

The information about the endpoint groups.

You can enter the information about up to 10 endpoint groups.

EndpointGroupNamestringNo

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 (-). The name must start with a letter.

group1
EndpointGroupDescriptionstringNo

The description of the endpoint group.

The description must be up to 200 characters in length, and cannot start with http:// or https://.

group1
EndpointGroupRegionstringYes

The ID of the region where the endpoint group is created.

You can enter the IDs of up to 10 regions.

cn-hangzhou
TrafficPercentagelongNo

The traffic distribution ratio. If an intelligent routing listener is associated with multiple endpoint groups, you can configure this parameter to specify the ratio of traffic distributed to each endpoint group.

Valid values: 1 to 100. Default value: 100.

You can specify the traffic distribution ratios for at most 10 endpoint groups.

20
HealthCheckEnabledbooleanNo

Specifies whether to enable health checks for the endpoint group. Valid values:

  • true: enables the health check feature.
  • false (default): disables the health check feature.

You can enable the health check feature for up to 10 endpoint groups.

false
HealthCheckIntervalSecondslongNo

The interval at which health checks are performed. Unit: seconds.

You can specify up to 10 health check intervals.

3
HealthCheckPathstringNo

The health check path.

You can specify up to 10 health check paths.

/healthcheck
HealthCheckPortlongNo

The port that you want to use for health checks. Valid values: 1 to 65535.

You can specify up to 10 ports for health checks.

20
HealthCheckProtocolstringNo

The protocol over which health check requests are sent. Valid values:

  • tcp or TCP
  • http or HTTP
  • https or HTTPS

You can specify up to 10 health check protocols.

tcp
ThresholdCountlongNo

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 up to 10 values (the number of consecutive health check successes or consecutive health check failures).

3
EndpointConfigurationsarray<object>No

The endpoint that is associated with the intelligent routing listener.

objectNo

The endpoint that is associated with the intelligent routing listener.

TypestringNo

The type of the endpoint that is associated with the intelligent routing listener. Valid values:

  • Domain: a custom domain name.
  • Ip: a custom IP address.
  • PublicIp: a public IP address provided by Alibaba Cloud.
  • ECS: an Elastic Compute Service (ECS) instance.
  • SLB: a Classic Load Balancer (SLB) instance.
  • ALB: an Application Load Balancer (ALB) instance.
  • OSS: an Object Storage Service (OSS) bucket.
  • ENI: an elastic network interface (ENI).
  • NLB: a Network Load Balancer (NLB) instance.

You can specify up to 100 endpoint types in the endpoint group that is associated with the intelligent routing listener.

Note
  • If you set Type to Standard, you can configure the endpoint group and endpoint that are associated with the intelligent routing listener. In addition, this parameter is required.
  • If you set this parameter to ECS, ENI, SLB, ALB, or NLB and the AliyunServiceRoleForGaVpcEndpoint service-linked role does not exist, the system automatically creates the service-linked role.
  • If you set this parameter to ALB and the AliyunServiceRoleForGaAlb service-linked role does not exist, the system automatically creates the role.
  • If you set this parameter to OSS and the AliyunServiceRoleForGaOss service-linked role does not exist, the system automatically creates the role.
  • If you set this parameter to NLB and the AliyunServiceRoleForGaNlb service-linked role does not exist, the system automatically creates the role.
  • For more information, see Service-linked roles.

    Ip
    WeightlongNo

    The weight of the endpoint.

    Valid values: 0 to 255.

    Note If you set the weight of an endpoint to 0, GA stops distributing traffic to the endpoint. Proceed with caution.
    20
    EndpointstringNo

    The IP address or domain name of the endpoint that is associated with the intelligent routing listener.

    You can enter the IP addresses or domain names of up to 100 endpoints in an endpoint group that is associated with the intelligent routing listener.

    47.0.XX.XX
    SubAddressstringNo

    The private IP address of the ENI.

    Note This parameter is available only when you set the endpoint type to ENI. If you leave this parameter empty, the primary private IP address of the ENI is used.
    172.168.XX.XX
    EndpointRequestProtocolstringNo

    The protocol that is used by the backend server. Valid values:

    • HTTP
    • HTTPS
    Note
  • You can specify this parameter only if the listener that is associated with the endpoint group uses HTTP or HTTPS.
  • The backend service protocol of an HTTP listener must be HTTP.
  • HTTP
    EndpointProtocolVersionstringNo

    The backend service protocol of the endpoint that is associated with the intelligent routing listener. Valid values:

    • HTTP1.1 (default)
    • HTTP2
    Note You can specify this parameter only if the EndpointRequestProtocol parameter is set to HTTPS.
    HTTP1.1
    EndpointGroupTypestringNo

    The type of the endpoint group associated with the intelligent routing listener. Valid values:

    • default (default): a default endpoint group.
    • virtual: a virtual endpoint group.

    You can specify up to 10 endpoint group types.

    default
    PortOverridesarray<object>No

    The mappings between ports.

    objectNo

    The mappings between ports.

    ListenerPortlongNo

    The listener port.

    Valid values: 1 to 65499.

    Note
  • You can configure port mappings only when you configure endpoint groups for HTTP or HTTPS listeners.
  • The listener port in a port mapping must be the port that is used by the current listener.
  • 443
    EndpointPortlongNo

    The endpoint port that is mapped to the listener port.

    Note You can configure port mappings only when you configure endpoint groups for HTTP or HTTPS listeners.
    80
    EnableClientIPPreservationToabooleanNo

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

    • true: uses the TOA module.
    • false: does not use the TOA module.
    false
    EnableClientIPPreservationProxyProtocolbooleanNo

    Specifies whether to use the proxy protocol to preserve client IP addresses. Valid values:

    • true: uses the proxy protocol.
    • false: does not use the proxy protocol.
    false
    Tagarray<object>No

    The tag of the endpoint group.

    objectNo

    The tag of the endpoint group.

    KeystringNo

    The tag key of the endpoint group. It cannot be an empty string.

    The tag key must be up to 64 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

    You can enter up to 20 tag keys.

    tag-key
    ValuestringNo

    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 contain http:// or https://. The tag value cannot start with aliyun or acs:.

    You can enter up to 20 tag values.

    tag-value
    SystemTagarray<object>No

    This parameter is not in use. Ignore this parameter.

    objectNo

    This parameter is not in use. Ignore this parameter.

    KeystringNo

    This parameter is not in use. Ignore this parameter.

    system-tag-key
    ValuestringNo

    This parameter is not in use. Ignore this parameter.

    system-tag-value
    ScopestringNo

    This parameter is not in use. Ignore this parameter.

    public

    Response parameters

    ParameterTypeDescriptionExample
    object

    The returned data.

    RequestIdstring

    The ID of the request.

    6FEA0CF3-D3B9-43E5-A304-D217037876A8
    EndpointGroupIdsarray

    The IDs of the endpoint groups.

    string

    The ID of the endpoint group.

    epg-bp1dmlohjjz4kqaun****

    Examples

    Sample success responses

    JSONformat

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

    Error codes

    HTTP status codeError codeError messageDescription
    400Domain.NotFitThe domain is not fit the ruleThe domain name does not have an ICP number.
    400Resource.QuotaFullThe resource quota is exceeded.The number of resources has reached the upper limit.
    400NoPermission.EnableHealthCheckYou do not have permission to enable health check.The current account does not have the permissions to enable health checks.
    400NotSupportHealthCheck.AcceleratorCurrently Accelerator does not support health check.The current GA instance does not support health checks.
    400EndpointGroupExclusive.ListenerAll endpoint group must under the same listener.All the endpoint groups must be associated with the same listener.
    400RegionConflict.EndpointGroupEndpoint 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.
    400ListenerProtocolIllegal.EndpointGroupListener 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.
    400QuotaExceeded.EndpointGroupThe number of endpoint group exceeds the limit.The number of endpoint groups has reached the upper limit.
    400ParamExclusive.EndpointGroupTypeAll endpoint group type group must be consistent.-
    400HealthCheckPath.IllegalHealth check path illegal.The health check path is invalid.
    400NotExist.ListenerThe listener does not exist.The listener does not exist.
    400NotActive.ListenerThe state of the listener is not active.The listener is unstable.
    400NotExist.AcceleratorThe accelerated instance does not exist.The GA instance does not exist.
    400StateError.AcceleratorThe state of the accelerated instance is invalid.The status of the GA instance is invalid.
    400NotExist.BusinessRegionThe business region does not exist.The business region does not exist.
    400NotExist.BasicBandwidthPackageYou must specify the basic bandwidth package.You must specify the basic bandwidth package.
    400QuotaExceeded.EndPointThe maximum number of endpoints is exceeded.The maximum number of endpoints is exceeded.
    400NoPermission.VpcEndpointYou 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.
    400EndPointRequestProtocolIllegal.EndpointGroupendpoint group request protoco is illegal-
    400QuotaExceeded.PortOverrideThe number of port override exceeds the limit.The number of port override exceeds the limit.
    400NotExist.ListenerPortlistener port %s is not exist-
    400MixedVpc.EndPointVPC Endpoint cannot be mixed with other types of Endpoints.You cannot use private endpoints with other types of endpoints.
    400IllegalPublicIp.EndPointThe 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 timeSummary of changesOperation
    2024-07-20The Error code has changedView Change Details
    2024-04-22The Error code has changedView Change Details
    2023-10-27The Error code has changedView Change Details
    2023-09-14The Error code has changedView Change Details
    2023-04-20The Error code has changedView Change Details
    2023-04-13The Error code has changedView Change Details