Returns a paginated list of migration projects for your account in the current region.
Required permissions: dms:ListMigrationProjects. For more information, see Actions, resources, and condition keys for Database Migration Service.
Parameters:
-
filters
(Optional[FilterList], default:
None
)
–
The filters to apply to the migration projects.
The following filter names are supported:
-
migration-project-identifier – The migration project name or ARN.
-
instance-profile-identifier – The instance profile name or ARN.
-
data-provider-identifier – The source or target data provider name or ARN.
-
source-data-provider-identifier – The source data provider name or ARN.
-
target-data-provider-identifier – The target data provider name or ARN.
-
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.
-
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.
Raises:
Examples:
Describe migration projects with a filter
The following example retrieves the details of a migration project identified by its ARN.
>>> client.describe_migration_projects(filters=[{'Name': 'migration-project-identifier', 'Values': ['arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS']}])
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
| def describe_migration_projects(
self,
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
filters: Optional[
"capo_database_migration_service.types.filter_list.FilterList"
] = None,
max_records: Optional[
"capo_database_migration_service.types.integer_optional.IntegerOptional"
] = None,
marker: Optional["capo_database_migration_service.types.string.String"] = None,
) -> "capo_database_migration_service.types.describe_migration_projects_response.DescribeMigrationProjectsResponse":
"""<p>Returns a paginated list of migration projects for your account in the current region.</p> <p> <b>Required permissions:</b> <code>dms:ListMigrationProjects</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:
filters: <p>The filters to apply to the migration projects.</p> <p>The following filter names are supported:</p> <ul> <li> <p> <code>migration-project-identifier</code> – The migration project name or ARN.</p> </li> <li> <p> <code>instance-profile-identifier</code> – The instance profile name or ARN.</p> </li> <li> <p> <code>data-provider-identifier</code> – The source or target data provider name or ARN.</p> </li> <li> <p> <code>source-data-provider-identifier</code> – The source data provider name or ARN.</p> </li> <li> <p> <code>target-data-provider-identifier</code> – The target data provider name or ARN.</p> </li> </ul>
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>
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>
Raises:
capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
capo_database_migration_service.errors.failed_dependency_fault.FailedDependencyFault: <p>A dependency threw an exception.</p>
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:
Describe migration projects with a filter
The following example retrieves the details of a migration project identified by its ARN.
>>> client.describe_migration_projects(filters=[{'Name': 'migration-project-identifier', 'Values': ['arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS']}])
"""
def _handler(
req: "OperationRequest[capo_database_migration_service.types.describe_migration_projects_message.DescribeMigrationProjectsMessage]",
) -> OperationResponse[
"capo_database_migration_service.types.describe_migration_projects_response.DescribeMigrationProjectsResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.describe_migration_projects
output, http_response = (
capo_database_migration_service._operations.amazon_dm_sv20160101.describe_migration_projects.describe_migration_projects(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeMigrationProjects")
)
input_: capo_database_migration_service.types.describe_migration_projects_message.DescribeMigrationProjectsMessage = {}
if filters is not None:
input_["filters"] = filters
if max_records is not None:
input_["max_records"] = max_records
if marker is not None:
input_["marker"] = marker
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|