All Products
Search
Document Center

Elastic Compute Service:DescribeElasticityAssurances

Last Updated:Jun 12, 2026

Mengkueri detail jaminan elastisitas, seperti status, mode pencocokan, mode pemberlakuan, waktu kedaluwarsa, dan jumlah instance yang digunakan dari sebuah jaminan elastisitas.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

ecs:DescribeElasticityAssurances

get

*ElasticityAssurance

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

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

RegionId

string

Yes

ID region dari jaminan elastisitas (elasticity assurance). Anda dapat memanggil DescribeRegions untuk mengkueri daftar region Alibaba Cloud terbaru.

cn-hangzhou

ResourceGroupId

string

No

ID dari grup sumber daya. Saat Anda menggunakan parameter ini untuk memfilter sumber daya, jumlah sumber daya tidak boleh melebihi 1.000.

Catatan

Grup sumber daya default tidak didukung untuk pemfilteran.

rg-bp67acfmxazb4p****

Tag

array<object>

No

Daftar pasangan kunci-nilai tag yang terikat ke jaminan elastisitas.

object

No

Informasi pasangan tag.

Key

string

No

Kunci tag. N menunjukkan bahwa beberapa kunci tag dapat ditentukan untuk pemfilteran, dan rentang nilai N adalah 1 hingga 20.

Saat Anda menggunakan satu tag untuk memfilter sumber daya, jumlah sumber daya yang dikembalikan untuk tag tersebut tidak boleh melebihi 1.000. Saat Anda menggunakan beberapa tag untuk memfilter sumber daya, jumlah sumber daya yang terikat ke semua tag yang ditentukan secara bersamaan tidak boleh melebihi 1.000. Jika lebih dari 1.000 sumber daya cocok dengan kriteria, gunakan operasi ListTagResources untuk mengkueri sumber daya.

TestKey

Value

string

No

Nilai tag. N menunjukkan bahwa beberapa kunci tag dapat ditentukan untuk pemfilteran, dan rentang nilai N adalah 1 hingga 20.

TestValue

MaxResults

integer

No

Jumlah entri per halaman saat Anda menggunakan paginasi untuk mengkueri hasil.

Nilai maksimum: 100.

Nilai default: 10.

10

NextToken

string

No

Token kueri. Atur nilai ke nilai NextToken yang dikembalikan pada pemanggilan sebelumnya ke operasi ini.

caeba0bbb2be03f84eb48b699f0a4883

PrivatePoolOptions.Ids

string

No

ID dari jaminan elastisitas. Nilai dapat berupa array JSON yang terdiri dari beberapa ID. Maksimal 100 ID dapat ditentukan. Pisahkan ID dengan koma (,).

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

Platform

string

No

Catatan

Parameter ini sudah tidak digunakan lagi (deprecated).

null

InstanceType

string

No

Tipe instance. Anda hanya dapat menggunakan tipe instance untuk mengkueri jaminan elastisitas yang sedang berlaku. Untuk mengkueri jaminan elastisitas yang sudah dilepaskan, Anda harus menggunakan PrivatePoolOptions.Ids.

ecs.c6.large

ZoneId

string

No

ID zona dari jaminan elastisitas dalam region tersebut.

cn-hangzhou-h

InstanceChargeType

string

No

Metode penagihan instance. Nilai yang valid: PostPaid. Hanya pay-as-you-go yang didukung.

Nilai default: PostPaid.

PostPaid

Status

string

No

Status dari jaminan elastisitas. Nilai yang valid:

  • All: semua status.

  • Deactived: menunggu aktivasi (status ini berada dalam pratinjau khusus undangan berdasarkan whitelist).

  • Preparing: sedang disiapkan.

  • Prepared: akan segera berlaku.

  • Active: sedang berlaku.

  • Released: sudah dilepaskan.

Jika parameter ini tidak ditentukan, jaminan elastisitas dengan status selain Pending dan Released akan dikueri.

Active

PackageType

string

No

Tipe jaminan elastisitas. Nilai yang valid:

  • ElasticityAssurance: jaminan elastisitas reguler (ketika RecurrenceRules tidak ditentukan, jaminan elastisitas adalah jenis reguler).

  • TimeDivisionElasticityAssurance: jaminan elastisitas tersegmentasi waktu (ketika RecurrenceRules ditentukan, jaminan elastisitas adalah jenis tersegmentasi waktu).

ElasticityAssurance

Elemen respons

Element

Type

Description

Example

object

NextToken

string

Token kueri yang dikembalikan untuk kueri jaminan elastisitas berikutnya.

caeba0bbb2be03f84eb48b699f0a4883

RequestId

string

ID permintaan.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

TotalCount

integer

Jumlah entri yang cocok dengan kondisi kueri.

1

MaxResults

integer

Jumlah entri yang dikembalikan per halaman untuk jaminan elastisitas.

10

ElasticityAssuranceSet

object

ElasticityAssuranceItem

array<object>

Koleksi yang terdiri dari detail jaminan elastisitas.

array<object>

Detail dari jaminan elastisitas.

Status

string

The status of the elasticity assurance. Valid values:

  • Preparing

  • Prepared

  • Active

  • Released

Active

PrivatePoolOptionsMatchCriteria

string

The type of the private pool associated with the elasticity assurance. Valid values:

  • Open: open private pool

  • Target: specific private pool

Target

PrivatePoolOptionsId

string

The ID of the elasticity assurance.

eap-bp1ir35kqtn8ywci****

