Class: Google::Apis::DataprocV1::AutoscalingPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dataproc_v1/classes.rb,
generated/google/apis/dataproc_v1/representations.rb,
generated/google/apis/dataproc_v1/representations.rb

Overview

Describes an autoscaling policy for Dataproc cluster autoscaler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicy

Returns a new instance of AutoscalingPolicy.


124
125
126
# File 'generated/google/apis/dataproc_v1/classes.rb', line 124

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#basic_algorithmGoogle::Apis::DataprocV1::BasicAutoscalingAlgorithm

Basic algorithm for autoscaling. Corresponds to the JSON property basicAlgorithm


92
93
94
# File 'generated/google/apis/dataproc_v1/classes.rb', line 92

def basic_algorithm
  @basic_algorithm
end

#idString

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

Returns:

  • (String)

99
100
101
# File 'generated/google/apis/dataproc_v1/classes.rb', line 99

def id
  @id
end

#nameString

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

Returns:

  • (String)

110
111
112
# File 'generated/google/apis/dataproc_v1/classes.rb', line 110

def name
  @name
end

#secondary_worker_configGoogle::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


116
117
118
# File 'generated/google/apis/dataproc_v1/classes.rb', line 116

def secondary_worker_config
  @secondary_worker_config
end

#worker_configGoogle::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


122
123
124
# File 'generated/google/apis/dataproc_v1/classes.rb', line 122

def worker_config
  @worker_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


129
130
131
132
133
134
135
# File 'generated/google/apis/dataproc_v1/classes.rb', line 129

def update!(**args)
  @basic_algorithm = args[:basic_algorithm] if args.key?(:basic_algorithm)
  @id = args[:id] if args.key?(:id)
  @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