Membuat dan menambahkan tag ke Sumber daya.
Deskripsi operasi
This topic provides an example of how to create and add a tag to a resource stack in China (Hangzhou) region. The resource stack ID is 7fee80e1-8c48-4c2f-8300-0f6dc40b****, with the tag key of FinanceDept and the tag value of FinanceJoshua.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:TagResources |
update |
*Stack
*StackGroup
Template
*TemplateScratch
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah tag. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
| ResourceType |
string |
Yes |
Tipe Sumber daya. Nilai valid:
|
stack |
| ResourceId |
array |
Yes |
ID Sumber daya. |
7fee80e1-8c48-4c2f-8300-0f6dc40b**** |
|
string |
No |
The resource ID. You can specify up to 50 resource IDs. Catatan
When the value of ResourceType is stackgroup, specify the name of the stack group. |
7fee80e1-8c48-4c2f-8300-0f6dc40b**** |
|
| Tag |
array<object> |
Yes |
Tag Sumber daya. Anda dapat menentukan hingga 20 tag. |
|
|
object |
No |
The tag of the resource. |
||
| Key |
string |
Yes |
The key of the tag to add to the resource. You can specify up to 20 tag keys. The length must not exceed 128 characters. It cannot start with |
FinanceDept |
| Value |
string |
Yes |
The value of the tag to add to the resource. You can specify up to 20 tag values. The length must not exceed 128 characters. It cannot start with |
FinanceJoshua |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
C46FF5A8-C5F0-4024-8262-B16B639225A0 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "C46FF5A8-C5F0-4024-8262-B16B639225A0"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.