migrations
Creates, updates, deletes, gets or lists a migrations resource.
Overview
| Name | migrations |
| Type | Resource |
| Id | aws.opensearch.migrations |
Fields
The following fields are returned by SELECT queries:
- get_migration
- list_migrations
| Name | Datatype | Description |
|---|---|---|
application_id | string | The unique identifier of the OpenSearch application associated with the migration. (pattern: <code>[a-z0-9]{3,30}</code>) |
created_at | string (date-time) | The date and time when the migration job was created. |
error | object | Error details if the migration failed or completed with errors. |
exported_count | integer | The number of saved objects exported from the source data source. |
imported_count | integer | The number of saved objects successfully imported into the target workspace. |
migration_id | string | The unique identifier of the migration job. |
source | object | The source configuration for the migration, including the data source ARN. |
status | string | The current status of the migration job. Valid values are PENDING, IN_PROGRESS, SUCCEEDED, and FAILED. |
updated_at | string (date-time) | The date and time when the migration job was last updated. |
| Name | Datatype | Description |
|---|---|---|
migrations | array | A list of migration job summaries for the specified application. |
next_token | string | The pagination token to use in a subsequent call to retrieve the next set of results. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_migration | select | migration_id, region | Retrieves the current status and progress of a migration job, including the number of exported and imported objects and error details if the migration failed. | |
list_migrations | select | applicationId, region | status, maxResults, nextToken | Lists migration jobs for an Amazon OpenSearch Service application. You can filter results by migration status. Use pagination to ensure that the operation returns quickly and successfully. |
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 |
|---|---|---|
applicationId | string | The unique identifier of the OpenSearch application to list migrations for. |
migration_id | string | The unique identifier of the migration job to retrieve. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return in a single call. |
nextToken | string | The pagination token from a previous call to retrieve the next set of results. |
status | string | Filters the results by migration status. Valid values are PENDING, IN_PROGRESS, SUCCEEDED, and FAILED. |
SELECT examples
- get_migration
- list_migrations
Retrieves the current status and progress of a migration job, including the number of exported and imported objects and error details if the migration failed.
SELECT
application_id,
created_at,
error,
exported_count,
imported_count,
migration_id,
source,
status,
updated_at
FROM aws.opensearch.migrations
WHERE migration_id = '{{ migration_id }}' -- required
AND region = '{{ region }}' -- required
;
Lists migration jobs for an Amazon OpenSearch Service application. You can filter results by migration status. Use pagination to ensure that the operation returns quickly and successfully.
SELECT
migrations,
next_token
FROM aws.opensearch.migrations
WHERE applicationId = '{{ applicationId }}' -- required
AND region = '{{ region }}' -- required
AND status = '{{ status }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;