Skip to content

describe_events

describe_events(
    *,
    config_overrides: Optional[MemoryDBClientConfig] = None,
    source_name: Optional[String] = None,
    source_type: Optional[SourceType] = None,
    start_time: Optional[TStamp] = None,
    end_time: Optional[TStamp] = None,
    duration: Optional[IntegerOptional] = None,
    max_results: Optional[IntegerOptional] = None,
    next_token: Optional[String] = None,
) -> DescribeEventsResponse

Returns events related to clusters, security groups, and parameter groups. You can obtain events specific to a particular cluster, security group, or parameter group by providing the name as a parameter. By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days' worth of events if necessary.

Parameters:

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

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

  • 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. Example: 2017-03-30T07:03:49.555Z

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

    The end of the time interval for which to retrieve events, specified in ISO 8601 format. Example: 2017-03-30T07:03:49.555Z

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

    The number of minutes worth of events to retrieve.

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

    The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

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

    An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

Raises:

Source code in docs_src/capo_memorydb/_services/memory_db.py
def describe_events(
    self,
    *,
    config_overrides: Optional[MemoryDBClientConfig] = None,
    source_name: Optional["capo_memorydb.types.string.String"] = None,
    source_type: Optional["capo_memorydb.types.source_type.SourceType"] = None,
    start_time: Optional["capo_memorydb.types.t_stamp.TStamp"] = None,
    end_time: Optional["capo_memorydb.types.t_stamp.TStamp"] = None,
    duration: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    max_results: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    next_token: Optional["capo_memorydb.types.string.String"] = None,
) -> "capo_memorydb.types.describe_events_response.DescribeEventsResponse":
    """<p>Returns events related to clusters, security groups, and parameter groups. You can obtain events specific to a particular cluster, security group, or parameter group by providing the name as a parameter. By default, only the events occurring within the last hour are returned; however, you can retrieve up to 14 days' worth of events if necessary.</p>

    Args:
        source_name: <p>The identifier of the event source for which events are returned. If not specified, all sources are included in the response.</p>
        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. Example: 2017-03-30T07:03:49.555Z</p>
        end_time: <p>The end of the time interval for which to retrieve events, specified in ISO 8601 format. Example: 2017-03-30T07:03:49.555Z</p>
        duration: <p>The number of minutes worth of events to retrieve.</p>
        max_results: <p>The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.</p>
        next_token: <p>An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. </p>

    Raises:
        capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
        capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
        capo_memorydb.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The required service-linked role was not found.</p>
        capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_memorydb.types.describe_events_request.DescribeEventsRequest]",
    ) -> OperationResponse[
        "capo_memorydb.types.describe_events_response.DescribeEventsResponse"
    ]:
        import capo_memorydb._operations.amazon_memory_db.describe_events

        output, http_response = (
            capo_memorydb._operations.amazon_memory_db.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_memorydb.types.describe_events_request.DescribeEventsRequest = {}
    if source_name is not None:
        input_["source_name"] = source_name
    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 max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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