import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ElastiCacheClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ElastiCacheClient"; import type { DescribeEventsMessage, EventsMessage } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link DescribeEventsCommand}. */ export interface DescribeEventsCommandInput extends DescribeEventsMessage { } /** * @public * * The output of {@link DescribeEventsCommand}. */ export interface DescribeEventsCommandOutput extends EventsMessage, __MetadataBearer { } declare const DescribeEventsCommand_base: { new (input: DescribeEventsCommandInput): import("@smithy/smithy-client").CommandImpl; new (...[input]: [] | [DescribeEventsCommandInput]): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Returns events related to clusters, cache security groups, and cache parameter groups. * You can obtain events specific to a particular cluster, cache security group, or cache * 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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ElastiCacheClient, DescribeEventsCommand } from "@aws-sdk/client-elasticache"; // ES Modules import * // const { ElastiCacheClient, DescribeEventsCommand } = require("@aws-sdk/client-elasticache"); // CommonJS import * // import type { ElastiCacheClientConfig } from "@aws-sdk/client-elasticache"; * const config = {}; // type is ElastiCacheClientConfig * const client = new ElastiCacheClient(config); * const input = { // DescribeEventsMessage * SourceIdentifier: "STRING_VALUE", * SourceType: "cache-cluster" || "cache-parameter-group" || "cache-security-group" || "cache-subnet-group" || "replication-group" || "serverless-cache" || "serverless-cache-snapshot" || "user" || "user-group", * StartTime: new Date("TIMESTAMP"), * EndTime: new Date("TIMESTAMP"), * Duration: Number("int"), * MaxRecords: Number("int"), * Marker: "STRING_VALUE", * }; * const command = new DescribeEventsCommand(input); * const response = await client.send(command); * // { // EventsMessage * // Marker: "STRING_VALUE", * // Events: [ // EventList * // { // Event * // SourceIdentifier: "STRING_VALUE", * // SourceType: "cache-cluster" || "cache-parameter-group" || "cache-security-group" || "cache-subnet-group" || "replication-group" || "serverless-cache" || "serverless-cache-snapshot" || "user" || "user-group", * // Message: "STRING_VALUE", * // Date: new Date("TIMESTAMP"), * // }, * // ], * // }; * * ``` * * @param DescribeEventsCommandInput - {@link DescribeEventsCommandInput} * @returns {@link DescribeEventsCommandOutput} * @see {@link DescribeEventsCommandInput} for command's `input` shape. * @see {@link DescribeEventsCommandOutput} for command's `response` shape. * @see {@link ElastiCacheClientResolvedConfig | config} for ElastiCacheClient's `config` shape. * * @throws {@link InvalidParameterCombinationException} (client fault) *

Two or more incompatible parameters were specified.

* * @throws {@link InvalidParameterValueException} (client fault) *

The value for a parameter is invalid.

* * @throws {@link ElastiCacheServiceException} *

Base exception class for all service exceptions from ElastiCache service.

* * * @example DescribeEvents * ```javascript * // Describes all the cache-cluster events for the past 120 minutes. * const input = { * Duration: 360, * SourceType: "cache-cluster" * }; * const command = new DescribeEventsCommand(input); * const response = await client.send(command); * /* response is * { * Events: [ * { * Date: "2016-12-22T16:27:56.088Z", * Message: "Added cache node 0001 in availability zone us-east-1e", * SourceIdentifier: "redis-cluster", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:27:56.078Z", * Message: "Cache cluster created", * SourceIdentifier: "redis-cluster", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:05:17.326Z", * Message: "Added cache node 0002 in availability zone us-east-1c", * SourceIdentifier: "my-memcached2", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:05:17.323Z", * Message: "Added cache node 0001 in availability zone us-east-1e", * SourceIdentifier: "my-memcached2", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:05:17.314Z", * Message: "Cache cluster created", * SourceIdentifier: "my-memcached2", * SourceType: "cache-cluster" * } * ], * Marker: "" * } * *\/ * ``` * * @example DescribeEvents * ```javascript * // Describes all the replication-group events from 3:00P to 5:00P on November 11, 2016. * const input = { * StartTime: "2016-12-22T15:00:00.000Z" * }; * const command = new DescribeEventsCommand(input); * const response = await client.send(command); * /* response is * { * Events: [ * { * Date: "2016-12-22T21:35:46.674Z", * Message: "Snapshot succeeded for snapshot with ID 'cr-bkup' of replication group with ID 'clustered-redis'", * SourceIdentifier: "clustered-redis-0001-001", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:27:56.088Z", * Message: "Added cache node 0001 in availability zone us-east-1e", * SourceIdentifier: "redis-cluster", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:27:56.078Z", * Message: "Cache cluster created", * SourceIdentifier: "redis-cluster", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:05:17.326Z", * Message: "Added cache node 0002 in availability zone us-east-1c", * SourceIdentifier: "my-memcached2", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:05:17.323Z", * Message: "Added cache node 0001 in availability zone us-east-1e", * SourceIdentifier: "my-memcached2", * SourceType: "cache-cluster" * }, * { * Date: "2016-12-22T16:05:17.314Z", * Message: "Cache cluster created", * SourceIdentifier: "my-memcached2", * SourceType: "cache-cluster" * } * ], * Marker: "" * } * *\/ * ``` * * @public */ export declare class DescribeEventsCommand extends DescribeEventsCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DescribeEventsMessage; output: EventsMessage; }; sdk: { input: DescribeEventsCommandInput; output: DescribeEventsCommandOutput; }; }; }