Queries the policies that are created for an access configuration.

Usage notes

This topic provides an example on how to query the policies that are created for the access configuration ac-00jhtfl8thteu6uj****. The returned result shows that the access configuration contains one system policy and one inline policy.

Limits

You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.

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 ListPermissionPoliciesInAccessConfiguration

The operation that you want to perform. Set the value to ListPermissionPoliciesInAccessConfiguration.

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

AccessConfigurationId String Yes ac-00jhtfl8thteu6uj****

The ID of the access configuration.

PermissionPolicyType String No System

The type of the policy. The type can be used to filter policies. Valid values:

  • System: system policy
  • Inline: inline policy

If you do not specify this parameter, all types of policies are queried.

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

Response parameters

Parameter Type Example Description
PermissionPolicies Array of PermissionPolicy

The policies.

PermissionPolicyName String AliyunECSFullAccess

The name of the policy.

PermissionPolicyType String System

The type of the policy.

PermissionPolicyDocument String {\"Statement\": [{\"Action\": \"*\",\"Effect\": \"Allow\",\"Resource\": \"*\"}],\"Version\": \"1\"}

The configurations of the inline policy.

Note This parameter is returned only when the value of the PermissionPolicyType parameter is Inline.
AddTime String 2021-11-03T06:37:25Z

The time when the policy was created for the access configuration.

RequestId String 3A5E771F-1F5A-5555-A64E-579748AAFD98

The ID of the request.

TotalCounts Integer 2

The total number of policies.

Examples

Sample requests

https://[Endpoint]/?Action=ListPermissionPoliciesInAccessConfiguration
&DirectoryId=d-00fc2p61****
&AccessConfigurationId=ac-00jhtfl8thteu6uj****
&<Common request parameters>

Sample success responses

XML format

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

<ListPermissionPoliciesInAccessConfigurationResponse>
	<PermissionPolicies>
		<PermissionPolicy>
			<PermissionPolicyName>InlinePolicy</PermissionPolicyName>
			<PermissionPolicyType>Inline</PermissionPolicyType>
			<PermissionPolicyDocument>{"Statement": [{"Action": "*","Effect": "Allow","Resource": "*"}],"Version": "1"}</PermissionPolicyDocument>
			<AddTime>2021-11-03T06:49:50Z</AddTime>
		</PermissionPolicy>
		<PermissionPolicy>
			<PermissionPolicyName>AliyunECSFullAccess</PermissionPolicyName>
			<PermissionPolicyType>System</PermissionPolicyType>
			<AddTime>2021-11-03T06:37:25Z</AddTime>
		</PermissionPolicy>
	</PermissionPolicies>
	<RequestId>3A5E771F-1F5A-5555-A64E-579748AAFD98</RequestId>
	<TotalCounts>2</TotalCounts>
</ListPermissionPoliciesInAccessConfigurationResponse>

JSON format

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

{
  "PermissionPolicies" : [ {
    "PermissionPolicyName" : "InlinePolicy",
    "PermissionPolicyType" : "Inline",
    "PermissionPolicyDocument" : "{\"Statement\": [{\"Action\": \"*\",\"Effect\": \"Allow\",\"Resource\": \"*\"}],\"Version\": \"1\"}",
    "AddTime" : "2021-11-03T06:49:50Z"
  }, {
    "PermissionPolicyName" : "AliyunECSFullAccess",
    "PermissionPolicyType" : "System",
    "AddTime" : "2021-11-03T06:37:25Z"
  } ],
  "RequestId" : "3A5E771F-1F5A-5555-A64E-579748AAFD98",
  "TotalCounts" : 2
}

Error codes

For a list of error codes, visit the API Error Center.