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 |
Creates a thing record in the registry. If this call is made multiple
times using the same thing name and configuration, the call will
succeed. If this call is made with the same thing name but different
configuration a ResourceAlreadyExistsException
is thrown.
This is a control plane operation. See Authorization for information about authorizing control plane actions.
Requires permission to access the CreateThing action.
Synopsis
- data CreateThing = CreateThing' {}
- newCreateThing :: Text -> CreateThing
- createThing_thingTypeName :: Lens' CreateThing (Maybe Text)
- createThing_attributePayload :: Lens' CreateThing (Maybe AttributePayload)
- createThing_billingGroupName :: Lens' CreateThing (Maybe Text)
- createThing_thingName :: Lens' CreateThing Text
- data CreateThingResponse = CreateThingResponse' {}
- newCreateThingResponse :: Int -> CreateThingResponse
- createThingResponse_thingArn :: Lens' CreateThingResponse (Maybe Text)
- createThingResponse_thingName :: Lens' CreateThingResponse (Maybe Text)
- createThingResponse_thingId :: Lens' CreateThingResponse (Maybe Text)
- createThingResponse_httpStatus :: Lens' CreateThingResponse Int
Creating a Request
data CreateThing Source #
The input for the CreateThing operation.
See: newCreateThing
smart constructor.
CreateThing' | |
|
Instances
Create a value of CreateThing
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:thingTypeName:CreateThing'
, createThing_thingTypeName
- The name of the thing type associated with the new thing.
$sel:attributePayload:CreateThing'
, createThing_attributePayload
- The attribute payload, which consists of up to three name/value pairs
in a JSON document. For example:
{\"attributes\":{\"string1\":\"string2\"}}
$sel:billingGroupName:CreateThing'
, createThing_billingGroupName
- The name of the billing group the thing will be added to.
$sel:thingName:CreateThing'
, createThing_thingName
- The name of the thing to create.
You can't change a thing's name after you create it. 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
createThing_thingTypeName :: Lens' CreateThing (Maybe Text) Source #
The name of the thing type associated with the new thing.
createThing_attributePayload :: Lens' CreateThing (Maybe AttributePayload) Source #
The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:
{\"attributes\":{\"string1\":\"string2\"}}
createThing_billingGroupName :: Lens' CreateThing (Maybe Text) Source #
The name of the billing group the thing will be added to.
createThing_thingName :: Lens' CreateThing Text Source #
The name of the thing to create.
You can't change a thing's name after you create it. 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 CreateThingResponse Source #
The output of the CreateThing operation.
See: newCreateThingResponse
smart constructor.
Instances
newCreateThingResponse Source #
Create a value of CreateThingResponse
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:thingArn:CreateThingResponse'
, createThingResponse_thingArn
- The ARN of the new thing.
$sel:thingName:CreateThing'
, createThingResponse_thingName
- The name of the new thing.
$sel:thingId:CreateThingResponse'
, createThingResponse_thingId
- The thing ID.
$sel:httpStatus:CreateThingResponse'
, createThingResponse_httpStatus
- The response's http status code.
Response Lenses
createThingResponse_thingArn :: Lens' CreateThingResponse (Maybe Text) Source #
The ARN of the new thing.
createThingResponse_thingName :: Lens' CreateThingResponse (Maybe Text) Source #
The name of the new thing.
createThingResponse_thingId :: Lens' CreateThingResponse (Maybe Text) Source #
The thing ID.
createThingResponse_httpStatus :: Lens' CreateThingResponse Int Source #
The response's http status code.