Modifies the description of a custom policy.
Usage notes
You can call this operation to modify only the description of a custom policy. You cannot modify the description of a system policy.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdatePolicyDescription |
The operation that you want to perform. Set the value to UpdatePolicyDescription. |
PolicyName | String | No | TestPolicy |
The name of the policy. |
NewDescription | String | No | This is a test policy. |
The description of the policy. The value of the parameter must be 1 to 1,024 characters in length. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 7572DEBD-0ECE-518E-8682-D8CB82F8FE8E |
The ID of the request. |
Policy | Object |
The information about the policy. |
|
PolicyName | String | TestPolicy |
The name of the policy. |
PolicyType | String | Custom |
The type of the policy. Valid values:
|
CreateDate | String | 2022-02-28T07:04:15Z |
The time when the policy was created. |
UpdateDate | String | 2022-02-28T07:05:37Z |
The time when the policy was modified. |
Description | String | This is a test policy. |
The description of the policy. |
DefaultVersion | String | v1 |
The version of the policy. Default value: v1. |
Examples
Sample requests
https://ram.aliyuncs.com/?Action=UpdatePolicyDescription
&PolicyName=TestPolicy
&NewDescription=This is a test policy.
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdatePolicyDescriptionResponse>
<Policy>
<PolicyType>Custom</PolicyType>
<UpdateDate>2022-02-28T07:05:37Z</UpdateDate>
<Description>This is a test policy.</Description>
<PolicyName>TestPolicy</PolicyName>
<DefaultVersion>v1</DefaultVersion>
<CreateDate>2022-02-28T07:04:15Z</CreateDate>
</Policy>
<RequestId>7572DEBD-0ECE-518E-8682-D8CB82F8FE8E</RequestId>
</UpdatePolicyDescriptionResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Policy" : {
"PolicyType" : "Custom",
"UpdateDate" : "2022-02-28T07:05:37Z",
"Description" : "This is a test policy.",
"PolicyName" : "TestPolicy",
"DefaultVersion" : "v1",
"CreateDate" : "2022-02-28T07:04:15Z"
},
"RequestId" : "7572DEBD-0ECE-518E-8682-D8CB82F8FE8E"
}
Error codes
For a list of error codes, visit the API Error Center.