Amazon OpenSearch Service

2026/07/06 - Amazon OpenSearch Service - 3 new api methods

Changes  This release introduces Saved Object Migration APIs, enabling users to migrate dashboards, visualizations, index patterns, and other saved objects from a data source into an Amazon OpenSearch Service application workspace with configurable export filters and conflict resolution strategies.

GetMigration (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.get_migration(
    migrationId='string'
)
type migrationId:

string

param migrationId:

[REQUIRED]

The unique identifier of the migration job to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'migrationId': 'string',
    'status': 'string',
    'applicationId': 'string',
    'source': {
        'datasourceArn': 'string'
    },
    'exportedCount': 123,
    'importedCount': 123,
    'error': {
        'code': 'string',
        'message': 'string'
    },
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • migrationId (string) --

      The unique identifier of the migration job.

    • status (string) --

      The current status of the migration job. Valid values are PENDING, IN_PROGRESS, SUCCEEDED, and FAILED.

    • applicationId (string) --

      The unique identifier of the OpenSearch application associated with the migration.

    • source (dict) --

      The source configuration for the migration, including the data source ARN.

      • datasourceArn (string) --

        The Amazon Resource Name (ARN) of the data source to migrate saved objects from.

    • exportedCount (integer) --

      The number of saved objects exported from the source data source.

    • importedCount (integer) --

      The number of saved objects successfully imported into the target workspace.

    • error (dict) --

      Error details if the migration failed or completed with errors.

      • code (string) --

        The error code identifying the type of failure.

      • message (string) --

        A human-readable description of the error.

    • createdAt (datetime) --

      The date and time when the migration job was created.

    • updatedAt (datetime) --

      The date and time when the migration job was last updated.

ListMigrations (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.list_migrations(
    applicationId='string',
    status='string',
    maxResults=123,
    nextToken='string'
)
type applicationId:

string

param applicationId:

[REQUIRED]

The unique identifier of the OpenSearch application to list migrations for.

type status:

string

param status:

Filters the results by migration status. Valid values are PENDING, IN_PROGRESS, SUCCEEDED, and FAILED.

type maxResults:

integer

param maxResults:

The maximum number of results to return in a single call.

type nextToken:

string

param nextToken:

The pagination token from a previous call to retrieve the next set of results.

rtype:

dict

returns:

Response Syntax

{
    'migrations': [
        {
            'migrationId': 'string',
            'status': 'string',
            'applicationId': 'string',
            'source': {
                'datasourceArn': 'string'
            },
            'exportedCount': 123,
            'importedCount': 123,
            'error': {
                'code': 'string',
                'message': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • migrations (list) --

      A list of migration job summaries for the specified application.

      • (dict) --

        A summary of a migration job, including its status and progress.

        • migrationId (string) --

          The unique identifier of the migration job.

        • status (string) --

          The current status of the migration job.

        • applicationId (string) --

          The unique identifier of the OpenSearch application associated with the migration.

        • source (dict) --

          The source configuration for the migration.

          • datasourceArn (string) --

            The Amazon Resource Name (ARN) of the data source to migrate saved objects from.

        • exportedCount (integer) --

          The number of saved objects exported from the source data source.

        • importedCount (integer) --

          The number of saved objects successfully imported into the target workspace.

        • error (dict) --

          Error details if the migration failed or completed with errors.

          • code (string) --

            The error code identifying the type of failure.

          • message (string) --

            A human-readable description of the error.

        • createdAt (datetime) --

          The date and time when the migration job was created.

        • updatedAt (datetime) --

          The date and time when the migration job was last updated.

    • nextToken (string) --

      The pagination token to use in a subsequent call to retrieve the next set of results.

StartMigration (new) Link ¶

Initiates a migration job to migrate saved objects from a data source to an Amazon OpenSearch Service application workspace. Saved objects include dashboards, visualizations, index patterns, and searches. You can specify export filters to control the scope of the migration and a conflict resolution strategy for handling existing objects in the target workspace.

See also: AWS API Documentation

Request Syntax

client.start_migration(
    applicationId='string',
    migrationOptions={
        'source': {
            'datasourceArn': 'string'
        },
        'workspace': {
            'workspaceId': 'string',
            'createWorkspace': True|False,
            'name': 'string',
            'type': 'string'
        },
        'exportOptions': {
            'types': [
                'string',
            ],
            'objects': [
                {
                    'type': 'string',
                    'id': 'string'
                },
            ],
            'includeReferencesDeep': True|False
        },
        'conflictResolution': 'string'
    },
    clientToken='string'
)
type applicationId:

string

param applicationId:

[REQUIRED]

The unique identifier of the OpenSearch application to migrate saved objects into.

type migrationOptions:

dict

param migrationOptions:

[REQUIRED]

The configuration options for the migration, including the source data source, target workspace, export filters, and conflict resolution strategy.

  • source (dict) -- [REQUIRED]

    The data source from which to export saved objects.

    • datasourceArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the data source to migrate saved objects from.

  • workspace (dict) -- [REQUIRED]

    The target workspace configuration for importing saved objects. You can specify an existing workspace or request creation of a new workspace.

    • workspaceId (string) --

      The unique identifier of an existing workspace to use as the migration target. Specify either this parameter or createWorkspace.

    • createWorkspace (boolean) --

      Specifies whether to create a new workspace as the migration target. If true, you must also specify name.

    • name (string) --

      The name of the new workspace to create. Required when createWorkspace is true.

    • type (string) --

      The type of the new workspace to create.

  • exportOptions (dict) --

    Options to filter the scope of saved objects to export from the source.

    • types (list) --

      A list of saved object types to include in the migration. Valid values include dashboard, visualization, index-pattern, search, and query.

      • (string) --

    • objects (list) --

      A list of specific saved objects to include in the migration, identified by type and ID.

      • (dict) --

        Identifies a specific saved object by its type and unique identifier.

        • type (string) -- [REQUIRED]

          The type of the saved object, such as dashboard, visualization, index-pattern, search, or query.

        • id (string) -- [REQUIRED]

          The unique identifier of the saved object.

    • includeReferencesDeep (boolean) --

      Specifies whether to include all objects referenced by the exported objects, recursively.

  • conflictResolution (string) --

    The strategy for resolving conflicts when saved objects already exist in the target workspace. Valid values are CREATE_NEW_COPIES, which creates new objects with unique IDs, and overwrite, which replaces existing objects.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon OpenSearch Service ignores the request but does not return an error.

rtype:

dict

returns:

Response Syntax

{
    'migrationId': 'string',
    'status': 'string'
}

Response Structure

  • (dict) --

    • migrationId (string) --

      The unique identifier of the migration job.

    • status (string) --

      The initial status of the migration job. The status is PENDING when a migration is first created.