amazonka-organizations-1.6.0: Amazon Organizations SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Organizations.CreatePolicy

Contents

Description

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual AWS account.

For more information about policies and their use, see Managing Organization Policies .

This operation can be called only from the organization's master account.

Synopsis

Creating a Request

createPolicy Source #

Creates a value of CreatePolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cpContent - The policy content to add to the new policy. For example, if you create a service control policy (SCP), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see Service Control Policy Syntax in the AWS Organizations User Guide .
  • cpDescription - An optional description to assign to the policy.
  • cpName - The friendly name to assign to the policy. The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.
  • cpType - The type of policy to create.

data CreatePolicy Source #

See: createPolicy smart constructor.

Instances

Eq CreatePolicy Source # 
Data CreatePolicy Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreatePolicy -> c CreatePolicy #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreatePolicy #

toConstr :: CreatePolicy -> Constr #

dataTypeOf :: CreatePolicy -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreatePolicy) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreatePolicy) #

gmapT :: (forall b. Data b => b -> b) -> CreatePolicy -> CreatePolicy #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreatePolicy -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreatePolicy -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreatePolicy -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreatePolicy -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreatePolicy -> m CreatePolicy #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreatePolicy -> m CreatePolicy #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreatePolicy -> m CreatePolicy #

Read CreatePolicy Source # 
Show CreatePolicy Source # 
Generic CreatePolicy Source # 

Associated Types

type Rep CreatePolicy :: * -> * #

Hashable CreatePolicy Source # 
ToJSON CreatePolicy Source # 
NFData CreatePolicy Source # 

Methods

rnf :: CreatePolicy -> () #

AWSRequest CreatePolicy Source # 
ToHeaders CreatePolicy Source # 
ToPath CreatePolicy Source # 
ToQuery CreatePolicy Source # 
type Rep CreatePolicy Source # 
type Rep CreatePolicy = D1 * (MetaData "CreatePolicy" "Network.AWS.Organizations.CreatePolicy" "amazonka-organizations-1.6.0-rHxjcIb8Bn6XT7VgZWDi9" False) (C1 * (MetaCons "CreatePolicy'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cpContent") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cpDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cpName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cpType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * PolicyType)))))
type Rs CreatePolicy Source # 

Request Lenses

cpContent :: Lens' CreatePolicy Text Source #

The policy content to add to the new policy. For example, if you create a service control policy (SCP), this string must be JSON text that specifies the permissions that admins in attached accounts can delegate to their users, groups, and roles. For more information about the SCP syntax, see Service Control Policy Syntax in the AWS Organizations User Guide .

cpDescription :: Lens' CreatePolicy Text Source #

An optional description to assign to the policy.

cpName :: Lens' CreatePolicy Text Source #

The friendly name to assign to the policy. The regex pattern that is used to validate this parameter is a string of any of the characters in the ASCII character range.

cpType :: Lens' CreatePolicy PolicyType Source #

The type of policy to create.

Destructuring the Response

createPolicyResponse Source #

Creates a value of CreatePolicyResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreatePolicyResponse Source #

See: createPolicyResponse smart constructor.

Instances

Eq CreatePolicyResponse Source # 
Data CreatePolicyResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreatePolicyResponse -> c CreatePolicyResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreatePolicyResponse #

toConstr :: CreatePolicyResponse -> Constr #

dataTypeOf :: CreatePolicyResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreatePolicyResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreatePolicyResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreatePolicyResponse -> CreatePolicyResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreatePolicyResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreatePolicyResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreatePolicyResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreatePolicyResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreatePolicyResponse -> m CreatePolicyResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreatePolicyResponse -> m CreatePolicyResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreatePolicyResponse -> m CreatePolicyResponse #

Read CreatePolicyResponse Source # 
Show CreatePolicyResponse Source # 
Generic CreatePolicyResponse Source # 
NFData CreatePolicyResponse Source # 

Methods

rnf :: CreatePolicyResponse -> () #

type Rep CreatePolicyResponse Source # 
type Rep CreatePolicyResponse = D1 * (MetaData "CreatePolicyResponse" "Network.AWS.Organizations.CreatePolicy" "amazonka-organizations-1.6.0-rHxjcIb8Bn6XT7VgZWDi9" False) (C1 * (MetaCons "CreatePolicyResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cprsPolicy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Policy))) (S1 * (MetaSel (Just Symbol "_cprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

cprsPolicy :: Lens' CreatePolicyResponse (Maybe Policy) Source #

A structure that contains details about the newly created policy.

cprsResponseStatus :: Lens' CreatePolicyResponse Int Source #

  • - | The response status code.