From 77d72406e4c1ce2560c6d65e4968aafdf01d0da0 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 15 Feb 2024 19:17:47 +0000 Subject: [PATCH] feat(client-healthlake): This release adds a new response parameter, JobProgressReport, to the DescribeFHIRImportJob and ListFHIRImportJobs API operation. JobProgressReport provides details on the progress of the import job on the server. --- .../commands/DescribeFHIRImportJobCommand.ts | 10 +++ .../src/commands/ListFHIRImportJobsCommand.ts | 10 +++ .../client-healthlake/src/models/models_0.ts | 66 ++++++++++++++++- .../src/protocols/Aws_json1_0.ts | 20 +++++ .../sdk-codegen/aws-models/healthlake.json | 74 ++++++++++++++++++- 5 files changed, 174 insertions(+), 6 deletions(-) diff --git a/clients/client-healthlake/src/commands/DescribeFHIRImportJobCommand.ts b/clients/client-healthlake/src/commands/DescribeFHIRImportJobCommand.ts index 5da83207e78eb..7599fb22428ee 100644 --- a/clients/client-healthlake/src/commands/DescribeFHIRImportJobCommand.ts +++ b/clients/client-healthlake/src/commands/DescribeFHIRImportJobCommand.ts @@ -58,6 +58,16 @@ export interface DescribeFHIRImportJobCommandOutput extends DescribeFHIRImportJo * // KmsKeyId: "STRING_VALUE", // required * // }, * // }, + * // JobProgressReport: { // JobProgressReport + * // TotalNumberOfScannedFiles: Number("long"), + * // TotalSizeOfScannedFilesInMB: Number("double"), + * // TotalNumberOfImportedFiles: Number("long"), + * // TotalNumberOfResourcesScanned: Number("long"), + * // TotalNumberOfResourcesImported: Number("long"), + * // TotalNumberOfResourcesWithCustomerError: Number("long"), + * // TotalNumberOfFilesReadWithCustomerError: Number("long"), + * // Throughput: Number("double"), + * // }, * // DataAccessRoleArn: "STRING_VALUE", * // Message: "STRING_VALUE", * // }, diff --git a/clients/client-healthlake/src/commands/ListFHIRImportJobsCommand.ts b/clients/client-healthlake/src/commands/ListFHIRImportJobsCommand.ts index c2909b8694515..09ce1516927d0 100644 --- a/clients/client-healthlake/src/commands/ListFHIRImportJobsCommand.ts +++ b/clients/client-healthlake/src/commands/ListFHIRImportJobsCommand.ts @@ -66,6 +66,16 @@ export interface ListFHIRImportJobsCommandOutput extends ListFHIRImportJobsRespo * // KmsKeyId: "STRING_VALUE", // required * // }, * // }, + * // JobProgressReport: { // JobProgressReport + * // TotalNumberOfScannedFiles: Number("long"), + * // TotalSizeOfScannedFilesInMB: Number("double"), + * // TotalNumberOfImportedFiles: Number("long"), + * // TotalNumberOfResourcesScanned: Number("long"), + * // TotalNumberOfResourcesImported: Number("long"), + * // TotalNumberOfResourcesWithCustomerError: Number("long"), + * // TotalNumberOfFilesReadWithCustomerError: Number("long"), + * // Throughput: Number("double"), + * // }, * // DataAccessRoleArn: "STRING_VALUE", * // Message: "STRING_VALUE", * // }, diff --git a/clients/client-healthlake/src/models/models_0.ts b/clients/client-healthlake/src/models/models_0.ts index b8ede26b1b19d..c5bd484c1593f 100644 --- a/clients/client-healthlake/src/models/models_0.ts +++ b/clients/client-healthlake/src/models/models_0.ts @@ -798,7 +798,61 @@ export namespace InputDataConfig { /** * @public - *

Displays the properties of the import job, including the ID, Arn, Name, and the status of the data store.

+ *

The progress report of an import job.

