amazonka-iot-1.6.0: 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.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 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:

  • 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 Source #

The input for the CreatePolicy operation.

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.IoT.CreatePolicy" "amazonka-iot-1.6.0-GZYdsKS1TEjHFZo6BqaYJk" 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 Source # 

Request Lenses

cpPolicyDocument :: Lens' CreatePolicy Text Source #

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

The output from the CreatePolicy operation.

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.IoT.CreatePolicy" "amazonka-iot-1.6.0-GZYdsKS1TEjHFZo6BqaYJk" 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 DecidedStrict) (Rec0 * Int))))))

Response Lenses

cprsPolicyDocument :: Lens' CreatePolicyResponse (Maybe Text) Source #

The JSON document that describes the policy.

cprsResponseStatus :: Lens' CreatePolicyResponse Int Source #

  • - | The response status code.