Updates the metadata of a secret.
Operation description
This example updates the metadata of the secret001 secret by setting Description to datainfo.
For the access policy that a RAM user or RAM role needs to call this operation, see Resource Access Management.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SecretName |
string |
Yes |
The name of the secret. |
secret001 |
| Description |
string |
No |
The description of the secret. |
datainfo |
| ExtendedConfig.CustomData |
object |
No |
The custom data in the extended configuration of the secret. Note
|
{"DBName":"app1","Port":"3306"} |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| SecretName |
string |
The name of the secret. |
secret001 |
| RequestId |
string |
The request ID. |
5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47 |
Examples
Success response
JSON format
{
"SecretName": "secret001",
"RequestId": "5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47"
}
Error codes
|
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 |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.