组织 ORGANIZATIONS-SCP示例:禁止共享到组织外

时间:2024-05-11 17:00:35

禁止共享到组织外

使用以下SCP禁止本组织内的账号给组织外账号共享资源。此SCP建议绑定至组织的根OU,使其对整个组织生效。

{
  "Version": "5.0",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": [
        "ram:resourceShares:create",
        "ram:resourceShares:associate"
 
      ],
      "Resource": [
        "*"
      ],
      "Condition": {
        "ForAnyValue:StringNotLike": {
          "ram:TargetOrgPaths": [
            "organization_id/root_id/ou_id"【备注:此处需填写组织的路径ID】
          ]
        }
      }
    }
  ]
}
support.huaweicloud.com/usermanual-organizations/org_03_0081.html