start_metadata_model_import
async
¶
start_metadata_model_import(
migration_project_identifier: MigrationProjectIdentifier,
selection_rules: String,
origin: OriginTypeValue,
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
refresh: Optional[Boolean] = None,
) -> StartMetadataModelImportResponse
Queues an import of metadata models (database objects such as tables, views, and procedures) from your data provider into the metadata tree. If other requests created by Start* operations are already in the migration project's queue, the import begins after they complete.
To check the status of the import request, call DescribeMetadataModelImports using the returned RequestIdentifier as a filter.
Required permissions: dms:StartMetadataModelImport. For more information, see Actions, resources, and condition keys for Database Migration Service.
Parameters:
-
migration_project_identifier(MigrationProjectIdentifier) –The migration project name or Amazon Resource Name (ARN).
-
selection_rules(String) –A JSON string that identifies the metadata models to import from the data provider. For the selection rule format and examples, see Selection rules in DMS Schema Conversion.
Usage:
-
Accepts source or target selection rules depending on the
Originparameter. Theserver-namein the object locator must match the corresponding data provider. -
Supports
explicit,include, andexcluderule actions.
-
-
origin(OriginTypeValue) –Specifies the metadata tree to import into.
You cannot import from a virtual target data provider.
-
refresh(Optional[Boolean], default:None) –Specifies whether to refresh the selected metadata models from the data provider.
When
true, the import reloads the selected metadata models with current definitions and removes their existing subtree.When
false(default), the import loads the full subtree that has not yet been loaded into the metadata tree.
Raises:
-
AccessDeniedFault–DMS was denied access to the endpoint. Check that the role is correctly configured.
-
InvalidResourceStateFault–The resource is in a state that prevents it from being used for database migration.
-
KMSKeyNotAccessibleFault–DMS cannot access the KMS key.
-
ResourceAlreadyExistsFault–The resource you are attempting to create already exists.
-
ResourceNotFoundFault–The resource could not be found.
-
ResourceQuotaExceededFault–The quota for this resource quota has been exceeded.
-
S3AccessDeniedFault–Insufficient privileges are preventing access to an Amazon S3 object.
-
S3ResourceNotFoundFault–A specified Amazon S3 bucket, bucket folder, or other object can't be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Import metadata from the source database The following example queues a metadata import for all objects in the ExampleSchema schema from the source database.
>>> await client.start_metadata_model_import(migration_project_identifier='arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS', selection_rules='{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}', origin='SOURCE', refresh=False)
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 | |