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 Amazon Redshift Event Notifications.
Parameters:
-
source_type
(Optional[String], default:
None
)
–
The source type, such as cluster or parameter group, to which the described event categories apply.
Valid values: cluster, cluster-snapshot, cluster-parameter-group, cluster-security-group, and scheduled-action.
Raises:
Source code in docs_src/capo_redshift/_services/redshift.py
| def describe_event_categories(
self,
*,
config_overrides: Optional[RedshiftClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_redshift.types.describe_event_categories_message.DescribeEventCategoriesMessage]",
) -> OperationResponse[
"capo_redshift.types.event_categories_message.EventCategoriesMessage"
]:
import capo_redshift._operations.redshift_service_version20121201.describe_event_categories
output, http_response = (
capo_redshift._operations.redshift_service_version20121201.describe_event_categories.describe_event_categories(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|