最近更新时间:2024.01.04 19:46:28
首次发布时间:2023.11.21 10:21:45
调用 DescribeReservedInstances 接口查询已购买的预留实例券信息。
说明
调用该接口时,使用TagFilters.N.Key
和TagFilters.N.Values.N
查询到的预留实例券数量不能超过1000个。若超过1000个,请使用 DesribeTags 接口进行查询。
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeReservedInstances | 要执行的操作,取值:DescribeReservedInstances。 |
Version | String | 是 | 2020-04-01 | API的版本,取值:2020-04-01。 |
InstanceTypeFamilies.N | String | 否 | InstanceTypeFamilies.1=ecs.g3i | 根据规格族过滤预留实例券,最多支持100个。
|
InstanceTypeIds.N | String | 否 | InstanceTypeIds.1=ecs.g3i.2xlarge | 根据规格过滤实例券,最多支持100个。
|
ReservedInstanceIds.N | String | 否 | ReservedInstanceIds.1=ecsri-ycsimi9g465pkfxc**** | 预留实例券ID,最多支持100个。
|
ReservedInstanceName | String | 否 | reserved-instance-test | 预留实例券的名称,支持模糊搜索。 |
Scope | String | 否 | ZonalRI | 预留实例券的类型,取值:
|
Status | String | 否 | ACTIVE | 预留实例券的状态,取值:
|
SupportModify | String | 否 | SizeSupport | 预留实例券支持的更改类型,取值:
|
TagFilters.N.Key | String | 否 | TagFilters.1.Key=k1 | 用户标签的标签键。
|
TagFilters.N.Values.N | String | 否 | TagFilters.1.Values.1=v1&TagFilters.1.Values.2=v2 | 用户标签的标签值。
说明
|
ZoneId | String | 否 | cn-beijing-a | 预留实例券所在的可用区ID。 您可以调用 DescribeZones 查询一个地域下的可用区信息。 |
NextToken | String | 否 | - | 分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的 |
MaxResults | Integer | 否 | 10 | 分页查询时设置的每页行数。
|
ProjectName | String | 否 | project_a | 资源所属项目,一个资源只能归属于一个项目。
|
HpcClusterId | String | 否 | hpcCluster-1 | 高性能计算集群ID。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
ReservedInstances | Array of Struct | - | 符合条件的预留实例券信息。 |
NextToken | String | eWNsYTg0b2s1Y3Yyd3Jzb2do**** | 本次调用返回的查询凭证值,返回为空表示该页为末页。 |
GET /?Action=DescribeReservedInstances&Version=2020-04-01 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing ServiceName: ecs
{ "ResponseMetadata": { "RequestId": "202311201528596749BD5A57E146F0****", "Action": "DescribeReservedInstances", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": { "ReservedInstances": [ { "CreatedAt": "2023-06-28T18:29:38+08:00", "ExpiredAt": "2023-07-28T18:29:38+08:00", "InstanceCount": 10, "InstanceTypeId": "ecs.g3i.xlarge", "ReservedInstanceId": "ecsri-ycsimi9g465pkfxc****", "ReservedInstanceName": "reserved-instance-test", "Status": "ACTIVE", "ZoneId": "cn-beijing-a", "SupportModify": "SizeSupport", "OfferingType": "AllUpfront", "Tags": [ { "Key": "k1", "Value": "v1" } ], "HpcClusterId": "", "ProjectName": "default", "Scope": "ZonalRI", "RegionId": "cn-beijing-a", "StartAt": "2023-06-28T18:29:38+08:00" } ], "NextToken": "bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******" } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidTagFilterKey.Malformed | The specified TagFilterKey is malformed. | 指定的标签键不合法。 |
400 | InvalidTagFilterValue.Malformed | The specified TagFilterValue is malformed. | 指定的标签值不合法。 |
400 | LimitExceeded.MaximumInstanceTypeFamilies | You've reached the limit on the number of InstanceTypeFamilies that you can set. | 指定的InstanceTypeFamilies数量超过最大限制。 |
400 | LimitExceeded.MaximumInstanceTypeIds | You've reached the limit on the number of InstanceTypeIds that you can set. | 指定的InstanceTypeIds数量超过最大限制。 |
400 | LimitExceeded.MaximumMaxResults | The number of specified MaxResults exceeds the maximum limit. | 指定的MaxResults超过最大限制。 |
400 | LimitExceeded.MaximumReservedInstanceIds | The number of specified ReservedInstanceIds exceeds the maximum limit. | 指定的ReservedInstanceIds超过最大限制。 |
400 | LimitExceeded.MaximumTagFilterKeys | You've reached the limit on the number of TagFilterKeys that you can set. | 指定的标签键超过最大限制。 |
400 | LimitExceeded.MaximumTagFilterValues | You've reached the limit on the number of TagFilterValues that you can set. | 指定的标签值超过最大限制。 |
400 | LimitExceeded.MaximumTagFilterResults | You've reached the limit on the number of resources that you can describe by TagFilters. | 通过标签过滤出的资源数量超过上限。 |
400 | LimitExceeded.MinimumMaxResults | The number of specified MaxResults exceeds the minimum limit. | 指定的MaxResults超过最小限制。 |
409 | InvalidTagFilterKey.Conflict | The specified TagFilterKey already exists. | 指定的标签键已存在。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |