start_metadata_model_import
¶
start_metadata_model_import(
migration_project_identifier: MigrationProjectIdentifier,
selection_rules: String,
origin: OriginTypeValue,
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = 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.
>>> 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/database_migration_service.py
9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 | |