amazonka-iot-2.0: Amazon IoT SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.IoT.UpdateThing

Description

Updates the data for a thing.

Requires permission to access the UpdateThing action.

Synopsis

Creating a Request

data UpdateThing Source #

The input for the UpdateThing operation.

See: newUpdateThing smart constructor.

Constructors

UpdateThing' 

Fields

  • attributePayload :: Maybe AttributePayload

    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.

  • expectedVersion :: Maybe Integer

    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.

  • removeThingType :: Maybe Bool

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

  • thingTypeName :: Maybe Text

    The name of the thing type.

  • thingName :: Text

    The name of the thing to update.

    You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.

Instances

Instances details
ToJSON UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

ToHeaders UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Methods

toHeaders :: UpdateThing -> [Header] #

ToPath UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

ToQuery UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

AWSRequest UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Associated Types

type AWSResponse UpdateThing #

Generic UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Associated Types

type Rep UpdateThing :: Type -> Type #

Read UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Show UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

NFData UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Methods

rnf :: UpdateThing -> () #

Eq UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Hashable UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type AWSResponse UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type Rep UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type Rep UpdateThing = D1 ('MetaData "UpdateThing" "Amazonka.IoT.UpdateThing" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "UpdateThing'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "attributePayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AttributePayload)) :*: S1 ('MetaSel ('Just "expectedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))) :*: (S1 ('MetaSel ('Just "removeThingType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "thingTypeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "thingName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newUpdateThing Source #

Create a value of UpdateThing with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

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

$sel:expectedVersion:UpdateThing', updateThing_expectedVersion - 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.

$sel:removeThingType:UpdateThing', updateThing_removeThingType - Remove a thing type association. If true, the association is removed.

UpdateThing, updateThing_thingTypeName - The name of the thing type.

UpdateThing, updateThing_thingName - The name of the thing to update.

You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.

Request Lenses

updateThing_attributePayload :: 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.

updateThing_expectedVersion :: 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.

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

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

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

The name of the thing type.

updateThing_thingName :: Lens' UpdateThing Text Source #

The name of the thing to update.

You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.

Destructuring the Response

data UpdateThingResponse Source #

The output from the UpdateThing operation.

See: newUpdateThingResponse smart constructor.

Constructors

UpdateThingResponse' 

Fields

Instances

Instances details
Generic UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Associated Types

type Rep UpdateThingResponse :: Type -> Type #

Read UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Show UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

NFData UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Methods

rnf :: UpdateThingResponse -> () #

Eq UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type Rep UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type Rep UpdateThingResponse = D1 ('MetaData "UpdateThingResponse" "Amazonka.IoT.UpdateThing" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "UpdateThingResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newUpdateThingResponse Source #

Create a value of UpdateThingResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:UpdateThingResponse', updateThingResponse_httpStatus - The response's http status code.

Response Lenses