Mengkueri detail penggunaan rencana penghematan.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:SavingsPlansAnalysis |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| StartPeriod |
string |
Yes |
Awal rentang waktu untuk dikueri. Formatnya adalah yyyy-MM-dd HH:mm:ss. Kueri mencakup data mulai dari waktu ini. |
2021-01-01 00:00:00 |
| EndPeriod |
string |
No |
Akhir rentang waktu untuk dikueri. Formatnya adalah yyyy-MM-dd HH:mm:ss. Kueri tidak mencakup data dari waktu ini. Jika Anda mengosongkan parameter ini, kueri berakhir pada waktu saat ini. |
2021-01-02 00:00:00 |
| PeriodType |
string |
Yes |
Granularitas waktu ringkasan penggunaan. Nilai valid: MONTH, DAY, dan HOUR. |
HOUR |
| Token |
string |
No |
Token paginasi. Untuk kueri pertama, kosongkan parameter ini. Tanggapan mengembalikan token untuk halaman berikutnya. Jika token yang dikembalikan kosong, semua data telah diambil. |
eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6MTB9 |
| MaxResults |
integer |
No |
Jumlah maksimum rekaman data yang dikembalikan pada setiap halaman. Nilai default adalah 20. Nilai maksimum adalah 300. |
300 |
| BillOwnerId |
integer |
No |
ID akun yang detail penggunaannya ingin Anda kueri. Jika Anda mengosongkan parameter ini, sistem akan mengkueri data untuk akun saat ini dan akun tertaut trusteeship-nya. Tentukan ID akun tertaut trusteeship untuk mengkueri data hanya untuk akun tersebut. |
123745698925000 |
| FilterParam |
object |
No |
||
| Dimensions |
array<object> |
No |
||
|
object |
No |
|||
| Code |
string |
No |
||
| SelectType |
string |
No |
||
| Values |
array |
No |
||
|
string |
No |
|||
| Tags |
array<object> |
No |
||
|
object |
No |
|||
| Code |
string |
No |
||
| SelectType |
string |
No |
||
| Values |
array |
No |
||
|
string |
No |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. |
Success |
| Message |
string |
The error message. |
Successful! |
| RequestId |
string |
The request ID. |
79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| Data |
object |
The returned data. |
|
| TotalCount |
integer |
The total number of data entries. |
1000 |
| NextToken |
string |
The token for the next page. |
eyJwYWdlTnVtIjoyLCJwYWdlU2ldhsSI6MTB9 |
| Items |
array<object> |
The data items. |
|
|
object |
|||
| Status |
string |
The status of the instance. A value of -1 indicates that the payment is overdue. A value of 1 indicates that the instance is active. |
-1 |
| Type |
string |
The type of the savings plan. Valid values: universal and ECS compute. |
通用型 |
| UsagePercentage |
number |
The usage. |
0.9 |
| UserId |
integer |
The ID of the account. |
123745698925000 |
| InstanceId |
string |
The ID of the instance. |
spn-a1fhs54c243hP22 |
| Currency |
string |
The currency. |
CNY |
| PostpaidCost |
number |
The pay-as-you-go cost. |
4.2 |
| DeductValue |
number |
The used amount of the savings plan. |
3.94 |
| StartPeriod |
string |
The start time. |
2021-08-01 00:00:00 |
| SavedCost |
number |
The amount that is saved. |
0.08 |
| PoolValue |
number |
The total amount of the savings plan. |
29.84 |
| UserName |
string |
The username of the account. |
test13@test.aliyun.com |
| EndPeriod |
string |
The end time. |
2021-08-09 00:00:00 |
Contoh
Respons sukses
JSONformat
{
"Code": "Success",
"Message": "Successful!",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F",
"Success": true,
"Data": {
"TotalCount": 1000,
"NextToken": "eyJwYWdlTnVtIjoyLCJwYWdlU2ldhsSI6MTB9",
"Items": [
{
"Status": "-1",
"Type": "通用型",
"UsagePercentage": 0.9,
"UserId": 123745698925000,
"InstanceId": "spn-a1fhs54c243hP22",
"Currency": "CNY",
"PostpaidCost": 4.2,
"DeductValue": 3.94,
"StartPeriod": "2021-08-01 00:00:00",
"SavedCost": 0.08,
"PoolValue": 29.84,
"UserName": "test13@test.aliyun.com",
"EndPeriod": "2021-08-09 00:00:00"
}
]
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.