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

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

  • thingTypeName :: Maybe Text

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

  • 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
ToJSON CreateThing Source # 
Instance details

Defined in Amazonka.IoT.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

AWSRequest CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Associated Types

type AWSResponse CreateThing #

Generic CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Associated Types

type Rep CreateThing :: Type -> Type #

Read CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Show CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

NFData CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Methods

rnf :: CreateThing -> () #

Eq CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Hashable CreateThing Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

type AWSResponse 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" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "CreateThing'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "attributePayload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AttributePayload)) :*: S1 ('MetaSel ('Just "billingGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "thingTypeName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "thingName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

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:

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.

CreateThing, createThing_thingTypeName - The name of the thing type associated with the new thing.

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_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_thingTypeName :: Lens' CreateThing (Maybe Text) Source #

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

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
Generic CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Associated Types

type Rep CreateThingResponse :: Type -> Type #

Read CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Show CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

NFData CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

Methods

rnf :: CreateThingResponse -> () #

Eq CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

type Rep CreateThingResponse Source # 
Instance details

Defined in Amazonka.IoT.CreateThing

type Rep CreateThingResponse = D1 ('MetaData "CreateThingResponse" "Amazonka.IoT.CreateThing" "amazonka-iot-2.0-6w03vgAfmrM1SG22OsNJXL" 'False) (C1 ('MetaCons "CreateThingResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "thingArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "thingId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "thingName") '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:

CreateThingResponse, createThingResponse_thingArn - The ARN of the new thing.

CreateThingResponse, createThingResponse_thingId - The thing ID.

CreateThing, createThingResponse_thingName - The name of the new thing.

$sel:httpStatus:CreateThingResponse', createThingResponse_httpStatus - The response's http status code.

Response Lenses