Skip to content

register_thing

register_thing(
    template_body: TemplateBody,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    parameters: Optional[Parameters] = None,
) -> RegisterThingResponse

Provisions a thing in the device registry. RegisterThing calls other IoT control plane APIs. These calls might exceed your account level IoT Throttling Limits and cause throttle errors. Please contact Amazon Web Services Customer Support to raise your throttling limits if necessary.

Requires permission to access the RegisterThing action.

Parameters:

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def register_thing(
    self,
    template_body: "capo_iot.types.template_body.TemplateBody",
    *,
    config_overrides: Optional[IoTClientConfig] = None,
    parameters: Optional["capo_iot.types.parameters.Parameters"] = None,
) -> "capo_iot.types.register_thing_response.RegisterThingResponse":
    """<p>Provisions a thing in the device registry. RegisterThing calls other IoT control plane APIs. These calls might exceed your account level <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot"> IoT Throttling Limits</a> and cause throttle errors. Please contact <a href="https://console.aws.amazon.com/support/home">Amazon Web Services Customer Support</a> to raise your throttling limits if necessary.</p> <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions">RegisterThing</a> action.</p>

    Args:
        template_body: <p>The provisioning template. See <a href="https://docs.aws.amazon.com/iot/latest/developerguide/provision-w-cert.html">Provisioning Devices That Have Device Certificates</a> for more information.</p>
        parameters: <p>The parameters for provisioning a thing. See <a href="https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html">Provisioning Templates</a> for more information.</p>

    Raises:
        capo_iot.errors.conflicting_resource_update_exception.ConflictingResourceUpdateException: <p>A conflicting resource update exception. This exception is thrown when two pending updates cause a conflict.</p>
        capo_iot.errors.internal_failure_exception.InternalFailureException: <p>An unexpected error has occurred.</p>
        capo_iot.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_iot.errors.resource_registration_failure_exception.ResourceRegistrationFailureException: <p>The resource registration failed.</p>
        capo_iot.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is temporarily unavailable.</p>
        capo_iot.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot.types.register_thing_request.RegisterThingRequest]",
    ) -> OperationResponse[
        "capo_iot.types.register_thing_response.RegisterThingResponse"
    ]:
        import capo_iot._operations.aws_iot_service.register_thing

        output, http_response = (
            capo_iot._operations.aws_iot_service.register_thing.register_thing(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RegisterThing")
    )
    input_: capo_iot.types.register_thing_request.RegisterThingRequest = {
        "template_body": template_body
    }
    if parameters is not None:
        input_["parameters"] = parameters

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output