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 |
Disables an organizational policy type in a root. A policy of a certain type can be attached to entities in a root only if that type is enabled in the root. After you perform this operation, you no longer can attach policies of the specified type to that root or to any organizational unit (OU) or account in that root. You can undo this by using the EnablePolicyType operation.
This is an asynchronous request that AWS performs in the background. If you disable a policy type for a root, it still appears enabled for the organization if all features are enabled for the organization. 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.
To view the status of available policy types in the organization, use DescribeOrganization.
Synopsis
- data DisablePolicyType = DisablePolicyType' {
- rootId :: Text
- policyType :: PolicyType
- newDisablePolicyType :: Text -> PolicyType -> DisablePolicyType
- disablePolicyType_rootId :: Lens' DisablePolicyType Text
- disablePolicyType_policyType :: Lens' DisablePolicyType PolicyType
- data DisablePolicyTypeResponse = DisablePolicyTypeResponse' {
- root :: Maybe Root
- httpStatus :: Int
- newDisablePolicyTypeResponse :: Int -> DisablePolicyTypeResponse
- disablePolicyTypeResponse_root :: Lens' DisablePolicyTypeResponse (Maybe Root)
- disablePolicyTypeResponse_httpStatus :: Lens' DisablePolicyTypeResponse Int
Creating a Request
data DisablePolicyType Source #
See: newDisablePolicyType
smart constructor.
DisablePolicyType' | |
|
Instances
:: Text | |
-> PolicyType | |
-> DisablePolicyType |
Create a value of DisablePolicyType
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:DisablePolicyType'
, disablePolicyType_rootId
- The unique identifier (ID) of the root in which you want to disable 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:DisablePolicyType'
, disablePolicyType_policyType
- The policy type that you want to disable in this root. You can specify
one of the following values:
Request Lenses
disablePolicyType_rootId :: Lens' DisablePolicyType Text Source #
The unique identifier (ID) of the root in which you want to disable 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.
disablePolicyType_policyType :: Lens' DisablePolicyType PolicyType Source #
The policy type that you want to disable in this root. You can specify one of the following values:
Destructuring the Response
data DisablePolicyTypeResponse Source #
See: newDisablePolicyTypeResponse
smart constructor.
DisablePolicyTypeResponse' | |
|
Instances
newDisablePolicyTypeResponse Source #
Create a value of DisablePolicyTypeResponse
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:DisablePolicyTypeResponse'
, disablePolicyTypeResponse_root
- A structure that shows the root with the updated list of enabled policy
types.
$sel:httpStatus:DisablePolicyTypeResponse'
, disablePolicyTypeResponse_httpStatus
- The response's http status code.
Response Lenses
disablePolicyTypeResponse_root :: Lens' DisablePolicyTypeResponse (Maybe Root) Source #
A structure that shows the root with the updated list of enabled policy types.
disablePolicyTypeResponse_httpStatus :: Lens' DisablePolicyTypeResponse Int Source #
The response's http status code.