Queries control policies.
In this example, the system control policies within a resource directory are queried.
The returned result shows that the resource directory has only one system control
policy. The policy is named FullAliyunAccess
.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListControlPolicies |
The operation that you want to perform. Set the value to ListControlPolicies. |
PolicyType | String | Yes | System |
The type of control 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 descriptions of the control policies. Valid values:
|
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ControlPolicies | Array of ControlPolicy |
The list of control policies. |
|
ControlPolicy | |||
AttachmentCount | String | 44 |
The number of times that the control policy is referenced. |
CreateDate | String | 2020-08-05T06:32:24Z |
The time when the control policy was created. |
Description | String | System control policy available for all operations on the cloud |
The description of the control policy. |
EffectScope | String | All |
The effective scope of the control policy. Valid values:
|
PolicyId | String | cp-FullAliyunAccess |
The ID of the control policy. |
PolicyName | String | FullAliyunAccess |
The name of the control policy. |
PolicyType | String | System |
The type of the control policy. Valid values:
|
UpdateDate | String | 2020-08-05T06:32:24Z |
The time when the control policy was updated. |
PageNumber | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 10 |
The number of entries returned per page. |
RequestId | String | 9424A34C-3471-45AD-B6AB-924BBDFE42F9 |
The ID of the request. |
TotalCount | Integer | 1 |
The number of control policies. |
Examples
Sample requests
https://resourcemanager.aliyuncs.com/?Action=ListControlPolicies
&PolicyType=System
&<Common request parameters>
Sample success responses
XML
format
<ListControlPoliciesResponse>
<TotalCount>1</TotalCount>
<RequestId>9424A34C-3471-45AD-B6AB-924BBDFE42F9</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<ControlPolicies>
<ControlPolicy>
<PolicyType>System</PolicyType>
<UpdateDate>2020-08-05T06:32:24Z</UpdateDate>
<Description>System control policy available for all operations on the cloud</Description>
<AttachmentCount>44</AttachmentCount>
<PolicyName>FullAliyunAccess</PolicyName>
<CreateDate>2020-08-05T06:32:24Z</CreateDate>
<PolicyId>cp-FullAliyunAccess</PolicyId>
<EffectScope>All</EffectScope>
</ControlPolicy>
</ControlPolicies>
</ListControlPoliciesResponse>
JSON
format
{
"TotalCount": 1,
"RequestId": "9424A34C-3471-45AD-B6AB-924BBDFE42F9",
"PageSize": 10,
"PageNumber": 1,
"ControlPolicies": {
"ControlPolicy": [
{
"PolicyType": "System",
"UpdateDate": "2020-08-05T06:32:24Z",
"Description": "System control policy available for all operations on the cloud",
"AttachmentCount": 44,
"PolicyName": "FullAliyunAccess",
"CreateDate": "2020-08-05T06:32:24Z",
"PolicyId": "cp-FullAliyunAccess",
"EffectScope": "All"
}
]
}
}
Error codes
For a list of error codes, visit the API Error Center.