Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Attaches a policy to a root, an organizational unit (OU), or an individual account. How the policy affects accounts depends on the type of policy. Refer to the AWS Organizations User Guide for information about each policy type:
This operation can be called only from the organization's management account.
Synopsis
Creating a Request
data AttachPolicy Source #
See: newAttachPolicy
smart constructor.
AttachPolicy' | |
|
Instances
Create a value of AttachPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:policyId:AttachPolicy'
, attachPolicy_policyId
- The unique identifier (ID) of the policy that you want to attach to the
target. You can get the ID for the policy by calling the ListPolicies
operation.
The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).
$sel:targetId:AttachPolicy'
, attachPolicy_targetId
- The unique identifier (ID) of the root, OU, or account that you want to
attach the policy to. You can get the ID by calling the ListRoots,
ListOrganizationalUnitsForParent, or ListAccounts operations.
The regex pattern for a target ID string requires one of the following:
- Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
- Account - A string that consists of exactly 12 digits.
- Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
Request Lenses
attachPolicy_policyId :: Lens' AttachPolicy Text Source #
The unique identifier (ID) of the policy that you want to attach to the target. You can get the ID for the policy by calling the ListPolicies operation.
The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).
attachPolicy_targetId :: Lens' AttachPolicy Text Source #
The unique identifier (ID) of the root, OU, or account that you want to attach the policy to. You can get the ID by calling the ListRoots, ListOrganizationalUnitsForParent, or ListAccounts operations.
The regex pattern for a target ID string requires one of the following:
- Root - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
- Account - A string that consists of exactly 12 digits.
- Organizational unit (OU) - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
Destructuring the Response
data AttachPolicyResponse Source #
See: newAttachPolicyResponse
smart constructor.
Instances
Eq AttachPolicyResponse Source # | |
Defined in Amazonka.Organizations.AttachPolicy (==) :: AttachPolicyResponse -> AttachPolicyResponse -> Bool # (/=) :: AttachPolicyResponse -> AttachPolicyResponse -> Bool # | |
Read AttachPolicyResponse Source # | |
Show AttachPolicyResponse Source # | |
Defined in Amazonka.Organizations.AttachPolicy showsPrec :: Int -> AttachPolicyResponse -> ShowS # show :: AttachPolicyResponse -> String # showList :: [AttachPolicyResponse] -> ShowS # | |
Generic AttachPolicyResponse Source # | |
Defined in Amazonka.Organizations.AttachPolicy type Rep AttachPolicyResponse :: Type -> Type # from :: AttachPolicyResponse -> Rep AttachPolicyResponse x # to :: Rep AttachPolicyResponse x -> AttachPolicyResponse # | |
NFData AttachPolicyResponse Source # | |
Defined in Amazonka.Organizations.AttachPolicy rnf :: AttachPolicyResponse -> () # | |
type Rep AttachPolicyResponse Source # | |
Defined in Amazonka.Organizations.AttachPolicy |
newAttachPolicyResponse :: AttachPolicyResponse Source #
Create a value of AttachPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.