修改单个源地址池,传入源地址池ID指定单个源地址池,进行修改。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
下表是API对应的授权信息,可以在RAM权限策略语句的Action
元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:
- 操作:是指具体的权限点。
- 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
- 资源类型:是指操作中支持授权的资源类型。具体说明如下:
- 对于必选的资源类型,用前面加 * 表示。
- 对于不支持资源级授权的操作,用
全部资源
表示。
- 条件关键字:是指云产品自身定义的条件关键字。
- 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 |
---|---|---|---|---|
esa:UpdateOriginPool | update | *Site acs:esa:{#regionId}:{#accountId}:site/{#SiteId} |
| 无 |
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
Id | long | 是 | 源地址池 ID,可通过调用 ListOriginPools 接口获取。 | 1038520525196928 |
Enabled | boolean | 否 | 源地址池是否启用:
| true |
Origins | array<object> | 否 | 源地址池里添加的源站信息,多个源站使用数组传值。 | |
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 |
SiteId | long | 是 | 站点 ID,可通过调用 ListSites 接口获取。 | 216558609793952 |
返回参数
示例
正常返回示例
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. | 源站在黑名单中。 |
404 | SiteNotFound | The website does not exist or does not belong to you. | 站点不存在,或者不属于你。 |
访问错误中心查看更多错误码。