migrations
Creates, updates, deletes, gets or lists a migrations resource.
Overview
| Name | migrations |
| Type | Resource |
| Id | aws.lex_models.migrations |
Fields
The following fields are returned by SELECT queries:
- get_migration
- get_migrations
| Name | Datatype | Description |
|---|---|---|
alerts | array | A list of alerts and warnings that indicate issues with the migration for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1 feature has a different implementation if Amazon Lex V2. For more information, see Migrating a bot in the Amazon Lex V2 developer guide. |
migration_id | string | The unique identifier of the migration. This is the same as the identifier used when calling the GetMigration operation. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
migration_status | string | Indicates the status of the migration. When the status is COMPLETE the migration is finished and the bot is available in Amazon Lex V2. There may be alerts and warnings that need to be resolved to complete the migration. (IN_PROGRESS, COMPLETED, FAILED) |
migration_strategy | string | The strategy used to conduct the migration. CREATE_NEW - Creates a new Amazon Lex V2 bot and migrates the Amazon Lex V1 bot to the new bot. UPDATE_EXISTING - Overwrites the existing Amazon Lex V2 bot metadata and the locale being migrated. It doesn't change any other locales in the Amazon Lex V2 bot. If the locale doesn't exist, a new locale is created in the Amazon Lex V2 bot. (CREATE_NEW, UPDATE_EXISTING) |
migration_timestamp | string (date-time) | The date and time that the migration started. |
v_1_bot_locale | string | The locale of the Amazon Lex V1 bot migrated to Amazon Lex V2. (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) |
v_1_bot_name | string | The name of the Amazon Lex V1 bot migrated to Amazon Lex V2. (pattern: <code>^([A-Za-z]_?)+$</code>) |
v_1_bot_version | string | The version of the Amazon Lex V1 bot migrated to Amazon Lex V2. (pattern: <code>$LATEST|[0-9]+</code>) |
v_2_bot_id | string | The unique identifier of the Amazon Lex V2 bot that the Amazon Lex V1 is being migrated to. (pattern: <code>^[0-9a-zA-Z]+$</code>) |
v_2_bot_role | string | The IAM role that Amazon Lex uses to run the Amazon Lex V2 bot. (pattern: <code>^arn:[\w-]+:iam::[\d]{12}:role/.+$</code>) |
| Name | Datatype | Description |
|---|---|---|
migration_summaries | array | An array of summaries for migrations from Amazon Lex V1 to Amazon Lex V2. To see details of the migration, use the migrationId from the summary in a call to the operation. |
next_token | string | If the response is truncated, it includes a pagination token that you can specify in your next request to fetch the next page of migrations. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_migration | select | migration_id, region | Provides details about an ongoing or complete migration from an Amazon Lex V1 bot to an Amazon Lex V2 bot. Use this operation to view the migration alerts and warnings related to the migration. | |
get_migrations | select | region | sortByAttribute, sortByOrder, v1BotNameContains, migrationStatusEquals, maxResults, nextToken | Gets a list of migrations between Amazon Lex V1 and Amazon Lex V2. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
migration_id | string | The unique identifier of the migration to view. The migrationID is returned by the operation. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of migrations to return in the response. The default is 10. |
migrationStatusEquals | string | Filters the list to contain only migrations in the specified state. |
nextToken | string | A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request. |
sortByAttribute | string | The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started. |
sortByOrder | string | The order so sort the list. |
v1BotNameContains | string | Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name. |
SELECT examples
- get_migration
- get_migrations
Provides details about an ongoing or complete migration from an Amazon Lex V1 bot to an Amazon Lex V2 bot. Use this operation to view the migration alerts and warnings related to the migration.
SELECT
alerts,
migration_id,
migration_status,
migration_strategy,
migration_timestamp,
v_1_bot_locale,
v_1_bot_name,
v_1_bot_version,
v_2_bot_id,
v_2_bot_role
FROM aws.lex_models.migrations
WHERE migration_id = '{{ migration_id }}' -- required
AND region = '{{ region }}' -- required
;
Gets a list of migrations between Amazon Lex V1 and Amazon Lex V2.
SELECT
migration_summaries,
next_token
FROM aws.lex_models.migrations
WHERE region = '{{ region }}' -- required
AND sortByAttribute = '{{ sortByAttribute }}'
AND sortByOrder = '{{ sortByOrder }}'
AND v1BotNameContains = '{{ v1BotNameContains }}'
AND migrationStatusEquals = '{{ migrationStatusEquals }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;