All Products
Search
Document Center

Resource Management:ListControlPolicyAttachmentsForTarget

Last Updated:Jun 25, 2024

Queries the access control policies that are attached to a folder or member.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TargetIdstringYes

The ID of the object whose access control policies you want to query. Access control policies can be attached to the following objects:

  • Root folder
  • Subfolders of the Root folder
  • Members
fd-ZDNPiT****
LanguagestringNo

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.
zh-CN

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

C276B600-7B7A-49E8-938C-E16CFA955A82
ControlPolicyAttachmentsobject []

The information about the attached access control policies.

Descriptionstring

The description of the access control policy.

ExampleControlPolicy
EffectScopestring

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.
RAM
PolicyNamestring

The name of the access control policy.

ExampleControlPolicy
PolicyIdstring

The ID of the access control policy.

cp-jExXAqIYkwHN****
AttachDatestring

The time when the access control policy was attached.

2021-03-19T02:56:24Z
PolicyTypestring

The type of the access control policy. Valid values:

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

Examples

Sample success responses

JSONformat

{
  "RequestId": "C276B600-7B7A-49E8-938C-E16CFA955A82",
  "ControlPolicyAttachments": {
    "ControlPolicyAttachment": [
      {
        "Description": "ExampleControlPolicy",
        "EffectScope": "RAM",
        "PolicyName": "ExampleControlPolicy",
        "PolicyId": "cp-jExXAqIYkwHN****",
        "AttachDate": "2021-03-19T02:56:24Z",
        "PolicyType": "Custom"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
404EntityNotExists.TargetThe specified target does not exist in the resource directory.The specified object does not exist in the resource directory.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history