调用AttachControlPolicy绑定管控策略。
接口说明
绑定成功后,资源夹或成员将会立即受到管控策略的管控。请务必确定绑定操作的结果是符合预期的,以免影响您的业务正常运行。
系统会默认为资源夹和成员绑定系统策略 FullAliyunAccess。
管控策略在绑定节点下整体生效,即父资源夹绑定的管控策略,会在其子资源夹及其成员上生效。
每个节点(资源夹、成员)最多允许绑定 10 条管控策略。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
resourcemanager:AttachControlPolicy |
update |
*Account
*Folder
*ControlPolicy
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| PolicyId |
string |
是 |
管控策略 ID。 |
cp-jExXAqIYkwHN**** |
| TargetId |
string |
是 |
目标节点。取值:
|
fd-ZDNPiT**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| RequestId |
string |
请求 ID。 |
95060F1D-6990-4645-8920-A81D1BBFE992 |
示例
正常返回示例
JSON格式
{
"RequestId": "95060F1D-6990-4645-8920-A81D1BBFE992"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 404 | EntityNotExists.Target | The specified target does not exist in the resource directory. | 关联目标在资源目录中不存在。 |
| 404 | EntityNotExists.ResourceControlPolicy | The specified resource control policy does not exist. | 资源管控策略不存在。 |
| 409 | EntityAlreadyExists.ResourceControlPolicy | The resource control policy already exists. | 资源管控策略已存在。 |
| 409 | EntityAlreadyExists.ResourceControlPolicyAttachment | The resource control policy attachment already exists. | 指定目标已关联该资源管控策略。 |
| 409 | LimitExceeded.ResourceControlPolicyAttachment | The resource control policy attachment number exceeds the limit. | 资源管控策略绑定数量超出限制。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。