创建一个数据缓存。
接口说明
创建镜像缓存涉及资源计费。建议您提前了解相关计费信息。更多信息,请参见数据缓存计费。
创建镜像缓存前,您需要评估待缓存数据的大小,如果数据大小超过设置的缓存大小,将会创建失败。
创建数据缓存时,系统将自动创建一个 ECI 实例和一块 ESSD 云盘用于中转创建数据缓存。创建过程中请勿删除 ECI 实例和云盘,否则数据缓存将创建失败。
创建数据缓存将生成对应的快照。请勿删除快照,否则数据缓存将会失效。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
eci:CreateDataCache |
create |
*DataCache
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| SecurityGroupId |
string |
否 |
创建数据缓存过程中生成的 ECI 实例所属的安全组 ID。 |
sg-2ze81zoc3yl7a3we**** |
| VSwitchId |
string |
否 |
创建数据缓存过程中生成的 ECI 实例所属的交换机 ID。 |
vsw-bp1jrgfqqy54kg5hc**** |
| Bucket |
string |
否 |
数据的存储空间。默认为 default。支持自定义,以便进行业务分组和避免路径冲突。 说明
eci-system 为 ECI 保留空间,不可使用。 |
default |
| Path |
string |
否 |
数据存储的路径。 |
/model/test |
| Name |
string |
否 |
数据缓存名称。 |
test |
| Size |
integer |
否 |
数据缓存大小。单位为 GiB,默认为 20 GiB。请根据实际数据量评估所需大小。 |
30 |
| DataSource |
object |
否 |
数据源。 |
|
| Type |
string |
否 |
数据源类型。取值范围:
枚举值:
|
URL |
| Options |
object |
否 |
数据源的配置参数。 |
|
|
string |
否 |
数据源的配置参数。不同类型数据源要传入的参数不同。各类型数据源及其配置参数说明,请参见创建数据缓存。 |
{ "#10#repoSource": "HuggingFace/Model", "#6#repoId": "stabilityai/stable-diffusion-2-1" } |
|
| RetentionDays |
integer |
否 |
保留天数。过期会被清理。默认不过期。 |
7 |
| Tag |
array<object> |
否 |
数据缓存绑定的标签列表。 |
|
|
object |
否 |
数据缓存绑定的标签列表。 |
||
| Key |
string |
否 |
标签键。 |
testkey |
| Value |
string |
否 |
标签值。 |
testvalue |
| ResourceGroupId |
string |
否 |
资源组 ID。 |
rg-2df3isufhi38**** |
| ClientToken |
string |
否 |
保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性。 |
123e4567-****-12d3-****-426655440000 |
| EipInstanceId |
string |
否 |
绑定已有的弹性公网 IP(EIP)。 如果 VPC 没有配置 NAT 网关,可以绑定 EIP,以便拉取公网数据。 |
eip-uf66jeqopgqa9hdn**** |
| EipCreateParam |
object |
否 |
创建一个弹性公网 IP(EIP)并绑定。 如果 VPC 没有配置 NAT 网关,可以绑定 EIP,以便拉取公网数据。 |
|
| Bandwidth |
integer |
否 |
EIP 带宽。单位为 Mbps。默认为 5 Mbps。 |
10 |
| CommonBandwidthPackage |
string |
否 |
绑定已有的共享带宽包。 |
cbwp-2zeukbj916scmj51m**** |
| InternetChargeType |
string |
否 |
EIP 的计量方式。取值范围:
|
PayByTraffic |
| PublicIpAddressPoolId |
string |
否 |
IP 地址池 ID。 EIP 将从该 IP 地址池中分配。 IP 地址池功能默认不开放。如需使用,请在配额中心申请 IP 地址池功能权益配额。 |
pippool-2vc4xdtjhwl4t0go5**** |
| ISP |
string |
否 |
EIP 的线路类型。取值范围:
|
BGP |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC |
| DataCacheId |
string |
数据缓存 ID。 |
edc-bp15l4vvys94oo****** |
示例
正常返回示例
JSON格式
{
"RequestId": "D81A4A13-6DCC-4579-AC62-90A6C3EC7BBC",
"DataCacheId": "edc-bp15l4vvys94oo******"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Account.Arrearage | Your account has an outstanding payment. | 账号已经欠费。 |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 此次DryRun预检请求合格。 |
| 400 | InvalidParameter.CPU.Memory | The specified cpu and memory are not allowed | |
| 400 | IncorrectStatus | %s | 指定的实例状态不正确。 |
| 400 | ServiceNotEnabled | %s | 该次请求所依赖的服务没有开通,请开通后再试。 |
| 400 | DiskVolume.NotSupport | The disk volume is not supported. | 云盘卷暂不支持,如有需要请联系我们。 |
| 400 | RamRole.NotSupport | The RAM role is not supported. | ram实例角色不支持。 |
| 400 | ImageCache.IncorrectStatus | %s | 镜像缓存当前的状态不对。 |
| 400 | ImageCacheNotSupport | Image cache is not available for all users. If you want to enable this function, contact us. | 镜像缓存功能还未全网开放,如果有需要请联系我们。 |
| 400 | EipAddressPoolIpNotEnough | The ip address of specified PublicIpAddressPool is not enough. | 指定的eip公网地址池地址资源不足。 |
| 400 | DryRun.Success | This request is a dryrun request with successful result. | 该dryrun请求校验已经通过。 |
| 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. | 创建实例的可用区已经关闭售卖,请更换其他可用区。或者无法在该可用区使用指定 VPC 的虚拟交换机。 |
| 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. | |
| 403 | Forbidden.OnlyForInvitedTest | 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. | |
| 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. | 子账号用户没有权限使用RAM实例角色。 |
| 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. | 请确保账号拥有ram:CreateServiceLinkedRole权限。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。