Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Updates the data for a thing.
Requires permission to access the UpdateThing action.
Synopsis
- data UpdateThing = UpdateThing' {}
- newUpdateThing :: Text -> UpdateThing
- updateThing_removeThingType :: Lens' UpdateThing (Maybe Bool)
- updateThing_thingTypeName :: Lens' UpdateThing (Maybe Text)
- updateThing_expectedVersion :: Lens' UpdateThing (Maybe Integer)
- updateThing_attributePayload :: Lens' UpdateThing (Maybe AttributePayload)
- updateThing_thingName :: Lens' UpdateThing Text
- data UpdateThingResponse = UpdateThingResponse' {
- httpStatus :: Int
- newUpdateThingResponse :: Int -> UpdateThingResponse
- updateThingResponse_httpStatus :: Lens' UpdateThingResponse Int
Creating a Request
data UpdateThing Source #
The input for the UpdateThing operation.
See: newUpdateThing
smart constructor.
UpdateThing' | |
|
Instances
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.
UpdateThingResponse' | |
|
Instances
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
updateThingResponse_httpStatus :: Lens' UpdateThingResponse Int Source #
The response's http status code.