Updates an image cache.
Description
Only image caches that are in the Ready or UpdateFailed state can be updated.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateImageCache |
The operation that you want to perform. Set the value to UpdateImageCache. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the image cache. |
ImageCacheId | String | Yes | imc-bp195erqe9o2pb09**** |
The 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. |
ImageCacheName | String | Yes | testcache |
The name of the image cache. |
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 idempotence of the request. You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain 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 caches that fail to be created are only retained for one day.
|
AutoMatchImageCache | Boolean | No | true |
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. |
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:
Default value: false. Note The system automatically generates a temporary local snapshot for the image cache
during the use of the instant image cache feature. You are charged for the instant
use of the snapshot.
|
StandardCopyCount | Integer | No | 7 |
The number of regular snapshots. By default, the system creates one snapshot for each image cache. If an image cache is used to create multiple elastic container instances at a time, we recommend that you set this parameter to create multiple snapshots for the image cache. We recommend that you create one snapshot for creation of every 1,000 elastic container instances. Note If you set the Flash parameter to false, instant image cache is disabled. In this
case, only regular snapshots are generated during the creation of the image cache.
|
FlashCopyCount | Integer | No | 7 |
The number of temporary local snapshots. By default, the system creates one snapshot for each image cache. If an image cache is used to create multiple elastic container instances at a time, we recommend that you set this parameter to create multiple snapshots for the image cache. We recommend that you create one snapshot for creation of every 1,000 elastic container instances. Note If you set the Flash parameter to true, instant image cache is enabled. During the
creation of the image cache, the system first creates a temporary local snapshot for
you to instantly use the snapshot. After the temporary local snapshot is created,
the system begins to create a regular snapshot. After the regular snapshot is created,
the temporary local snapshot is automatically deleted.
|
ImageRegistryCredential.N.Password | String | No | registry-vpc.cn-hangzhou.aliyuncs.com |
The endpoint of the image repository. |
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 | String | 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 | String | No | test****-registry.cn-hangzhou.cr.aliyuncs.com |
Domain name N of Container Registry Enterprise Edition instance N. All domain names of instance N are displayed by default. You can specify domain names. Separate multiple domain names with commas (,). |
AcrRegistryInfo.N.InstanceName | String | No | test**** |
The name of the Container Registry Enterprise Edition instance. |
AcrRegistryInfo.N.InstanceId | String | No | cri-nwj395hgf6f3**** |
The ID of the Container Registry Enterprise Edition instance. |
AcrRegistryInfo.N.RegionId | String | No | cn-hangzhou |
The region ID of Container Registry Enterprise Edition instance N. |
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
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateImageCacheResponse>
<RequestId>0E234675-3465-4CC3-9D0F-9A864BC391DD</RequestId>
</UpdateImageCacheResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"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. | 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 vCPU and memory specifications are invalid. |
400 | IncorrectStatus | %s | The error message returned because the status of the specified instance is invalid. |
400 | ServiceNotEnabled | %s | The error message returned because the service that is 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 disk volumes are not supported. If you want to use disk volumes, 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 no parameters need to be updated in this operation. |
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 current zone. |
403 | QuotaExceeded | %s quota exceeded. | The error message returned because the maximum number of elastic container instances allowed is reached. |
403 | Zone.NotOnSale | The specified zone is not available for purchase. | The error message returned because the specified zone is unavailable for purchase of the instance or because the vSwitches in the specified VPC cannot be used in the current 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 are not allowed to perform the operation. |
403 | InvalidUser.PassRoleForbidden | The RAM user is not authorized to assume a RAM role. | The error message returned because the RAM user is not authorized to assume the 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 in the current zone. Try other regions, zones or 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 risks are detected in your default credit card or debit card. Click the URL 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.