Queries policies.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListPolicies |
The operation that you want to perform. Set the value to ListPolicies. |
PolicyType | String | No | Custom |
The type of the policy. If you do not specify this parameter, the system lists all types of policies. Valid values:
|
PageNumber | Integer | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Valid values: 1 to 100. Default value: 10. |
Language | String | No | zh-CN |
The language that is used to return the description of the system policy. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
Policies | Array |
The information of the policies. |
|
Policy | |||
AttachmentCount | Integer | 1 |
The number of times the policy is referenced. |
CreateDate | String | 2015-01-23T12:33:18Z |
The time when the policy was created. |
DefaultVersion | String | v1 |
The default version of the policy. |
Description | String | OSS administrator |
The description of the policy. |
PolicyName | String | OSS-Administrator |
The name of the policy. |
PolicyType | String | Custom |
The type of the policy. Valid values:
|
UpdateDate | String | 2016-02-11T18:39:12Z |
The time when the policy was updated. |
RequestId | String | 7B8A4E7D-6CFF-471D-84DF-195A7A241ECB |
The ID of the request. |
TotalCount | Integer | 2 |
The total number of returned entries. |
Examples
Sample requests
https://resourcemanager.aliyuncs.com/?Action=ListPolicies
&<Common request parameters>
Sample success responses
XML
format
<ListPoliciesResponse>
<RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
<PageNumber>1</PageNumber>
<PageSize>10</PageSize>
<TotalCount>2</TotalCount>
<Policies>
<Policy>
<PolicyName>OSS-Administrator</PolicyName>
<PolicyType>Custom</PolicyType>
<Description>OSS administrator</Description>
<DefaultVersion>v1</DefaultVersion>
<CreateDate>2015-01-23T12:33:18Z</CreateDate>
</Policy>
<Policy>
<PolicyName>ReadOnlyAccess</PolicyName>
<PolicyType>System</PolicyType>
<Description>Read-only access</Description>
<DefaultVersion>v1</DefaultVersion>
<CreateDate>2015-02-11T18:39:12Z</CreateDate>
</Policy>
</Policies>
</ListPoliciesResponse>
JSON
format
{
"RequestId": "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 2,
"Policies": {
"Policy": [
{
"PolicyName": "OSS-Administrator",
"PolicyType": "Custom",
"Description": "OSS administrator",
"DefaultVersion": "v1",
"CreateDate": "2015-01-23T12:33:18Z"
},
{
"PolicyName": "ReadOnlyAccess",
"PolicyType": "System",
"Description": "Read-only access",
"DefaultVersion": "v1",
"CreateDate": "2015-02-11T18:39:12Z"
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.