调用ListControlPolicyAttachmentsForTarget查询资源夹或成员绑定的管控策略列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
resourcemanager:ListControlPolicyAttachmentsForTarget |
list |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| TargetId |
string |
是 |
目标节点。取值:
|
fd-ZDNPiT**** |
| Language |
string |
否 |
指定返回结果中管控策略描述的语言。取值:
说明
该参数仅在系统管控策略时有效。 |
zh-CN |
| ControlPolicyType |
string |
否 |
RESOURCE_CONTROL_POLICY |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回参数。 |
||
| RequestId |
string |
请求 ID。 |
C276B600-7B7A-49E8-938C-E16CFA955A82 |
| ControlPolicyAttachments |
object |
||
| ControlPolicyAttachment |
array<object> |
已绑定的管控策略列表。 |
|
|
object |
已绑定的管控策略列表。 |
||
| Description |
string |
管控策略描述。 |
ExampleControlPolicy |
| EffectScope |
string |
管控策略生效范围。取值:
|
RAM |
| PolicyName |
string |
管控策略名称。 |
ExampleControlPolicy |
| PolicyId |
string |
管控策略 ID。 |
cp-jExXAqIYkwHN**** |
| AttachDate |
string |
绑定管控策略的时间。 |
2021-03-19T02:56:24Z |
| PolicyType |
string |
管控策略类型。取值:
|
Custom |
| ControlPolicyType |
string |
RESOURCE_CONTROL_POLICY |
示例
正常返回示例
JSON格式
{
"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",
"ControlPolicyType": "RESOURCE_CONTROL_POLICY"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 404 | EntityNotExists.Target | The specified target does not exist in the resource directory. | 关联目标在资源目录中不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。