Updates an image cache.

Description

Only image caches that are in the Ready or UpdateFailed state can be updated.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No UpdateImageCache

The operation that you want to perform. Set the value to UpdateImageCache.

ImageCacheId String Yes imc-bp195erqe9o2pb09****

The ID of the image cache.

ImageCacheName String Yes testcache

The name of the image cache.

RegionId String Yes cn-hangzhou

The region ID of the image cache.

SecurityGroupId String Yes sg-uf66jeqopgqa9hdn****

The ID of the security group.

VSwitchId String Yes vsw-uf6h3rbwbm90urjwa****

The ID of the vSwitch.

EipInstanceId String No eip-2zedsm5mfl3uhdj2d****

The ID of the elastic IP address (EIP). If you want to pull images over the Internet, make sure that the elastic container instance can access the Internet. You can configure an EIP or a NAT gateway for the elastic container instance to access the Internet.

ResourceGroupId String No rg-aekzh43v*****

The ID of the resource group.

ClientToken String No 123e4567-xxx-xxx-xxxx-42665544xxxx

The client token that is used to ensure the idempotency of the request. You can use different methods to generate this value, but you must ensure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

ImageCacheSize Integer No 20

The size of the image cache. Unit: GiB. Default value: 20.

RetentionDays Integer No 7

The retention period of the image cache. Unit: days. When the retention period ends, the image cache expires and is deleted. By default, image caches do not expire.

Note The image cache that fails to be created is retained for only one day.
AutoMatchImageCache Boolean No true

Specifies whether to enable image cache reuse. After you enable the feature, you can use the image layers of existing image caches to create new image caches. This way, image caches can be created in an accelerated manner. Valid values:

  • true: enables image cache reuse.
  • false: does not enable image cache reuse.

Default value: false.

Flash Boolean No true

Specifies whether to enable instant image cache. After you enable the feature, image caches can be created in an accelerated manner. Valid values:

  • true: enables instant image cache.
  • false: does not enable instant image cache.

Default value: false.

ImageRegistryCredential.N.Password String No registry-vpc.cn-hangzhou.aliyuncs.com

The endpoint of image repository N without the prefix http:// or https://.

ImageRegistryCredential.N.Server String No username

The username that is used to log on to image repository N.

ImageRegistryCredential.N.UserName String No password

The password that is used to log on to image repository N.

Image.N RepeatList No registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl

Container image N that is used to create the image cache.

Tag.N.Key String No imc

The key of tag N of the image cache. Valid values of N: 1 to 20.

Tag.N.Value String No test

The value of tag N of the image cache. Valid values of N: 1 to 20.

AcrRegistryInfo.N.Domain.N RepeatList No test****-registry.cn-hangzhou.cr.aliyuncs.com

Domain name N of Container Registry Enterprise Edition instance N. The default value is all domain names of the instance. You can specify domain names. Separate multiple domain names with commas (,).

AcrRegistryInfo.N.InstanceName String No test****

The name of Container Registry Enterprise Edition instance N.

AcrRegistryInfo.N.InstanceId String No cri-nwj395hgf6f3****

The ID of Container Registry Enterprise Edition instance N.

AcrRegistryInfo.N.RegionId String No cn-hangzhou

The ID of the region to which Container Registry Enterprise Edition instance N belongs.

Response parameters

Parameter Type Example Description
RequestId String 0E234675-3465-4CC3-9D0F-9A864BC391DD

The ID of the request.

Examples

Sample requests

https://eci.aliyuncs.com/?Action=UpdateImageCache
&ImageCacheId=imc-bp195erqe9o2pb09****    
&ImageCacheName=testcache
&RegionId=cn-hangzhou    
&SecurityGroupId=sg-uf66jeqopgqa9hdn****    
&VSwitchId=vsw-uf6h3rbwbm90urjwa****    
&<Common request parameters>

Sample success responses

XML format

<UpdateImageCacheResponse>
      <RequestId>0E234675-3465-4CC3-9D0F-9A864BC391DD</RequestId>
</UpdateImageCacheResponse>

JSON format

