Mengkueri daftar tag.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:ListTagResources |
get |
*FileSystem
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
Tipe Sumber daya. Nilai valid:
|
filesystem |
| NextToken |
string |
No |
Token yang digunakan untuk memulai kueri berikutnya. |
无 |
| ResourceId |
array |
No |
Daftar ID Sumber daya. ID Sumber daya target. Nilai valid untuk N: 1 hingga 50. |
03e08484f0 |
|
string |
No |
ID Sumber daya.
|
03e08484f0 |
|
| Tag |
array<object> |
No |
Array tag. Panjang array adalah 1 hingga 20. Jika array berisi beberapa objek tag, kunci tag harus unik. |
|
|
object |
No |
Objek tag. |
||
| Key |
string |
No |
Kunci tag. Batasan:
|
nastest |
| Value |
string |
No |
Nilai tag. Batasan:
|
filetest |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
Token yang digunakan untuk memulai kueri berikutnya. Jika NextToken kosong, tidak ada halaman berikutnya. |
无 |
| RequestId |
string |
ID permintaan. |
2D69A58F-345C-4FDE-88E4-BF518948**** |
| TagResources |
object |
||
| TagResource |
array<object> |
Kumpulan informasi Sumber daya. |
|
|
object |
|||
| ResourceType |
string |
The resource type. |
filesystem |
| TagValue |
string |
The tag value. |
test |
| ResourceId |
string |
The resource ID. |
i-2zebd226fxed6h4iadhe |
| TagKey |
string |
The tag key. |
test1 |
Contoh
Respons sukses
JSONformat
{
"NextToken": " 无",
"RequestId": "2D69A58F-345C-4FDE-88E4-BF518948****",
"TagResources": {
"TagResource": [
{
"ResourceType": "filesystem",
"TagValue": "test",
"ResourceId": "i-2zebd226fxed6h4iadhe",
"TagKey": "test1"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingParameter.ResourceIdOrTag | Either ResourceId or Tag must be specified. | |
| 400 | InvalidNextToken | The NextToken is invalid. | |
| 400 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. The maximum is 50. | |
| 400 | MissingParameter.ResourceIds | You must specify ResourceIds. | |
| 400 | Duplicate.ResourceId | The request contains duplicated ResourceId. | |
| 400 | NumberExceed.Tags | The maximum number of Tags is exceeded. The maximum is 20. | |
| 400 | Duplicate.TagKey | The Tag.N.Key contains a duplicated key. | |
| 400 | InvalidResourceId.NotFound | The ResourceId does not exist. | |
| 400 | InvalidParameter.TagKey | The specified Tag.n.Key is invalid. | |
| 400 | InvalidParameter.TagValue | The specified Tag.n.Value is invalid. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.