amazonka-iam-1.6.0: Amazon Identity and Access Management 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.IAM.CreatePolicyVersion

Contents

Description

Creates a new version of the specified managed policy. To update a managed policy, you create a new policy version. A managed policy can have up to five versions. If the policy has five versions, you must delete an existing version using DeletePolicyVersion before you create a new version.

Optionally, you can set the new version as the policy's default version. The default version is the version that is in effect for the IAM users, groups, and roles to which the policy is attached.

For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide .

Synopsis

Creating a Request

createPolicyVersion Source #

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

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

  • cpvSetAsDefault - Specifies whether to set this version as the policy's default version. When this parameter is true , the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to. For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide .
  • cpvPolicyARN - The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .
  • cpvPolicyDocument - The JSON policy document that you want to use as the content for this new version of the policy. The regex pattern used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through u00FF) * The special characters tab (u0009), line feed (u000A), and carriage return (u000D)

data CreatePolicyVersion Source #

See: createPolicyVersion smart constructor.

Instances

Eq CreatePolicyVersion Source # 
Data CreatePolicyVersion Source # 

Methods

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

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

toConstr :: CreatePolicyVersion -> Constr #

dataTypeOf :: CreatePolicyVersion -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreatePolicyVersion Source # 
Show CreatePolicyVersion Source # 
Generic CreatePolicyVersion Source # 
Hashable CreatePolicyVersion Source # 
NFData CreatePolicyVersion Source # 

Methods

rnf :: CreatePolicyVersion -> () #

AWSRequest CreatePolicyVersion Source # 
ToHeaders CreatePolicyVersion Source # 
ToPath CreatePolicyVersion Source # 
ToQuery CreatePolicyVersion Source # 
type Rep CreatePolicyVersion Source # 
type Rep CreatePolicyVersion = D1 * (MetaData "CreatePolicyVersion" "Network.AWS.IAM.CreatePolicyVersion" "amazonka-iam-1.6.0-CI3f7XZIc4eD0Ehb04tNY7" False) (C1 * (MetaCons "CreatePolicyVersion'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cpvSetAsDefault") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cpvPolicyARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_cpvPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs CreatePolicyVersion Source # 

Request Lenses

cpvSetAsDefault :: Lens' CreatePolicyVersion (Maybe Bool) Source #

Specifies whether to set this version as the policy's default version. When this parameter is true , the new policy version becomes the operative version. That is, it becomes the version that is in effect for the IAM users, groups, and roles that the policy is attached to. For more information about managed policy versions, see Versioning for Managed Policies in the IAM User Guide .

cpvPolicyARN :: Lens' CreatePolicyVersion Text Source #

The Amazon Resource Name (ARN) of the IAM policy to which you want to add a new version. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

cpvPolicyDocument :: Lens' CreatePolicyVersion Text Source #

The JSON policy document that you want to use as the content for this new version of the policy. The regex pattern used to validate this parameter is a string of characters consisting of the following: * Any printable ASCII character ranging from the space character (u0020) through the end of the ASCII character range * The printable characters in the Basic Latin and Latin-1 Supplement character set (through u00FF) * The special characters tab (u0009), line feed (u000A), and carriage return (u000D)

Destructuring the Response

createPolicyVersionResponse Source #

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

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

data CreatePolicyVersionResponse Source #

Contains the response to a successful CreatePolicyVersion request.

See: createPolicyVersionResponse smart constructor.

Instances

Eq CreatePolicyVersionResponse Source # 
Data CreatePolicyVersionResponse Source # 

Methods

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

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

toConstr :: CreatePolicyVersionResponse -> Constr #

dataTypeOf :: CreatePolicyVersionResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreatePolicyVersionResponse Source # 
Show CreatePolicyVersionResponse Source # 
Generic CreatePolicyVersionResponse Source # 
NFData CreatePolicyVersionResponse Source # 
type Rep CreatePolicyVersionResponse Source # 
type Rep CreatePolicyVersionResponse = D1 * (MetaData "CreatePolicyVersionResponse" "Network.AWS.IAM.CreatePolicyVersion" "amazonka-iam-1.6.0-CI3f7XZIc4eD0Ehb04tNY7" False) (C1 * (MetaCons "CreatePolicyVersionResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cpvrsPolicyVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe PolicyVersion))) (S1 * (MetaSel (Just Symbol "_cpvrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))

Response Lenses

cpvrsPolicyVersion :: Lens' CreatePolicyVersionResponse (Maybe PolicyVersion) Source #

A structure containing details about the new policy version.