Skip to content

describe_events

describe_events(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    source_identifier: Optional[String] = None,
    source_type: Optional[SourceType] = None,
    start_time: Optional[TStamp] = None,
    end_time: Optional[TStamp] = None,
    duration: Optional[IntegerOptional] = None,
    event_categories: Optional[EventCategoriesList] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> EventsMessage

Returns events related to DB instances, DB clusters, DB parameter groups, DB security groups, DB snapshots, DB cluster snapshots, and RDS Proxies for the past 14 days. Events specific to a particular DB instance, DB cluster, DB parameter group, DB security group, DB snapshot, DB cluster snapshot group, or RDS Proxy can be obtained by providing the name as a parameter.

For more information on working with events, see Monitoring Amazon RDS events in the Amazon RDS User Guide and Monitoring Amazon Aurora events in the Amazon Aurora User Guide.

By default, RDS returns events that were generated in the past hour.

Parameters:

  • source_identifier (Optional[String], default: None ) –

    The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.

    Constraints:

    • If SourceIdentifier is supplied, SourceType must also be provided.

    • If the source type is a DB instance, a DBInstanceIdentifier value must be supplied.

    • If the source type is a DB cluster, a DBClusterIdentifier value must be supplied.

    • If the source type is a DB parameter group, a DBParameterGroupName value must be supplied.

    • If the source type is a DB security group, a DBSecurityGroupName value must be supplied.

    • If the source type is a DB snapshot, a DBSnapshotIdentifier value must be supplied.

    • If the source type is a DB cluster snapshot, a DBClusterSnapshotIdentifier value must be supplied.

    • If the source type is an RDS Proxy, a DBProxyName value must be supplied.

    • Can't end with a hyphen or contain two consecutive hyphens.

  • source_type (Optional[SourceType], default: None ) –

    The event source to retrieve events for. If no value is specified, all events are returned.

  • start_time (Optional[TStamp], default: None ) –

    The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.

    Example: 2009-07-08T18:00Z

  • end_time (Optional[TStamp], default: None ) –

    The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the ISO8601 Wikipedia page.

    Example: 2009-07-08T18:00Z

  • duration (Optional[IntegerOptional], default: None ) –

    The number of minutes to retrieve events for.

    Default: 60

  • event_categories (Optional[EventCategoriesList], default: None ) –

    A list of event categories that trigger notifications for a event notification subscription.

  • filters (Optional[FilterList], default: None ) –

    This parameter isn't currently supported.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

  • marker (Optional[String], default: None ) –

    An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Raises:

Examples:

To describe events The following retrieves details for the events that have occurred for the specified DB instance.

>>> client.describe_events(source_identifier='test-instance', source_type='db-instance')
Source code in docs_src/capo_rds/_services/rds.py
def describe_events(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    source_identifier: Optional["capo_rds.types.string.String"] = None,
    source_type: Optional["capo_rds.types.source_type.SourceType"] = None,
    start_time: Optional["capo_rds.types.t_stamp.TStamp"] = None,
    end_time: Optional["capo_rds.types.t_stamp.TStamp"] = None,
    duration: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    event_categories: Optional[
        "capo_rds.types.event_categories_list.EventCategoriesList"
    ] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.events_message.EventsMessage":
    """<p>Returns events related to DB instances, DB clusters, DB parameter groups, DB security groups, DB snapshots, DB cluster snapshots, and RDS Proxies for the past 14 days. Events specific to a particular DB instance, DB cluster, DB parameter group, DB security group, DB snapshot, DB cluster snapshot group, or RDS Proxy can be obtained by providing the name as a parameter.</p> <p>For more information on working with events, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/working-with-events.html">Monitoring Amazon RDS events</a> in the <i>Amazon RDS User Guide</i> and <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/working-with-events.html">Monitoring Amazon Aurora events</a> in the <i>Amazon Aurora User Guide</i>.</p> <note> <p>By default, RDS returns events that were generated in the past hour.</p> </note>

    Args:
        source_identifier: <p>The identifier of the event source for which events are returned. If not specified, then all sources are included in the response.</p> <p>Constraints:</p> <ul> <li> <p>If <code>SourceIdentifier</code> is supplied, <code>SourceType</code> must also be provided.</p> </li> <li> <p>If the source type is a DB instance, a <code>DBInstanceIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB cluster, a <code>DBClusterIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB parameter group, a <code>DBParameterGroupName</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB security group, a <code>DBSecurityGroupName</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB snapshot, a <code>DBSnapshotIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is a DB cluster snapshot, a <code>DBClusterSnapshotIdentifier</code> value must be supplied.</p> </li> <li> <p>If the source type is an RDS Proxy, a <code>DBProxyName</code> value must be supplied.</p> </li> <li> <p>Can't end with a hyphen or contain two consecutive hyphens.</p> </li> </ul>
        source_type: <p>The event source to retrieve events for. If no value is specified, all events are returned.</p>
        start_time: <p>The beginning of the time interval to retrieve events for, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a> </p> <p>Example: 2009-07-08T18:00Z</p>
        end_time: <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format. For more information about ISO 8601, go to the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO8601 Wikipedia page.</a> </p> <p>Example: 2009-07-08T18:00Z</p>
        duration: <p>The number of minutes to retrieve events for.</p> <p>Default: 60</p>
        event_categories: <p>A list of event categories that trigger notifications for a event notification subscription.</p>
        filters: <p>This parameter isn't currently supported.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>
        marker: <p>An optional pagination token provided by a previous DescribeEvents request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>

    Raises:
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe events
        The following retrieves details for the events that have occurred for the specified DB instance.

        >>> client.describe_events(source_identifier='test-instance', source_type='db-instance')
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.describe_events_message.DescribeEventsMessage]",
    ) -> OperationResponse["capo_rds.types.events_message.EventsMessage"]:
        import capo_rds._operations.amazon_rd_sv19.describe_events

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.describe_events.describe_events(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEvents")
    )
    input_: capo_rds.types.describe_events_message.DescribeEventsMessage = {}
    if source_identifier is not None:
        input_["source_identifier"] = source_identifier
    if source_type is not None:
        input_["source_type"] = source_type
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if duration is not None:
        input_["duration"] = duration
    if event_categories is not None:
        input_["event_categories"] = event_categories
    if filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output