Menambahkan tag ke CMK, rahasia, atau sertifikat.
Deskripsi operasi
You can add up to 10 tags to a CMK, secret, or certificate.
In this example, the tags [{"TagKey":"S1key1","TagValue":"S1val1"},{"TagKey":"S1key2","TagValue":"S2val2"}] are added to the CMK whose ID is 08c33a6f-4e0a-4a1b-a3fa-7ddf****.
For more information about the access policy required by a RAM user or RAM role to call this API, see Resource Access Management.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| KeyId |
string |
No |
ID customer master key (CMK). ID harus unik secara global. Catatan
Anda hanya dapat mengonfigurasi salah satu dari parameter KeyId, SecretName, dan CertificateId. |
08c33a6f-4e0a-4a1b-a3fa-7ddf**** |
| Tags |
string |
Yes |
Satu atau beberapa tag yang ingin Anda tambahkan. Nilainya dalam format array. Atribut tag:
|
[{"TagKey":"S1key1","TagValue":"S1val1"},{"TagKey":"S1key2","TagValue":"S2val2"}] |
| SecretName |
string |
No |
Nama rahasia. Catatan
Anda hanya dapat mengonfigurasi salah satu dari parameter KeyId, SecretName, dan CertificateId. |
MyDbC**** |
| CertificateId |
string |
No |
ID sertifikat. Catatan
Anda hanya dapat mengonfigurasi salah satu dari parameter KeyId, SecretName, dan CertificateId. |
770dbe42-e146-43d1-a55a-1355db86**** |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
4162a6af-bc99-40b3-a552-89dcc8aaf7c8 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "4162a6af-bc99-40b3-a552-89dcc8aaf7c8"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is not valid. | An invalid value is specified for the parameter. |
| 404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.