From 2cc0b793ca7d025682c6147b26bbf283f059b0f5 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 20 Nov 2024 19:12:54 +0000 Subject: [PATCH] feat(client-application-discovery-service): Add support to import data from commercially available discovery tools without file manipulation. --- .../src/commands/CreateApplicationCommand.ts | 1 + .../commands/DescribeImportTasksCommand.ts | 5 +- ...tartBatchDeleteConfigurationTaskCommand.ts | 3 + .../src/commands/StartImportTaskCommand.ts | 3 +- .../src/commands/UpdateApplicationCommand.ts | 1 + .../src/models/models_0.ts | 42 +++++++++- .../src/protocols/Aws_json1_1.ts | 1 + .../application-discovery-service.json | 78 ++++++++++++++++++- 8 files changed, 125 insertions(+), 9 deletions(-) diff --git a/clients/client-application-discovery-service/src/commands/CreateApplicationCommand.ts b/clients/client-application-discovery-service/src/commands/CreateApplicationCommand.ts index d557cc732dcb..5b3c315f6635 100644 --- a/clients/client-application-discovery-service/src/commands/CreateApplicationCommand.ts +++ b/clients/client-application-discovery-service/src/commands/CreateApplicationCommand.ts @@ -42,6 +42,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons * const input = { // CreateApplicationRequest * name: "STRING_VALUE", // required * description: "STRING_VALUE", + * wave: "STRING_VALUE", * }; * const command = new CreateApplicationCommand(input); * const response = await client.send(command); diff --git a/clients/client-application-discovery-service/src/commands/DescribeImportTasksCommand.ts b/clients/client-application-discovery-service/src/commands/DescribeImportTasksCommand.ts index 49b83958b29b..13a0ddf8ab60 100644 --- a/clients/client-application-discovery-service/src/commands/DescribeImportTasksCommand.ts +++ b/clients/client-application-discovery-service/src/commands/DescribeImportTasksCommand.ts @@ -43,7 +43,7 @@ export interface DescribeImportTasksCommandOutput extends DescribeImportTasksRes * const input = { // DescribeImportTasksRequest * filters: [ // DescribeImportTasksFilterList * { // ImportTaskFilter - * name: "IMPORT_TASK_ID" || "STATUS" || "NAME", + * name: "IMPORT_TASK_ID" || "STATUS" || "NAME" || "FILE_CLASSIFICATION", * values: [ // ImportTaskFilterValueList * "STRING_VALUE", * ], @@ -62,10 +62,11 @@ export interface DescribeImportTasksCommandOutput extends DescribeImportTasksRes * // clientRequestToken: "STRING_VALUE", * // name: "STRING_VALUE", * // importUrl: "STRING_VALUE", - * // status: "IMPORT_IN_PROGRESS" || "IMPORT_COMPLETE" || "IMPORT_COMPLETE_WITH_ERRORS" || "IMPORT_FAILED" || "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED" || "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED" || "DELETE_FAILED_LIMIT_EXCEEDED" || "INTERNAL_ERROR", + * // status: "IMPORT_IN_PROGRESS" || "IMPORT_COMPLETE" || "IMPORT_COMPLETE_WITH_ERRORS" || "IMPORT_FAILED" || "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED" || "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" || "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED" || "DELETE_FAILED_LIMIT_EXCEEDED" || "INTERNAL_ERROR", * // importRequestTime: new Date("TIMESTAMP"), * // importCompletionTime: new Date("TIMESTAMP"), * // importDeletedTime: new Date("TIMESTAMP"), + * // fileClassification: "MODELIZEIT_EXPORT" || "RVTOOLS_EXPORT" || "VMWARE_NSX_EXPORT" || "IMPORT_TEMPLATE", * // serverImportSuccess: Number("int"), * // serverImportFailure: Number("int"), * // applicationImportSuccess: Number("int"), diff --git a/clients/client-application-discovery-service/src/commands/StartBatchDeleteConfigurationTaskCommand.ts b/clients/client-application-discovery-service/src/commands/StartBatchDeleteConfigurationTaskCommand.ts index 3e5e2ccc91b6..e2e6a28e5672 100644 --- a/clients/client-application-discovery-service/src/commands/StartBatchDeleteConfigurationTaskCommand.ts +++ b/clients/client-application-discovery-service/src/commands/StartBatchDeleteConfigurationTaskCommand.ts @@ -77,6 +77,9 @@ export interface StartBatchDeleteConfigurationTaskCommandOutput * @throws {@link HomeRegionNotSetException} (client fault) *

The home Region is not set. Set the home Region to continue.

* + * @throws {@link InvalidParameterException} (client fault) + *

One or more parameters are not valid. Verify the parameters and try again.

+ * * @throws {@link InvalidParameterValueException} (client fault) *

The value of one or more parameters are either invalid or out of range. Verify the * parameter values and try again.

diff --git a/clients/client-application-discovery-service/src/commands/StartImportTaskCommand.ts b/clients/client-application-discovery-service/src/commands/StartImportTaskCommand.ts index 73b6c7e4fa0c..9a2b44216e9b 100644 --- a/clients/client-application-discovery-service/src/commands/StartImportTaskCommand.ts +++ b/clients/client-application-discovery-service/src/commands/StartImportTaskCommand.ts @@ -84,10 +84,11 @@ export interface StartImportTaskCommandOutput extends StartImportTaskResponse, _ * // clientRequestToken: "STRING_VALUE", * // name: "STRING_VALUE", * // importUrl: "STRING_VALUE", - * // status: "IMPORT_IN_PROGRESS" || "IMPORT_COMPLETE" || "IMPORT_COMPLETE_WITH_ERRORS" || "IMPORT_FAILED" || "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED" || "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED" || "DELETE_FAILED_LIMIT_EXCEEDED" || "INTERNAL_ERROR", + * // status: "IMPORT_IN_PROGRESS" || "IMPORT_COMPLETE" || "IMPORT_COMPLETE_WITH_ERRORS" || "IMPORT_FAILED" || "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED" || "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" || "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE" || "DELETE_IN_PROGRESS" || "DELETE_COMPLETE" || "DELETE_FAILED" || "DELETE_FAILED_LIMIT_EXCEEDED" || "INTERNAL_ERROR", * // importRequestTime: new Date("TIMESTAMP"), * // importCompletionTime: new Date("TIMESTAMP"), * // importDeletedTime: new Date("TIMESTAMP"), + * // fileClassification: "MODELIZEIT_EXPORT" || "RVTOOLS_EXPORT" || "VMWARE_NSX_EXPORT" || "IMPORT_TEMPLATE", * // serverImportSuccess: Number("int"), * // serverImportFailure: Number("int"), * // applicationImportSuccess: Number("int"), diff --git a/clients/client-application-discovery-service/src/commands/UpdateApplicationCommand.ts b/clients/client-application-discovery-service/src/commands/UpdateApplicationCommand.ts index 2a4da72cafb8..8bcfc0de53ee 100644 --- a/clients/client-application-discovery-service/src/commands/UpdateApplicationCommand.ts +++ b/clients/client-application-discovery-service/src/commands/UpdateApplicationCommand.ts @@ -43,6 +43,7 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons * configurationId: "STRING_VALUE", // required * name: "STRING_VALUE", * description: "STRING_VALUE", + * wave: "STRING_VALUE", * }; * const command = new UpdateApplicationCommand(input); * const response = await client.send(command); diff --git a/clients/client-application-discovery-service/src/models/models_0.ts b/clients/client-application-discovery-service/src/models/models_0.ts index 66a016927306..5237466b5fd9 100644 --- a/clients/client-application-discovery-service/src/models/models_0.ts +++ b/clients/client-application-discovery-service/src/models/models_0.ts @@ -442,16 +442,22 @@ export interface BatchDeleteImportDataResponse { */ export interface CreateApplicationRequest { /** - *

Name of the application to be created.

+ *

The name of the application to be created.

* @public */ name: string | undefined; /** - *

Description of the application to be created.

+ *

The description of the application to be created.

* @public */ description?: string | undefined; + + /** + *

The name of the migration wave of the application to be created.

+ * @public + */ + wave?: string | undefined; } /** @@ -459,7 +465,7 @@ export interface CreateApplicationRequest { */ export interface CreateApplicationResponse { /** - *

Configuration ID of an application to be created.

+ *

The configuration ID of an application to be created.

* @public */ configurationId?: string | undefined; @@ -1374,6 +1380,7 @@ export interface DescribeExportTasksResponse { * @enum */ export const ImportTaskFilterName = { + FILE_CLASSIFICATION: "FILE_CLASSIFICATION", IMPORT_TASK_ID: "IMPORT_TASK_ID", NAME: "NAME", STATUS: "STATUS", @@ -1432,6 +1439,22 @@ export interface DescribeImportTasksRequest { nextToken?: string | undefined; } +/** + * @public + * @enum + */ +export const FileClassification = { + IMPORT_TEMPLATE: "IMPORT_TEMPLATE", + MODELIZEIT_EXPORT: "MODELIZEIT_EXPORT", + RVTOOLS_EXPORT: "RVTOOLS_EXPORT", + VMWARE_NSX_EXPORT: "VMWARE_NSX_EXPORT", +} as const; + +/** + * @public + */ +export type FileClassification = (typeof FileClassification)[keyof typeof FileClassification]; + /** * @public * @enum @@ -1446,6 +1469,7 @@ export const ImportStatus = { IMPORT_FAILED: "IMPORT_FAILED", IMPORT_FAILED_RECORD_LIMIT_EXCEEDED: "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED", IMPORT_FAILED_SERVER_LIMIT_EXCEEDED: "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED", + IMPORT_FAILED_UNSUPPORTED_FILE_TYPE: "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE", IMPORT_IN_PROGRESS: "IMPORT_IN_PROGRESS", INTERNAL_ERROR: "INTERNAL_ERROR", } as const; @@ -1521,6 +1545,12 @@ export interface ImportTask { */ importDeletedTime?: Date | undefined; + /** + *

The type of file detected by the import task.

+ * @public + */ + fileClassification?: FileClassification | undefined; + /** *

The total number of server records in the import file that were successfully * imported.

@@ -2794,6 +2824,12 @@ export interface UpdateApplicationRequest { * @public */ description?: string | undefined; + + /** + *

The new migration wave of the application that you want to update.

+ * @public + */ + wave?: string | undefined; } /** diff --git a/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts b/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts index 2802c9d8085c..88062800c730 100644 --- a/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts +++ b/clients/client-application-discovery-service/src/protocols/Aws_json1_1.ts @@ -1717,6 +1717,7 @@ const de_ImportTask = (output: any, context: __SerdeContext): ImportTask => { applicationImportSuccess: __expectInt32, clientRequestToken: __expectString, errorsAndFailedEntriesZip: __expectString, + fileClassification: __expectString, importCompletionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), importDeletedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), importRequestTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), diff --git a/codegen/sdk-codegen/aws-models/application-discovery-service.json b/codegen/sdk-codegen/aws-models/application-discovery-service.json index 6fd6f6c5f394..79957b14c52d 100644 --- a/codegen/sdk-codegen/aws-models/application-discovery-service.json +++ b/codegen/sdk-codegen/aws-models/application-discovery-service.json @@ -1071,6 +1071,16 @@ "smithy.api#pattern": "^[\\s\\S]*\\S[\\s\\S]*$" } }, + "com.amazonaws.applicationdiscoveryservice#ApplicationWave": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^($|[^\\s\\x00]( *[^\\s\\x00])*$)$" + } + }, "com.amazonaws.applicationdiscoveryservice#AssociateConfigurationItemsToApplication": { "type": "operation", "input": { @@ -1763,14 +1773,20 @@ "name": { "target": "com.amazonaws.applicationdiscoveryservice#ApplicationName", "traits": { - "smithy.api#documentation": "

Name of the application to be created.

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

The name of the application to be created.

", "smithy.api#required": {} } }, "description": { "target": "com.amazonaws.applicationdiscoveryservice#ApplicationDescription", "traits": { - "smithy.api#documentation": "

Description of the application to be created.

" + "smithy.api#documentation": "

The description of the application to be created.

" + } + }, + "wave": { + "target": "com.amazonaws.applicationdiscoveryservice#ApplicationWave", + "traits": { + "smithy.api#documentation": "

The name of the migration wave of the application to be created.

" } } }, @@ -1784,7 +1800,7 @@ "configurationId": { "target": "com.amazonaws.applicationdiscoveryservice#String", "traits": { - "smithy.api#documentation": "

Configuration ID of an application to be created.

" + "smithy.api#documentation": "

The configuration ID of an application to be created.

" } } }, @@ -3409,6 +3425,35 @@ "target": "com.amazonaws.applicationdiscoveryservice#FailedConfiguration" } }, + "com.amazonaws.applicationdiscoveryservice#FileClassification": { + "type": "enum", + "members": { + "MODELIZEIT_EXPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MODELIZEIT_EXPORT" + } + }, + "RVTOOLS_EXPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RVTOOLS_EXPORT" + } + }, + "VMWARE_NSX_EXPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VMWARE_NSX_EXPORT" + } + }, + "IMPORT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMPORT_TEMPLATE" + } + } + } + }, "com.amazonaws.applicationdiscoveryservice#Filter": { "type": "structure", "members": { @@ -3621,6 +3666,12 @@ "smithy.api#enumValue": "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED" } }, + "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMPORT_FAILED_UNSUPPORTED_FILE_TYPE" + } + }, "DELETE_IN_PROGRESS": { "target": "smithy.api#Unit", "traits": { @@ -3704,6 +3755,12 @@ "smithy.api#documentation": "

The time that the import task request was deleted, presented in the Unix time stamp\n format.

" } }, + "fileClassification": { + "target": "com.amazonaws.applicationdiscoveryservice#FileClassification", + "traits": { + "smithy.api#documentation": "

The type of file detected by the import task.

" + } + }, "serverImportSuccess": { "target": "com.amazonaws.applicationdiscoveryservice#Integer", "traits": { @@ -3783,6 +3840,12 @@ "traits": { "smithy.api#enumValue": "NAME" } + }, + "FILE_CLASSIFICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_CLASSIFICATION" + } } } }, @@ -4332,6 +4395,9 @@ { "target": "com.amazonaws.applicationdiscoveryservice#HomeRegionNotSetException" }, + { + "target": "com.amazonaws.applicationdiscoveryservice#InvalidParameterException" + }, { "target": "com.amazonaws.applicationdiscoveryservice#InvalidParameterValueException" }, @@ -5006,6 +5072,12 @@ "traits": { "smithy.api#documentation": "

New description of the application to be updated.

" } + }, + "wave": { + "target": "com.amazonaws.applicationdiscoveryservice#ApplicationWave", + "traits": { + "smithy.api#documentation": "

The new migration wave of the application that you want to update.

" + } } }, "traits": {