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 |
Enables a policy type in a root. After you enable a policy type in a root, you can attach policies of that type to the root, any organizational unit (OU), or account in that root. You can undo this by using the DisablePolicyType operation.
This is an asynchronous request that AWS performs in the background. AWS recommends that you first use ListRoots to see the status of policy types for a specified root, and then use this operation.
This operation can be called only from the organization's management account.
You can enable a policy type in a root only if that policy type is available in the organization. To view the status of available policy types in the organization, use DescribeOrganization.
Synopsis
- data EnablePolicyType = EnablePolicyType' {
- rootId :: Text
- policyType :: PolicyType
- newEnablePolicyType :: Text -> PolicyType -> EnablePolicyType
- enablePolicyType_rootId :: Lens' EnablePolicyType Text
- enablePolicyType_policyType :: Lens' EnablePolicyType PolicyType
- data EnablePolicyTypeResponse = EnablePolicyTypeResponse' {
- root :: Maybe Root
- httpStatus :: Int
- newEnablePolicyTypeResponse :: Int -> EnablePolicyTypeResponse
- enablePolicyTypeResponse_root :: Lens' EnablePolicyTypeResponse (Maybe Root)
- enablePolicyTypeResponse_httpStatus :: Lens' EnablePolicyTypeResponse Int
Creating a Request
data EnablePolicyType Source #
See: newEnablePolicyType
smart constructor.
EnablePolicyType' | |
|
Instances
:: Text | |
-> PolicyType | |
-> EnablePolicyType |
Create a value of EnablePolicyType
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:rootId:EnablePolicyType'
, enablePolicyType_rootId
- The unique identifier (ID) of the root in which you want to enable a
policy type. You can get the ID from the ListRoots operation.
The regex pattern for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or digits.
$sel:policyType:EnablePolicyType'
, enablePolicyType_policyType
- The policy type that you want to enable. You can specify one of the
following values:
Request Lenses
enablePolicyType_rootId :: Lens' EnablePolicyType Text Source #
The unique identifier (ID) of the root in which you want to enable a policy type. You can get the ID from the ListRoots operation.
The regex pattern for a root ID string requires "r-" followed by from 4 to 32 lowercase letters or digits.
enablePolicyType_policyType :: Lens' EnablePolicyType PolicyType Source #
The policy type that you want to enable. You can specify one of the following values:
Destructuring the Response
data EnablePolicyTypeResponse Source #
See: newEnablePolicyTypeResponse
smart constructor.
EnablePolicyTypeResponse' | |
|
Instances
newEnablePolicyTypeResponse Source #
Create a value of EnablePolicyTypeResponse
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:root:EnablePolicyTypeResponse'
, enablePolicyTypeResponse_root
- A structure that shows the root with the updated list of enabled policy
types.
$sel:httpStatus:EnablePolicyTypeResponse'
, enablePolicyTypeResponse_httpStatus
- The response's http status code.
Response Lenses
enablePolicyTypeResponse_root :: Lens' EnablePolicyTypeResponse (Maybe Root) Source #
A structure that shows the root with the updated list of enabled policy types.
enablePolicyTypeResponse_httpStatus :: Lens' EnablePolicyTypeResponse Int Source #
The response's http status code.