Class: Google::Apis::ComputeAlpha::ResourcePolicyGroupPlacementPolicy

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

Overview

A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourcePolicyGroupPlacementPolicy

Returns a new instance of ResourcePolicyGroupPlacementPolicy.



36644
36645
36646
# File 'lib/google/apis/compute_alpha/classes.rb', line 36644

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

Instance Attribute Details

#availability_domain_countFixnum

The number of availability domains to spread instances across. If two instances are in different availability domain, they are not in the same low latency network. Corresponds to the JSON property availabilityDomainCount

Returns:

  • (Fixnum)


36605
36606
36607
# File 'lib/google/apis/compute_alpha/classes.rb', line 36605

def availability_domain_count
  @availability_domain_count
end

#collocationString

Specifies network collocation Corresponds to the JSON property collocation

Returns:

  • (String)


36610
36611
36612
# File 'lib/google/apis/compute_alpha/classes.rb', line 36610

def collocation
  @collocation
end

#localityString

Specifies network locality Corresponds to the JSON property locality

Returns:

  • (String)


36615
36616
36617
# File 'lib/google/apis/compute_alpha/classes.rb', line 36615

def locality
  @locality
end

#max_distanceFixnum

Specifies the number of max logical switches. Corresponds to the JSON property maxDistance

Returns:

  • (Fixnum)


36620
36621
36622
# File 'lib/google/apis/compute_alpha/classes.rb', line 36620

def max_distance
  @max_distance
end

#scopeString

Scope specifies the availability domain to which the VMs should be spread. Corresponds to the JSON property scope

Returns:

  • (String)


36625
36626
36627
# File 'lib/google/apis/compute_alpha/classes.rb', line 36625

def scope
  @scope
end

#styleString

Specifies instances to hosts placement relationship Corresponds to the JSON property style

Returns:

  • (String)


36630
36631
36632
# File 'lib/google/apis/compute_alpha/classes.rb', line 36630

def style
  @style
end

#tpu_topologyString

Specifies the shape of the TPU slice Corresponds to the JSON property tpuTopology

Returns:

  • (String)


36635
36636
36637
# File 'lib/google/apis/compute_alpha/classes.rb', line 36635

def tpu_topology
  @tpu_topology
end

#vm_countFixnum

Number of VMs in this placement group. Google does not recommend that you use this field unless you use a compact policy and you want your policy to work only if it contains this exact number of VMs. Corresponds to the JSON property vmCount

Returns:

  • (Fixnum)


36642
36643
36644
# File 'lib/google/apis/compute_alpha/classes.rb', line 36642

def vm_count
  @vm_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
# File 'lib/google/apis/compute_alpha/classes.rb', line 36649

def update!(**args)
  @availability_domain_count = args[:availability_domain_count] if args.key?(:availability_domain_count)
  @collocation = args[:collocation] if args.key?(:collocation)
  @locality = args[:locality] if args.key?(:locality)
  @max_distance = args[:max_distance] if args.key?(:max_distance)
  @scope = args[:scope] if args.key?(:scope)
  @style = args[:style] if args.key?(:style)
  @tpu_topology = args[:tpu_topology] if args.key?(:tpu_topology)
  @vm_count = args[:vm_count] if args.key?(:vm_count)
end