Skip to content

describe_events

describe_events(
    *,
    config_overrides: Optional[NeptuneClientConfig] = 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 security groups, DB snapshots, and DB parameter groups for the past 14 days. Events specific to a particular DB instance, DB security group, database snapshot, or DB parameter group can be obtained by providing the name as a parameter. By default, the past hour of events are returned.

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 DBInstance, then a DBInstanceIdentifier must be supplied.

    • If the source type is DBSecurityGroup, a DBSecurityGroupName must be supplied.

    • If the source type is DBParameterGroup, a DBParameterGroupName must be supplied.

    • If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied.

    • Cannot 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 is not 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 the remaining results can be retrieved.

    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:

Source code in docs_src/capo_neptune/_services/neptune.py
def describe_events(
    self,
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    source_identifier: Optional["capo_neptune.types.string.String"] = None,
    source_type: Optional["capo_neptune.types.source_type.SourceType"] = None,
    start_time: Optional["capo_neptune.types.t_stamp.TStamp"] = None,
    end_time: Optional["capo_neptune.types.t_stamp.TStamp"] = None,
    duration: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    event_categories: Optional[
        "capo_neptune.types.event_categories_list.EventCategoriesList"
    ] = None,
    filters: Optional["capo_neptune.types.filter_list.FilterList"] = None,
    max_records: Optional[
        "capo_neptune.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_neptune.types.string.String"] = None,
) -> "capo_neptune.types.events_message.EventsMessage":
    """<p>Returns events related to DB instances, DB security groups, DB snapshots, and DB parameter groups for the past 14 days. Events specific to a particular DB instance, DB security group, database snapshot, or DB parameter group can be obtained by providing the name as a parameter. By default, the past hour of events are returned.</p>

    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 SourceIdentifier is supplied, SourceType must also be provided.</p> </li> <li> <p>If the source type is <code>DBInstance</code>, then a <code>DBInstanceIdentifier</code> must be supplied.</p> </li> <li> <p>If the source type is <code>DBSecurityGroup</code>, a <code>DBSecurityGroupName</code> must be supplied.</p> </li> <li> <p>If the source type is <code>DBParameterGroup</code>, a <code>DBParameterGroupName</code> must be supplied.</p> </li> <li> <p>If the source type is <code>DBSnapshot</code>, a <code>DBSnapshotIdentifier</code> must be supplied.</p> </li> <li> <p>Cannot 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 is not 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 the remaining results can be retrieved.</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_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_neptune._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_neptune.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