amazonka-organizations-2.0: Amazon Organizations SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Organizations.EnablePolicyType

Description

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 Amazon Web Services performs in the background. Amazon Web Services 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

Creating a Request

data EnablePolicyType Source #

See: newEnablePolicyType smart constructor.

Constructors

EnablePolicyType' 

Fields

Instances

Instances details
ToJSON EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

ToHeaders EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

ToPath EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

ToQuery EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

AWSRequest EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Associated Types

type AWSResponse EnablePolicyType #

Generic EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Associated Types

type Rep EnablePolicyType :: Type -> Type #

Read EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Show EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

NFData EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Methods

rnf :: EnablePolicyType -> () #

Eq EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Hashable EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

type AWSResponse EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

type Rep EnablePolicyType Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

type Rep EnablePolicyType = D1 ('MetaData "EnablePolicyType" "Amazonka.Organizations.EnablePolicyType" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "EnablePolicyType'" 'PrefixI 'True) (S1 ('MetaSel ('Just "rootId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "policyType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PolicyType)))

newEnablePolicyType Source #

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.

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.

Constructors

EnablePolicyTypeResponse' 

Fields

  • root :: Maybe Root

    A structure that shows the root with the updated list of enabled policy types.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic EnablePolicyTypeResponse Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Associated Types

type Rep EnablePolicyTypeResponse :: Type -> Type #

Read EnablePolicyTypeResponse Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Show EnablePolicyTypeResponse Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

NFData EnablePolicyTypeResponse Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

Eq EnablePolicyTypeResponse Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

type Rep EnablePolicyTypeResponse Source # 
Instance details

Defined in Amazonka.Organizations.EnablePolicyType

type Rep EnablePolicyTypeResponse = D1 ('MetaData "EnablePolicyTypeResponse" "Amazonka.Organizations.EnablePolicyType" "amazonka-organizations-2.0-JONpdX4PtttLcKxQshpOlA" 'False) (C1 ('MetaCons "EnablePolicyTypeResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "root") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Root)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.