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.
-
#cluster_type ⇒ String
Optional.
-
#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.
951 952 953 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 951 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
903 904 905 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 903 def basic_algorithm @basic_algorithm end |
#cluster_type ⇒ String
Optional. The type of the clusters for which this autoscaling policy is to be
configured.
Corresponds to the JSON property clusterType
909 910 911 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 909 def cluster_type @cluster_type 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
916 917 918 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 916 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
926 927 928 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 926 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
937 938 939 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 937 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
943 944 945 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 943 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
949 950 951 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 949 def worker_config @worker_config end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
956 957 958 959 960 961 962 963 964 |
# File 'lib/google/apis/dataproc_v1/classes.rb', line 956 def update!(**args) @basic_algorithm = args[:basic_algorithm] if args.key?(:basic_algorithm) @cluster_type = args[:cluster_type] if args.key?(:cluster_type) @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 |