create_thing
async
¶
create_thing(
thing_name: ThingName,
*,
config_overrides: Optional[AsyncIoTClientConfig] = None,
thing_type_name: Optional[ThingTypeName] = None,
attribute_payload: Optional[AttributePayload] = None,
billing_group_name: Optional[BillingGroupName] = None,
) -> CreateThingResponse
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.
Parameters:
-
thing_name(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.
-
thing_type_name(Optional[ThingTypeName], default:None) –The name of the thing type associated with the new thing.
-
attribute_payload(Optional[AttributePayload], default:None) –The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:
{\"attributes\":{\"string1\":\"string2\"}} -
billing_group_name(Optional[BillingGroupName], default:None) –The name of the billing group the thing will be added to.
Raises:
-
InternalFailureException–An unexpected error has occurred.
-
InvalidRequestException–The request is not valid.
-
ResourceAlreadyExistsException–The resource already exists.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service is temporarily unavailable.
-
ThrottlingException–The rate exceeds the limit.
-
UnauthorizedException–You are not authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iot/_services/async_io_t.py
4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 | |