This operation is used by SaaS partners to delete a partner event source. This operation is not used by Amazon Web Services customers.
When you delete an event source, the status of the corresponding partner event bus in the Amazon Web Services customer account becomes DELETED.
Parameters:
-
name
(EventSourceName)
–
The name of the event source to delete.
-
account
(AccountId)
–
The Amazon Web Services account ID of the Amazon Web Services customer that the event source was created for.
Raises:
Source code in docs_src/capo_cloudwatch_events/_services/async_cloud_watch_events.py
| async def delete_partner_event_source(
self,
name: "capo_cloudwatch_events.types.event_source_name.EventSourceName",
account: "capo_cloudwatch_events.types.account_id.AccountId",
*,
config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
) -> None:
"""<p>This operation is used by SaaS partners to delete a partner event source. This operation is not used by Amazon Web Services customers.</p> <p>When you delete an event source, the status of the corresponding partner event bus in the Amazon Web Services customer account becomes DELETED.</p> <p></p>
Args:
name: <p>The name of the event source to delete.</p>
account: <p>The Amazon Web Services account ID of the Amazon Web Services customer that the event source was created for.</p>
Raises:
capo_cloudwatch_events.errors.concurrent_modification_exception.ConcurrentModificationException: <p>There is concurrent modification on a rule, target, archive, or replay.</p>
capo_cloudwatch_events.errors.internal_exception.InternalException: <p>This exception occurs due to unexpected causes.</p>
capo_cloudwatch_events.errors.operation_disabled_exception.OperationDisabledException: <p>The operation you are attempting is not available in this region.</p>
capo_cloudwatch_events.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cloudwatch_events.types.delete_partner_event_source_request.DeletePartnerEventSourceRequest]",
) -> AsyncOperationResponse[None]:
import capo_cloudwatch_events._operations.aws_events.delete_partner_event_source
(
output,
http_response,
) = await capo_cloudwatch_events._operations.aws_events.delete_partner_event_source.async_delete_partner_event_source(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeletePartnerEventSource")
)
input_: capo_cloudwatch_events.types.delete_partner_event_source_request.DeletePartnerEventSourceRequest = {
"name": name,
"account": account,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|