Creates an origin pool for a site. The origin pool can be used with a load balancer or for direct back-to-origin requests.
Operation description
An origin pool supports multiple origin types: domain names, IP addresses, OSS buckets, and S3 buckets. OSS and S3 origins support back-to-origin authentication.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
esa:CreateOriginPool |
create |
*Site
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The origin pool name. Must be unique within the site. |
pool1 |
| Enabled |
boolean |
No |
Whether the origin pool is enabled.
|
true |
| Origins |
array<object> |
No |
The origins to add to the origin pool. |
|
|
array<object> |
No |
The configuration for a single origin. |
||
| Name |
string |
No |
The origin name. Must be unique within the origin pool. |
origin1 |
| Address |
string |
No |
The origin address, such as www.example.com. |
www.example.com |
| Enabled |
boolean |
No |
Whether the origin is enabled.
|
true |
| Header |
any |
No |
The request header for back-to-origin requests. Only the |
{ "Host": [ "example.com" ] } |
| Weight |
integer |
No |
The origin weight. Valid values: 0 to 100. |
50 |
| Type |
string |
No |
The origin type. Valid values:
|
ip_domain |
| AuthConf |
object |
No |
The authentication configuration. Required for OSS or S3 origins that require authentication. |
|
| AuthType |
string |
No |
The authentication type. Valid values:
|
public |
| AccessKey |
string |
No |
The access key for private authentication. |
yourAccessKeyID |
| SecretKey |
string |
No |
The secret key for private authentication. |
yourAccessKeySecret |
| Version |
string |
No |
The signature version. Required for S3 origins. |
v2 |
| Region |
string |
No |
The origin region. Required for S3 origins. |
us-east-1 |
| IpVersionPolicy |
string |
No |
The IP version for back-to-origin requests. Valid values:
|
round_robin |
| SiteId |
integer |
Yes |
The site ID. To obtain this ID, call the ListSites operation. |
21655860979**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Response schema |
||
| RequestId |
string |
The request ID. |
CB1A380B-09F0-41BB-A198-72F8FD6DA2FE |
| Id |
integer |
The origin pool ID. |
103852052519**** |
Examples
Success response
JSON format
{
"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. |
| 400 | SourceInBlackList | The source is in the black list. | The source is in the black list. |
| 400 | InvalidParameter.PrivateIpAsSourceUnsupported | The provided origin is an invalid private IP address. Please verify and resubmit. | The provided origin is an invalid private IP address. Please verify and resubmit. |
| 400 | InvalidParameter.SourceIpInBlacklist | The provided origin is an invalid private IP address. Please verify and resubmit. | The provided origin is an invalid private IP address. Please verify and resubmit. |
| 400 | OriginPool.TypeNotSupport | The origin address pool type is not supported. | The origin address pool type is not supported. |
| 400 | Instance.NotOnline | Your plan is unavailable due to an overdue payment. Complete the payment first. | Your plan is unavailable due to an overdue payment. Complete the payment first. |
| 404 | SiteNotFound | The website does not exist or does not belong to you. | The website does not exist or does not belong to you. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.