Updates the metadata of a secret.
Operation description
In this example, the metadata of the secret001 secret is updated. The Description parameter is set to datainfo.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
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 parameters
Examples
Sample success responses
JSONformat
{
"SecretName": "secret001",
"RequestId": "5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47"
}Error codes
| HTTP status code | Error code | Error message |
|---|---|---|
| 400 | InvalidParameter | some of the specified parameters "\" is not valid |
| 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 |
| 500 | InternalFailure | Internal Failure |
For a list of error codes, visit the Service error codes.
