amazonka-iot-1.6.1: Amazon IoT 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.IoT.CreatePolicyVersion

Contents

Description

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

Optionally, you can set the new version as the policy's default version. The default version is the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

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 the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
  • cpvPolicyName - The policy name.
  • cpvPolicyDocument - The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.

data CreatePolicyVersion Source #

The input for the CreatePolicyVersion operation.

See: createPolicyVersion smart constructor.

Instances
Eq CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Data CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

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 # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Show CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Generic CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Associated Types

type Rep CreatePolicyVersion :: Type -> Type #

Hashable CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

ToJSON CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

AWSRequest CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Associated Types

type Rs CreatePolicyVersion :: Type #

ToHeaders CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

ToPath CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

ToQuery CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

NFData CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Methods

rnf :: CreatePolicyVersion -> () #

type Rep CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

type Rep CreatePolicyVersion = D1 (MetaData "CreatePolicyVersion" "Network.AWS.IoT.CreatePolicyVersion" "amazonka-iot-1.6.1-1U0NSVSRVsCEeZIE9W0TkV" False) (C1 (MetaCons "CreatePolicyVersion'" PrefixI True) (S1 (MetaSel (Just "_cpvSetAsDefault") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 (MetaSel (Just "_cpvPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_cpvPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs CreatePolicyVersion Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Request Lenses

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

Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).

cpvPolicyDocument :: Lens' CreatePolicyVersion Text Source #

The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.

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 #

The output of the CreatePolicyVersion operation.

See: createPolicyVersionResponse smart constructor.

Instances
Eq CreatePolicyVersionResponse Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Data CreatePolicyVersionResponse Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

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 # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Show CreatePolicyVersionResponse Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Generic CreatePolicyVersionResponse Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

Associated Types

type Rep CreatePolicyVersionResponse :: Type -> Type #

NFData CreatePolicyVersionResponse Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

type Rep CreatePolicyVersionResponse Source # 
Instance details

Defined in Network.AWS.IoT.CreatePolicyVersion

type Rep CreatePolicyVersionResponse = D1 (MetaData "CreatePolicyVersionResponse" "Network.AWS.IoT.CreatePolicyVersion" "amazonka-iot-1.6.1-1U0NSVSRVsCEeZIE9W0TkV" False) (C1 (MetaCons "CreatePolicyVersionResponse'" PrefixI True) ((S1 (MetaSel (Just "_cpvrsPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_cpvrsPolicyVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 (MetaSel (Just "_cpvrsPolicyARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_cpvrsIsDefaultVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_cpvrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

cpvrsPolicyDocument :: Lens' CreatePolicyVersionResponse (Maybe Text) Source #

The JSON document that describes the policy.

cpvrsIsDefaultVersion :: Lens' CreatePolicyVersionResponse (Maybe Bool) Source #

Specifies whether the policy version is the default.