Class: Google::Apis::BatchV1::LocationPolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LocationPolicy

Returns a new instance of LocationPolicy.



1688
1689
1690
# File 'lib/google/apis/batch_v1/classes.rb', line 1688

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

Instance Attribute Details

#allowed_locationsArray<String>

A list of allowed location names represented by internal URLs. Each location can be a region or a zone. Only one region or multiple zones in one region is supported now. For example, ["regions/us-central1"] allow VMs in any zones in region us-central1. ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and us-central1-c. Mixing locations from different regions would cause errors. For example, ["regions/us-central1", "zones/us- central1-a", "zones/us-central1-b", "zones/us-west1-a"] contains locations from two distinct regions: us-central1 and us-west1. This combination will trigger an error. Corresponds to the JSON property allowedLocations

Returns:

  • (Array<String>)


1686
1687
1688
# File 'lib/google/apis/batch_v1/classes.rb', line 1686

def allowed_locations
  @allowed_locations
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1693
1694
1695
# File 'lib/google/apis/batch_v1/classes.rb', line 1693

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