Menanyakan tag yang dilampirkan ke instans Cloud Enterprise Network (CEN).
Deskripsi operasi
Saat memanggil operasi ListTagResources, Anda harus menentukan setidaknya salah satu dari parameter permintaan ResourceId.N atau Tag.N.Key.
Jika hanya menentukan ResourceId.N, sistem akan menanyakan tag yang dilampirkan ke instans CEN yang ditentukan.
Jika hanya menentukan Tag.N.Key, sistem akan menanyakan semua instans CEN yang terkait dengan kunci tag tersebut.
- Jika menentukan keduanya, ResourceId.N dan Tag.N.Key, sistem akan menanyakan tag yang sesuai dengan kunci tag yang ditentukan dan dilampirkan ke instans CEN yang ditentukan.
Instans CEN yang ditentukan harus terkait dengan kunci tag yang ditentukan; jika tidak, hasil kosong akan dikembalikan.
Jika menentukan beberapa kunci tag, hubungan antar kunci tag tersebut bersifat AND.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:ListTagResources |
get |
*CenInstance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
Tipe resource. Nilai yang valid: Cen: instans CEN. BandwidthPackage: Paket bandwidth. TransitRouter: Router transit. TransitRouterVpcAttachment: koneksi VPC. TransitRouterVbrAttachment: koneksi VBR. TransitRouterPeerAttachment: koneksi antar-wilayah. TransitRouterVpnAttachment: koneksi VPN. TransitRouterRouteTable: tabel rute. Flowlog: log aliran. TransitRouterMulticastDomain: domain multicast. |
cen |
| NextToken |
string |
No |
Token yang digunakan untuk kueri berikutnya. Nilai yang valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| PageSize |
integer |
No |
Jumlah entri yang dikembalikan per halaman. Nilai yang valid: 1 hingga 50. Nilai default: 10. |
10 |
| ResourceId |
array |
No |
ID instans CEN. Anda dapat memasukkan maksimal 20 ID instans CEN. |
cen-8z69wtwqel33lq**** |
|
string |
No |
ID instans CEN. Anda dapat memasukkan maksimal 20 ID instans CEN. |
cen-8z69wtwqel33lq**** |
|
| Tag |
array<object> |
No |
Tag instans CEN. Anda dapat menanyakan maksimal 20 tag. |
|
|
object |
No |
Tag instans CEN. Anda dapat menanyakan maksimal 20 tag. |
||
| Key |
string |
No |
Kunci tag. Panjang kunci tag maksimal 64 karakter. Kunci tag tidak boleh diawali dengan Anda dapat memasukkan maksimal 20 kunci tag. |
test |
| Value |
string |
No |
Nilai tag. Panjang nilai tag maksimal 128 karakter. Nilai tag tidak boleh diawali dengan Anda dapat memasukkan maksimal 20 nilai tag. |
Bp |
| RegionId |
string |
No |
ID wilayah tempat resource ditempatkan. Parameter ini tidak diperlukan untuk tipe resource Cen dan BandwidthPackage. Parameter ini wajib untuk semua tipe resource lainnya. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| NextToken |
string |
Token yang digunakan untuk kueri berikutnya. Nilai yang valid:
|
FFmyTO70tTpLG6I3FmYAXGKPd**** |
| RequestId |
string |
ID permintaan. |
165B5C86-2033-5954-A89D-4CD83BA06C85 |
| TagResources |
object |
||
| TagResource |
array<object> |
Daftar resource beserta tag-nya. |
|
|
object |
|||
| ResourceType |
string |
Tipe resource. Nilai yang valid: Cen: instans CEN. BandwidthPackage: Paket bandwidth. TransitRouter: router transit. TransitRouterVpcAttachment: koneksi VPC. TransitRouterVbrAttachment: koneksi VBR. TransitRouterPeerAttachment: koneksi antar-wilayah. TransitRouterVpnAttachment: koneksi VPN. TransitRouterRouteTable: tabel rute. Flowlog: log aliran. TransitRouterMulticastDomain: domain multicast. |
CEN |
| TagValue |
string |
Nilai tag. |
Bp |
| ResourceId |
string |
ID instans CEN. |
cen-8z69wtwqel33lq**** |
| TagKey |
string |
Kunci tag. |
test |
Contoh
Respons sukses
JSONformat
{
"NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId": "165B5C86-2033-5954-A89D-4CD83BA06C85",
"TagResources": {
"TagResource": [
{
"ResourceType": "CEN",
"TagValue": "Bp",
"ResourceId": "cen-8z69wtwqel33lq****",
"TagKey": "test"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidTagKey | The tag keys are not valid. | The error message returned because the specified tag key is invalid. |
| 400 | InvalidTagValue | The tag values are not valid. | The error message returned because the specified tag value is invalid. |
| 400 | MissingParam | %s | |
| 400 | InvalidInstanceType.NotFound | The instance type is not found | The error message returned because the specified instance type does not exist. |
| 400 | InvalidInstanceIds.NotFound | The instanceIds are not found | The error message returned because the specified instance does not exist. |
| 400 | Forbidden.TagKeys | The request do not allow to operate the tag keys | The error message returned because you cannot manage the specified tag key. |
| 400 | QuotaExceeded.TagNum | Custom Tags quota exceeded | The error message returned because the number of tags has reached the upper limit. |
| 400 | InvalidTagScope.NotFound | The tag scope is not found | The error message returned because the specified tag scope is invalid. |
| 400 | Forbidden.NotAllowedCategary | The System tag is not valid | The error message returned because you cannot configure system tags. |
| 400 | SizeLimitExceeded.ResourceIdNum | The ResourceIds parameter's number is exceed , Valid : 20 | |
| 400 | BothEmpty.TagsAndResources | Both of Tags and ResourceIds is empty. | The error message returned because the Tags and ResourceIds parameters are not set. |
| 400 | IllegalParam.NextToken | The parameter NextToken is invalid. | The error message returned because the NextToken parameter is set to an invalid value. Check the value and try again. |
| 400 | IllegalParam.Region | The specified region is invalid. | |
| 400 | InvalidParameter | Invalid parameter. | The error message returned because the parameter is set to an invalid value. |
| 400 | Unauthorized | The AccessKeyId is unauthorized. | The error message returned because you do not have the permissions to perform this operation. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.