/* * 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; import com.amazonaws.AmazonWebServiceRequest; /** *
* Represents the input for a ModifyReplicationGroupShardConfiguration
operation.
*
* The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. *
*/ private String replicationGroupId; /** ** The number of node groups (shards) that results from the modification of the shard configuration. *
*/ private Integer nodeGroupCount; /** *
* Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for
* this parameter is true
.
*
* Value: true *
*/ private Boolean applyImmediately; /** *
* Specifies the preferred availability zones for each node group in the cluster. If the value of
* NodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
*
* You can specify this parameter only if the value of NodeGroupCount
is greater than the current
* number of node groups (shards).
*
* If the value of NodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRemove
* is a list of NodeGroupId
s to remove from the cluster.
*
* ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove
from the
* cluster.
*
* If the value of NodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRetain
* is a list of NodeGroupId
s to retain in the cluster.
*
* ElastiCache for Redis will attempt to remove all node groups except those listed by
* NodeGroupsToRetain
from the cluster.
*
* The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. *
* * @param replicationGroupId * The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. */ public void setReplicationGroupId(String replicationGroupId) { this.replicationGroupId = replicationGroupId; } /** ** The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. *
* * @return The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. */ public String getReplicationGroupId() { return this.replicationGroupId; } /** ** The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. *
* * @param replicationGroupId * The name of the Redis (cluster mode enabled) cluster (replication group) on which the shards are to be * configured. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyReplicationGroupShardConfigurationRequest withReplicationGroupId(String replicationGroupId) { setReplicationGroupId(replicationGroupId); return this; } /** ** The number of node groups (shards) that results from the modification of the shard configuration. *
* * @param nodeGroupCount * The number of node groups (shards) that results from the modification of the shard configuration. */ public void setNodeGroupCount(Integer nodeGroupCount) { this.nodeGroupCount = nodeGroupCount; } /** ** The number of node groups (shards) that results from the modification of the shard configuration. *
* * @return The number of node groups (shards) that results from the modification of the shard configuration. */ public Integer getNodeGroupCount() { return this.nodeGroupCount; } /** ** The number of node groups (shards) that results from the modification of the shard configuration. *
* * @param nodeGroupCount * The number of node groups (shards) that results from the modification of the shard configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyReplicationGroupShardConfigurationRequest withNodeGroupCount(Integer nodeGroupCount) { setNodeGroupCount(nodeGroupCount); return this; } /** *
* Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for
* this parameter is true
.
*
* Value: true *
* * @param applyImmediately * Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value * for this parameter istrue
.
* * Value: true */ public void setApplyImmediately(Boolean applyImmediately) { this.applyImmediately = applyImmediately; } /** *
* Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for
* this parameter is true
.
*
* Value: true *
* * @return Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value * for this parameter istrue
.
* * Value: true */ public Boolean getApplyImmediately() { return this.applyImmediately; } /** *
* Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for
* this parameter is true
.
*
* Value: true *
* * @param applyImmediately * Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value * for this parameter istrue
.
* * Value: true * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyReplicationGroupShardConfigurationRequest withApplyImmediately(Boolean applyImmediately) { setApplyImmediately(applyImmediately); return this; } /** *
* Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value for
* this parameter is true
.
*
* Value: true *
* * @return Indicates that the shard reconfiguration process begins immediately. At present, the only permitted value * for this parameter istrue
.
* * Value: true */ public Boolean isApplyImmediately() { return this.applyImmediately; } /** *
* Specifies the preferred availability zones for each node group in the cluster. If the value of
* NodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
*
* You can specify this parameter only if the value of NodeGroupCount
is greater than the current
* number of node groups (shards).
*
NodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
*
* You can specify this parameter only if the value of
* Specifies the preferred availability zones for each node group in the cluster. If the value of
*
* You can specify this parameter only if the value of NodeGroupCount
is greater than the
* current number of node groups (shards).
*/
public java.util.ListNodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
* NodeGroupCount
is greater than the current
* number of node groups (shards).
* NodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
* You can specify this parameter only if the value of
* Specifies the preferred availability zones for each node group in the cluster. If the value of
*
* You can specify this parameter only if the value of
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setReshardingConfiguration(java.util.Collection)} or
* {@link #withReshardingConfiguration(java.util.Collection)} if you want to override the existing values.
* NodeGroupCount
is greater than the
* current number of node groups (shards).
*/
public void setReshardingConfiguration(java.util.CollectionNodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
* NodeGroupCount
is greater than the current
* number of node groups (shards).
* NodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
* You can specify this parameter only if the value of
* Specifies the preferred availability zones for each node group in the cluster. If the value of
*
* You can specify this parameter only if the value of NodeGroupCount
is greater than the
* current number of node groups (shards).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyReplicationGroupShardConfigurationRequest withReshardingConfiguration(ReshardingConfiguration... reshardingConfiguration) {
if (this.reshardingConfiguration == null) {
setReshardingConfiguration(new com.amazonaws.internal.SdkInternalListNodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
* NodeGroupCount
is greater than the current
* number of node groups (shards).
* NodeGroupCount
is greater than the current number of node groups (shards), you can use this
* parameter to specify the preferred availability zones of the cluster's shards. If you omit this parameter
* ElastiCache selects availability zones for you.
* You can specify this parameter only if the value of
* If the value of
* ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupCount
is greater than the
* current number of node groups (shards).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyReplicationGroupShardConfigurationRequest withReshardingConfiguration(java.util.CollectionNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRemove
* is a list of NodeGroupId
s to remove from the cluster.
* NodeGroupsToRemove
from the
* cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRemove
is a list of NodeGroupId
s to remove from the cluster.
* ElastiCache for Redis will attempt to remove all node groups listed by
* If the value of
* ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove
* from the cluster.
*/
public java.util.ListNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRemove
* is a list of NodeGroupId
s to remove from the cluster.
* NodeGroupsToRemove
from the
* cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRemove
is a list of NodeGroupId
s to remove from the cluster.
* ElastiCache for Redis will attempt to remove all node groups listed by
* If the value of
* ElastiCache for Redis will attempt to remove all node groups listed by
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNodeGroupsToRemove(java.util.Collection)} or {@link #withNodeGroupsToRemove(java.util.Collection)} if
* you want to override the existing values.
* NodeGroupsToRemove
* from the cluster.
*/
public void setNodeGroupsToRemove(java.util.CollectionNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRemove
* is a list of NodeGroupId
s to remove from the cluster.
* NodeGroupsToRemove
from the
* cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRemove
is a list of NodeGroupId
s to remove from the cluster.
* ElastiCache for Redis will attempt to remove all node groups listed by
* If the value of
* ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove
* from the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyReplicationGroupShardConfigurationRequest withNodeGroupsToRemove(String... nodeGroupsToRemove) {
if (this.nodeGroupsToRemove == null) {
setNodeGroupsToRemove(new com.amazonaws.internal.SdkInternalListNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRemove
* is a list of NodeGroupId
s to remove from the cluster.
* NodeGroupsToRemove
from the
* cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRemove
is a list of NodeGroupId
s to remove from the cluster.
* ElastiCache for Redis will attempt to remove all node groups listed by
* If the value of
* ElastiCache for Redis will attempt to remove all node groups except those listed by
* NodeGroupsToRemove
* from the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyReplicationGroupShardConfigurationRequest withNodeGroupsToRemove(java.util.CollectionNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRetain
* is a list of NodeGroupId
s to retain in the cluster.
* NodeGroupsToRetain
from the cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRetain
is a list of NodeGroupId
s to retain in the cluster.
* ElastiCache for Redis will attempt to remove all node groups except those listed by
*
* If the value of
* ElastiCache for Redis will attempt to remove all node groups except those listed by
* NodeGroupsToRetain
from the cluster.
*/
public java.util.ListNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRetain
* is a list of NodeGroupId
s to retain in the cluster.
* NodeGroupsToRetain
from the cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRetain
is a list of NodeGroupId
s to retain in the cluster.
* ElastiCache for Redis will attempt to remove all node groups except those listed by
*
* If the value of
* ElastiCache for Redis will attempt to remove all node groups except those listed by
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNodeGroupsToRetain(java.util.Collection)} or {@link #withNodeGroupsToRetain(java.util.Collection)} if
* you want to override the existing values.
* NodeGroupsToRetain
from the cluster.
*/
public void setNodeGroupsToRetain(java.util.CollectionNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRetain
* is a list of NodeGroupId
s to retain in the cluster.
* NodeGroupsToRetain
from the cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRetain
is a list of NodeGroupId
s to retain in the cluster.
* ElastiCache for Redis will attempt to remove all node groups except those listed by
*
* If the value of
* ElastiCache for Redis will attempt to remove all node groups except those listed by
* NodeGroupsToRetain
from the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyReplicationGroupShardConfigurationRequest withNodeGroupsToRetain(String... nodeGroupsToRetain) {
if (this.nodeGroupsToRetain == null) {
setNodeGroupsToRetain(new com.amazonaws.internal.SdkInternalListNodeGroupCount
is less than the current number of node groups (shards), then either
* NodeGroupsToRemove
or NodeGroupsToRetain
is required. NodeGroupsToRetain
* is a list of NodeGroupId
s to retain in the cluster.
* NodeGroupsToRetain
from the cluster.
* NodeGroupCount
is less than the current number of node groups (shards), then
* either NodeGroupsToRemove
or NodeGroupsToRetain
is required.
* NodeGroupsToRetain
is a list of NodeGroupId
s to retain in the cluster.
* ElastiCache for Redis will attempt to remove all node groups except those listed by
* NodeGroupsToRetain
from the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyReplicationGroupShardConfigurationRequest withNodeGroupsToRetain(java.util.Collection