Returns a paginated list of metadata model assessment requests for a migration project, initiated by StartMetadataModelAssessment.
Required permissions: dms:ListMetadataModelAssessments. 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).
-
filters
(Optional[FilterList], default:
None
)
–
The filters to apply to the metadata model assessment requests.
The following filter names are supported:
-
request-id – The request identifier.
-
status – The request status. Valid values: RECEIVED, IN_PROGRESS, SUCCESS, FAILED.
-
marker
(Optional[String], default:
None
)
–
Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
If Marker is returned by a previous response, there are more results available. The value of Marker is a unique pagination token for each page. To retrieve the next page, make the call again using the returned token and keeping all other arguments unchanged.
-
max_records
(Optional[IntegerOptional], default:
None
)
–
The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, DMS includes a pagination token in the response so that you can retrieve the remaining results.
Raises:
Examples:
Retrieve the status of metadata model assessments
The following example retrieves the status of metadata model assessment operations identified by their request IDs.
>>> await client.describe_metadata_model_assessments(migration_project_identifier='arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS', filters=[{'Name': 'request-id', 'Values': ['a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', 'a1b2c3d4-5678-90ab-cdef-EXAMPLE22222', 'a1b2c3d4-5678-90ab-cdef-EXAMPLE33333']}])
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
| async def describe_metadata_model_assessments(
self,
migration_project_identifier: "capo_database_migration_service.types.migration_project_identifier.MigrationProjectIdentifier",
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
filters: Optional[
"capo_database_migration_service.types.filter_list.FilterList"
] = None,
marker: Optional["capo_database_migration_service.types.string.String"] = None,
max_records: Optional[
"capo_database_migration_service.types.integer_optional.IntegerOptional"
] = None,
) -> "capo_database_migration_service.types.describe_metadata_model_assessments_response.DescribeMetadataModelAssessmentsResponse":
"""<p>Returns a paginated list of metadata model assessment requests for a migration project, initiated by <a href="https://docs.aws.amazon.com/dms/latest/APIReference/API_StartMetadataModelAssessment.html">StartMetadataModelAssessment</a>.</p> <p> <b>Required permissions:</b> <code>dms:ListMetadataModelAssessments</code>. For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsdatabasemigrationservice.html">Actions, resources, and condition keys for Database Migration Service</a>.</p>
Args:
migration_project_identifier: <p>The migration project name or Amazon Resource Name (ARN).</p>
filters: <p>The filters to apply to the metadata model assessment requests.</p> <p>The following filter names are supported:</p> <ul> <li> <p> <code>request-id</code> – The request identifier.</p> </li> <li> <p> <code>status</code> – The request status. Valid values: <code>RECEIVED</code>, <code>IN_PROGRESS</code>, <code>SUCCESS</code>, <code>FAILED</code>.</p> </li> </ul>
marker: <p>Specifies the unique pagination token that makes it possible to display the next page of results. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p> <p>If <code>Marker</code> is returned by a previous response, there are more results available. The value of <code>Marker</code> is a unique pagination token for each page. To retrieve the next page, make the call again using the returned token and keeping all other arguments unchanged.</p>
max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, DMS includes a pagination token in the response so that you can retrieve the remaining results.</p>
Raises:
capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Retrieve the status of metadata model assessments
The following example retrieves the status of metadata model assessment operations identified by their request IDs.
>>> await client.describe_metadata_model_assessments(migration_project_identifier='arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS', filters=[{'Name': 'request-id', 'Values': ['a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', 'a1b2c3d4-5678-90ab-cdef-EXAMPLE22222', 'a1b2c3d4-5678-90ab-cdef-EXAMPLE33333']}])
"""
async def _handler(
req: "AsyncOperationRequest[capo_database_migration_service.types.describe_metadata_model_assessments_message.DescribeMetadataModelAssessmentsMessage]",
) -> AsyncOperationResponse[
"capo_database_migration_service.types.describe_metadata_model_assessments_response.DescribeMetadataModelAssessmentsResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.describe_metadata_model_assessments
(
output,
http_response,
) = await capo_database_migration_service._operations.amazon_dm_sv20160101.describe_metadata_model_assessments.async_describe_metadata_model_assessments(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeMetadataModelAssessments")
)
input_: capo_database_migration_service.types.describe_metadata_model_assessments_message.DescribeMetadataModelAssessmentsMessage = {
"migration_project_identifier": migration_project_identifier
}
if filters is not None:
input_["filters"] = filters
if marker is not None:
input_["marker"] = marker
if max_records is not None:
input_["max_records"] = max_records
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|