赛尔校园公共服务平台 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
赛尔校园公共服务平台 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 云服务器 ECS
  4. 开发参考
  5. API参考(ECS)
  6. API目录
  7. 存储容量单位包
  8. PurchaseStorageCapacityUnit - 购买存储容量单位包

PurchaseStorageCapacityUnit - 购买存储容量单位包

  • 存储容量单位包
  • 发布于 2025-04-01
  • 0 次阅读
文档编辑
文档编辑

本接口用于购买一个或多个存储容量单位包SCU(Storage Capacity Unit)。

接口说明

请确保在使用该接口前,已充分了解存储容量单位包的计费方式和价格。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
RegionIdstring是

SCU 所属的地域 ID。确定地域后,SCU 只能抵扣该地域下云盘的按量付费账单。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou
Namestring否

SCU 的名称,长度为 2~128 个英文或中文字符。必须以大小写字母或中文开头,不能以http://或https://开头。可以包含数字、半角冒号(:)、下划线(_)或者短划线(-)。

ScuPurchaseDemo
Capacityinteger是

SCU 容量大小,单位为 GiB。取值范围:20、40、100、200、500、1024、2048、5210、10240、20480、52100。

20
Descriptionstring否

SCU 的描述信息,长度为 2~256 个英文或中文字符,不能以http://或https://开头。

ScuPurchaseDemo
StartTimestring否

SCU 的生效时间。生效时间不能超过创建时间开始的 180 天。按照ISO 8601标准表示,并使用 UTC +0 时间,格式为 yyyy-MM-ddTHHZ。

默认值:无,表示从创建时间开始生效。

2020-09-09T02Z
Periodinteger否

SCU 的有效期时长。取值范围:

  • 当 PeriodUnit=Month 时,Period 参数的有效取值为 1、2、3、6。
  • 当 PeriodUnit=Year 时,Period 参数的有效取值为 1、3、5。

默认值:1。

1
PeriodUnitstring否

SCU 的有效期时长单位。取值范围:

  • Month:月。
  • Year:年。

默认值:Month。

Month
FromAppstring否

用于备注请求来源,默认值为 OpenAPI,无需手动设置。

OpenAPI
ClientTokenstring否

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性。

123e4567-e89b-12d3-a456-426655440000
Amountinteger否

购买的 SCU 的数量。取值范围:1~20。

默认值:1。

1
Tagarray<object>否

标签数组。数组长度:1~20。

object否

标签列表。

Keystring否

SCU 的标签键。一旦传入该值,则不允许为空字符串。最多支持 128 个字符,不能以aliyun或acs:开头,不能包含http://或https://。

TestKey
Valuestring否

SCU 的标签值。一旦传入该值,可以为空字符串。最多支持 128 个字符,不能以acs:开头,不能包含http://或https://。

TestValue
ResourceGroupIdstring否

存储容量单位包所在的资源组 ID。您只能传入已有权限的资源组 ID。

rg-bp67acfmxazb4p****

返回参数

名称类型描述示例值
object
OrderIdstring

订单 ID。

204135153880****
RequestIdstring

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
StorageCapacityUnitIdsarray

SCU ID。

StorageCapacityUnitIdstring

SCU ID。

scu-bp67acfmxazb4p****

示例

正常返回示例

JSON格式

{
  "OrderId": "204135153880****",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "StorageCapacityUnitIds": {
    "StorageCapacityUnitId": [
      "scu-bp67acfmxazb4p****"
    ]
  }
}

错误码

HTTP status code错误码错误信息描述
400InvalidParameter.PeriodThe specified Period is not valid.指定的生效日期无效。
400MissingParameter.RegionIdThe specified RegionId should not be null.RegionId是必选参数。
400InvalidParameter.NameThe specified Name is invalid.指定的 Name 参数无效。
400InvalidParameter.CapacityThe specified Capacity is invalid.指定的 Capacity 参数不在有效取值范围内。
400MissingParameter.CapacityThe specified Capacity should be not null.Capacity 为必选参数。
400InvalidParameter.PeriodUnitThe specified PeriodUnit is not supported.指定的 PeriodUnit 参数不在有效的取值范围内。
400InvalidParameter.CapacityExceedThe specified Capacity exceeds the limitation of quota.指定的 Capacity 参数超出了最大有效取值。
400InvalidStartTime.NotSupportedThe specified StartTime should be within 180 calendar days from the current date, and you must specify a precision to hour.指定的 StartTime 参数不在有效取值范围内。
400InvalidStartTime.MalFormedThe specified StartTime is out of the permitted range.指定的 StartTime 参数超出了最大有效取值。
500InternalErrorThe request processing has failed due to some unknown error.内部错误,请重试。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2025-03-12OpenAPI 去除了 deprecated 标记、OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情
2023-07-28OpenAPI 描述信息更新、OpenAPI 错误码发生变更查看变更详情
相关文章

DescribeStorageCapacityUnits - 查询存储容量单位包详细信息列表 2025-04-01 11:58

本接口用于查询存储容量单位包SCU(Storage Capacity Unit)的详细信息列表,支持根据名称、状态以及容量大小等条件进行查询。

ModifyStorageCapacityUnitAttribute - 修改存储容量单位包属性 2025-04-01 11:58

本接口用于修改一个存储容量单位包SCU(Storage Capacity Unit)的名称或者描述信息。

PurchaseStorageCapacityUnit - 购买存储容量单位包 2025-04-01 11:58

本接口用于购买一个或多个存储容量单位包SCU(Storage Capacity Unit)。

目录
Copyright © 2025 your company All Rights Reserved. Powered by 赛尔网络.
京ICP备14022346号-15
gongan beian 京公网安备11010802041014号