本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
範例:用於管理組織備份政策的合併許可
此範例顯示如何建立以資源為基礎的委派政策,以允許管理帳戶委派在組織內管理備份政策所需的完整許可,包括 create
、read
、update
和 delete
動作,以及 attach
和 detach
政策動作。
重要
此政策可讓委派管理員對組織中任何帳戶 (包括管理帳戶) 建立的政策執行指定的動作。
此委派政策範例授予從 AWS API或 以程式設計方式完成動作所需的許可 AWS CLI。若要使用此委派政策,請 AWS 取代 的預留位置文字 MemberAccountId
,
ManagementAccountId
, OrganizationId
和 RootId
使用您自己的資訊。然後,依照 的委派管理員 AWS Organizations中的指示操作。
{ "Version": "2012-10-17", "Statement": [ { "Sid": "DelegatingNecessaryDescribeListActions", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::
MemberAccountId
:root" }, "Action": [ "organizations:DescribeOrganization", "organizations:DescribeOrganizationalUnit", "organizations:DescribeAccount", "organizations:ListRoots", "organizations:ListOrganizationalUnitsForParent", "organizations:ListParents", "organizations:ListChildren", "organizations:ListAccounts", "organizations:ListAccountsForParent", "organizations:ListTagsForResource" ], "Resource": "*" }, { "Sid": "DelegatingNecessaryDescribeListActionsForSpecificPolicyType", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::MemberAccountId
:root" }, "Action": [ "organizations:DescribePolicy", "organizations:DescribeEffectivePolicy", "organizations:ListPolicies", "organizations:ListPoliciesForTarget", "organizations:ListTargetsForPolicy" ], "Resource": "*", "Condition": { "StringLikeIfExists": { "organizations:PolicyType": "BACKUP_POLICY" } } }, { "Sid": "DelegatingAllActionsForBackupPolicies", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::MemberAccountId
:root" }, "Action": [ "organizations:CreatePolicy", "organizations:UpdatePolicy", "organizations:DeletePolicy", "organizations:AttachPolicy", "organizations:DetachPolicy", "organizations:EnablePolicyType", "organizations:DisablePolicyType" ], "Resource": [ "arn:aws:organizations::ManagementAccountId
:root/o-OrganizationId
/r-RootId
", "arn:aws:organizations::ManagementAccountId
:ou/o-OrganizationId
/*", "arn:aws:organizations::ManagementAccountId
:account/o-OrganizationId
/*", "arn:aws:organizations::ManagementAccountId
:policy/o-OrganizationId
/backup_policy/*" ], "Condition": { "StringLikeIfExists": { "organizations:PolicyType": "BACKUP_POLICY" } } } ] }