create_thing
¶
create_thing(
thing_name: ThingName,
*,
config_overrides: Optional[IoTClientConfig] = 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/io_t.py
4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 | |