参数 | 类型 | 是否必选 | 示例值 | 描述 |
Action | String | 是 | CreateImageCache | 接口名称。当前 API 的名称为 CreateImageCache。 |
Version | String | 是 | 2022-05-12 | 接口版本。当前 API 的版本为 2022-05-12。 |
ImageCacheName | String | 是 | test-imc | 镜像缓存名称。
|
SubnetIds | Array of String | 是 | ["subnet-3rf6vwbgkg****"] | |
SecurityGroupIds | Array of String | 是 | ["sg-2byy13cnsczy****"] | |
Images | Array of String | 是 | ["cr-cn-beijing.volces.com/vke****/nginx:latest"] | 制作镜像缓存所需要的容器镜像列表。 |
ImageCacheSize | Integer | 否 | 50 | 镜像缓存的大小。
|
ImageRegistryCredentials | 否 | - | 镜像仓库(CR)的访问凭证信息。 | |
AutoPrewarmConfig | 否 | - | 镜像缓存对应的弹性块存储(EBS)快照预热策略配置。 | |
RetentionDays | Integer | 否 | 15 | 镜像缓存保留时间,过期后镜像缓存会被清理。
注意 请求参数中不传入该参数时,镜像缓存 15 天后过期。 |
RegistryHostnameResolvNameservers | Array of String | 否 | ["10.xx.xx.xx", "10.xx.xx.xx"] | 用于解析主机名的 DNS 服务器 IP 地址。
|
BaseImageCacheId | String | 否 | imc-3uqroqkx0i3j**** | 指定已有的镜像缓存并开启镜像缓存增量制作。指定后,新创建的镜像缓存将复用所指定镜像缓存的镜像层,加快新镜像缓存的创建速度。 注意 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
Server | String | 是 | cr-cn-beijing.volces.com | 不带http://或https://前缀的镜像仓库域名。 |
UserName | String | 是 | user_****@21000**** | |
Password | String | 是 | dGhpcyBpcyBh******** | 镜像仓库实例用户名对应的密码。 注意 |
参数 | 类型 | 是否必选 | 示例值 | 描述 |
ZoneIds | Array of String | 否 | ["cn-beijing-b"] | 需要预热的快照可用区。 说明 不传入参数值时,默认用创建镜像缓存时指定的子网所对应的可用区。 |
PrewarmRetentionDays | Integer | 否 | 90 | 镜像缓存对应 EBS 快照的预热保留时长。
|
参数 | 类型 | 示例值 | 描述 |
ImageCacheId | String | imc-3uqroqkx0i3jabcdefgs | 镜像缓存 ID。 |
HTTP 状态码 | 错误码 | 错误信息 | 说明 |
400 | LimitExceeded.ImageCacheSize | You have reached the limit of the size of image cache that you can create. | 指定的镜像缓存盘容量超过所支持的最大值。请确认 ImageCacheSize参数要求的取值范围。 |
400 | VpcMismatch.{{Parameter}} | The specified {{resourceType}} {{resourceId}} and {{resourceType}} {{resourceId}} are not in the same vpc. | 指定的子网、安全组等不同属于一个私有网络(VPC),请确保其处于同一个 VPC 内。 |
400 | OutOfStorage.ImageCacheSize | The size of the specified image cache is too small. | 指定的镜像缓存盘容量过小。请确认 ImageCacheSize参数要求的取值范围。 |
400 | Conflict.Name | The specified name conflicts with existing {{resourceType}}. | 指定的地域内已经存在同名的镜像缓存。请更新镜像缓存名称后重试。 |
400 | NotFound.BaseImageCacheId | The specified imageCache {{BaseImageCacheId}} not found | 指定的用于镜像缓存增量制作的基础镜像缓存不存在。请确认已有镜像缓存 ID 并重试。 |
400 | OperationDenied.ImageCacheStatus | The action has been denied due to wrong source image cache status {{Status}}. | 指定的已有镜像缓存当前状态不支持该操作。请确认 BaseImageCacheId 参数指定的已有镜像缓存状态是否处于 Ready状态并重试。 |