Skip to content

start_snomedct_inference_job async

start_snomedct_inference_job(
    input_data_config: InputDataConfig,
    output_data_config: OutputDataConfig,
    data_access_role_arn: IamRoleArn,
    language_code: LanguageCode,
    *,
    config_overrides: Optional[AsyncComprehendMedicalClientConfig] = None,
    job_name: Optional[JobName] = None,
    client_request_token: Optional[ClientRequestTokenString] = None,
    kms_key: Optional[KMSKey] = None,
) -> StartSNOMEDCTInferenceJobResponse

Starts an asynchronous job to detect medical concepts and link them to the SNOMED-CT ontology. Use the DescribeSNOMEDCTInferenceJob operation to track the status of a job.

Parameters:

  • data_access_role_arn (IamRoleArn) –

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend Medical read access to your input data.

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

    The user generated name the asynchronous InferSNOMEDCT job.

  • client_request_token (Optional[ClientRequestTokenString], default: None ) –

    A unique identifier for the request. If you don't set the client request token, Amazon Comprehend Medical generates one.

  • kms_key (Optional[KMSKey], default: None ) –

    An AWS Key Management Service key used to encrypt your output files. If you do not specify a key, the files are written in plain text.

  • language_code (LanguageCode) –

    The language of the input documents. All documents must be in the same language.

Raises:

  • InternalServerException –

    An internal server error occurred. Retry your request.

  • InvalidRequestException –

    The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.

  • ResourceNotFoundException –

    The resource identified by the specified Amazon Resource Name (ARN) was not found. Check the ARN and try your request again.

  • TooManyRequestsException –

    You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_comprehendmedical/_services/async_comprehend_medical.py
async def start_snomedct_inference_job(
    self,
    input_data_config: "capo_comprehendmedical.types.input_data_config.InputDataConfig",
    output_data_config: "capo_comprehendmedical.types.output_data_config.OutputDataConfig",
    data_access_role_arn: "capo_comprehendmedical.types.iam_role_arn.IamRoleArn",
    language_code: "capo_comprehendmedical.types.language_code.LanguageCode",
    *,
    config_overrides: Optional[AsyncComprehendMedicalClientConfig] = None,
    job_name: Optional["capo_comprehendmedical.types.job_name.JobName"] = None,
    client_request_token: Optional[
        "capo_comprehendmedical.types.client_request_token_string.ClientRequestTokenString"
    ] = None,
    kms_key: Optional["capo_comprehendmedical.types.kms_key.KMSKey"] = None,
) -> "capo_comprehendmedical.types.start_snomedct_inference_job_response.StartSNOMEDCTInferenceJobResponse":
    """<p> Starts an asynchronous job to detect medical concepts and link them to the SNOMED-CT ontology. Use the DescribeSNOMEDCTInferenceJob operation to track the status of a job. </p>

    Args:
        data_access_role_arn: <p> The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend Medical read access to your input data. </p>
        job_name: <p> The user generated name the asynchronous InferSNOMEDCT job. </p>
        client_request_token: <p> A unique identifier for the request. If you don't set the client request token, Amazon Comprehend Medical generates one. </p>
        kms_key: <p> An AWS Key Management Service key used to encrypt your output files. If you do not specify a key, the files are written in plain text. </p>
        language_code: <p> The language of the input documents. All documents must be in the same language. </p>

    Raises:
        capo_comprehendmedical.errors.internal_server_exception.InternalServerException: <p> An internal server error occurred. Retry your request. </p>
        capo_comprehendmedical.errors.invalid_request_exception.InvalidRequestException: <p> The request that you made is invalid. Check your request to determine why it's invalid and then retry the request.</p>
        capo_comprehendmedical.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource identified by the specified Amazon Resource Name (ARN) was not found. Check the ARN and try your request again.</p>
        capo_comprehendmedical.errors.too_many_requests_exception.TooManyRequestsException: <p> You have made too many requests within a short period of time. Wait for a short time and then try your request again. Contact customer support for more information about a service limit increase. </p>
        capo_comprehendmedical.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_comprehendmedical.types.start_snomedct_inference_job_request.StartSNOMEDCTInferenceJobRequest]",
    ) -> AsyncOperationResponse[
        "capo_comprehendmedical.types.start_snomedct_inference_job_response.StartSNOMEDCTInferenceJobResponse"
    ]:
        import capo_comprehendmedical._operations.comprehend_medical_20181030.start_snomedct_inference_job

        (
            output,
            http_response,
        ) = await capo_comprehendmedical._operations.comprehend_medical_20181030.start_snomedct_inference_job.async_start_snomedct_inference_job(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartSNOMEDCTInferenceJob")
    )
    input_: capo_comprehendmedical.types.start_snomedct_inference_job_request.StartSNOMEDCTInferenceJobRequest = {
        "input_data_config": input_data_config,
        "output_data_config": output_data_config,
        "data_access_role_arn": data_access_role_arn,
        "language_code": language_code,
    }
    if job_name is not None:
        input_["job_name"] = job_name
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if kms_key is not None:
        input_["kms_key"] = kms_key

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output