Menambahkan tag ke sumber daya. Anda dapat memanggil operasi API ini untuk menambahkan tag ke satu atau beberapa titik akhir atau layanan titik akhir.
Deskripsi operasi
You can add up to 20 tags to an instance. Before tags are added to a resource, Alibaba Cloud checks the number of existing tags on the resource. If the maximum number is reached, an error message is returned.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
privatelink:TagResources |
update |
*VpcEndpoint
*VpcEndpointService
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ResourceId |
array |
Yes |
ID sumber daya. Anda dapat menentukan hingga 50 ID sumber daya. |
|
|
string |
No |
The resource ID. |
ep-ba16baebdf35641a1**** |
|
| Tag |
array<object> |
Yes |
Tag yang akan ditambahkan ke sumber daya. |
|
|
object |
No |
|||
| Key |
string |
Yes |
The key of tag N to add to the resource. You can specify up to 20 tag keys. The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain |
FinanceDept |
| Value |
string |
Yes |
The value of tag N to add to the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain |
FinanceJoshua |
| ResourceType |
string |
Yes |
Tipe sumber daya. Nilai valid:
|
vpcendpoint |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run saja, tanpa menjalankan permintaan aktual. Nilai valid:
|
false |
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Anda dapat menggunakan klien untuk menghasilkan token, tetapi Anda harus memastikan bahwa token tersebut unik di antara permintaan yang berbeda. Token hanya dapat berisi karakter ASCII. Catatan
Jika Anda tidak menentukan parameter ini, sistem secara otomatis menggunakan ID permintaan sebagai token klien. ID permintaan dapat berbeda untuk setiap permintaan. |
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
Yes |
ID wilayah instans PrivateLink. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah terbaru. |
cn-hangzhou |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| RequestId |
string |
The request ID. |
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 | MissingTagKeyParam | The tag key is empty. | |
| 400 | MissingTagValueParam | The tag value is empty. | |
| 400 | IllegalTagKeyParam | IllegalTagKeyParam | |
| 400 | IllegalTagValueParam | The tag value is Illegal. | |
| 400 | DuplicatedTagKey | The tag keys is duplicated. | |
| 400 | QuotaExceed.TagsPerResource | The maximum number of tags for each resource is exceeded | |
| 400 | InvalidResourceId.NotFound | The specified ResourceIds are not found in our records. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.