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

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AutoscalingPolicy

Returns a new instance of AutoscalingPolicy.



815
816
817
# File 'lib/google/apis/dataproc_v1/classes.rb', line 815

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

Instance Attribute Details

#basic_algorithmGoogle::Apis::DataprocV1::BasicAutoscalingAlgorithm

Basic algorithm for autoscaling. Corresponds to the JSON property basicAlgorithm



767
768
769
# File 'lib/google/apis/dataproc_v1/classes.rb', line 767

def basic_algorithm
  @basic_algorithm
end

#cluster_typeString

Optional. The type of the clusters for which this autoscaling policy is to be configured. Corresponds to the JSON property clusterType

Returns:

  • (String)


773
774
775
# File 'lib/google/apis/dataproc_v1/classes.rb', line 773

def cluster_type
  @cluster_type
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)


780
781
782
# File 'lib/google/apis/dataproc_v1/classes.rb', line 780

def id
  @id
end

#labelsHash<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

Returns:

  • (Hash<String,String>)


790
791
792
# File 'lib/google/apis/dataproc_v1/classes.rb', line 790

def labels
  @labels
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)


801
802
803
# File 'lib/google/apis/dataproc_v1/classes.rb', line 801

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



807
808
809
# File 'lib/google/apis/dataproc_v1/classes.rb', line 807

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



813
814
815
# File 'lib/google/apis/dataproc_v1/classes.rb', line 813

def worker_config
  @worker_config
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



820
821
822
823
824
825
826
827
828
# File 'lib/google/apis/dataproc_v1/classes.rb', line 820

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