Membuat dan menyambungkan tag ke Sumber daya ECS tertentu dalam satu operasi.
Deskripsi operasi
Deskripsi operasi
Sebelum Anda menyambungkan tag, Alibaba Cloud memeriksa jumlah tag yang ada pada Sumber daya. Jika jumlahnya melebihi batas, pesan error akan dikembalikan. Untuk informasi selengkapnya, lihat Batas.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:TagResources |
create |
spesifikasi khusus
Disk.
NetworkInterface.
Image.
Instance.
KeyPair.
LaunchTemplate.
ReservedInstance.
SecurityGroup.
Snapshot.
AutoSnapshotPolicy.
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah Sumber daya. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ResourceType |
string |
Yes |
Tipe Sumber daya. Nilai valid:
|
Instans |
| ResourceId |
array |
Yes |
Daftar ID Sumber daya. Panjang array: 1 hingga 50. |
i-bp67acfmxazb4ph**** |
|
string |
No |
ID Sumber daya. |
r-XXX |
|
| Tag |
array<object> |
Yes |
Tag. Panjang array: 1 hingga 20. Jika array berisi beberapa objek tag, kunci tag |
|
|
object |
No |
Objek tag. |
||
| Key |
string |
Yes |
Kunci tag. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag dapat mencapai 128 karakter dan tidak boleh diawali dengan |
TestKey |
| Value |
string |
Yes |
Nilai tag. Nilai tag tidak boleh null tetapi dapat berupa string kosong. Panjang nilai tag dapat mencapai 128 karakter dan tidak boleh mengandung |
TestValue |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | NumberExceed.ResourceIds | The ResourceIds parameter's number is exceed , Valid : 50. | Parameter ResourceIds tidak boleh berisi lebih dari 50 nilai ResourceId. |
| 400 | NumberExceed.Tags | The Tags parameter's number is exceed , Valid : 20. | Jumlah tag melebihi batas maksimum. Anda dapat menentukan hingga 20 tag untuk operasi ini. |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | Terdapat kunci duplikat dalam tag. Pastikan semua kunci unik. |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | Parameter kunci tag yang ditentukan tidak valid. |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | Parameter nilai tag yang ditentukan tidak valid. |
| 400 | OperationDenied.QuotaExceed | The quota of tags on resource is beyond permitted range. | |
| 400 | InvalidTag.Mismatch | The specified Tag.n.Key and Tag.n.Value are not match. | Tag.N.Key dan Tag.N.Value yang ditentukan tidak cocok. |
| 400 | InvalidTagCount | The specified tags are beyond the permitted range. | Tag yang ditentukan berada di luar rentang valid. |
| 400 | Invalid.Scope | The specified scope is invalid. | |
| 500 | ServiceUnavailable | The service is unavailable, please try again later. | Permintaan backend habis waktu. Coba lagi nanti. |
| 403 | PermissionDenied.TagOwnerBid | The specified operator not have permission to set TagOwnerBid value. | |
| 403 | PermissionDenied.TagOwnerUid | The specified operator not have permission to set TagOwnerUid value. | Anda tidak memiliki izin untuk mengatur pemilik tag. |
| 403 | PermissionDenied.Scope | The specified operator not have permission to set Scope value. | Operator yang ditentukan tidak memiliki izin untuk mengatur nilai cakupan (dalam OAuth). |
| 403 | InvalidResourceId.NotSupported | The specified ResourceId does not support tagging. | |
| 403 | NoPermissionKey.Scope | %s | |
| 403 | NoPermission.Tag | The operator is not permission for the tag. | Anda tidak memiliki izin untuk mengelola tag pada sumber daya ini. |
| 403 | QuotaExceed.Tags | %s | Jumlah tag melebihi jumlah maksimum yang dapat dikonfigurasi. %s adalah variabel. Paket error aktual dikembalikan secara dinamis berdasarkan panggilan API. |
| 403 | TagKey.Duplication | The TagKey has duplication with others, case-insensitive. | Parameter Tag.N.Key berisi nilai duplikat. Parameter ini tidak peka huruf besar/kecil. Periksa apakah nilai duplikat ditentukan. |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | RegionId yang ditentukan tidak ada. Periksa apakah produk tersedia di wilayah ini. |
| 404 | MissingParameter.ResourceIds | The parameter - ResourceIds.N should not be null. | |
| 404 | MissingParameter.TagOwnerUid | The parameter - TagOwnerUid should not be null. | |
| 404 | MissingParameter.TagOwnerBid | The parameter - TagOwnerBid should not be null. | |
| 404 | MissingParameter.ResourceType | The parameter - ResourceType should not be null. | Parameter ResourceType tidak boleh kosong. |
| 404 | MissingParameter.Tags | The parameter - Tags should not be null. | |
| 404 | MissingParameter.RegionId | The parameter - RegionId should not be null. | Parameter RegionId tidak boleh kosong. |
| 404 | InvalidResourceId.NotFound | The specified ResourceIds are not found in our records. | Sumber daya yang ditentukan tidak ada. Periksa apakah sumber daya sudah benar. |
| 404 | InvalidResourceType.NotFound | The ResourceType provided does not exist in our records. | Tipe resource yang ditentukan tidak ada. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.