Deletes an DMS event subscription.
Parameters:
-
subscription_name
(String)
–
The name of the DMS event notification subscription to be deleted.
Raises:
Source code in docs_src/capo_database_migration_service/_services/database_migration_service.py
| def delete_event_subscription(
self,
subscription_name: "capo_database_migration_service.types.string.String",
*,
config_overrides: Optional[DatabaseMigrationServiceClientConfig] = None,
) -> "capo_database_migration_service.types.delete_event_subscription_response.DeleteEventSubscriptionResponse":
"""<p> Deletes an DMS event subscription. </p>
Args:
subscription_name: <p>The name of the DMS event notification subscription to be deleted.</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.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.
"""
def _handler(
req: "OperationRequest[capo_database_migration_service.types.delete_event_subscription_message.DeleteEventSubscriptionMessage]",
) -> OperationResponse[
"capo_database_migration_service.types.delete_event_subscription_response.DeleteEventSubscriptionResponse"
]:
import capo_database_migration_service._operations.amazon_dm_sv20160101.delete_event_subscription
output, http_response = (
capo_database_migration_service._operations.amazon_dm_sv20160101.delete_event_subscription.delete_event_subscription(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteEventSubscription")
)
input_: capo_database_migration_service.types.delete_event_subscription_message.DeleteEventSubscriptionMessage = {
"subscription_name": subscription_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|