+ */ +export interface JobProgressReport { + /** + * @public + *

The number of files scanned from input S3 bucket.

+ */ + TotalNumberOfScannedFiles?: number; + + /** + * @public + *

The size (in MB) of the files scanned from the input S3 bucket.

+ */ + TotalSizeOfScannedFilesInMB?: number; + + /** + * @public + *

The number of files imported so far.

+ */ + TotalNumberOfImportedFiles?: number; + + /** + * @public + *

The number of resources scanned from the input S3 bucket.

+ */ + TotalNumberOfResourcesScanned?: number; + + /** + * @public + *

The number of resources imported so far.

+ */ + TotalNumberOfResourcesImported?: number; + + /** + * @public + *

The number of resources that failed due to customer error.

+ */ + TotalNumberOfResourcesWithCustomerError?: number; + + /** + * @public + *

The number of files that failed to be read from the input S3 bucket due to customer error.

+ */ + TotalNumberOfFilesReadWithCustomerError?: number; + + /** + * @public + *

The throughput (in MB/sec) of the import job.

+ */ + Throughput?: number; +} + +/** + * @public + *

Displays the properties of the import job, including the ID, Arn, Name, the status of the job, and the progress report of the job.

*/ export interface ImportJobProperties { /** @@ -849,6 +903,12 @@ export interface ImportJobProperties { */ JobOutputDataConfig?: OutputDataConfig; + /** + * @public + *

Displays the progress of the import job, including total resources scanned, total resources ingested, and total size of data ingested.

+ */ + JobProgressReport?: JobProgressReport; + /** * @public *

The Amazon Resource Name (ARN) that gives AWS HealthLake access to your input data.

@@ -868,7 +928,7 @@ export interface ImportJobProperties { export interface DescribeFHIRImportJobResponse { /** * @public - *

The properties of the Import job request, including the ID, ARN, name, and the status of the job.

+ *

The properties of the Import job request, including the ID, ARN, name, status of the job, and the progress report of the job.

*/ ImportJobProperties: ImportJobProperties | undefined; } @@ -1063,7 +1123,7 @@ export interface ListFHIRImportJobsResponse { /** * @public *

- * The properties of a listed FHIR import jobs, including the ID, ARN, name, and the status of the job. + * The properties of a listed FHIR import jobs, including the ID, ARN, name, the status of the job, and the progress report of the job. *

*/ ImportJobPropertiesList: ImportJobProperties[] | undefined; diff --git a/clients/client-healthlake/src/protocols/Aws_json1_0.ts b/clients/client-healthlake/src/protocols/Aws_json1_0.ts index df91444abfaa2..618593604b988 100644 --- a/clients/client-healthlake/src/protocols/Aws_json1_0.ts +++ b/clients/client-healthlake/src/protocols/Aws_json1_0.ts @@ -5,9 +5,11 @@ import { _json, collectBody, decorateServiceException as __decorateServiceException, + expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, + limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, @@ -70,6 +72,7 @@ import { ImportJobProperties, InputDataConfig, InternalServerException, + JobProgressReport, KmsEncryptionConfig, ListFHIRDatastoresRequest, ListFHIRDatastoresResponse, @@ -883,6 +886,7 @@ const de_ImportJobProperties = (output: any, context: __SerdeContext): ImportJob JobId: __expectString, JobName: __expectString, JobOutputDataConfig: (_: any) => _json(__expectUnion(_)), + JobProgressReport: (_: any) => de_JobProgressReport(_, context), JobStatus: __expectString, Message: __expectString, SubmitTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), @@ -905,6 +909,22 @@ const de_ImportJobPropertiesList = (output: any, context: __SerdeContext): Impor // de_InternalServerException omitted. +/** + * deserializeAws_json1_0JobProgressReport + */ +const de_JobProgressReport = (output: any, context: __SerdeContext): JobProgressReport => { + return take(output, { + Throughput: __limitedParseDouble, + TotalNumberOfFilesReadWithCustomerError: __expectLong, + TotalNumberOfImportedFiles: __expectLong, + TotalNumberOfResourcesImported: __expectLong, + TotalNumberOfResourcesScanned: __expectLong, + TotalNumberOfResourcesWithCustomerError: __expectLong, + TotalNumberOfScannedFiles: __expectLong, + TotalSizeOfScannedFilesInMB: __limitedParseDouble, + }) as any; +}; + // de_KmsEncryptionConfig omitted. /** diff --git a/codegen/sdk-codegen/aws-models/healthlake.json b/codegen/sdk-codegen/aws-models/healthlake.json index 2209a79a2fcd2..7e0a0a30c2a8f 100644 --- a/codegen/sdk-codegen/aws-models/healthlake.json +++ b/codegen/sdk-codegen/aws-models/healthlake.json @@ -664,7 +664,7 @@ "ImportJobProperties": { "target": "com.amazonaws.healthlake#ImportJobProperties", "traits": { - "smithy.api#documentation": "

The properties of the Import job request, including the ID, ARN, name, and the status of the job.

", + "smithy.api#documentation": "

The properties of the Import job request, including the ID, ARN, name, status of the job, and the progress report of the job.

", "smithy.api#required": {} } } @@ -767,6 +767,12 @@ } } }, + "com.amazonaws.healthlake#GenericDouble": { + "type": "double" + }, + "com.amazonaws.healthlake#GenericLong": { + "type": "long" + }, "com.amazonaws.healthlake#HealthLake": { "type": "service", "version": "2017-07-01", @@ -1578,6 +1584,12 @@ "JobOutputDataConfig": { "target": "com.amazonaws.healthlake#OutputDataConfig" }, + "JobProgressReport": { + "target": "com.amazonaws.healthlake#JobProgressReport", + "traits": { + "smithy.api#documentation": "

Displays the progress of the import job, including total resources scanned, total resources ingested, and total size of data ingested.

" + } + }, "DataAccessRoleArn": { "target": "com.amazonaws.healthlake#IamRoleArn", "traits": { @@ -1592,7 +1604,7 @@ } }, "traits": { - "smithy.api#documentation": "

Displays the properties of the import job, including the ID, Arn, Name, and the status of the data store.

" + "smithy.api#documentation": "

Displays the properties of the import job, including the ID, Arn, Name, the status of the job, and the progress report of the job.

" } }, "com.amazonaws.healthlake#ImportJobPropertiesList": { @@ -1648,6 +1660,62 @@ "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$" } }, + "com.amazonaws.healthlake#JobProgressReport": { + "type": "structure", + "members": { + "TotalNumberOfScannedFiles": { + "target": "com.amazonaws.healthlake#GenericLong", + "traits": { + "smithy.api#documentation": "

The number of files scanned from input S3 bucket.

" + } + }, + "TotalSizeOfScannedFilesInMB": { + "target": "com.amazonaws.healthlake#GenericDouble", + "traits": { + "smithy.api#documentation": "

The size (in MB) of the files scanned from the input S3 bucket.

" + } + }, + "TotalNumberOfImportedFiles": { + "target": "com.amazonaws.healthlake#GenericLong", + "traits": { + "smithy.api#documentation": "

The number of files imported so far.

" + } + }, + "TotalNumberOfResourcesScanned": { + "target": "com.amazonaws.healthlake#GenericLong", + "traits": { + "smithy.api#documentation": "

The number of resources scanned from the input S3 bucket.

" + } + }, + "TotalNumberOfResourcesImported": { + "target": "com.amazonaws.healthlake#GenericLong", + "traits": { + "smithy.api#documentation": "

The number of resources imported so far.

" + } + }, + "TotalNumberOfResourcesWithCustomerError": { + "target": "com.amazonaws.healthlake#GenericLong", + "traits": { + "smithy.api#documentation": "

The number of resources that failed due to customer error.

" + } + }, + "TotalNumberOfFilesReadWithCustomerError": { + "target": "com.amazonaws.healthlake#GenericLong", + "traits": { + "smithy.api#documentation": "

The number of files that failed to be read from the input S3 bucket due to customer error.

" + } + }, + "Throughput": { + "target": "com.amazonaws.healthlake#GenericDouble", + "traits": { + "smithy.api#documentation": "

The throughput (in MB/sec) of the import job.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The progress report of an import job.

" + } + }, "com.amazonaws.healthlake#JobStatus": { "type": "enum", "members": { @@ -2010,7 +2078,7 @@ "ImportJobPropertiesList": { "target": "com.amazonaws.healthlake#ImportJobPropertiesList", "traits": { - "smithy.api#documentation": "

\n The properties of a listed FHIR import jobs, including the ID, ARN, name, and the status of the job.\n

", + "smithy.api#documentation": "

\n The properties of a listed FHIR import jobs, including the ID, ARN, name, the status of the job, and the progress report of the job.\n

", "smithy.api#required": {} } },