Mengkueri Sumber daya.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bdrc:DescribeResources |
none |
*全部资源
|
None | None |
Sintaks permintaan
GET /api/v1/resources HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
No |
Tipe Sumber daya. |
ACS::ECS::Instance |
| ResourceId |
string |
No |
ID Sumber daya. Misalnya, untuk instans, ini adalah ID instans. |
i-0003***110 |
| FailedRuleTemplate |
string |
No |
Filter untuk aturan yang gagal dalam penilaian. |
rule-000c***yc9 |
| NextToken |
string |
No |
Token paginasi. Layanan mengembalikan token jika tanggapan terpotong. Untuk mengambil halaman hasil berikutnya, sertakan token ini di permintaan berikutnya. Jika tidak ada token yang dikembalikan, semua hasil telah diambil. |
cae**********699 |
| MaxResults |
integer |
No |
Ukuran halaman. Nilai default: 10. Nilai maksimum: 100. Nilai kurang dari 10 diatur ke 10, dan nilai lebih dari 100 diatur ke 100. |
10 |
| SortBy |
string |
No |
Kunci pengurutan. |
protectionScore |
| SortOrder |
string |
No |
Pesanan pengurutan. Valid values:
|
ASC |
| StorageClass |
string |
No |
Kelas penyimpanan. |
ARCHIVE |
| DataRedundancyType |
string |
No |
Tipe redundansi data. |
LRS |
| ResourceCategoryId |
string |
No |
ID kategori Sumber daya. |
rc-000***123 |
| ResourceRegionId |
string |
No |
ID Wilayah Sumber daya. |
cn-hangzhou |
| ResourceArn |
string |
No |
Nama Sumber Daya Alibaba Cloud resource. |
acs:ecs:cn-hangzhou:123***7890:instance/i-123***7890 |
| ResourceOwnerIds |
array |
No |
Daftar ID pemilik Sumber daya. Gunakan parameter ini untuk skenario lintas akun. Jika Anda menghilangkan parameter ini, layanan mengembalikan data untuk akun saat ini secara default. |
[123***7890] |
|
integer |
No |
The resource owner ID. |
123***7890 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
BaseResponse<ListResult> |
||
| Data |
object |
The response data. |
|
| Content |
array<object> |
The list of returned resources. |
|
|
object |
|||
| ResourceArn |
string |
The resource ARN. |
acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx |
| ProductType |
string |
The cloud product type. |
ecs |
| ResourceType |
string |
The resource type. |
ACS::ECS::Instance |
| ResourceId |
string |
The resource ID. |
i-xxxxxxxx |
| ResourceName |
string |
The resource name. |
test server |
| RegionId |
string |
The region ID. |
cn-hangzhou |
| ZoneId |
string |
The availability zone ID. |
cn-hangzhou-i |
| VpcId |
string |
The VPC ID. |
vpc-xxxxxxxx |
| VSwitchId |
string |
The vSwitch ID. |
vsw-xxxxxxxx |
| CreateTime |
integer |
The creation time of the resource. The value is a UNIX timestamp. |
1697798340 |
| Status |
string |
The resource status. |
Running |
| TotalDataSize |
integer |
The total size of data. Unit: bytes. |
0 |
| StandardDataSize |
integer |
The size of data in the Standard storage class. Unit: bytes. |
0 |
| IaDataSize |
integer |
The size of data in the Infrequent Access (IA) storage class. Unit: bytes. |
0 |
| ArchiveDataSize |
integer |
The size of data in the Archive storage class. Unit: bytes. |
0 |
| ColdArchiveDataSize |
integer |
The size of data in the Cold Archive storage class. Unit: bytes. |
0 |
| EnableCheck |
boolean |
Indicates whether data protection score assessment is enabled. |
0 |
| ProtectionScore |
integer |
The resource protection score. |
0 |
| ProtectionScoreUpdatedTime |
integer |
The last update time of the score. The value is a UNIX timestamp. |
0 |
| RiskCount |
integer |
The number of risk items. |
0 |
| CheckFailedCount |
integer |
The number of failed check items. |
0 |
| StorageClass |
string |
The storage class. |
STANDARD |
| DataRedundancyType |
string |
The data redundancy type. |
LRS |
| ResourceOwnerId |
integer |
The ID of the resource owner. |
123***7890 |
| NextToken |
string |
The pagination token to retrieve the next page of results. If this parameter is empty, all results have been returned. |
fb836242f4225fa0f0e0257362dfc6dd |
| MaxResults |
integer |
The maximum number of resources to return on each page. |
100 |
| TotalCount |
integer |
The total number of resources that match the query criteria. This parameter is optional and is not returned by default. |
149 |
| RequestId |
string |
The request ID. |
700683DE-0154-56D4-8D76-3B7A2C2C7DF9 |
Contoh
Respons sukses
JSONformat
{
"Data": {
"Content": [
{
"ResourceArn": "acs:ecs:cn-hangzhou:xxxxxxxx:instance/xxxxx\n",
"ProductType": "ecs",
"ResourceType": "ACS::ECS::Instance\n",
"ResourceId": "i-xxxxxxxx\n",
"ResourceName": "test server",
"RegionId": "cn-hangzhou",
"ZoneId": "cn-hangzhou-i",
"VpcId": "vpc-xxxxxxxx",
"VSwitchId": "vsw-xxxxxxxx",
"CreateTime": 1697798340,
"Status": "Running",
"TotalDataSize": 0,
"StandardDataSize": 0,
"IaDataSize": 0,
"ArchiveDataSize": 0,
"ColdArchiveDataSize": 0,
"EnableCheck": true,
"ProtectionScore": 0,
"ProtectionScoreUpdatedTime": 0,
"RiskCount": 0,
"CheckFailedCount": 0,
"StorageClass": "STANDARD",
"DataRedundancyType": "LRS",
"ResourceOwnerId": 0
}
],
"NextToken": "fb836242f4225fa0f0e0257362dfc6dd",
"MaxResults": 100,
"TotalCount": 149
},
"RequestId": "700683DE-0154-56D4-8D76-3B7A2C2C7DF9"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.