Mengkueri hubungan pengikatan antara instance ApsaraDB for Redis (kompatibel dengan Tair) dan tag.
Deskripsi operasi
Untuk operasi konsol yang sesuai dengan API ini, lihat Memfilter instance menurut tag dan Melihat tag yang terikat dengan instance.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:ListTagResources |
get |
*DBInstance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID region instance. |
cn-hangzhou |
| ResourceType |
string |
Yes |
Jenis sumber daya. Tetapkan nilainya ke INSTANCE. |
INSTANCE |
| NextToken |
string |
No |
Token yang digunakan untuk memulai kueri berikutnya guna mengambil lebih banyak hasil. Catatan
Anda tidak perlu menentukan parameter ini untuk kueri pertama. Jika tidak semua hasil dikembalikan dalam satu kueri, Anda dapat meneruskan nilai NextToken yang dikembalikan pada kueri sebelumnya dalam kueri berikutnya untuk melanjutkan kueri. |
212db86sca4384811e0b5e8707ec2**** |
| ResourceId |
array |
No |
Daftar ID instance. Catatan
|
r-bp1zxszhcgatnx**** |
|
string |
No |
ID instance. |
r-bp1zxszhcgatnx**** |
|
| Tag |
array<object> |
No |
Informasi tag instance. Anda harus menentukan salah satu dari parameter ini atau ResourceId. |
|
|
object |
No |
|||
| Key |
string |
No |
Kunci tag. |
demokey |
| Value |
string |
No |
Nilai tag. |
demovalue |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Objek. |
||
| NextToken |
string |
Jika tidak semua hasil dikembalikan dalam satu kueri, Anda dapat meneruskan token yang dikembalikan pada kueri sebelumnya dalam kueri berikutnya untuk melanjutkan kueri. |
212db86sca4384811e0b5e8707ec2**** |
| RequestId |
string |
ID permintaan. |
47A514A1-4B77-4E30-B4C5-2A880650**** |
| TagResources |
object |
||
| TagResource |
array<object> |
Informasi tentang instance dan tag. |
|
|
object |
Objek. |
||
| TagValue |
string |
The values of the tags. |
demovalue |
| ResourceType |
string |
The resource type. The return value is ALIYUN::KVSTORE::INSTANCE. This value indicates a Tair (Redis OSS-compatible) instance. |
ALIYUN::KVSTORE::INSTANCE |
| ResourceId |
string |
The resource ID, which is also the ID of the instance. |
r-bp1zxszhcgatnx**** |
| TagKey |
string |
The keys of the tags. |
demokey |
Contoh
Respons sukses
JSONformat
{
"NextToken": "212db86sca4384811e0b5e8707ec2****",
"RequestId": "47A514A1-4B77-4E30-B4C5-2A880650****",
"TagResources": {
"TagResource": [
{
"TagValue": "demovalue",
"ResourceType": "ALIYUN::KVSTORE::INSTANCE",
"ResourceId": "r-bp1zxszhcgatnx****",
"TagKey": "demokey"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidTagKey.Malformed | The specified parameter Tag.n.Key or TagKey.n is not valid. | |
| 400 | InvalidTagValue.Malformed | The specified parameter Tag.n.Value is not valid. | |
| 400 | InvalidParameter.ResourceId | The specified parameter ResourceId.n is not valid. | |
| 400 | MissParameter.TagOrResourceId | The parameter Tag.n or ResourceId.n is needed. | |
| 400 | InvalidParameter.Scope | The specified parameter Scope is not valid. | |
| 400 | NumberExceed.ResourceIds | The ResourceIds parameter number is exceed. | |
| 400 | NumberExceed.Tags | The Tags parameter number is exceed. | |
| 400 | Duplicate.TagKey | The specified parameter Tag.n.Key is duplicated. | |
| 400 | InvalidParameter.ResourceType | The specified parameter ResourceType is not valid. | |
| 404 | InvalidDbInstanceId.NotFound | Specified instance does not exist. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.