修改单个源地址池,传入源地址池ID指定单个源地址池,进行修改。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Id |
integer |
是 |
源地址池 ID,可通过调用 ListOriginPools 接口获取。 |
1038520525196928 |
| Enabled |
boolean |
否 |
源地址池是否启用:
|
true |
| Origins |
array<object> |
否 |
源地址池里添加的源站信息,多个源站使用数组传值。 |
|
|
array<object> |
否 |
源地址池里添加的源站信息。 |
||
| Name |
string |
否 |
源站名称,一个源地址下源站名称唯一。 |
origin1 |
| Address |
string |
否 |
源站地址,如:www.example.com。 |
www.example.com |
| Enabled |
boolean |
否 |
源站是否启用:
|
true |
| Header |
any |
否 |
回源时带的请求头,只支持 Host。 |
{ "Host": [ "example.com" ] } |
| Weight |
integer |
否 |
权重,0-100 的整数。 |
50 |
| Type |
string |
否 |
源站类型:
|
OSS |
| AuthConf |
object |
否 |
鉴权信息,源站为 OSS 或者 S3 等源站需要鉴权时,需要传鉴权相关配置信息。 |
|
| AuthType |
string |
否 |
鉴权类型。
|
public |
| AccessKey |
string |
否 |
私有鉴权时需要传的 AccessKey。 |
yourAccessKeyID |
| SecretKey |
string |
否 |
私有鉴权时需要传的 SecretKey。 |
yourAccessKeySecret |
| Version |
string |
否 |
源站为 AWS S3 时需要传的签名版本。 |
v2 |
| Region |
string |
否 |
源站为 AWS S3 时需要传的源站 region。 |
us-east-1 |
| IpVersionPolicy |
string |
否 |
||
| SiteId |
integer |
是 |
站点 ID,可通过调用 ListSites 接口获取。 |
216558609793952 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
15C66C7B-671A-4297-9187-2C4477247A74 |
| Id |
integer |
源地址池 ID。 |
1038520525196928 |
示例
正常返回示例
JSON格式
{
"RequestId": "15C66C7B-671A-4297-9187-2C4477247A74",
"Id": 1038520525196928
}
错误码
|
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 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 400 | OriginPoolNotExist | The specified origin pool does not exist or does not belong to your account or website. Check and try again. | 传入的源地址池不存在,或该地址池不属于当前用户和站点,请您确认后重试。 |
| 400 | Instance.NotOnline | Your plan is unavailable due to an overdue payment. Complete the payment first. | 您的套餐实例因欠费当前处于非上线状态,请先完成续费操作以继续使用。 |
| 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 | LockFailed | The system is handling requests you previously submitted. Try again later. | 您有其他请求正在处理中,请稍后再进行重试。 |
| 400 | InvalidParameter.AddressConflict | Duplicate origin addresses. Make sure that each origin address for the same pool is unique. | 传入的源站地址有冲突,在同一个源地址池中,不能存在重复的源站地址,请您确保源站地址的唯一性。 |
| 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.SourceIpInBlacklist | The provided origin is an invalid private IP address. Please verify and resubmit. | 您输入的源服务器地址为无效的内网地址,请检查修改后重新提交。 |
| 400 | InvalidParameter.PrivateIpAsSourceUnsupported | 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. | 站点不存在,或者不属于你。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。