Skip to content

start_dicom_import_job

start_dicom_import_job(
    data_access_role_arn: RoleArn,
    client_token: ClientToken,
    datastore_id: DatastoreId,
    input_s3_uri: S3Uri,
    output_s3_uri: S3Uri,
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
    job_name: Optional[JobName] = None,
    input_owner_account_id: Optional[AwsAccountId] = None,
    import_configuration: Optional[ImportConfiguration] = None,
) -> StartDICOMImportJobResponse

Start importing bulk data into an ACTIVE data store. The import job imports DICOM P10 files or enhances existing DICOM files with JSON metadata. The importConfiguration parameter specifies the import type. The data is found in the S3 prefix specified by the inputS3Uri parameter. The import job stores processing results in the file specified by the outputS3Uri parameter.

Parameters:

  • job_name (Optional[JobName], default: None ) –

    The import job name.

  • data_access_role_arn (RoleArn) –

    The Amazon Resource Name (ARN) of the IAM role that grants permission to access medical imaging resources.

  • client_token (ClientToken) –

    A unique identifier for API idempotency.

  • datastore_id (DatastoreId) –

    The data store identifier.

  • input_s3_uri (S3Uri) –

    The input prefix path for the S3 bucket that contains the DICOM files to be imported.

  • output_s3_uri (S3Uri) –

    The output prefix of the S3 bucket to upload the results of the DICOM import job.

  • input_owner_account_id (Optional[AwsAccountId], default: None ) –

    The account ID of the source S3 bucket owner.

  • import_configuration (Optional[ImportConfiguration], default: None ) –

    The import configuration for the import job.

Raises:

Source code in docs_src/capo_medical_imaging/_services/medical_imaging.py
def start_dicom_import_job(
    self,
    data_access_role_arn: "capo_medical_imaging.types.role_arn.RoleArn",
    client_token: "capo_medical_imaging.types.client_token.ClientToken",
    datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
    input_s3_uri: "capo_medical_imaging.types.s3_uri.S3Uri",
    output_s3_uri: "capo_medical_imaging.types.s3_uri.S3Uri",
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
    job_name: Optional["capo_medical_imaging.types.job_name.JobName"] = None,
    input_owner_account_id: Optional[
        "capo_medical_imaging.types.aws_account_id.AwsAccountId"
    ] = None,
    import_configuration: Optional[
        "capo_medical_imaging.types.import_configuration.ImportConfiguration"
    ] = None,
) -> "capo_medical_imaging.types.start_dicom_import_job_response.StartDICOMImportJobResponse":
    """<p>Start importing bulk data into an <code>ACTIVE</code> data store. The import job imports DICOM P10 files or enhances existing DICOM files with JSON metadata. The <code>importConfiguration</code> parameter specifies the import type. The data is found in the S3 prefix specified by the <code>inputS3Uri</code> parameter. The import job stores processing results in the file specified by the <code>outputS3Uri</code> parameter.</p>

    Args:
        job_name: <p>The import job name.</p>
        data_access_role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that grants permission to access medical imaging resources.</p>
        client_token: <p>A unique identifier for API idempotency.</p>
        datastore_id: <p>The data store identifier.</p>
        input_s3_uri: <p>The input prefix path for the S3 bucket that contains the DICOM files to be imported.</p>
        output_s3_uri: <p>The output prefix of the S3 bucket to upload the results of the DICOM import job.</p>
        input_owner_account_id: <p>The account ID of the source S3 bucket owner.</p>
        import_configuration: <p>The import configuration for the import job.</p>

    Raises:
        capo_medical_imaging.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_medical_imaging.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_medical_imaging.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request caused a service quota to be exceeded.</p>
        capo_medical_imaging.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling.</p>
        capo_medical_imaging.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints set by the service.</p>
        capo_medical_imaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medical_imaging.types.start_dicom_import_job_request.StartDICOMImportJobRequest]",
    ) -> OperationResponse[
        "capo_medical_imaging.types.start_dicom_import_job_response.StartDICOMImportJobResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.start_dicom_import_job

        output, http_response = (
            capo_medical_imaging._operations.ahi_gateway_service.start_dicom_import_job.start_dicom_import_job(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_medical_imaging.types.start_dicom_import_job_request.StartDICOMImportJobRequest",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.start_dicom_import_job_request

        return capo_medical_imaging.types.start_dicom_import_job_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("StartDICOMImportJob", redact_input=_redact_input),
    )
    input_: capo_medical_imaging.types.start_dicom_import_job_request.StartDICOMImportJobRequest = {
        "data_access_role_arn": data_access_role_arn,
        "client_token": client_token,
        "datastore_id": datastore_id,
        "input_s3_uri": input_s3_uri,
        "output_s3_uri": output_s3_uri,
    }
    if job_name is not None:
        input_["job_name"] = job_name
    if input_owner_account_id is not None:
        input_["input_owner_account_id"] = input_owner_account_id
    if import_configuration is not None:
        input_["import_configuration"] = import_configuration

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