Deletes the specified migration project.
Required permissions: dms:DeleteMigrationProject. For more information, see Actions, resources, and condition keys for Database Migration Service.
The migration project must be closed before you can delete it.
Parameters:
-
migration_project_identifier
(String)
–
The name or Amazon Resource Name (ARN) of the migration project to delete.
Raises:
Examples:
Delete a migration project
The following example deletes a migration project identified by its ARN.
>>> await client.delete_migration_project(migration_project_identifier='arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS')
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
| async def delete_migration_project(
self,
migration_project_identifier: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.delete_migration_project_response.DeleteMigrationProjectResponse":
"""<p>Deletes the specified migration project.</p> <p> <b>Required permissions:</b> <code>dms:DeleteMigrationProject</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> <note> <p>The migration project must be closed before you can delete it.</p> </note>
Args:
migration_project_identifier: <p>The name or Amazon Resource Name (ARN) of the migration project to delete.</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.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</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:
Delete a migration project
The following example deletes a migration project identified by its ARN.
>>> await client.delete_migration_project(migration_project_identifier='arn:aws:dms:us-east-1:111122223333:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS')
"""
async def _handler(
req: "AsyncOperationRequest[capo_database_migration_service.types.delete_migration_project_message.DeleteMigrationProjectMessage]",
) -> AsyncOperationResponse[
"capo_database_migration_service.types.delete_migration_project_response.DeleteMigrationProjectResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.delete_migration_project
(
output,
http_response,
) = await capo_database_migration_service._operations.amazon_dm_sv20160101.delete_migration_project.async_delete_migration_project(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteMigrationProject")
)
input_: capo_database_migration_service.types.delete_migration_project_message.DeleteMigrationProjectMessage = {
"migration_project_identifier": migration_project_identifier
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|