Updates an image cache.
Operation description
Only image caches that are in the Ready or UpdateFailed state can be updated.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eci:UpdateImageCache | update | *ImageCache acs:eci:{#regionId}:{#accountId}:imagecache/{#ImageCacheId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the image cache. | cn-hangzhou |
ImageCacheId | string | Yes | The ID of the image cache. | imc-bp195erqe9o2pb09**** |
SecurityGroupId | string | No | The ID of the security group to which the image cache belongs. | sg-uf66jeqopgqa9hdn**** |
VSwitchId | string | No | The ID of the vSwitch to which the image cache is connected. | vsw-uf6h3rbwbm90urjwa**** |
ImageCacheName | string | Yes | The name of the image cache. | testcache |
EipInstanceId | string | No | The ID of the elastic IP address (EIP). If you want to pull public images, you must make sure that the elastic container instance can access the Internet. To enable Internet access, you can configure an EIP or a NAT gateway for the instance. | eip-2zedsm5mfl3uhdj2d**** |
ResourceGroupId | string | No | The ID of the resource group to which the image cache belongs. | rg-aekzh43v***** |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token 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 the idempotence of a request? | 123e4567-xxx-xxx-xxxx-42665544xxxx |
ImageCacheSize | integer | No | The size of the image cache. Unit: GiB. Default value: 20. | 20 |
RetentionDays | integer | No | The retention period of the image cache. Unit: days. When the retention period elapses, the image cache expires and is deleted. By default, image caches never expire. Note
The image caches that fail to be created are retained for only 1 day.
| 7 |
AutoMatchImageCache | boolean | No | Specifies whether to enable reuse of image cache layers. If you enable this feature and the image cache that you want to create and an existing image cache contain duplicate image layers, the system reuses the duplicate image layers to create the new image cache. This accelerates the creation of the image cache. Valid values:
Default value: false. | true |
ImageRegistryCredential | array<object> | No | The information about the image repository. | |
object | No | The information about the image repository. | ||
Password | string | No | The password that is used to access the image repository. | password |
Server | string | No | The image repository address without | registry-vpc.cn-hangzhou.aliyuncs.com |
UserName | string | No | The username that is used to access the image repository. | username |
Image | array | No | Container images that are used to create the image cache. | |
string | No | The container image that is used to create the image cache. | registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/nginx:1.15.10-perl | |
Tag | array<object> | No | The tags to add to the image cache. A maximum of 20 tags can be added to the image cache. | |
object | No | The information about the tag. A maximum of 20 tags can be added to the image cache. | ||
Key | string | No | The key of tag N to add to the image cache. | imc |
Value | string | No | The value of tag N to add to the image cache. | test |
Flash | boolean | No | Specifies whether to enable the instant image cache feature. The feature can accelerate the creation of image caches. Valid values:
Default value: false. | true |
AcrRegistryInfo | array<object> | No | The information about the Container Registry Enterprise Edition instance. | |
object | No | The information about the Container Registry Enterprise Edition instance. | ||
Domain | array | No | The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. You can specify multiple domain names. Separate multiple domain names with commas (,). | |
string | No | The domain names of the Container Registry Enterprise Edition instance. By default, all domain names of the instance are displayed. You can specify multiple domain names. Separate multiple domain names with commas (,). | test****-registry.cn-hangzhou.cr.aliyuncs.com | |
InstanceName | string | No | The name of the Container Registry Enterprise Edition instance. | test**** |
InstanceId | string | No | The ID of the Container Registry Enterprise Edition instance. | cri-nwj395hgf6f3**** |
RegionId | string | No | The region ID of the Container Registry Enterprise Edition instance. | cn-hangzhou |
StandardCopyCount | integer | No | The number of duplicates of regular snapshots. By default, the system creates one snapshot for each image cache. If you use the image cache to create multiple elastic container instances at a time, we recommend that you configure this parameter to create multiple snapshot duplicates for the image cache. We recommend that you create one snapshot duplicate for creation of every 1,000 elastic container instances. Note
If you disable the instant image cache feature by setting Flash to false, only regular snapshots are generated when you create an image cache.
| 7 |
FlashCopyCount | integer | No | The number of duplicates of temporary local snapshots. By default, the system creates one snapshot for each image cache. If you use the image cache to create multiple elastic container instances at a time, we recommend that you configure this parameter to create multiple snapshot duplicates for the image cache. We recommend that you create one snapshot duplicate for creation of every 1,000 elastic container instances. Note
If you enable the instant image cache feature by setting Flash to true, a local snapshot is first created during the creation of the image cache. After the local snapshot is created, regular snapshots start to be created. After the regular snapshots are created, the local snapshot is automatically deleted.
| 7 |
EliminationStrategy | string | No | The elimination policy for the image cache. This parameter is empty by default, which indicates that the image cache is always retained. You can set this parameter to LRU, which indicates that the image cache can be automatically deleted. When the number of image caches reaches the quota, the system automatically deletes the image caches whose EliminationStrategy parameter is set to LRU and that are least recently used. | LRU |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0E234675-3465-4CC3-9D0F-9A864BC391DD"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | Account.Arrearage | Your account has an outstanding payment. | Your account has an outstanding payment. |
400 | DryRunOperation | Request validation has been passed with DryRun flag set. | Request validation has been passed with DryRun flag set. |
400 | InvalidParameter.CPU.Memory | The specified cpu and memory are not allowed | - |
400 | IncorrectStatus | %s | - |
400 | ServiceNotEnabled | %s | You have not activated the service that is required for processing this request. |
400 | DiskVolume.NotSupport | The disk volume is not supported. | Disk volume does not support your structure. If you want to enable this function, contact us. |
400 | RamRole.NotSupport | The RAM role is not supported. | The RAM role is not supported. |
400 | ImageCache.IncorrectStatus | %s | - |
400 | ImageCacheNotSupport | Image cache is not available for all users. If you want to enable this function, contact us. | Container image cache is currently not available to all users. Submit a ticket if you need to use the feature. |
400 | OperationConflict | Request was denied due to conflict with a previous request. | Request was denied due to conflict with a previous request. |
400 | NoNeedUpdate | There are no changes to be updated for current resource. | 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. | - |
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. | The specified action is not available for you. |
403 | Forbidden.OnlyForInvitedTest | Eci create action is only open to invited users during public beta. | Eci create action is only open to invited users during public beta. |
403 | OperationDenied.SecurityGroupMisMatch | The specified VSwitchId and SecurityGroupId are not in the same VPC. | The specified VSwitchId and SecurityGroupId are not in the same VPC. |
403 | InvalidVSwitchId.IpNotEnough | The specified VSwitch does not have enough IP addresses. | - |
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. | The RAM user is not authorized 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 | - |
403 | NoPermission | The RAM role AliyunECIContainerGroupRole does not belong to eci.aliyuncs.com. Please 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. | - |
403 | CreateServiceLinkedRole.Denied | Please make sure the account has ram:CreateServiceLinkedRole permission. | Please make sure the account has ram:CreateServiceLinkedRole permission. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-09-18 | The Error code has changed | View Change Details |
2022-03-01 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2022-03-01 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2021-09-10 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2021-08-20 | Add Operation | View Change Details |