通过UpdateImageCache更新容器镜像缓存。
接口说明
仅支持更新状态为Ready(创建完成)或者UpdateFailed(更新失败)的镜像缓存。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateImageCache |
系统规定参数。取值:UpdateImageCache。 |
RegionId | String | 是 | cn-hangzhou |
地域ID。 |
ImageCacheId | String | 是 | imc-bp195erqe9o2pb09**** |
镜像缓存ID。 |
SecurityGroupId | String | 是 | sg-uf66jeqopgqa9hdn**** |
安全组ID。 |
VSwitchId | String | 是 | vsw-uf6h3rbwbm90urjwa**** |
交换机ID。 |
ImageCacheName | String | 是 | testcache |
镜像缓存名称。 |
EipInstanceId | String | 否 | eip-2zedsm5mfl3uhdj2d**** |
弹性公网IP。如果需要拉取公网镜像,需要确保ECI实例能够访问公网,您可以配置EIP或者NAT网关实现公网访问。 |
ResourceGroupId | String | 否 | rg-aekzh43v***** |
资源组ID。 |
ClientToken | String | 否 | 123e4567-xxx-xxx-xxxx-42665544xxxx |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。只支持ASCII字符,且不能超过64个字符。更多信息,请参见如何保证幂等性。 |
ImageCacheSize | Integer | 否 | 20 |
镜像缓存的大小。默认为20 GiB。 |
RetentionDays | Integer | 否 | 7 |
镜像缓存保留时间,过期将会被清理,默认永不过期。 说明 创建失败的镜像缓存仅保留一天。
|
AutoMatchImageCache | Boolean | 否 | true |
是否开启镜像缓存复用。开启后,新创建的镜像缓存可以复用已有镜像缓存的镜像层,加快镜像缓存的制作速度。取值范围:
默认为false。 |
ImageRegistryCredential.N.Password | String | 否 | password |
镜像仓库密码。 |
ImageRegistryCredential.N.Server | String | 否 | registry-vpc.cn-hangzhou.aliyuncs.com |
不带 |
ImageRegistryCredential.N.UserName | String | 否 | username |
镜像仓库用户名。 |
Image.N | String | 否 | registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl |
用于制作镜像缓存的容器镜像。 |
Tag.N.Key | String | 否 | imc |
镜像缓存标签键。N的取值范围为:1~20。 |
Tag.N.Value | String | 否 | test |
镜像缓存标签值。N的取值范围为:1~20。 |
Flash | Boolean | 否 | true |
是否开启极速镜像缓存功能,开启后,可以加速镜像缓存创建。取值范围:
默认为false。 说明 使用极速镜像缓存功能将临时生成一个本地快照,收取快照极速可用费用。
|
AcrRegistryInfo.N.Domain.N | String | 否 | test****-registry.cn-hangzhou.cr.aliyuncs.com |
ACR企业版实例的域名。默认为相应实例的所有域名。支持指定个别域名,多个以半角逗号分隔。 |
AcrRegistryInfo.N.InstanceName | String | 否 | test**** |
ACR企业版实例的名称。 |
AcrRegistryInfo.N.InstanceId | String | 否 | cri-nwj395hgf6f3**** |
ACR企业版实例ID。 |
AcrRegistryInfo.N.RegionId | String | 否 | cn-hangzhou |
ACR企业版实例所属地域。 |
StandardCopyCount | Integer | 否 | 7 |
普通快照副本数。默认情况下,一个镜像缓存对应一个快照。如果该镜像缓存将用于批量创建多个ECI实例,建议您配置该参数实现快照多副本。推荐每1000个ECI实例增加一个快照副本。 说明 未开启极速镜像缓存功能(Flash取值为false)时,创镜像缓存的过程中仅生成普通快照。
|
FlashCopyCount | Integer | 否 | 7 |
本地快照副本数。默认情况下,一个镜像缓存对应一个快照。如果该镜像缓存将用于批量创建多个ECI实例,建议您配置该参数实现快照多副本。推荐每1000个ECI实例增加一个快照副本。 说明 开启极速镜像缓存功能(Flash取值为true)时,创建镜像缓存的过程中将先创建本地快照,在本地快照创建完成后开始创建普通快照,待普通快照创建完成后会自动删除本地快照。
|
EliminationStrategy | String | 否 | LRU |
镜像缓存的淘汰策略。默认为空,表示一直保留。 支持配置为LRU,表示可以被自动删除。当镜像缓存数量达到配额限制时,系统将自动删除最不常用的EliminationStrategy为LRU的镜像缓存。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 0E234675-3465-4CC3-9D0F-9A864BC391DD |
请求ID,唯一标识。 |
示例
请求示例
https://eci.aliyuncs.com/?Action=UpdateImageCache
&ImageCacheId=imc-bp195erqe9o2pb09****
&ImageCacheName=testcache
&RegionId=cn-hangzhou
&SecurityGroupId=sg-uf66jeqopgqa9hdn****
&VSwitchId=vsw-uf6h3rbwbm90urjwa****
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateImageCacheResponse>
<RequestId>0E234675-3465-4CC3-9D0F-9A864BC391DD</RequestId>
</UpdateImageCacheResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "0E234675-3465-4CC3-9D0F-9A864BC391DD"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Account.Arrearage | Your account has an outstanding payment. | 账号已经欠费。 |
400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 此次DryRun预检请求合格。 |
400 | InvalidParameter.CPU.Memory | The specified cpu and memory are not allowed | cpu,mem不符合规格 |
400 | IncorrectStatus | %s | 指定的实例状态不正确。 |
400 | ServiceNotEnabled | %s | 该次请求所依赖的服务没有开通,请开通后再试。 |
400 | DiskVolume.NotSupport | The disk volume is not supported. | 云盘卷暂不支持,如有需要请联系我们。 |
400 | RamRole.NotSupport | The RAM role is not supported. | ram实例角色不支持 |
400 | ImageCache.IncorrectStatus | %s | 镜像缓存当前的状态不对。 |
400 | ImageCacheNotSupport | Image cache is not available for all users. If you want to enable this function, contact us. | 镜像缓存功能还未全网开放,如果有需要请联系我们。 |
400 | OperationConflict | Request was denied due to conflict with a previous request. | 该请求被禁止,因为与之前的请求冲突 |
400 | NoNeedUpdate | There are no changes to be updated for current resource. | 本次操作没有需要更新的参数 |
403 | OperationDenied.VswZoneMisMatch | The specified VSwitchId is not in the specified Zone. | 指定的交换机不在可用区 |
403 | QuotaExceeded | %s quota exceeded. | 用户允许创建的实例已经超过限制 |
403 | Zone.NotOnSale | The specified zone is not available for purchase. | 创建实例的可用区已经关闭售卖,请更换其他可用区。或者无法在该可用区使用指定 VPC 的虚拟交换机。 |
403 | Forbidden.RiskControl | This operation has been identified as an abnormal operation and cannot be processed. | 此操作已被确定为一个操作异常,无法处理。 |
403 | Forbidden.SubUser | The specified action is not available for you. | 当前用户无法执行该操作 |
403 | Forbidden.OnlyForInvitedTest | Eci create action is only open to invited users during public beta. | Eci公测阶段只对受邀的用户开放。 |
403 | OperationDenied.SecurityGroupMisMatch | The specified VSwitchId and SecurityGroupId are not in the same VPC. | 指定的交换机和安全组不在同一个VPC下 |
403 | InvalidVSwitchId.IpNotEnough | The specified VSwitch does not have enough IP addresses. | 交换机没有足够ip地址 |
403 | Forbidden.UserBussinessStatus | This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. | 用户处于欠费状态不允许创建,请充值后再尝试。 |
403 | Forbidden.UserNotRealNameAuthentication | This operation is not allowed, because you have not passed the real-name verification. | 操作被禁止,因为用户还未进行实名认证。 |
403 | InvalidUser.PassRoleForbidden | The RAM user is not authorized to assume a RAM role. | 子账号用户没有权限使用RAM实例角色 |
403 | OperationDenied.NoStock | Sales of this resource are temporarily suspended in the specified zone. We recommend that you use the multi-zone creation function to avoid the risk of insufficient resource. For more information, see https://help.aliyun.com/document_detail/157290.html | 库存不足,请尝试其它系列或者其它可用区/地域的实例,推荐使用多可用区多规格配置来避免库存不足,更多信息见:https://help.aliyun.com/document_detail/157290.html |
403 | SecurityRisk.3DVerification | We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. | 我们检测到您的默认信用卡或借记卡存在安全风险。请通过电子邮件中的链接进行验证。 |
403 | CreateServiceLinkedRole.Denied | Please make sure the account has ram:CreateServiceLinkedRole permission. | 请确保账号拥有ram:CreateServiceLinkedRole权限 |
访问错误中心查看更多错误码。