Queries access control policies.

This topic provides an example on how to call the API operation to query the system access control policies within a resource directory. The response shows that the resource directory has only one system access control policy. The policy is named FullAliyunAccess.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 No System

The type of the access control policy. Valid values:

  • System: system access control policy
  • Custom: custom access control policy
PageNumber Integer No 1

The number of the page to return.

Page 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 in which you want to return the descriptions of the access control policies. Valid values:

  • zh-CN (default value): Chinese
  • en: English
  • ja: Japanese
Note This parameter is valid only for system access control policies.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The number of access control policies.

RequestId String 9424A34C-3471-45AD-B6AB-924BBDFE42F9

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The number of the returned page.

ControlPolicies Array of ControlPolicy

The access control policies.

ControlPolicy
UpdateDate String 2020-08-05T06:32:24Z

The time when the access control policy was updated.

Description String System access control policy available for all operations on the cloud

The description of the access control policy.

EffectScope String All

The effective scope of the access control policy. Valid values:

  • All: The access control policy is in effect for Alibaba Cloud accounts, RAM users, and RAM roles.
  • RAM: The access control policy is in effect only for RAM users and RAM roles.
AttachmentCount String 44

The number of times that the access control policy is referenced.

PolicyName String FullAliyunAccess

The name of the access control policy.

PolicyId String cp-FullAliyunAccess

The ID of the access control policy.

CreateDate String 2020-08-05T06:32:24Z

The time when the access control policy was created.

PolicyType String System

The type of the access control policy. Valid values:

  • System: system access control policy
  • Custom: custom access control policy

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=ListControlPolicies
&PolicyType=System
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<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 access 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

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "RequestId" : "9424A34C-3471-45AD-B6AB-924BBDFE42F9",
  "PageSize" : 10,
  "PageNumber" : 1,
  "ControlPolicies" : {
    "ControlPolicy" : [ {
      "PolicyType" : "System",
      "UpdateDate" : "2020-08-05T06:32:24Z",
      "Description": "System access 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, see Service error codes.