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.



1180
1181
1182
# File 'lib/google/apis/batch_v1/classes.rb', line 1180

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. All locations end up in different regions would cause errors. For example, ["regions/us-central1", " zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] contains 2 regions "us-central1" and "us-west1". An error is expected in this case. Corresponds to the JSON property allowedLocations

Returns:

  • (Array<String>)


1178
1179
1180
# File 'lib/google/apis/batch_v1/classes.rb', line 1178

def allowed_locations
  @allowed_locations
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1185
1186
1187
# File 'lib/google/apis/batch_v1/classes.rb', line 1185

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