Class: Google::Apis::BatchV1::LocationPolicy
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::LocationPolicy
- 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
-
#allowed_locations ⇒ Array<String>
A list of location names that are allowed for the job's VMs formatted as URLs.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LocationPolicy
constructor
A new instance of LocationPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LocationPolicy
Returns a new instance of LocationPolicy.
1735 1736 1737 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1735 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allowed_locations ⇒ Array<String>
A list of location names that are allowed for the job's VMs formatted as URLs.
Each location can be a region or a zone, but you can only specify one region
or multiple zones in one region per job. For example, ["regions/us-central1"]
allow VMs in any zones in region us-central1, and ["zones/us-central1-a", "
zones/us-central1-c"] only allow VMs in zones us-central1-a and us-
central1-c. However, ["regions/us-central1", "zones/us-central1-a", "zones/
us-central1-b", "zones/us-west1-a"] causes an error because it contains
multiple regions (us-central1 and us-west1). The specified region or zones
must be in the same region in which the job is created starting on the
following dates: + For projects that have successfully submitted before July
31, 2026 at least one job that uses the allowedLocations[] field with any
region or zones outside of the job's location, the changes are starting on
June 30, 2027. + For all other projects, the changes are starting on July
31, 2026. For example, for job projects/123/locations/us-central1/jobs/jobid
, the specified region or zones must be in us-central1. Using a different
region (e.g. regions/us-west1) or a zone not in us-central1 (e.g. zones/
us-west1-a) causes an error.
Corresponds to the JSON property allowedLocations
1733 1734 1735 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1733 def allowed_locations @allowed_locations end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1740 1741 1742 |
# File 'lib/google/apis/batch_v1/classes.rb', line 1740 def update!(**args) @allowed_locations = args[:allowed_locations] if args.key?(:allowed_locations) end |