Add a new origin address pool
Operation description
Multiple origins can be added under the origin address, supporting domain names, IPs, OSS, S3, and other types of origins. It supports authentication for OSS and S3 type origins.
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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 |
|---|---|---|---|---|
| esa:CreateOriginPool | create | *Site acs:esa:{#regionId}:{#accountId}:site/{#SiteId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Name | string | Yes | The name of the origin address pool, which must be unique within a site. | pool1 |
| Enabled | boolean | No | Whether the origin address pool is enabled:
| true |
| Origins | array<object> | No | Information about the origins added to the origin address pool, with multiple origins passed as an array. | |
| object | No | Information about a single origin. | ||
| Name | string | No | The name of the origin, which must be unique within an origin address. | origin1 |
| Address | string | No | The address of the origin, e.g., www.example.com. | www.example.com |
| Enabled | boolean | No | Whether the origin is enabled:
| true |
| Header | any | No | The request header to be included when fetching from the origin, only Host is supported. | { "Host": [ "example.com" ] } |
| Weight | integer | No | The weight, an integer between 0 and 100. | 50 |
| Type | string | No | The type of the origin:
| ip_domain |
| AuthConf | object | No | Authentication information, required when the origin is OSS or S3 and needs authentication, including related configuration details. | |
| AuthType | string | No | The type of authentication.
| public |
| AccessKey | string | No | The access key required for private authentication. | yourAccessKeyID |
| SecretKey | string | No | The secret key required for private authentication. | yourAccessKeySecret |
| Version | string | No | The signature version required when the origin is AWS S3. | v2 |
| Region | string | No | The region of the origin required when the origin is AWS S3. | us-east-1 |
| SiteId | long | Yes | The site ID, which can be obtained by calling the ListSites API. | 21655860979**** |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "CB1A380B-09F0-41BB-A198-72F8FD6DA2FE\n",
"Id": 0
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | SourceNumberExceedLimit | The number of sources in the origin pool exceeds the quota limit. | The number of sources that can be created in the origin pool has reached the upper limit of the package. Please check your package quota and upgrade the package to obtain more quota. |
| 400 | PoolNumberExceedQuotaLimit | The number of origin pool you have added has reached the upper limit of the plan quota. Please delete the origin pool that is no longer in use or upgrade the plan and try again. | The number of origin pool you have added has reached the upper limit of the plan quota. Please delete the origin pool that is no longer in use or upgrade the plan and try again. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
| 400 | InvalidParameter.AddressConflict | Duplicate origin addresses. Make sure that each origin address for the same pool is unique. | Duplicate origin addresses. Make sure that each origin address for the same pool is unique. |
| 400 | OriginPoolNameConflict | The specified origin pool name already exists or its hostname conflicts with a load balancer name. Try again with a unique name. | The specified origin pool name already exists or its hostname conflicts with a load balancer name. Try again with a unique name. |
| 400 | SourceAddressInvalid | Invalid origin address. Check whether the IP address or domain name is in the valid format. | Invalid origin address. Check whether the IP address or domain name is in the valid format. |
| 400 | SourceCircleExist | The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry. | The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry. |
| 404 | SiteNotFound | The website does not exist or does not belong to you. | The website does not exist or does not belong to you. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-11-07 | The Error code has changed | View Change Details |
