CreateImageCache
Creates an image cache to accelerate the pulling of container images when creating ACS pods.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
acc:CreateImageCache |
create |
*ImageCache
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The idempotency token. |
7f3a2c18-6c47-4eb7-a6bb-8432a394a620 |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| ImageCacheName |
string |
Yes |
The name of the image cache. |
my-imc |
| Images |
array |
Yes |
The container images used to create the image cache. Currently, only one image is supported. |
|
|
string |
No |
The name of the container image. |
registry-vpc.cn-hangzhou.aliyuncs.com/*****/*****:v1 |
|
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-aekzh43v***** |
| Tags |
array<object> |
No |
The tags of the image cache. You can specify up to 20 tags. |
|
|
object |
No |
The tag object of the image cache. |
||
| Key |
string |
No |
The tag key of the image cache. |
imc |
| Value |
string |
No |
The tag value of the image cache. |
test |
| NetworkConfig |
object |
Yes |
The network configurations for pulling images when creating the image cache. |
|
| VSwitchIds |
array |
Yes |
The IDs of the vSwitches. You can specify up to 10 vSwitch IDs. One of the vSwitches is selected to pull the image. |
|
|
string |
No |
The ID of the vSwitch. |
vsw-0jlqxyfxgdw4tzqy***** |
|
| SecurityGroupId |
string |
Yes |
The ID of the security group. |
sg-0jlgektkddwa42n***** |
| EipInstance |
object |
No |
The configurations of the elastic IP address (EIP) instance. |
|
| InstanceId |
string |
No |
The elastic IP address. This parameter takes precedence. If you specify this parameter, other parameters are ignored. |
eip-0jl0bx3fnpnjc9i4***** |
| AutoCreate |
boolean |
No |
Specifies whether automatic creation of an EIP is enabled. Valid values:
|
true |
| Bandwidth |
integer |
No |
The bandwidth of the EIP for automatic creation. Unit: Mbit/s. |
100 |
| ImageRegistryCredentials |
array<object> |
No |
The credentials of the image registry. |
|
|
object |
No |
The credential object of the image registry. |
||
| Server |
string |
No |
The address of the image registry without the http:// or https:// prefix. |
registry-vpc.cn-hangzhou.aliyuncs.com |
| Username |
string |
No |
The username of the image registry. |
myusername |
| Password |
string |
No |
The password of the image registry. |
mypassword |
| UsePlainHttp |
boolean |
No |
Specifies whether the service uses the HTTP protocol to pull images to prevent image pull failures caused by protocol mismatches.
Default value: Valid values:
|
false |
| SkipCertVerification |
boolean |
No |
Specifies whether to skip certificate verification when you create an image cache by using images from a self-managed image registry that uses a self-signed certificate to prevent image pull failures caused by certificate verification failures.
Default value: Valid values:
|
false |
| AcrRegistryInfos |
array<object> |
No |
The ACR Enterprise instance information. |
|
|
object |
No |
The ACR Enterprise instance object. |
||
| InstanceId |
string |
No |
The ID of the ACR Enterprise instance. |
cri-nwj395hgf6f***** |
| RegionId |
string |
No |
The region to which the ACR Enterprise instance belongs. |
cn-hangzhou |
| Platform |
string |
No |
The platform type of the image cache. Valid values: linux/amd64 and windows/amd64. Default value: linux/amd64. |
windows/amd64 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The ID of the request. |
0E234675-3465-4CC3-9D0F-9A864BC***** |
| ImageCacheId |
string |
The ID of the image cache. |
imc-bp1dj***** |
Examples
Success response
JSON format
{
"RequestId": "0E234675-3465-4CC3-9D0F-9A864BC*****",
"ImageCacheId": "imc-bp1dj*****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | %s. | Invalid parameter |
| 400 | InvalidParameter.LengthExceeded | %s. | Array parameter exceeds maximum length |
| 400 | MissingParameter | %s. | Missing parameter |
| 400 | Idempotence.Failed | An error occurred while processing your request. Use the new Token and try again. | idempotent failure |
| 400 | Idempotence.Processing | The request is being processed. Please try again. | The request is being processed |
| 400 | Idempotence.SignatureMismatch | The idempotence signature of the specified request does not match the previous request. | The idempotence signature of the specified request does not match the previous request |
| 400 | InvalidParameter.NotFound | %s. | The specific parameter does not exist. |
| 400 | InsufficientAvailableBalance | Your available balance is insufficient for this purchase. Please add funds to your account and try again. | Your account available limit is less than 0, please recharge before trying to purchase. |
| 403 | CreateServiceLinkedRoleDenied | Please make sure the account has ram:CreateServiceLinkedRole permission. | Please make sure the account has ram:CreateServiceLinkedRole permission |
| 403 | Forbidden | User not authorized to operate on the specified resource. | User not authorized to operate on the specified resource |
| 403 | Ram.NoPermission | %s. | RAM User has no permission |
| 403 | EntityNotExist.ResourceId | The resource does not exist. | The resource does not exist |
| 403 | EntityNotExist.ResourceGroup | The resource group does not exist. | The resource group does not exist |
| 403 | Acr.UserNotExist | ACR user is not exist. | ACR user is not exist |
| 403 | Acr.AuthenticationFailed | ACR user is not authorized to perform this action. | ACR user is not authorized to perform this action |
| 403 | ImageCache.NotSupport | Image cache is not available for all users. If you want to enable this function, please contact us. | Image cache is not available for all users. If you want to enable this function, please contact us. |
| 403 | IncorrectOperation | %s. | Operation is forbidden, this resource does not support this operation |
| 403 | IncorrectStatus | %s. | Operation is forbidden, resource status is incorrect |
| 403 | QuotaExceeded | Your current account quota is insufficient. | The user quota for this resource is insufficient. |
| 403 | RegionNotSupport | The specified Region is not supported. | The specified Region is not supported |
| 403 | NoResourceAvailable | %s. | No resource available |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.