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

Dynamically decreases the number of replicas in a Valkey or Redis OSS (cluster mode disabled) * replication group or the number of replica nodes in one or more node groups (shards) of * a Valkey or Redis OSS (cluster mode enabled) replication group. This operation is performed with no * cluster down time.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ElastiCacheClient, DecreaseReplicaCountCommand } from "@aws-sdk/client-elasticache"; // ES Modules import * // const { ElastiCacheClient, DecreaseReplicaCountCommand } = 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 = { // DecreaseReplicaCountMessage * ReplicationGroupId: "STRING_VALUE", // required * NewReplicaCount: Number("int"), * ReplicaConfiguration: [ // ReplicaConfigurationList * { // ConfigureShard * NodeGroupId: "STRING_VALUE", // required * NewReplicaCount: Number("int"), // required * PreferredAvailabilityZones: [ // PreferredAvailabilityZoneList * "STRING_VALUE", * ], * PreferredOutpostArns: [ // PreferredOutpostArnList * "STRING_VALUE", * ], * }, * ], * ReplicasToRemove: [ // RemoveReplicasList * "STRING_VALUE", * ], * ApplyImmediately: true || false, // required * }; * const command = new DecreaseReplicaCountCommand(input); * const response = await client.send(command); * // { // DecreaseReplicaCountResult * // 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 DecreaseReplicaCountCommandInput - {@link DecreaseReplicaCountCommandInput} * @returns {@link DecreaseReplicaCountCommandOutput} * @see {@link DecreaseReplicaCountCommandInput} for command's `input` shape. * @see {@link DecreaseReplicaCountCommandOutput} for command's `response` shape. * @see {@link ElastiCacheClientResolvedConfig | config} for ElastiCacheClient's `config` shape. * * @throws {@link ClusterQuotaForCustomerExceededFault} (client fault) *

The request cannot be processed because it would exceed the allowed number of clusters * per customer.

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

The requested cache node type is not available in the specified Availability Zone. For * more information, see InsufficientCacheClusterCapacity in the ElastiCache User Guide.

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

The requested cluster is not in the available state.

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

The VPC network is in an invalid state.

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

The request cannot be processed because it would exceed the maximum allowed number of * node groups (shards) in a single replication group. The default maximum is 90

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

The request cannot be processed because it would exceed the allowed number of cache * nodes per customer.

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

The operation was not performed because no changes were required.

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

The specified replication group does not exist.

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

The specified service linked role (SLR) was not found.

* * @throws {@link ElastiCacheServiceException} *

Base exception class for all service exceptions from ElastiCache service.

* * * @public */ export declare class DecreaseReplicaCountCommand extends DecreaseReplicaCountCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DecreaseReplicaCountMessage; output: DecreaseReplicaCountResult; }; sdk: { input: DecreaseReplicaCountCommandInput; output: DecreaseReplicaCountCommandOutput; }; }; }