startMigration method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw DisabledOperationException.
May throw InternalException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter applicationId :
The unique identifier of the OpenSearch application to migrate saved
objects into.
Parameter migrationOptions :
The configuration options for the migration, including the source data
source, target workspace, export filters, and conflict resolution
strategy.
Parameter 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.
Implementation
Future<StartMigrationResponse> startMigration({
required String applicationId,
required MigrationOptions migrationOptions,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
'applicationId': applicationId,
'migrationOptions': migrationOptions,
if (clientToken != null) 'clientToken': clientToken,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2021-01-01/opensearch/app-migrations',
exceptionFnMap: _exceptionFns,
);
return StartMigrationResponse.fromJson(response);
}