Class: Google::Apis::RedisV1beta1::ZoneDistributionConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/redis_v1beta1/classes.rb,
lib/google/apis/redis_v1beta1/representations.rb,
lib/google/apis/redis_v1beta1/representations.rb

Overview

Zone distribution config for allocation of cluster resources.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ZoneDistributionConfig

Returns a new instance of ZoneDistributionConfig.



4738
4739
4740
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 4738

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#modeString

Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not specified. Corresponds to the JSON property mode

Returns:

  • (String)


4723
4724
4725
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 4723

def mode
  @mode
end

#zoneString

Optional. When SINGLE ZONE distribution is selected, zone field would be used to allocate all resources in that zone. This is not applicable to MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. Corresponds to the JSON property zone

Returns:

  • (String)


4730
4731
4732
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 4730

def zone
  @zone
end

#zonesArray<String>

Optional. Specify the zones of a multi-zone cluster where Redis Cluster allocates resources. This flag isn't applicable for single-zone clusters. Corresponds to the JSON property zones

Returns:

  • (Array<String>)


4736
4737
4738
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 4736

def zones
  @zones
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4743
4744
4745
4746
4747
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 4743

def update!(**args)
  @mode = args[:mode] if args.key?(:mode)
  @zone = args[:zone] if args.key?(:zone)
  @zones = args[:zones] if args.key?(:zones)
end