ConfigureShard
import "github.com/aws/aws-sdk-go/service/elasticache"
type ConfigureShard struct { NewReplicaCount *int64 `type:"integer" required:"true"` NodeGroupId *string `min:"1" type:"string" required:"true"` PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` }
Node group (shard) configuration options when adding or removing replicas. Each node group (shard) configuration has the following members: NodeGroupId, NewReplicaCount, and PreferredAvailabilityZones.
- NewReplicaCount
-
Type:
*int64
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 with Automatic Failover is enabled: 1
If Multi-AZ with Automatic Failover is not enable: 0
-
Redis (cluster mode enabled): 0 (though you will not be able to failover to a replica if your primary node fails)
NewReplicaCount is a required field
-
- NodeGroupId
-
Type:
*string
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 (https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html).
NodeGroupId is a required field
- PreferredAvailabilityZones
-
Type:
[]*string
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.
Method
GoString
func (s ConfigureShard) GoString() string
GoString returns the string representation
SetNewReplicaCount
func (s *ConfigureShard) SetNewReplicaCount(v int64) *ConfigureShard
SetNewReplicaCount sets the NewReplicaCount field's value.
SetNodeGroupId
func (s *ConfigureShard) SetNodeGroupId(v string) *ConfigureShard
SetNodeGroupId sets the NodeGroupId field's value.
SetPreferredAvailabilityZones
func (s *ConfigureShard) SetPreferredAvailabilityZones(v []*string) *ConfigureShard
SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value.
String
func (s ConfigureShard) String() string
String returns the string representation
Validate
func (s *ConfigureShard) Validate() error
Validate inspects the fields of the type to determine if they are valid.