Updates the metadata of a secret.
In this example, the metadata of the secret001
secret is updated. Description
is set to datainfo
.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | UpdateSecret | The operation that you want to perform. Set the value to UpdateSecret. |
SecretName | String | Yes | secret001 | The Alibaba Cloud Resource Name (ARN) of the secret or secret resource. Note When you access a secret within another Alibaba Cloud account, you must enter the ARN of the secret. The ARN is in the acs:kms:${region}:${account}:secret/${secret-name} format. |
Description | String | No | datainfo | The description of the secret. |
ExtendedConfig.CustomData | Map | No | {"DBName":"app1","Port":"3306"} | The custom data in the extended configuration of the secret. Note
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter |
Type |
Example |
Description |
SecretName | String | secret001 | The secret name. |
RequestId | String | 5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47 | The ID of the request, which is used to locate and troubleshoot issues. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateSecret
&SecretName=secret001
&Description=datainfo
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateSecretResponse>
<SecretName>secret001</SecretName>
<RequestId>5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47</RequestId>
</UpdateSecretResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"SecretName" : "secret001",
"RequestId" : "5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47"
}
Error codes
For a list of error codes, see Service error codes.