# Cloud Dataproc V1beta2 API - Class Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy (v0.6.3)

Reference documentation and code samples for the Cloud Dataproc V1beta2 API class Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy.

Describes an autoscaling policy for Dataproc cluster autoscaler.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #basic_algorithm

    def basic_algorithm() -> ::Google::Cloud::Dataproc::V1beta2::BasicAutoscalingAlgorithm

**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::BasicAutoscalingAlgorithm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-BasicAutoscalingAlgorithm))

### #basic_algorithm=

    def basic_algorithm=(value) -> ::Google::Cloud::Dataproc::V1beta2::BasicAutoscalingAlgorithm

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1beta2::BasicAutoscalingAlgorithm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-BasicAutoscalingAlgorithm))
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::BasicAutoscalingAlgorithm](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-BasicAutoscalingAlgorithm))

### #id

    def id() -> ::String

**Returns**

- (::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.

### #id=

    def id=(value) -> ::String

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #name

    def name() -> ::String

**Returns**

- (::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}`

### #secondary_worker_config

    def secondary_worker_config() -> ::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig

**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstanceGroupAutoscalingPolicyConfig)) --- Optional. Describes how the autoscaler will operate for secondary workers.

### #secondary_worker_config=

    def secondary_worker_config=(value) -> ::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstanceGroupAutoscalingPolicyConfig)) --- Optional. Describes how the autoscaler will operate for secondary workers.
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstanceGroupAutoscalingPolicyConfig)) --- Optional. Describes how the autoscaler will operate for secondary workers.

### #worker_config

    def worker_config() -> ::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig

**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstanceGroupAutoscalingPolicyConfig)) --- Required. Describes how the autoscaler will operate for primary workers.

### #worker_config=

    def worker_config=(value) -> ::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig

**Parameter**

- **value** ([::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstanceGroupAutoscalingPolicyConfig)) --- Required. Describes how the autoscaler will operate for primary workers.
**Returns**

- ([::Google::Cloud::Dataproc::V1beta2::InstanceGroupAutoscalingPolicyConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dataproc-v1beta2/latest/Google-Cloud-Dataproc-V1beta2-InstanceGroupAutoscalingPolicyConfig)) --- Required. Describes how the autoscaler will operate for primary workers.