Memanggil API `ListTagResources` untuk menampilkan daftar tag yang terkait dengan aplikasi Anda.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ListTagResources |
get |
*全部资源
|
None | None |
Sintaks permintaan
GET /tags HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah. |
cn-beijing |
| ResourceType |
string |
Yes |
Tipe Sumber daya. Hanya |
application |
| NextToken |
string |
No |
Satu kueri dapat mengembalikan maksimum 50 hasil. Jika jumlah hasil melebihi batas ini, tanggapan menyertakan NextToken. Untuk mengambil halaman hasil berikutnya, sertakan token ini di permintaan berikutnya. |
A2RN |
| ResourceIds |
string |
No |
ID Sumber daya, ditentukan sebagai array JSON berisi string. Parameter ini wajib diisi jika parameter Tags tidak ditentukan. |
["d42921c4-5433-4abd-8075-0e536f8b****"] |
| Tags |
string |
No |
Tag yang digunakan untuk memfilter Sumber daya. Parameter ini wajib diisi jika parameter ResourceIds tidak ditentukan. Tag adalah pasangan kunci-nilai.
Kunci tag dan nilai tag bersifat case-sensitive. Jika Anda menentukan beberapa tag, operasi hanya mengembalikan Sumber daya yang memiliki semua tag yang ditentukan. Kunci tag tidak boleh diawali dengan |
[{"key":"k1","value":"v1"}] |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| RequestId |
string |
The request ID. |
7414187F-4F59-4585-9BCF-5F0804E4**** |
| Message |
string |
The message returned for the request.
|
success |
| TraceId |
string |
The trace ID that is used to query the details of a request. |
0bc5f84e15916043198032146d**** |
| Data |
object |
The data returned. |
|
| NextToken |
string |
The token that is used to retrieve the next page of results. A query returns a maximum of 50 results. If the results are truncated, you can use this token in a subsequent request to retrieve the next page of results. |
"" |
| TagResources |
array<object> |
The list of tags and their associated resources. |
|
|
object |
The details of a tag and the resource to which the tag is added. |
||
| ResourceType |
string |
The type of the resource. Valid value: |
ALIYUN::SAE::APPLICATION |
| TagValue |
string |
The value of the tag. |
v1 |
| ResourceId |
string |
The ID of the application. |
d42921c4-5433-4abd-8075-0e536f8b**** |
| TagKey |
string |
The key of the tag. |
k1 |
| ErrorCode |
string |
The error code.
|
|
| Code |
string |
The HTTP status code.
|
200 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"RequestId": "7414187F-4F59-4585-9BCF-5F0804E4****",
"Message": "success",
"TraceId": "0bc5f84e15916043198032146d****",
"Data": {
"NextToken": "\"\"",
"TagResources": [
{
"ResourceType": "ALIYUN::SAE::APPLICATION",
"TagValue": "v1",
"ResourceId": "d42921c4-5433-4abd-8075-0e536f8b****",
"TagKey": "k1"
}
]
},
"ErrorCode": "",
"Code": "200",
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | |
| 400 | InvalidResourceType.NotFound | The specified resource type is not supported. | |
| 400 | NumberExceed.Tags | The specified parameter Tags count exceed. | |
| 400 | Invalid.Param.Tag.Scope | The specified parameter is invalid: tag scope. | |
| 400 | No.Permission | The account has no permission. | |
| 400 | NumberExceed.ResourceIds | The number of resource IDs cannot exceed 50. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.