libZSservicesZSamazonka-iotZSamazonka-iot
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • removeThingType :: Maybe Bool

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

  • thingTypeName :: Maybe Text

    The name of the thing type.

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

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

  • 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
Eq UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Read UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Show UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Generic UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Associated Types

type Rep UpdateThing :: Type -> Type #

NFData UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Methods

rnf :: UpdateThing -> () #

Hashable UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

ToJSON UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

AWSRequest UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Associated Types

type AWSResponse 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

type Rep UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type Rep UpdateThing = D1 ('MetaData "UpdateThing" "Amazonka.IoT.UpdateThing" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "UpdateThing'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "removeThingType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "thingTypeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "expectedVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "attributePayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AttributePayload)) :*: S1 ('MetaSel ('Just "thingName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse UpdateThing Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

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:

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

$sel:thingTypeName:UpdateThing', updateThing_thingTypeName - The name of the thing type.

$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:attributePayload: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:thingName: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_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_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_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_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
Eq UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Read UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Show UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Generic UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Associated Types

type Rep UpdateThingResponse :: Type -> Type #

NFData UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

Methods

rnf :: UpdateThingResponse -> () #

type Rep UpdateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.UpdateThing

type Rep UpdateThingResponse = D1 ('MetaData "UpdateThingResponse" "Amazonka.IoT.UpdateThing" "libZSservicesZSamazonka-iotZSamazonka-iot" '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