Use DescribeFHIRImportJob with an AWS SDK or CLI
The following code examples show how to use DescribeFHIRImportJob.
- CLI
-
- AWS CLI
-
To describe a FHIR import job
The following
describe-fhir-import-jobexample shows how to learn the properties of a FHIR import job using AWS HealthLake.aws healthlake describe-fhir-import-job \ --datastore-id(DatastoreID)\ --job-idc145fbb27b192af392f8ce6e7838e34fOutput:
{ "ImportJobProperties": { "InputDataConfig": { "S3Uri": "s3://(Bucket Name)/(Prefix Name)/" { "arrayitem2": 2 } }, "DataAccessRoleArn": "arn:aws:iam::(AWS Account ID):role/(Role Name)", "JobStatus": "COMPLETED", "JobId": "c145fbb27b192af392f8ce6e7838e34f", "SubmitTime": 1606272542.161, "EndTime": 1606272609.497, "DatastoreId": "(Data store ID)" } }-
For API details, see DescribeFHIRImportJob
in AWS CLI Command Reference.
-
- Python
-
- SDK for Python (Boto3)
-
@classmethod def from_client(cls) -> "HealthLakeWrapper": """ Creates a HealthLakeWrapper instance with a default AWS HealthLake client. :return: An instance of HealthLakeWrapper initialized with the default HealthLake client. """ health_lake_client = boto3.client("healthlake") return cls(health_lake_client) def describe_fhir_import_job( self, datastore_id: str, job_id: str ) -> dict[str, any]: """ Describes a HealthLake import job. :param datastore_id: The data store ID. :param job_id: The import job ID. :return: The import job description. """ try: response = self.health_lake_client.describe_fhir_import_job( DatastoreId=datastore_id, JobId=job_id ) return response["ImportJobProperties"] except ClientError as err: logger.exception( "Couldn't describe import job with ID %s. Here's why %s", job_id, err.response["Error"]["Message"], ) raise-
For API details, see DescribeFHIRImportJob in AWS SDK for Python (Boto3) API Reference.
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. -
- SAP ABAP
-
- SDK for SAP ABAP
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. TRY. " iv_datastore_id = 'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6' " iv_job_id = 'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6' oo_result = lo_hll->describefhirimportjob( iv_datastoreid = iv_datastore_id iv_jobid = iv_job_id ). DATA(lo_import_job_properties) = oo_result->get_importjobproperties( ). IF lo_import_job_properties IS BOUND. DATA(lv_job_status) = lo_import_job_properties->get_jobstatus( ). MESSAGE |Import job status: { lv_job_status }.| TYPE 'I'. ENDIF. CATCH /aws1/cx_hllresourcenotfoundex INTO DATA(lo_notfound_ex). DATA(lv_error) = |Resource not found: { lo_notfound_ex->av_err_code }-{ lo_notfound_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_notfound_ex. CATCH /aws1/cx_hllvalidationex INTO DATA(lo_validation_ex). lv_error = |Validation error: { lo_validation_ex->av_err_code }-{ lo_validation_ex->av_err_msg }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_validation_ex. ENDTRY.-
For API details, see DescribeFHIRImportJob in AWS SDK for SAP ABAP API reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using HealthLake with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.