- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StartMigrationCommand
Starts migrating a bot from Amazon Lex V1 to Amazon Lex V2. Migrate your bot when you want to take advantage of the new features of Amazon Lex V2.
For more information, see Migrating a bot in the Amazon Lex developer guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { LexModelBuildingServiceClient, StartMigrationCommand } from "@aws-sdk/client-lex-model-building-service"; // ES Modules import
// const { LexModelBuildingServiceClient, StartMigrationCommand } = require("@aws-sdk/client-lex-model-building-service"); // CommonJS import
const client = new LexModelBuildingServiceClient(config);
const input = { // StartMigrationRequest
v1BotName: "STRING_VALUE", // required
v1BotVersion: "STRING_VALUE", // required
v2BotName: "STRING_VALUE", // required
v2BotRole: "STRING_VALUE", // required
migrationStrategy: "CREATE_NEW" || "UPDATE_EXISTING", // required
};
const command = new StartMigrationCommand(input);
const response = await client.send(command);
// { // StartMigrationResponse
// v1BotName: "STRING_VALUE",
// v1BotVersion: "STRING_VALUE",
// v1BotLocale: "de-DE" || "en-AU" || "en-GB" || "en-IN" || "en-US" || "es-419" || "es-ES" || "es-US" || "fr-FR" || "fr-CA" || "it-IT" || "ja-JP" || "ko-KR",
// v2BotId: "STRING_VALUE",
// v2BotRole: "STRING_VALUE",
// migrationId: "STRING_VALUE",
// migrationStrategy: "CREATE_NEW" || "UPDATE_EXISTING",
// migrationTimestamp: new Date("TIMESTAMP"),
// };
StartMigrationCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
migrationStrategy Required | MigrationStrategy | undefined | The strategy used to conduct the migration.
|
v1BotName Required | string | undefined | The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2. |
v1BotVersion Required | string | undefined | The version of the bot to migrate to Amazon Lex V2. You can migrate the |
v2BotName Required | string | undefined | The name of the Amazon Lex V2 bot that you are migrating the Amazon Lex V1 bot to.
|
v2BotRole Required | string | undefined | The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot. |
StartMigrationCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
migrationId | string | undefined | The unique identifier that Amazon Lex assigned to the migration. |
migrationStrategy | MigrationStrategy | undefined | The strategy used to conduct the migration. |
migrationTimestamp | Date | undefined | The date and time that the migration started. |
v1BotLocale | Locale | undefined | The locale used for the Amazon Lex V1 bot. |
v1BotName | string | undefined | The name of the Amazon Lex V1 bot that you are migrating to Amazon Lex V2. |
v1BotVersion | string | undefined | The version of the bot to migrate to Amazon Lex V2. |
v2BotId | string | undefined | The unique identifier for the Amazon Lex V2 bot. |
v2BotRole | string | undefined | The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Your IAM user or role does not have permission to call the Amazon Lex V2 APIs required to migrate your bot. |
BadRequestException | client | The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again. |
InternalFailureException | server | An internal Amazon Lex error occurred. Try your request again. |
LimitExceededException | client | The request exceeded a limit. Try your request again. |
NotFoundException | client | The resource specified in the request was not found. Check the resource and try again. |
LexModelBuildingServiceServiceException | Base exception class for all service exceptions from LexModelBuildingService service. |