Deletes the specified instance profile.
Required permissions: dms:DeleteInstanceProfile. For more information, see Actions, resources, and condition keys for Database Migration Service.
All migration projects associated with the instance profile must be deleted or modified before you can delete the instance profile.
Parameters:
-
instance_profile_identifier
(String)
–
The identifier of the instance profile to delete.
Raises:
Examples:
Delete an instance profile
The following example deletes an instance profile identified by its ARN.
>>> await client.delete_instance_profile(instance_profile_identifier='arn:aws:dms:us-east-1:111122223333:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS')
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
| async def delete_instance_profile(
self,
instance_profile_identifier: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.delete_instance_profile_response.DeleteInstanceProfileResponse":
"""<p>Deletes the specified instance profile.</p> <p> <b>Required permissions:</b> <code>dms:DeleteInstanceProfile</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>All migration projects associated with the instance profile must be deleted or modified before you can delete the instance profile.</p> </note>
Args:
instance_profile_identifier: <p>The identifier of the instance profile 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 an instance profile
The following example deletes an instance profile identified by its ARN.
>>> await client.delete_instance_profile(instance_profile_identifier='arn:aws:dms:us-east-1:111122223333:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS')
"""
async def _handler(
req: "AsyncOperationRequest[capo_database_migration_service.types.delete_instance_profile_message.DeleteInstanceProfileMessage]",
) -> AsyncOperationResponse[
"capo_database_migration_service.types.delete_instance_profile_response.DeleteInstanceProfileResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.delete_instance_profile
(
output,
http_response,
) = await capo_database_migration_service._operations.amazon_dm_sv20160101.delete_instance_profile.async_delete_instance_profile(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteInstanceProfile")
)
input_: capo_database_migration_service.types.delete_instance_profile_message.DeleteInstanceProfileMessage = {
"instance_profile_identifier": instance_profile_identifier
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|