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.
-
#placement ⇒ Google::Apis::BatchV1::PlacementPolicy
PlacementPolicy describes a group placement policy for the VMs controlled by this AllocationPolicy.
-
#service_account ⇒ Google::Apis::BatchV1::ServiceAccount
Carries information about a Google Cloud service account.
-
#tags ⇒ Array<String>
Optional.
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.
650 651 652 |
# File 'lib/google/apis/batch_v1/classes.rb', line 650 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
611 612 613 |
# File 'lib/google/apis/batch_v1/classes.rb', line 611 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
620 621 622 |
# File 'lib/google/apis/batch_v1/classes.rb', line 620 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
625 626 627 |
# File 'lib/google/apis/batch_v1/classes.rb', line 625 def location @location end |
#network ⇒ Google::Apis::BatchV1::NetworkPolicy
NetworkPolicy describes VM instance network configurations.
Corresponds to the JSON property network
630 631 632 |
# File 'lib/google/apis/batch_v1/classes.rb', line 630 def network @network end |
#placement ⇒ Google::Apis::BatchV1::PlacementPolicy
PlacementPolicy describes a group placement policy for the VMs controlled by
this AllocationPolicy.
Corresponds to the JSON property placement
636 637 638 |
# File 'lib/google/apis/batch_v1/classes.rb', line 636 def placement @placement end |
#service_account ⇒ Google::Apis::BatchV1::ServiceAccount
Carries information about a Google Cloud service account.
Corresponds to the JSON property serviceAccount
641 642 643 |
# File 'lib/google/apis/batch_v1/classes.rb', line 641 def service_account @service_account end |
#tags ⇒ Array<String>
Optional. Tags applied to the VM instances. The tags identify valid sources or
targets for network firewalls. Each tag must be 1-63 characters long, and
comply with RFC1035.
Corresponds to the JSON property tags
648 649 650 |
# File 'lib/google/apis/batch_v1/classes.rb', line 648 def @tags end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
655 656 657 658 659 660 661 662 663 |
# File 'lib/google/apis/batch_v1/classes.rb', line 655 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) @placement = args[:placement] if args.key?(:placement) @service_account = args[:service_account] if args.key?(:service_account) @tags = args[:tags] if args.key?(:tags) end |