Queries a list of 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. |
Marker | String | No | EXAMPLE |
The |
MaxItems | Integer | No | 100 |
The number of entries to return. If a response is truncated because it reaches the
value of Valid values: 1 to 1000. Default value: 100. |
PolicyType | String | No | System |
The type of the |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
IsTruncated | Boolean | true |
Indicates whether the response is truncated. |
Marker | String | EXAMPLE |
The marker. This parameter is returned only if the value of |
Policies | Array |
The list of policies. |
|
Policy |
The information of a policy. |
||
AttachmentCount | Integer | 3 |
The number of references to the policy. |
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 | System |
The type of the policy. |
UpdateDate | String | 2015-01-23T12:33:18Z |
The time when the policy was modified. |
RequestId | String | 7B8A4E7D-6CFF-471D-84DF-195A7A241ECB |
The ID of the request. |
Examples
Sample requests
https://ram.aliyuncs.com/?Action=ListPolicies
&<Common request parameters>
Sample success responses
XML
format
<ListPoliciesResponse>
<RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
<IsTruncated>true</IsTruncated>
<Marker>EXAMPLE</Marker>
<Policies>
<Policy>
<PolicyName>OSS-Administrator</PolicyName>
<PolicyType>Custom</PolicyType>
<Description>OSS administrator</Description>
<DefaultVersion>v1</DefaultVersion>
<CreateDate>2015-01-23T12:33:18Z</CreateDate>
<UpdateDate>2015-01-23T12:33:18Z</UpdateDate>
<AttachmentCount>0</AttachmentCount>
</Policy>
<Policy>
<PolicyName>ReadOnlyAccess</PolicyName>
<PolicyType>System</PolicyType>
<Description>Read-only access</Description>
<DefaultVersion>v1</DefaultVersion>
<CreateDate>2015-02-11T18:39:12Z</CreateDate>
<UpdateDate>2015-02-19T09:43:16Z</UpdateDate>
<AttachmentCount>0</AttachmentCount>
</Policy>
</Policies>
</ListPoliciesResponse>
JSON
format
{
"Policies":{
"Policy":[
{
"AttachmentCount":3,
"Description":"OSS administrator",
"PolicyName":"OSS-Administrator",
"UpdateDate":"2015-01-23T12:33:18Z",
"CreateDate":"2015-01-23T12:33:18Z",
"DefaultVersion":"v1",
"PolicyType":"Custom"
},
{
"AttachmentCount":1,
"Description":"Read-only access",
"PolicyName":"ReadOnlyAccess",
"UpdateDate":"2015-02-19T09:43:16Z",
"CreateDate":"2015-02-11T18:39:12Z",
"DefaultVersion":"v1",
"PolicyType":"System"
}
]
},
"IsTruncated":true,
"RequestId":"7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
"Marker":"EXAMPLE"
}
Error codes
For a list of error codes, visit the API Error Center.