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 { TestFailoverMessage, TestFailoverResult } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link TestFailoverCommand}. */ export interface TestFailoverCommandInput extends TestFailoverMessage { } /** * @public * * The output of {@link TestFailoverCommand}. */ export interface TestFailoverCommandOutput extends TestFailoverResult, __MetadataBearer { } declare const TestFailoverCommand_base: { new (input: TestFailoverCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: TestFailoverCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Represents the input of a TestFailover operation which tests automatic * failover on a specified node group (called shard in the console) in a replication group * (called cluster in the console).

*

This API is designed for testing the behavior of your application in case of * ElastiCache failover. It is not designed to be an operational tool for initiating a * failover to overcome a problem you may have with the cluster. Moreover, in certain * conditions such as large-scale operational events, Amazon may block this API.

*

* Note the following *

* *

Also see, Testing * Multi-AZ in the ElastiCache User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ElastiCacheClient, TestFailoverCommand } from "@aws-sdk/client-elasticache"; // ES Modules import * // const { ElastiCacheClient, TestFailoverCommand } = 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 = { // TestFailoverMessage * ReplicationGroupId: "STRING_VALUE", // required * NodeGroupId: "STRING_VALUE", // required * }; * const command = new TestFailoverCommand(input); * const response = await client.send(command); * // { // TestFailoverResult * // ReplicationGroup: { // ReplicationGroup * // ReplicationGroupId: "STRING_VALUE", * // Description: "STRING_VALUE", * // GlobalReplicationGroupInfo: { // GlobalReplicationGroupInfo * // GlobalReplicationGroupId: "STRING_VALUE", * // GlobalReplicationGroupMemberRole: "STRING_VALUE", * // }, * // Status: "STRING_VALUE", * // PendingModifiedValues: { // ReplicationGroupPendingModifiedValues * // PrimaryClusterId: "STRING_VALUE", * // AutomaticFailoverStatus: "enabled" || "disabled", * // Resharding: { // ReshardingStatus * // SlotMigration: { // SlotMigration * // ProgressPercentage: Number("double"), * // }, * // }, * // AuthTokenStatus: "SETTING" || "ROTATING", * // UserGroups: { // UserGroupsUpdateStatus * // UserGroupIdsToAdd: [ // UserGroupIdList * // "STRING_VALUE", * // ], * // UserGroupIdsToRemove: [ * // "STRING_VALUE", * // ], * // }, * // LogDeliveryConfigurations: [ // PendingLogDeliveryConfigurationList * // { // PendingLogDeliveryConfiguration * // LogType: "slow-log" || "engine-log", * // DestinationType: "cloudwatch-logs" || "kinesis-firehose", * // DestinationDetails: { // DestinationDetails * // CloudWatchLogsDetails: { // CloudWatchLogsDestinationDetails * // LogGroup: "STRING_VALUE", * // }, * // KinesisFirehoseDetails: { // KinesisFirehoseDestinationDetails * // DeliveryStream: "STRING_VALUE", * // }, * // }, * // LogFormat: "text" || "json", * // }, * // ], * // TransitEncryptionEnabled: true || false, * // TransitEncryptionMode: "preferred" || "required", * // ClusterMode: "enabled" || "disabled" || "compatible", * // }, * // MemberClusters: [ // ClusterIdList * // "STRING_VALUE", * // ], * // NodeGroups: [ // NodeGroupList * // { // NodeGroup * // NodeGroupId: "STRING_VALUE", * // Status: "STRING_VALUE", * // PrimaryEndpoint: { // Endpoint * // Address: "STRING_VALUE", * // Port: Number("int"), * // }, * // ReaderEndpoint: { * // Address: "STRING_VALUE", * // Port: Number("int"), * // }, * // Slots: "STRING_VALUE", * // NodeGroupMembers: [ // NodeGroupMemberList * // { // NodeGroupMember * // CacheClusterId: "STRING_VALUE", * // CacheNodeId: "STRING_VALUE", * // ReadEndpoint: { * // Address: "STRING_VALUE", * // Port: Number("int"), * // }, * // PreferredAvailabilityZone: "STRING_VALUE", * // PreferredOutpostArn: "STRING_VALUE", * // CurrentRole: "STRING_VALUE", * // }, * // ], * // }, * // ], * // SnapshottingClusterId: "STRING_VALUE", * // AutomaticFailover: "enabled" || "disabled" || "enabling" || "disabling", * // MultiAZ: "enabled" || "disabled", * // ConfigurationEndpoint: "", * // SnapshotRetentionLimit: Number("int"), * // SnapshotWindow: "STRING_VALUE", * // ClusterEnabled: true || false, * // CacheNodeType: "STRING_VALUE", * // AuthTokenEnabled: true || false, * // AuthTokenLastModifiedDate: new Date("TIMESTAMP"), * // TransitEncryptionEnabled: true || false, * // AtRestEncryptionEnabled: true || false, * // MemberClustersOutpostArns: [ // ReplicationGroupOutpostArnList * // "STRING_VALUE", * // ], * // KmsKeyId: "STRING_VALUE", * // ARN: "STRING_VALUE", * // UserGroupIds: [ * // "STRING_VALUE", * // ], * // LogDeliveryConfigurations: [ // LogDeliveryConfigurationList * // { // LogDeliveryConfiguration * // LogType: "slow-log" || "engine-log", * // DestinationType: "cloudwatch-logs" || "kinesis-firehose", * // DestinationDetails: { * // CloudWatchLogsDetails: { * // LogGroup: "STRING_VALUE", * // }, * // KinesisFirehoseDetails: { * // DeliveryStream: "STRING_VALUE", * // }, * // }, * // LogFormat: "text" || "json", * // Status: "active" || "enabling" || "modifying" || "disabling" || "error", * // Message: "STRING_VALUE", * // }, * // ], * // ReplicationGroupCreateTime: new Date("TIMESTAMP"), * // DataTiering: "enabled" || "disabled", * // AutoMinorVersionUpgrade: true || false, * // NetworkType: "ipv4" || "ipv6" || "dual_stack", * // IpDiscovery: "ipv4" || "ipv6", * // TransitEncryptionMode: "preferred" || "required", * // ClusterMode: "enabled" || "disabled" || "compatible", * // Engine: "STRING_VALUE", * // }, * // }; * * ``` * * @param TestFailoverCommandInput - {@link TestFailoverCommandInput} * @returns {@link TestFailoverCommandOutput} * @see {@link TestFailoverCommandInput} for command's `input` shape. * @see {@link TestFailoverCommandOutput} for command's `response` shape. * @see {@link ElastiCacheClientResolvedConfig | config} for ElastiCacheClient's `config` shape. * * @throws {@link APICallRateForCustomerExceededFault} (client fault) *

The customer has exceeded the allowed rate of API calls.

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

The requested cluster is not in the available state.

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

The KMS key supplied is not valid.

* * @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 InvalidReplicationGroupStateFault} (client fault) *

The requested replication group is not in the available state.

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

The node group specified by the NodeGroupId parameter could not be found. * Please verify that the node group exists and that you spelled the * NodeGroupId value correctly.

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

The specified replication group does not exist.

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

The TestFailover action is not available.

* * @throws {@link ElastiCacheServiceException} *

Base exception class for all service exceptions from ElastiCache service.

* * * @public */ export declare class TestFailoverCommand extends TestFailoverCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: TestFailoverMessage; output: TestFailoverResult; }; sdk: { input: TestFailoverCommandInput; output: TestFailoverCommandOutput; }; }; }