Membuat dan menyambungkan tag ke beberapa sumber daya cloud dari beberapa layanan cloud secara terpadu.
Deskripsi operasi
Tag adalah pengidentifikasi sumber daya cloud. Tag membantu Anda mengklasifikasikan, mencari, dan mengelompokkan sumber daya cloud yang memiliki karakteristik umum dari berbagai dimensi, sehingga memudahkan manajemen sumber daya. Untuk informasi selengkapnya, lihat Ikhtisar tag.
Untuk layanan cloud yang mendukung tag, lihat Layanan cloud yang mendukung tag.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
tag:TagResources |
update |
*全部资源
|
None |
|
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah. Nilai valid:
|
cn-hangzhou |
| RegionId |
string |
Yes |
The region ID. Valid values:
|
cn-hangzhou |
| Tags |
string |
Yes |
Kunci tag dan nilai tag. Jumlah pasangan kunci-nilai berkisar antara 1 hingga 10. Jika Anda menentukan beberapa tag, tag tersebut akan dibuat dan disambungkan ke sumber daya yang ditentukan secara bersamaan. Batasan adalah sebagai berikut:
|
{"k1":"v1","k2":"v2"} |
| ResourceARN |
array |
Yes |
Nama Sumber Daya Alibaba Cloud (ARN) sumber daya. Nilai valid N: 1 hingga 50. Format ARN sumber daya:
Catatan
ResourceARN mendukung penerusan |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
|
string |
No |
Nama Sumber Daya Alibaba Cloud (ARN) sumber daya. |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
Untuk detail tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter tanggapan. |
||
| RequestId |
string |
ID permintaan. |
72086426-9F8C-4A60-852B-864048FD1199 |
| FailedResources |
object |
||
| FailedResource |
array<object> |
Informasi tentang sumber daya yang gagal. Catatan
|
|
|
array<object> |
Informasi tentang sumber daya yang gagal. |
||
| ResourceARN |
string |
The ARN of the resource. |
arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu**** |
| Result |
object |
The information about the error. |
|
| Code |
string |
The error code. |
InvalidResourceId.NotFound |
| Message |
string |
The error message. |
The specified ResourceIds are not found in our records. |
Contoh
Respons sukses
JSONformat
{
"RequestId": "72086426-9F8C-4A60-852B-864048FD1199",
"FailedResources": {
"FailedResource": [
{
"ResourceARN": "arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****",
"Result": {
"Code": "InvalidResourceId.NotFound",
"Message": "The specified ResourceIds are not found in our records."
}
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidResourceARN.Region | The Region specified in the ResourceARN parameter does not match the RegionId parameter, specifically: %s. | |
| 400 | InvalidResourceARN.Account | The Account specified in the ResourceARN parameter does not match the actual account, specifically: %s. | |
| 400 | InvalidResourceARN.FormatError | The format of parameter ResourceARN: %s is not valid, for the correct format, you can refer to the Recommend. | |
| 400 | InvalidParameter.ResourceType | The parameter resource type: %s in ResourceARN is not valid or not support. | |
| 400 | InvalidParameter.ServiceCode | The parameter service code: %s in ResourceARN is not valid or not support. | |
| 400 | InvalidParameter.TagKey | The TagKey parameter is invalid. The following TagKeys are invalid: %s. | |
| 400 | InvalidParameter.TagValue | The TagValue parameter is invalid. The following TagValues are invalid: %s. | |
| 400 | InvalidParameter.Tags | The Tags parameter cannot be empty, and JSON parsing should adhere to the format of a Map. | |
| 403 | Duplicate.TagKey | The Tag.N.Key contains duplicate keys. | |
| 403 | InvalidParameter.Category | The specified Category is invalid. Valid values are Custom and System. | |
| 403 | MissingParameter.Createby | You must specify Createby. | |
| 403 | MissingParameter.ResourceIds | You must specify ResourceIds. | |
| 403 | NoPermission.Operator | The user is not authorized to operate on the specified resource. | |
| 403 | NoPermissionKey.Category | Some keys cannot be modified because the user does not have permission. | |
| 403 | NoPermissionKey.Operator | You are not authorized to operate the tag key. | |
| 403 | NumberExceed.ResourceIds | The maximum number of ResourceIds is exceeded. | |
| 403 | NumberExceed.Tags | The maximum number of Tags is exceeded. | |
| 403 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded. | |
| 404 | Missing.TagKey | Tag.N.Value has been specified and you must specify Tag.N.Key. | |
| 404 | MissingParameter.AliUid | You must specify AliUid. | |
| 404 | MissingParameter.Bid | You must specify Bid. | |
| 404 | MissingParameter.TagKey | You must specify TagKey. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.