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

Description

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

Creating a Request

data CreateThing Source #

The input for the CreateThing operation.

See: newCreateThing smart constructor.

Constructors

CreateThing' 

Fields

  • thingTypeName :: Maybe Text

    The name of the thing type associated with the new thing.

  • attributePayload :: Maybe AttributePayload

    The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:

    {\"attributes\":{\"string1\":\"string2\"}}
  • billingGroupName :: Maybe Text

    The name of the billing group the thing will be added to.

  • thingName :: Text

    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.

Instances

Instances details
Eq CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Read CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Show CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Generic CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Associated Types

type Rep CreateThing :: Type -> Type #

NFData CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Methods

rnf :: CreateThing -> () #

Hashable CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

ToJSON CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

AWSRequest CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Associated Types

type AWSResponse CreateThing #

ToHeaders CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Methods

toHeaders :: CreateThing -> [Header] #

ToPath CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

ToQuery CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

type Rep CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

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

Defined in Amazonka.IoT.CreateThing

newCreateThing Source #

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.

Constructors

CreateThingResponse' 

Fields

Instances

Instances details
Eq CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Read CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Show CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Generic CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Associated Types

type Rep CreateThingResponse :: Type -> Type #

NFData CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Methods

rnf :: CreateThingResponse -> () #

type Rep CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

type Rep CreateThingResponse = D1 ('MetaData "CreateThingResponse" "Amazonka.IoT.CreateThing" "libZSservicesZSamazonka-iotZSamazonka-iot" 'False) (C1 ('MetaCons "CreateThingResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "thingArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "thingName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "thingId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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