amazonka-iot-1.4.5: Amazon IoT 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.IoT.CreatePolicy

Contents

Description

Creates an AWS IoT policy.

The created policy is the default version for the policy. This operation creates a policy version with a version identifier of 1 and sets 1 as the policy's default version.

Synopsis

Creating a Request

createPolicy #

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:

  • cpPolicyName - The policy name.
  • cpPolicyDocument - The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.

data CreatePolicy #

The input for the CreatePolicy operation.

See: createPolicy smart constructor.

Instances

Eq CreatePolicy # 
Data CreatePolicy # 

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 # 
Show CreatePolicy # 
Generic CreatePolicy # 

Associated Types

type Rep CreatePolicy :: * -> * #

Hashable CreatePolicy # 
ToJSON CreatePolicy # 
NFData CreatePolicy # 

Methods

rnf :: CreatePolicy -> () #

AWSRequest CreatePolicy # 
ToQuery CreatePolicy # 
ToPath CreatePolicy # 
ToHeaders CreatePolicy # 
type Rep CreatePolicy # 
type Rep CreatePolicy = D1 (MetaData "CreatePolicy" "Network.AWS.IoT.CreatePolicy" "amazonka-iot-1.4.5-HnBhW38Gbiq1QAd2zPEJmJ" False) (C1 (MetaCons "CreatePolicy'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cpPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_cpPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs CreatePolicy # 

Request Lenses

cpPolicyName :: Lens' CreatePolicy Text #

The policy name.

cpPolicyDocument :: Lens' CreatePolicy Text #

The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.

Destructuring the Response

createPolicyResponse #

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 #

The output from the CreatePolicy operation.

See: createPolicyResponse smart constructor.

Instances

Eq CreatePolicyResponse # 
Data CreatePolicyResponse # 

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 # 
Show CreatePolicyResponse # 
Generic CreatePolicyResponse # 
NFData CreatePolicyResponse # 

Methods

rnf :: CreatePolicyResponse -> () #

type Rep CreatePolicyResponse # 
type Rep CreatePolicyResponse = D1 (MetaData "CreatePolicyResponse" "Network.AWS.IoT.CreatePolicy" "amazonka-iot-1.4.5-HnBhW38Gbiq1QAd2zPEJmJ" False) (C1 (MetaCons "CreatePolicyResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_cprsPolicyName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cprsPolicyDocument") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_cprsPolicyVersionId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_cprsPolicyARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cprsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))))

Response Lenses

cprsPolicyDocument :: Lens' CreatePolicyResponse (Maybe Text) #

The JSON document that describes the policy.

cprsResponseStatus :: Lens' CreatePolicyResponse Int #

  • - | The response status code.