DescribeElasticityAssurances - 查询弹性保障服务的信息

更新时间:
复制为 MD 格式

查询弹性保障服务的详细信息。例如弹性保障服务的状态、匹配模式、生效方式、失效时间、已使用的实例的数量等。

调试

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

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

ecs:DescribeElasticityAssurances

get

*ElasticityAssurance

acs:ecs:{#regionId}:{#accountId}:elasticityassurance/*

请求参数

名称

类型

必填

描述

示例值

RegionId

string

弹性保障服务所属地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou

ResourceGroupId

string

资源组 ID。使用该参数过滤资源时,资源数量不能超过 1000 个。

说明

不支持默认资源组过滤。

rg-bp67acfmxazb4p****

Tag

array<object>

弹性保障服务绑定的标签键值对列表。

object

标签对信息。

Key

string

标签键。N 表示可以设置多个标签键进行过滤,N 的取值范围为 1~20。

使用一个标签过滤资源,查询到该标签下的资源数量不能超过 1000 个;使用多个标签过滤资源,查询到同时绑定了多个标签的资源数量不能超过 1000 个。如果资源数量超过 1000 个,请使用 ListTagResources 接口进行查询。

TestKey

Value

string

标签值。N 表示可以设置多个标签键进行过滤,N 的取值范围为 1~20。

TestValue

MaxResults

integer

分页查询时每页行数。

最大值:100。

默认值:10。

10

NextToken

string

弹性保障服务查询起始标志。由上一次的请求结果中获取。

caeba0bbb2be03f84eb48b699f0a4883

PrivatePoolOptions.Ids

string

弹性保障服务 ID 列表。取值可以由多个 ID 组成一个 JSON 数组,最多支持 100 个 ID,ID 之间用半角逗号(,)隔开。

["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"]

Platform

string

说明

该参数已废弃。

null

InstanceType

string

实例规格。通过实例规格只可以查询还在生效中的弹性保障服务,已释放的服务只能通过PrivatePoolOptions.Ids查询。

ecs.c6.large

ZoneId

string

弹性保障服务所属地域下的可用区 ID。

cn-hangzhou-h

InstanceChargeType

string

实例的计费方式。取值:PostPaid,目前仅支持按量付费。

默认值:PostPaid。

PostPaid

Status

string

弹性保障服务的状态。取值范围:

  • All:所有状态。

  • Deactived:待激活(该状态白名单邀测中)。

  • Preparing:准备中。

  • Prepared:待生效。

  • Active:生效中。

  • Released:已释放。

若不指定,则查询除 Pending、Released 以外状态的弹性保障。

Active

PackageType

string

弹性保障服务类型,取值范围:

  • ElasticityAssurance:普通弹性保障(未指定 RecurrenceRules 时为普通弹性保障)。

  • TimeDivisionElasticityAssurance:分时弹性保障(指定 RecurrenceRules 时为分时弹性保障)。

ElasticityAssurance

返回参数

名称

类型

描述

示例值

object

NextToken

string

弹性保障服务下一个查询起始标志。

caeba0bbb2be03f84eb48b699f0a4883

RequestId

string

请求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

符合查询条件的记录条数。

1

MaxResults

integer

弹性保障服务每页显示行数。

10

ElasticityAssuranceSet

object

ElasticityAssuranceItem

array<object>

弹性保障服务详细信息组成的集合。

array<object>

弹性保障服务详细信息。

Status

string

弹性保障服务的状态。可能值:

  • Preparing:准备中。

  • Prepared:待生效。

  • Active:生效中。

  • Released:已释放。

Active

PrivatePoolOptionsMatchCriteria

string

弹性保障服务的匹配模式。可能值:

  • Open:开放模式的弹性保障服务。启动实例时将自动匹配开放类型的私有池容量。如果没有符合条件的私有池容量,则使用公共池资源启动。

  • Target:指定模式的弹性保障服务。使用指定的私有池容量启动实例,如果该私有池容量不可用,则实例会启动失败。

Target

PrivatePoolOptionsId

string

弹性保障服务 ID。

eap-bp1ir35kqtn8ywci****

UsedAssuranceTimes

integer

说明

该参数暂未开放使用。

0

LatestStartTime

string

说明

该参数暂未开放使用。

null

PrivatePoolOptionsName

string

弹性保障服务名称。

eapTestName

RegionId

string

弹性保障服务所属地域 ID。

cn-hangzhou

EndTime

string

弹性保障服务失效时间。

2021-12-03T16:00Z

StartTime

string

弹性保障服务生效时间。

2020-12-03T05:25Z

Description

string

弹性保障服务描述。

This is description.

ResourceGroupId

string

资源组 ID。

rg-bp67acfmxazb4p****

TotalAssuranceTimes

string

弹性保障服务的总次数。目前仅支持在服务生效期内的无限次模式。

Unlimited

AllocatedResources

object

AllocatedResource

array<object>

资源分配详情列表。

array<object>

资源分配详情。

UsedAmount

integer

已使用的实例的数量。

2

TotalAmount

integer

在一个实例规格内,需要预留的实例的总数量。

2

AvailableAmount

integer

说明

该参数暂未开放使用。

5

FailedAmount

integer

1

LockedAmount

integer

1

zoneId

string

弹性保障服务所属地域下的可用区 ID。

cn-hangzhou-h

InstanceType

string

实例规格。

ecs.c6.large

ElasticityAssuranceUsages

object

ElasticityAssuranceUsage

array<object>

说明

该参数暂未开放使用。

object

说明

该参数暂未开放使用。

AccountId

string

说明

该参数暂未开放使用。

1144775968548340

ServiceName

string

说明

该参数暂未开放使用。

name

UsedAmount

integer

说明

该参数暂未开放使用。

1

Tags

object

Tag

array<object>

弹性保障服务绑定的标签键值对列表。

object

弹性保障服务绑定的标签键值对信息。

TagValue

string

标签值。

TestValue

TagKey

string

标签键。

TestKey

InstanceChargeType

string

实例的计费方式。目前仅支持按量付费。

可能值:PostPaid。

PostPaid

StartTimeType

string

弹性保障生效方式。可能值:

  • Now:立即生效。

  • Later:指定时间生效。

Now

ElasticityAssuranceOwnerId

string

说明

该参数暂未开放使用。

e114477596854834

RecurrenceRules

object

RecurrenceRule

array<object>

弹性保障-分时保障重复规则列表。

object

弹性保障-分时保障重复规则。

RecurrenceType

string

重复规则的策略类型。可能值:

  • Daily:按天重复。

  • Weekly:按周重复。

  • Monthly:按月重复。

Daily

RecurrenceValue

string

重复规则执行数值。可能值

  • RecurrenceTypeDaily时,只能填一个值,取值范围:1~31。表示每几天执行一次。

  • RecurrenceTypeWeekly时,可以填入多个值,多个值间使用半角逗号(,)隔开。周日、周一、周二、周三、周四、周五、周六的值依次为:0,1,2,3,4,5,6。例如1,2表示周一和周二执行。

  • RecurrenceTypeMonthly时,格式为A-B。A、B 的取值范围为 1~31,并且 B 必须大于等于 A。例如:1-5表示每月的 1~5 日重复执行。

1

StartHour

integer

分时保障生效时间。

4

EndHour

integer

分时保障结束时间。

10

PackageType

string

弹性保障服务类型,可能值:

  • ElasticityAssurance:普通弹性保障。

  • TimeDivisionElasticityAssurance:分时弹性保障。

ElasticityAssurance

示例

正常返回示例

JSON格式

{
  "NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TotalCount": 1,
  "MaxResults": 10,
  "ElasticityAssuranceSet": {
    "ElasticityAssuranceItem": [
      {
        "Status": "Active",
        "PrivatePoolOptionsMatchCriteria": "Target",
        "PrivatePoolOptionsId": "eap-bp1ir35kqtn8ywci****",
        "UsedAssuranceTimes": 0,
        "LatestStartTime": "null",
        "PrivatePoolOptionsName": "eapTestName",
        "RegionId": "cn-hangzhou",
        "EndTime": "2021-12-03T16:00Z",
        "StartTime": "2020-12-03T05:25Z",
        "Description": "This is description.",
        "ResourceGroupId": "rg-bp67acfmxazb4p****",
        "TotalAssuranceTimes": "Unlimited",
        "AllocatedResources": {
          "AllocatedResource": [
            {
              "UsedAmount": 2,
              "TotalAmount": 2,
              "AvailableAmount": 5,
              "FailedAmount": 1,
              "LockedAmount": 1,
              "zoneId": "cn-hangzhou-h",
              "InstanceType": "ecs.c6.large",
              "ElasticityAssuranceUsages": {
                "ElasticityAssuranceUsage": [
                  {
                    "AccountId": "1144775968548340",
                    "ServiceName": "name",
                    "UsedAmount": 1
                  }
                ]
              }
            }
          ]
        },
        "Tags": {
          "Tag": [
            {
              "TagValue": "TestValue",
              "TagKey": "TestKey"
            }
          ]
        },
        "InstanceChargeType": "PostPaid",
        "StartTimeType": "Now",
        "ElasticityAssuranceOwnerId": "e114477596854834",
        "RecurrenceRules": {
          "RecurrenceRule": [
            {
              "RecurrenceType": "Daily",
              "RecurrenceValue": "1",
              "StartHour": 4,
              "EndHour": 10
            }
          ]
        },
        "PackageType": "ElasticityAssurance"
      }
    ]
  }
}

错误码

HTTP status code

错误码

错误信息

描述

400 MissingParameter.RegionId The specified RegionId should not be null. RegionId是必选参数。
400 InvalidParameter.Name The specified PrivatePoolOptions.Name is invalid.
400 InvalidParameter.PrivatePoolOptions.Ids The specified PrivatePoolOptions.Ids is invalid.
400 DedicatedHostNotSupported DedicatedHost is not supported for PrivatePool. 私有池不支持专有宿主机。
400 SpotNotSupported Spot is not supported for PrivatePool. 私有池不支持抢占式实例。
400 ClassicNetworkNotSupported Classic network is not supported for PrivatePool. 私有池不支持经典网络类型实例。
400 Invalid.InstanceId Instance does not exist. 实例不存在。
400 Invalid.PrivatePoolOptions.MatchCriteria Target mode does not support this operation. Target模式不支持本次操作。
400 MissingParameter.PrivatePoolOptions.Id The specified PrivatePoolOptions.Id should not be null. PrivatePoolOptions.Id 参数不能为空。
400 Invalid.PrivatePoolOptions.Id The PrivatePool does not exist. 私有池不存在。
400 Invalid.InstanceType The InstanceType does not match the PrivatePool. 实例类型与私有池不匹配。
400 Invalid.InstanceChargeType The InstanceChargeType does not match the PrivatePool. 实例计费类型与私有池不匹配。
400 Invalid.ZoneId The ZoneId does not match the PrivatePool. 可用区与私有池不匹配。
400 Invalid.PrivatePoolOptions.status The PrivatePool has been used up. 该资源已用完。
400 InvalidPlatform.ValueNotSupported The Platform does not match the PrivatePool. 指定的Platform参数与私有池不匹配。
400 InvalidAliUid The PrivatePool does not belong to the user of the Instance. 私有池不属于创建实例的用户。
400 MissingParameter.PackageType The specified parameter "PackageType" can not be empty. 指定的参数PackageType不能为空。
400 MissingParameter.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" can not be empty. 指定参数“PrivatePoolOptions.ids”不能为空。
400 MissingParameter.InstanceCpuCoreCount The specified parameter "InstanceCpuCoreCount" can not be empty. 指定的参数 'InstanceCpuCocount'不能为空。
400 MissingParameter.InstanceAmount The specified parameter "InstanceAmount" can not be empty. 指定的参数InstanceAmount不能为空。
400 MissingParameter.InstanceCpuCoreCountOrInstanceAmount The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. 指定的参数InstanceCpuCoreCountInstanceAmount不能同时为空。
400 Invalid.TooManyPrivatePoolOptions.Ids Too many PrivatePoolOptions.Ids in this request. PrivatePoolOptions.Ids参数超过上限。
400 Invalid.TooManyZoneIds Too many ZoneIds in the request. ZoneIds参数超过上限。
400 Invalid.TooManyInstanceTypes Too many InstanceTypes in the request. InstanceTypes参数超过上限。
400 Invalid.TooManyUnpaidPrivatePool Too many PrivatePools create but still unpaid. 多个私有池未支付。
400 Invalid.InstanceCpuCoreCountOrInstanceAmount Both InstanceCpuCoreCount and InstanceAmount are provided. InstanceCpuCoreCountInstanceAmount两个参数不需要同时提供。
400 Invalid.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. 指定的私有池ID不存在。
400 Invalid.PackageType The specified parameter "PackageType" is invalid. 指定的参数“PackageType”无效。
400 Invalid.PrivatePool.Purchase The PrivatePool has already paid. 私有池已经支付。
400 Invalid.AssuranceTimes.NotSupported The value of AssuranceTimes is not supported. AssuranceTimes参数值不支持。
400 RepeatStartPrivatePool PrivatePool has already been started. 私有池已经启动。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 内部错误,请重试。
404 InvalidResourceGroup.NotFound The specified resource group is not found. 找不到对应的资源组

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

变更历史

更多信息,参考变更详情