All Products
Search
Document Center

Key Management Service:UpdateSecret

Last Updated:Jun 10, 2026

Memperbarui metadata rahasia.

Deskripsi operasi

In this example, the metadata of the secret001 secret is updated. The Description parameter is set to datainfo.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Parameter permintaan

Parameter

Type

Required

Description

Example

SecretName

string

Yes

Nama rahasia.

secret001

Description

string

No

Deskripsi rahasia.

datainfo

ExtendedConfig.CustomData

object

No

The custom data in the extended configuration of the secret.

Catatan
  • If this parameter is specified, the existing extended configuration of the secret is updated.

  • This parameter is unavailable for generic secrets.

{"DBName":"app1","Port":"3306"}

Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.

Elemen respons

Element

Type

Description

Example

object

SecretName

string

The name of the secret.

secret001

RequestId

string

The ID of the request, which is used to locate and troubleshoot issues.

5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47

Contoh

Respons sukses

JSONformat

{
  "SecretName": "secret001",
  "RequestId": "5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParameter some of the specified parameters "\" is not valid
500 InternalFailure Internal Failure
403 Forbidden.NoPermission This operation is forbidden by permission system
404 Forbidden.ResourceNotFound Resource not found
409 Rejected.ResourceExist The request was rejected becasue key already exsit
409 Rejected.ResourceInDeleteWindow secret in delete peroid

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.