全部产品
Search
文档中心

边缘安全加速:CreateOriginPool - 创建源地址池

更新时间:Jan 30, 2026

在站点在创建源地址池,创建成功后,源地址池可以用于负载均衡器,也可以用于记录直接回源。

接口说明

源地址下可以添加多个源站,支持域名、IP、OSS、S3 等类型的源站,支持 OSS 和 S3 类型源站的回源鉴权。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

Name

string

源地址池名称,一个站点下源地址池名称唯一。

pool1

Enabled

boolean

源地址池是否启用:

  • true: 启用;

  • false:不启用。

true

Origins

array<object>

源地址池里添加的源站信息,多个源站使用数组传值。

array<object>

单个源站信息。

Name

string

源站名称,一个源地址下源站名称唯一。

origin1

Address

string

源站地址,如:www.example.com。

www.example.com

Enabled

boolean

源站是否启用:

  • true: 启用;

  • false:不启用。

true

Header

any

回源时带的请求头,只支持 Host。

{ "Host": [ "example.com" ] }

Weight

integer

权重,0-100 的整数。

50

Type

string

源站类型:

  • ip_domain: ip 或域名类型源站;

  • OSS:OSS 地址源站;

  • S3:AWS S3 源站。

ip_domain

AuthConf

object

鉴权信息,源站为 OSS 或者 S3 等源站需要鉴权时,需要传鉴权相关配置信息。

AuthType

string

鉴权类型。

  • public:公共读写,源站为 OSS 或 S3 且为公共读写时使用;

  • private_same_account:私有同账号,源站为 OSS,且鉴权类型为同账号私有鉴权时使用;

  • private_cross_account:私有跨账号,源站为 OSS,且鉴权类型为跨账号私有鉴权时使用;

  • private:源站为 S3,且鉴权类型为私有时使用。

public

AccessKey

string

私有鉴权时需要传的 access key。

yourAccessKeyID

SecretKey

string

私有鉴权时需要传的 secret key。

yourAccessKeySecret

Version

string

源站为 AWS S3 时需要传的签名版本。

v2

Region

string

源站为 AWS S3 时需要传的源站 region。

us-east-1

IpVersionPolicy

string

SiteId

integer

站点 ID,可通过调用 ListSites 接口获取。

21655860979****

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID。

CB1A380B-09F0-41BB-A198-72F8FD6DA2FE

Id

integer

新增的源地址池 ID。

103852052519****

示例

正常返回示例

JSON格式

{
  "RequestId": "CB1A380B-09F0-41BB-A198-72F8FD6DA2FE\n",
  "Id": 0
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidParameter The specified parameter is invalid. 输入参数规范校验失败。
400 SourceNumberExceedLimit The number of sources in the origin pool exceeds the quota limit. 您在源地址池中可创建的源站个数已达到套餐上限,请查看您的套餐配额,并升级套餐以获得更多配额。
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. 您添加的源站组数量已经达到套餐的配额上限,请删除不再使用的源站组或者升级套餐后,进行重试。
400 InternalException 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. 传入的源站地址有冲突,在同一个源地址池中,不能存在重复的源站地址,请您确保源站地址的唯一性。
400 OriginPoolNameConflict 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. 源站地址无效,请检查并确保输入的是正确的IP或域名格式。
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. 当前要操作资源的主机记录已经是其他资源的源站,或者当前资源的源站已经被添加为主机记录,为避免回环产生,请修改主机记录或者源站后进行重试。
400 SourceInBlackList The source is in the black list. 源站在黑名单中。
400 InvalidParameter.PrivateIpAsSourceUnsupported 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. 您输入的源服务器地址为无效的内网地址,请检查修改后重新提交。
400 OriginPool.TypeNotSupport The origin address pool type is not supported. 源地址池类型不支持。
404 SiteNotFound The website does not exist or does not belong to you. 站点不存在,或者不属于你。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情