OpenSearchService / Client / start_migration
start_migration¶
- OpenSearchService.Client.start_migration(**kwargs)¶
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
response = 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' )
- Parameters:
applicationId (string) –
[REQUIRED]
The unique identifier of the OpenSearch application to migrate saved objects into.
migrationOptions (dict) –
[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 specifyname.name (string) –
The name of the new workspace to create. Required when
createWorkspaceistrue.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, andquery.(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, orquery.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, andoverwrite, which replaces existing objects.
clientToken (string) – 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.
- Return type:
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
PENDINGwhen a migration is first created.
Exceptions
OpenSearchService.Client.exceptions.ValidationExceptionOpenSearchService.Client.exceptions.AccessDeniedExceptionOpenSearchService.Client.exceptions.InternalExceptionOpenSearchService.Client.exceptions.ResourceNotFoundExceptionOpenSearchService.Client.exceptions.ConflictExceptionOpenSearchService.Client.exceptions.DisabledOperationException