Batch V1 API - Class Google::Cloud::Batch::V1::AllocationPolicy::InstanceSelection (v1.12.0)

Reference documentation and code samples for the Batch V1 API class Google::Cloud::Batch::V1::AllocationPolicy::InstanceSelection.

Defines an instance selection for a given instance flexibility policy.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#machine_types

def machine_types() -> ::Array<::String>
Returns
  • (::Array<::String>) — Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

#machine_types=

def machine_types=(value) -> ::Array<::String>
Parameter
  • value (::Array<::String>) — Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.
Returns
  • (::Array<::String>) — Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

#rank

def rank() -> ::Integer
Returns
  • (::Integer) — Optional. Indicates the preference of this instance selection. Lower number means higher preference. First try is to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.

#rank=

def rank=(value) -> ::Integer
Parameter
  • value (::Integer) — Optional. Indicates the preference of this instance selection. Lower number means higher preference. First try is to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.
Returns
  • (::Integer) — Optional. Indicates the preference of this instance selection. Lower number means higher preference. First try is to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.