amazonka-iam-1.4.1: Amazon Identity and Access Management SDK.

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

Network.AWS.IAM.CreatePolicy

Contents

Description

Creates a new managed policy for your AWS account.

This operation creates a policy version with a version identifier of v1 and sets v1 as the policy's default version. For more information about policy versions, see Versioning for Managed Policies in the IAM User Guide.

For more information about managed policies in general, refer to Managed Policies and Inline Policies in the IAM User Guide.

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:

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 # 
NFData CreatePolicy Source # 

Methods

rnf :: CreatePolicy -> () #

AWSRequest CreatePolicy Source # 
ToQuery CreatePolicy Source # 
ToPath CreatePolicy Source # 
ToHeaders CreatePolicy Source # 
type Rep CreatePolicy Source # 
type Rep CreatePolicy = D1 (MetaData "CreatePolicy" "Network.AWS.IAM.CreatePolicy" "amazonka-iam-1.4.1-7UxTCVdPNcf8CA4oHmoXZ6" False) (C1 (MetaCons "CreatePolicy'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cpPath") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cpDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_cpPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_cpPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs CreatePolicy Source # 

Request Lenses

cpPath :: Lens' CreatePolicy (Maybe Text) Source #

The path for the policy.

For more information about paths, see IAM Identifiers in the IAM User Guide.

This parameter is optional. If it is not included, it defaults to a slash (/).

cpDescription :: Lens' CreatePolicy (Maybe Text) Source #

A friendly description of the policy.

Typically used to store information about the permissions defined in the policy. For example, "Grants access to production DynamoDB tables."

The policy description is immutable. After a value is assigned, it cannot be changed.

cpPolicyName :: Lens' CreatePolicy Text Source #

The name of the policy document.

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 #

Contains the response to a successful CreatePolicy request.

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.IAM.CreatePolicy" "amazonka-iam-1.4.1-7UxTCVdPNcf8CA4oHmoXZ6" 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 #

Information about the policy.