Class: Google::Apis::BatchV1::AllocationPolicy
- Inherits:
-
Object
- Object
- Google::Apis::BatchV1::AllocationPolicy
- 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
Overview
A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.
Instance Attribute Summary collapse
-
#instances ⇒ Array<Google::Apis::BatchV1::InstancePolicyOrTemplate>
Describe instances that can be created by this AllocationPolicy.
-
#labels ⇒ Hash<String,String>
Labels applied to all VM instances and other resources created by AllocationPolicy.
-
#location ⇒ Google::Apis::BatchV1::LocationPolicy
Location where compute resources should be allocated for the Job.
-
#network ⇒ Google::Apis::BatchV1::NetworkPolicy
NetworkPolicy describes VM instance network configurations.
-
#service_account ⇒ Google::Apis::BatchV1::ServiceAccount
Carries information about a Google Cloud service account.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AllocationPolicy
constructor
A new instance of AllocationPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AllocationPolicy
Returns a new instance of AllocationPolicy.
290 291 292 |
# File 'lib/google/apis/batch_v1/classes.rb', line 290 def initialize(**args) update!(**args) end |
Instance Attribute Details
#instances ⇒ Array<Google::Apis::BatchV1::InstancePolicyOrTemplate>
Describe instances that can be created by this AllocationPolicy. Only
instances[0] is supported now.
Corresponds to the JSON property instances
264 265 266 |
# File 'lib/google/apis/batch_v1/classes.rb', line 264 def instances @instances end |
#labels ⇒ Hash<String,String>
Labels applied to all VM instances and other resources created by
AllocationPolicy. Labels could be user provided or system generated. You can
assign up to 64 labels. Google Compute Engine label restrictions apply. Label
names that start with "goog-" or "google-" are reserved.
Corresponds to the JSON property labels
273 274 275 |
# File 'lib/google/apis/batch_v1/classes.rb', line 273 def labels @labels end |
#location ⇒ Google::Apis::BatchV1::LocationPolicy
Location where compute resources should be allocated for the Job.
Corresponds to the JSON property location
278 279 280 |
# File 'lib/google/apis/batch_v1/classes.rb', line 278 def location @location end |
#network ⇒ Google::Apis::BatchV1::NetworkPolicy
NetworkPolicy describes VM instance network configurations.
Corresponds to the JSON property network
283 284 285 |
# File 'lib/google/apis/batch_v1/classes.rb', line 283 def network @network end |
#service_account ⇒ Google::Apis::BatchV1::ServiceAccount
Carries information about a Google Cloud service account.
Corresponds to the JSON property serviceAccount
288 289 290 |
# File 'lib/google/apis/batch_v1/classes.rb', line 288 def service_account @service_account end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
295 296 297 298 299 300 301 |
# File 'lib/google/apis/batch_v1/classes.rb', line 295 def update!(**args) @instances = args[:instances] if args.key?(:instances) @labels = args[:labels] if args.key?(:labels) @location = args[:location] if args.key?(:location) @network = args[:network] if args.key?(:network) @service_account = args[:service_account] if args.key?(:service_account) end |