Class: Google::Apis::DataprocV1::AutoscalingPolicy
- Inherits:
-
Object
- Object
- Google::Apis::DataprocV1::AutoscalingPolicy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/dataproc_v1/classes.rb,
lib/google/apis/dataproc_v1/representations.rb,
lib/google/apis/dataproc_v1/representations.rb
Overview
Describes an autoscaling policy for Dataproc cluster autoscaler.
Instance Attribute Summary collapse
-
#basic_algorithm ⇒ Google::Apis::DataprocV1::BasicAutoscalingAlgorithm
Basic algorithm for autoscaling.
-
#id ⇒ String
Required.
-
#labels ⇒ Hash<String,String>
Optional.
-
#name ⇒ String
Output only.
-
#secondary_worker_config ⇒ Google::Apis::DataprocV1::InstanceGroupAutoscalingPolicyConfig
Configuration for the size bounds of an instance group, including its proportional size to other groups.
-
#worker_config ⇒ Google::Apis::DataprocV1::InstanceGroupAutoscalingPolicyConfig
Configuration for the size bounds of an instance group, including its proportional size to other groups.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AutoscalingPolicy
constructor
A new instance of AutoscalingPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AutoscalingPolicy
Returns a new instance of AutoscalingPolicy.
739 740 741 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 739 def initialize(**args) update!(**args) end |
Instance Attribute Details
#basic_algorithm ⇒ Google::Apis::DataprocV1::BasicAutoscalingAlgorithm
Basic algorithm for autoscaling.
Corresponds to the JSON property basicAlgorithm
697 698 699 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 697 def basic_algorithm @basic_algorithm end |
#id ⇒ String
Required. The policy id.The id must contain only letters (a-z, A-Z), numbers (
0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or
hyphen. Must consist of between 3 and 50 characters.
Corresponds to the JSON property id
704 705 706 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 704 def id @id end |
#labels ⇒ Hash<String,String>
Optional. The labels to associate with this autoscaling policy. Label keys
must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.
ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must
contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/
rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling
policy.
Corresponds to the JSON property labels
714 715 716 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 714 def labels @labels end |
#name ⇒ String
Output only. The "resource name" of the autoscaling policy, as described in
https://cloud.google.com/apis/design/resource_names. For projects.regions.
autoscalingPolicies, the resource name of the policy has the following format:
projects/project_id
/regions/region
/autoscalingPolicies/policy_id
For
projects.locations.autoscalingPolicies, the resource name of the policy has
the following format: projects/project_id
/locations/location
/
autoscalingPolicies/policy_id
Corresponds to the JSON property name
725 726 727 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 725 def name @name end |
#secondary_worker_config ⇒ Google::Apis::DataprocV1::InstanceGroupAutoscalingPolicyConfig
Configuration for the size bounds of an instance group, including its
proportional size to other groups.
Corresponds to the JSON property secondaryWorkerConfig
731 732 733 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 731 def secondary_worker_config @secondary_worker_config end |
#worker_config ⇒ Google::Apis::DataprocV1::InstanceGroupAutoscalingPolicyConfig
Configuration for the size bounds of an instance group, including its
proportional size to other groups.
Corresponds to the JSON property workerConfig
737 738 739 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 737 def worker_config @worker_config end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
744 745 746 747 748 749 750 751 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 744 def update!(**args) @basic_algorithm = args[:basic_algorithm] if args.key?(:basic_algorithm) @id = args[:id] if args.key?(:id) @labels = args[:labels] if args.key?(:labels) @name = args[:name] if args.key?(:name) @secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config) @worker_config = args[:worker_config] if args.key?(:worker_config) end |