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.UpdateThing

Contents

Description

Updates the data for a thing.

Synopsis

Creating a Request

updateThing Source #

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

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

  • utRemoveThingType - Remove a thing type association. If true , the association is removed.
  • utThingTypeName - The name of the thing type.
  • utExpectedVersion - The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the UpdateThing request is rejected with a VersionConflictException .
  • utAttributePayload - A list of thing attributes, a JSON string containing name-value pairs. For example: {"attributes":{"name1":"value2"}} This data is used to add new attributes or update existing attributes.
  • utThingName - The name of the thing to update.

data UpdateThing Source #

The input for the UpdateThing operation.

See: updateThing smart constructor.

Instances

Eq UpdateThing Source # 
Data UpdateThing Source # 

Methods

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

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

toConstr :: UpdateThing -> Constr #

dataTypeOf :: UpdateThing -> DataType #

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

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

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

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

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

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

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

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

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

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

Read UpdateThing Source # 
Show UpdateThing Source # 
Generic UpdateThing Source # 

Associated Types

type Rep UpdateThing :: * -> * #

Hashable UpdateThing Source # 
ToJSON UpdateThing Source # 
NFData UpdateThing Source # 

Methods

rnf :: UpdateThing -> () #

AWSRequest UpdateThing Source # 
ToHeaders UpdateThing Source # 

Methods

toHeaders :: UpdateThing -> [Header] #

ToPath UpdateThing Source # 
ToQuery UpdateThing Source # 
type Rep UpdateThing Source # 
type Rep UpdateThing = D1 * (MetaData "UpdateThing" "Network.AWS.IoT.UpdateThing" "amazonka-iot-1.6.0-GZYdsKS1TEjHFZo6BqaYJk" False) (C1 * (MetaCons "UpdateThing'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_utRemoveThingType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Bool))) (S1 * (MetaSel (Just Symbol "_utThingTypeName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_utExpectedVersion") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Integer))) ((:*:) * (S1 * (MetaSel (Just Symbol "_utAttributePayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe AttributePayload))) (S1 * (MetaSel (Just Symbol "_utThingName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))))
type Rs UpdateThing Source # 

Request Lenses

utRemoveThingType :: Lens' UpdateThing (Maybe Bool) Source #

Remove a thing type association. If true , the association is removed.

utThingTypeName :: Lens' UpdateThing (Maybe Text) Source #

The name of the thing type.

utExpectedVersion :: Lens' UpdateThing (Maybe Integer) Source #

The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the UpdateThing request is rejected with a VersionConflictException .

utAttributePayload :: Lens' UpdateThing (Maybe AttributePayload) Source #

A list of thing attributes, a JSON string containing name-value pairs. For example: {"attributes":{"name1":"value2"}} This data is used to add new attributes or update existing attributes.

utThingName :: Lens' UpdateThing Text Source #

The name of the thing to update.

Destructuring the Response

updateThingResponse Source #

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

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

data UpdateThingResponse Source #

The output from the UpdateThing operation.

See: updateThingResponse smart constructor.

Instances

Eq UpdateThingResponse Source # 
Data UpdateThingResponse Source # 

Methods

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

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

toConstr :: UpdateThingResponse -> Constr #

dataTypeOf :: UpdateThingResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read UpdateThingResponse Source # 
Show UpdateThingResponse Source # 
Generic UpdateThingResponse Source # 
NFData UpdateThingResponse Source # 

Methods

rnf :: UpdateThingResponse -> () #

type Rep UpdateThingResponse Source # 
type Rep UpdateThingResponse = D1 * (MetaData "UpdateThingResponse" "Network.AWS.IoT.UpdateThing" "amazonka-iot-1.6.0-GZYdsKS1TEjHFZo6BqaYJk" True) (C1 * (MetaCons "UpdateThingResponse'" PrefixI True) (S1 * (MetaSel (Just Symbol "_utrsResponseStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Int)))

Response Lenses

utrsResponseStatus :: Lens' UpdateThingResponse Int Source #

  • - | The response status code.