Membuat dan menyambungkan tag ke resource.
Deskripsi operasi
Sebuah tag terdiri dari kunci tag dan nilai tag. Keduanya wajib diisi.
Jika Anda menyambungkan beberapa tag ke instans Cloud Enterprise Network (CEN), kunci tag harus unik untuk instans tersebut.
Anda dapat menyambungkan hingga 20 tag ke satu instans CEN.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cen:TagResources |
update |
*All Resource
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceType |
string |
Yes |
Tipe resource. Nilai yang valid: Cen: sebuah instans CEN. BandwidthPackage: sebuah paket bandwidth. TransitRouter: sebuah instans router transit. TransitRouterVpcAttachment: sebuah koneksi VPC. TransitRouterVbrAttachment: sebuah koneksi VBR. TransitRouterPeerAttachment: sebuah koneksi antar-wilayah. TransitRouterVpnAttachment: sebuah koneksi VPN. TransitRouterRouteTable: sebuah tabel rute. Flowlog: sebuah log aliran. TransitRouterMulticastDomain: sebuah domain multicast. |
cen |
| ResourceId |
array |
Yes |
Daftar ID resource. |
cen-7qthudw0ll6jmc**** |
|
string |
No |
ID resource. Anda dapat memasukkan beberapa ID resource. Nilai N berkisar dari 1 hingga 20. |
cen-pfa6ugf3xl0qsd**** |
|
| Tag |
array<object> |
Yes |
Daftar tag. |
|
|
object |
Yes |
Tag. |
||
| Key |
string |
Yes |
Kunci tag. Anda dapat memasukkan beberapa kunci tag. Nilai N berkisar dari 1 hingga 20. Panjang kunci tag maksimal 64 karakter. Tidak boleh diawali dengan |
TagKey |
| Value |
string |
Yes |
Nilai tag. Setiap kunci tag harus memiliki nilai tag. Nilai N berkisar dari 1 hingga 20. Panjang nilai tag maksimal 128 karakter. Tidak boleh diawali dengan |
TagValue |
| RegionId |
string |
No |
ID wilayah dari resource. Parameter ini tidak diperlukan untuk resource bertipe Cen dan BandwidthPackage. Parameter ini wajib untuk semua tipe resource lainnya. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Respons yang dikembalikan. |
||
| RequestId |
string |
ID permintaan. |
C46FF5A8-C5F0-4024-8262-B16B639225A0 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}
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 | MissingParameter.TagValue | The specified parameter TagValue is missing | The error message returned because the TagValue parameter is not set. |
| 400 | DuplicatedParam.TagKey | The parameter TagKey is duplicated. | The error message returned because the TagKey parameter already exists. |
| 400 | IllegalParamLength.Tag | The specified length of Tag is invalid. | The error message returned because the length of the specified tag is invalid. Check the tag and try again. |
| 400 | IllegalParam.Region | The specified region is invalid. | |
| 400 | MissingParameter.TagKey | TagKey must be specified. | The error message returned because you must set the TagKey parameter. |
| 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.