Mengkueri daftar tag yang terikat pada Express Connect dengan memanggil operasi ListTagResourcesForExpressConnect.
Deskripsi operasi
-
Untuk mengkueri objek pencarian, Anda harus menentukan ResourceId.N atau Tag.N (Tag.N.Key dan Tag.N.Value) di permintaan.
-
Tag.N adalah tag resource yang terdiri dari pasangan kunci tag dan nilai tag. Jika Anda hanya menentukan Tag.N.Key, semua nilai tag yang terkait dengan kunci tag yang ditentukan akan dikembalikan. Jika Anda hanya menentukan Tag.N.Value, pesan error akan dikembalikan.
-
Jika Anda menentukan Tag.N dan ResourceId.N untuk memfilter tag, ResourceId.N harus cocok dengan semua pasangan kunci tag dan nilai tag yang ditentukan.
-
Jika Anda menentukan beberapa pasangan kunci tag dan nilai tag secara bersamaan, hasil yang dikembalikan hanya berisi resource yang cocok dengan semua pasangan kunci tag dan nilai tag yang ditentukan.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
Jenis resource. Nilai valid:
|
PHYSICALCONNECTION |
| RegionId |
string |
Yes |
ID wilayah resource. Anda dapat memanggil operasi DescribeRegions untuk mengkueri ID wilayah. |
cn-hangzhou |
| NextToken |
string |
No |
Token yang menentukan titik awal kueri berikutnya. Nilai valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| MaxResults |
integer |
No |
Jumlah entri yang akan dikembalikan pada setiap halaman. Nilai valid: 1 hingga 100. Nilai default: 20. |
20 |
| ResourceId |
array |
No |
Daftar ID resource. |
|
|
string |
No |
ID resource. Anda dapat menentukan hingga 20 ID resource. |
pc-bp16qjewdsunr41m1**** |
|
| Tag |
array<object> |
No |
Daftar tag. |
|
|
object |
No |
Daftar tag. |
||
| Key |
string |
No |
Kunci tag resource. Anda dapat menentukan hingga 20 kunci tag. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter. Kunci tag tidak boleh diawali dengan |
FinanceDept |
| Value |
string |
No |
Nilai tag resource. Anda dapat menentukan hingga 20 nilai tag. Nilai tag dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter. Nilai tag tidak boleh diawali dengan |
FinanceJoshua |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
Token yang menentukan titik awal kueri berikutnya. Nilai valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
ID permintaan. |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| TagResources |
object |
||
| TagResource |
array<object> |
Daftar tag resource. |
|
|
object |
Daftar tag resource. |
||
| ResourceType |
string |
The type of the resource. Valid values:
|
PHYSICALCONNECTION |
| TagValue |
string |
The value of the tag that is added to the resource. |
FinanceJoshua |
| ResourceId |
string |
The resource ID. |
pc-bp16qjewdsunr41m1**** |
| TagKey |
string |
The key of the tag that is added to the resource. |
FinanceDept |
Contoh
Respons sukses
JSONformat
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"TagResources": {
"TagResource": [
{
"ResourceType": "PHYSICALCONNECTION",
"TagValue": "FinanceJoshua",
"ResourceId": "pc-bp16qjewdsunr41m1****",
"TagKey": "FinanceDept"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidTagKey | The tag keys are not valid. | |
| 400 | InvalidTagValue | The tag values are not valid. | |
| 400 | InvalidInstanceType.NotFound | The instance type is not found | |
| 400 | InvalidInstanceIds.NotFound | The instanceIds are not found | |
| 400 | Forbidden.TagKeys | The request do not allow to operate the tag keys | |
| 400 | QuotaExceeded.TagNum | Custom Tags quota exceeded | |
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | |
| 400 | SizeLimitExceeded.ResourceId | The maximum number of resource IDs is exceeded. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. | |
| 403 | BothEmpty.TagsAndResources | The specified Tags and ResourcesIds are not allow to both empty. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.