{
    "RequestId":"0E234675-3465-4CC3-9D0F-9A864BC391DD"
}

Error codes

HttpCode Error code Error message Description
400 Account.Arrearage Your account has an outstanding payment. The error message returned because you have an overdue payment in your account.
400 DryRunOperation Request validation has been passed with DryRun flag set. The error message returned because the request is determined as valid in the dry run.
400 InvalidParameter.CPU.Memory The specified cpu and memory are not allowed The error message returned because the CPU and memory specifications are invalid.
400 IncorrectStatus %s The error message returned because the status of the specified elastic container instance is invalid.
400 ServiceNotEnabled %s The error message returned because the service required to call the operation is not activated. Activate the service and try again later.
400 DiskVolume.NotSupport The disk volume is not supported. The error message returned because the disk cannot be used as a volume. If the error persists, contact Alibaba Cloud technical support personnel.
400 RamRole.NotSupport The RAM role is not supported. The error message returned because the specified Resource Access Management (RAM) role is not supported.
400 ImageCache.IncorrectStatus %s The error message returned because the status of the image cache is invalid.
400 ImageCacheNotSupport Image cache is not available for all users. If you want to enable this function, contact us. The error message returned because the image cache feature is not available to all users. If you need to use this feature, contact Alibaba Cloud technical support personnel.
400 OperationConflict Request was denied due to conflict with a previous request. The error message returned because the request conflicts with a previous request and is denied.
400 NoNeedUpdate There are no changes to be updated for current resource. The error message returned because this operation updates no parameters.
403 OperationDenied.VswZoneMisMatch The specified VSwitchId is not in the specified Zone. The error message returned because the specified vSwitch is not deployed in the specified zone.
403 QuotaExceeded %s quota exceeded. The error message returned because the maximum number of elastic container instances has been reached.
403 Zone.NotOnSale The specified zone is not available for purchase. The error message returned because the specified zone is unavailable or because the vSwitches of the specified VPC are unavailable in the specified zone. Specify another zone.
403 Forbidden.RiskControl This operation has been identified as an abnormal operation and cannot be processed. The error message returned because the operation is determined as abnormal and cannot be performed.
403 Forbidden.SubUser The specified action is not available for you. The error message returned because you are not authorized to perform the operation.
403 Forbidden.OnlyForInvitedTest Eci create action is only open to invited users during public beta. The error message returned because Elastic Container Instance is available only to invited users during the public preview period.
403 OperationDenied.SecurityGroupMisMatch The specified VSwitchId and SecurityGroupId are not in the same VPC. The error message returned because the specified vSwitch and security group are not deployed in the same VPC.
403 InvalidVSwitchId.IpNotEnough The specified VSwitch does not have enough IP addresses. The error message returned because the vSwitch does not have sufficient IP addresses.
403 Forbidden.UserBussinessStatus This operation is not allowed, because you have overdue bills. Pay the overdue bill and try again. The error message returned because you have an overdue payment. Settle the overdue payment and try again later.
403 Forbidden.UserNotRealNameAuthentication This operation is not allowed, because you have not passed the real-name verification. The error message returned because you have not completed real-name verification and the operation is not allowed.
403 InvalidUser.PassRoleForbidden The RAM user is not authorized to assume a RAM role. The error message returned because RAM users do not have the permissions to assume a RAM role.
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 The error message returned because available resources are insufficient. Try another region or other instance types. To ensure that available resources are sufficient, we recommend that you specify multiple zones and instance types. For more information, visit https://www.alibabacloud.com/help/doc-detail/157290.html.
403 NoPermission The RAM role AliyunECIContainerGroupRole does not belong to eci.aliyuncs.com. Please check and try again. The error message returned because the AliyunECIContainerGroupRole RAM role does not belong to eci.aliyuncs.com. Check and try again.
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. The error message returned because your default credit card or debit card is exposed to security risks. Click the link in the email for verification.
403 CreateServiceLinkedRole.Denied Please make sure the account has ram:CreateServiceLinkedRole permission. The error message returned because you do not have the ram:CreateServiceLinkedRole permission.

For a list of error codes, visit the API Error Center.