async def describe_event_categories(
self,
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
source_type: Optional["capo_redshift.types.string.String"] = None,
) -> "capo_redshift.types.event_categories_message.EventCategoriesMessage":
"""<p>Displays a list of event categories for all event source types, or for a specified source type. For a list of the event categories and source types, go to <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html">Amazon Redshift Event Notifications</a>.</p>
Args:
source_type: <p>The source type, such as cluster or parameter group, to which the described event categories apply.</p> <p>Valid values: cluster, cluster-snapshot, cluster-parameter-group, cluster-security-group, and scheduled-action.</p>
Raises:
capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_redshift.types.describe_event_categories_message.DescribeEventCategoriesMessage]",
) -> AsyncOperationResponse[
"capo_redshift.types.event_categories_message.EventCategoriesMessage"
]:
import capo_redshift._operations.redshift_service_version20121201.describe_event_categories
(
output,
http_response,
) = await capo_redshift._operations.redshift_service_version20121201.describe_event_categories.async_describe_event_categories(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeEventCategories")
)
input_: capo_redshift.types.describe_event_categories_message.DescribeEventCategoriesMessage = {}
if source_type is not None:
input_["source_type"] = source_type
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output