UsedAssuranceTimes

integer

Catatan

This parameter is not publicly available.

0

LatestStartTime

string

Catatan

This parameter is not publicly available.

null

PrivatePoolOptionsName

string

The name of the elasticity assurance.

eapTestName

RegionId

string

The region ID of the elasticity assurance.

cn-hangzhou

EndTime

string

The time when the elasticity assurance expires.

2021-12-03T16:00Z

StartTime

string

The time when the elasticity assurance takes effect.

2020-12-03T05:25Z

Description

string

The description of the elasticity assurance.

This is description.

ResourceGroupId

string

The ID of the resource group.

rg-bp67acfmxazb4p****

TotalAssuranceTimes

string

The total number of times that the elasticity assurance is applied.

Unlimited

AllocatedResources

object

AllocatedResource

array<object>

Details of the allocated resources.

array<object>

Details of the allocated resources.

UsedAmount

integer

The number of instances that have used the elasticity assurance.

2

TotalAmount

integer

The total number of instances for which capacity of an instance type is reserved.

2

AvailableAmount

integer

Catatan

This parameter is not publicly available.

5

FailedAmount

integer

1

LockedAmount

integer

1

zoneId

string

The zone ID.

cn-hangzhou-h

InstanceType

string

The instance type.

ecs.c6.large

ElasticityAssuranceUsages

object

ElasticityAssuranceUsage

array<object>

Catatan

This parameter is not publicly available.

object

Catatan

This parameter is not publicly available.

AccountId

string

Catatan

This parameter is not publicly available.

1144775968548340

ServiceName

string

Catatan

This parameter is not publicly available.

name

UsedAmount

integer

Catatan

This parameter is not publicly available.

1

Tags

object

Tag

array<object>

The tags of the elasticity assurance.

object

The tags of the elasticity assurance.

TagValue

string

The value of the tag.

TestValue

TagKey

string

The key of the tag.

TestKey

InstanceChargeType

string

The billing method of the instance. The value can be only PostPaid. Only pay-as-you-go instances can be created by using elasticity assurances.

PostPaid

StartTimeType

string

Indicates when the elasticity assurance takes effect. Valid values:

  • Now: The elasticity assurance takes effect immediately after it is created.

  • Later: The elasticity assurance takes effect at a specified time.

Now

ElasticityAssuranceOwnerId

string

Catatan

This parameter is not publicly available.

e114477596854834

RecurrenceRules

object

RecurrenceRule

array<object>

The recurrence rules of the time-segmented assurances.

object

The recurrence rule of the time-segmented assurance.

RecurrenceType

string

The type of the recurrence rule. Valid values:

  • Daily

  • Weekly

  • Monthly

Daily

RecurrenceValue

string

The recurrence value of the time-segmented assurance. Valid values:

  • If you set RecurrenceType to Daily, you can set RecurrenceValue to only one value. Valid values: 1 to 31. The time-segmented assurance is performed every few days.

  • If you set RecurrenceType to Weekly, you can set RecurrenceValue to one or more values. Separate the values with commas (,). The values that correspond to Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday are 0, 1, 2, 3, 4, 5, and 6. For example, 1,2 indicates that the time-segmented assurance is performed on Monday and Tuesday of every week.

  • If you set RecurrenceType to Monthly, you can set RecurrenceValue to two values in the A-B format. Valid values of A and B: 1 to 31. B must be greater than or equal to A. For example, 1-5 indicates that the time-segmented assurance is performed from the 1st to the 5th of each month.

1

StartHour

integer

The time when the time-segmented assurance takes effect.

4

EndHour

integer

The time when the time-segmented assurance ends.

10

PackageType

string

The type of the elasticity assurance. Valid values:

  • ElasticityAssurance: the general-purpose elasticity assurance.

  • TimeDivisionElasticityAssurance: the time-segmented assurance of the elasticity assurance.

ElasticityAssurance

Contoh

Respons sukses

JSONformat

{
  "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"
      }
    ]
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 MissingParameter.RegionId The specified RegionId should not be null.
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.
400 MissingParameter.PrivatePoolOptions.Id The specified PrivatePoolOptions.Id should not be null.
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.
400 InvalidAliUid The PrivatePool does not belong to the user of the Instance.
400 MissingParameter.PackageType The specified parameter "PackageType" can not be empty.
400 MissingParameter.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" can not be empty.
400 MissingParameter.InstanceCpuCoreCount The specified parameter "InstanceCpuCoreCount" can not be empty.
400 MissingParameter.InstanceAmount The specified parameter "InstanceAmount" can not be empty.
400 MissingParameter.InstanceCpuCoreCountOrInstanceAmount The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time.
400 Invalid.TooManyPrivatePoolOptions.Ids Too many PrivatePoolOptions.Ids in this request.
400 Invalid.TooManyZoneIds Too many ZoneIds in the request.
400 Invalid.TooManyInstanceTypes Too many InstanceTypes in the request.
400 Invalid.TooManyUnpaidPrivatePool Too many PrivatePools create but still unpaid.
400 Invalid.InstanceCpuCoreCountOrInstanceAmount Both InstanceCpuCoreCount and InstanceAmount are provided.
400 Invalid.PrivatePoolOptions.Ids The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id.
400 Invalid.PackageType The specified parameter "PackageType" is invalid.
400 Invalid.PrivatePool.Purchase The PrivatePool has already paid.
400 Invalid.AssuranceTimes.NotSupported The value of AssuranceTimes is not supported.
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.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.