/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.elasticache.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Node group (shard) configuration options when adding or removing replicas. Each node group (shard) configuration has * the following members: NodeGroupId, NewReplicaCount, and PreferredAvailabilityZones. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ConfigureShard implements Serializable, Cloneable { /** ** The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication groups, the * node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a Shard's Id. *
*/ private String nodeGroupId; /** *
* The number of replicas you want in this node group at the end of this operation. The maximum value for
* NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you are
* working with.
*
* The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails) *
*
* A list of PreferredAvailabilityZone
strings that specify which availability zones the replication
* group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must equal the value of
* NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each of the
* replicas.
*
* The outpost ARNs in which the cache cluster is created. *
*/ private com.amazonaws.internal.SdkInternalList* The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication groups, the * node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a Shard's Id. *
* * @param nodeGroupId * The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication * groups, the node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) * id, see Finding a * Shard's Id. */ public void setNodeGroupId(String nodeGroupId) { this.nodeGroupId = nodeGroupId; } /** ** The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication groups, the * node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a Shard's Id. *
* * @return The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication * groups, the node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) * id, see Finding * a Shard's Id. */ public String getNodeGroupId() { return this.nodeGroupId; } /** ** The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication groups, the * node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a Shard's Id. *
* * @param nodeGroupId * The 4-digit id for the node group you are configuring. For Redis (cluster mode disabled) replication * groups, the node group id is always 0001. To find a Redis (cluster mode enabled)'s node group's (shard's) * id, see Finding a * Shard's Id. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureShard withNodeGroupId(String nodeGroupId) { setNodeGroupId(nodeGroupId); return this; } /** *
* The number of replicas you want in this node group at the end of this operation. The maximum value for
* NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you are
* working with.
*
* The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails) *
*NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you
* are working with.
* * The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node * fails) *
*
* The number of replicas you want in this node group at the end of this operation. The maximum value for
* NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you are
* working with.
*
* The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails) *
*NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you
* are working with.
* * The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary * node fails) *
*
* The number of replicas you want in this node group at the end of this operation. The maximum value for
* NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you are
* working with.
*
* The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails) *
*NewReplicaCount
is 5. The minimum value depends upon the type of Redis replication group you
* are working with.
* * The minimum number of replicas in a shard or replication group is: *
** Redis (cluster mode disabled) *
** If Multi-AZ: 1 *
** If Multi-AZ: 0 *
** Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node * fails) *
*
* A list of PreferredAvailabilityZone
strings that specify which availability zones the replication
* group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must equal the value of
* NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each of the
* replicas.
*
PreferredAvailabilityZone
strings that specify which availability zones the
* replication group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must
* equal the value of NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for
* each of the replicas.
*/
public java.util.List
* A list of PreferredAvailabilityZone
strings that specify which availability zones the replication
* group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must equal the value of
* NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each of the
* replicas.
*
PreferredAvailabilityZone
strings that specify which availability zones the
* replication group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must
* equal the value of NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each
* of the replicas.
*/
public void setPreferredAvailabilityZones(java.util.Collection
* A list of PreferredAvailabilityZone
strings that specify which availability zones the replication
* group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must equal the value of
* NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each of the
* replicas.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPreferredAvailabilityZones(java.util.Collection)} or * {@link #withPreferredAvailabilityZones(java.util.Collection)} if you want to override the existing values. *
* * @param preferredAvailabilityZones * A list ofPreferredAvailabilityZone
strings that specify which availability zones the
* replication group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must
* equal the value of NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each
* of the replicas.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigureShard withPreferredAvailabilityZones(String... preferredAvailabilityZones) {
if (this.preferredAvailabilityZones == null) {
setPreferredAvailabilityZones(new com.amazonaws.internal.SdkInternalList
* A list of PreferredAvailabilityZone
strings that specify which availability zones the replication
* group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must equal the value of
* NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each of the
* replicas.
*
PreferredAvailabilityZone
strings that specify which availability zones the
* replication group's nodes are to be in. The nummber of PreferredAvailabilityZone
values must
* equal the value of NewReplicaCount
plus 1 to account for the primary node. If this member of
* ReplicaConfiguration
is omitted, ElastiCache for Redis selects the availability zone for each
* of the replicas.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigureShard withPreferredAvailabilityZones(java.util.Collection* The outpost ARNs in which the cache cluster is created. *
* * @return The outpost ARNs in which the cache cluster is created. */ public java.util.List* The outpost ARNs in which the cache cluster is created. *
* * @param preferredOutpostArns * The outpost ARNs in which the cache cluster is created. */ public void setPreferredOutpostArns(java.util.Collection* The outpost ARNs in which the cache cluster is created. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPreferredOutpostArns(java.util.Collection)} or {@link #withPreferredOutpostArns(java.util.Collection)} * if you want to override the existing values. *
* * @param preferredOutpostArns * The outpost ARNs in which the cache cluster is created. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureShard withPreferredOutpostArns(String... preferredOutpostArns) { if (this.preferredOutpostArns == null) { setPreferredOutpostArns(new com.amazonaws.internal.SdkInternalList* The outpost ARNs in which the cache cluster is created. *
* * @param preferredOutpostArns * The outpost ARNs in which the cache cluster is created. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureShard withPreferredOutpostArns(java.util.Collection