Skip to content

start_thing_registration_task

start_thing_registration_task(
    template_body: TemplateBody,
    input_file_bucket: RegistryS3BucketName,
    input_file_key: RegistryS3KeyName,
    role_arn: RoleArn,
    *,
    config_overrides: Optional[IoTClientConfig] = None,
) -> StartThingRegistrationTaskResponse

Creates a bulk thing provisioning task.

Requires permission to access the StartThingRegistrationTask action.

Parameters:

  • template_body (TemplateBody) –

    The provisioning template.

  • input_file_bucket (RegistryS3BucketName) –

    The S3 bucket that contains the input file.

  • input_file_key (RegistryS3KeyName) –

    The name of input file within the S3 bucket. This file contains a newline delimited JSON file. Each line contains the parameter values to provision one device (thing).

  • role_arn (RoleArn) –

    The IAM role ARN that grants permission the input file.

Raises:

Source code in docs_src/capo_iot/_services/io_t.py
def start_thing_registration_task(
    self,
    template_body: "capo_iot.types.template_body.TemplateBody",
    input_file_bucket: "capo_iot.types.registry_s3_bucket_name.RegistryS3BucketName",
    input_file_key: "capo_iot.types.registry_s3_key_name.RegistryS3KeyName",
    role_arn: "capo_iot.types.role_arn.RoleArn",
    *,
    config_overrides: Optional[IoTClientConfig] = None,
) -> "capo_iot.types.start_thing_registration_task_response.StartThingRegistrationTaskResponse":
    """<p>Creates a bulk thing provisioning task.</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">StartThingRegistrationTask</a> action.</p>

    Args:
        template_body: <p>The provisioning template.</p>
        input_file_bucket: <p>The S3 bucket that contains the input file.</p>
        input_file_key: <p>The name of input file within the S3 bucket. This file contains a newline delimited JSON file. Each line contains the parameter values to provision one device (thing).</p>
        role_arn: <p>The IAM role ARN that grants permission the input file.</p>

    Raises:
        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.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.start_thing_registration_task_request.StartThingRegistrationTaskRequest]",
    ) -> OperationResponse[
        "capo_iot.types.start_thing_registration_task_response.StartThingRegistrationTaskResponse"
    ]:
        import capo_iot._operations.aws_iot_service.start_thing_registration_task

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartThingRegistrationTask")
    )
    input_: capo_iot.types.start_thing_registration_task_request.StartThingRegistrationTaskRequest = {
        "template_body": template_body,
        "input_file_bucket": input_file_bucket,
        "input_file_key": input_file_key,
        "role_arn": role_arn,
    }

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