Cloud Dataproc V1beta2 API - Class Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client (v0.6.3)

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

Client for the AutoscalingPolicyService service.

The API interface for managing autoscaling policies in the Cloud Dataproc API.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the AutoscalingPolicyService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all AutoscalingPolicyService clients
::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the AutoscalingPolicyService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_autoscaling_policy

def create_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
def create_autoscaling_policy(parent: nil, policy: nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy

Creates new autoscaling policy.

Overloads
def create_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
Pass arguments to create_autoscaling_policy via a request object, either of type CreateAutoscalingPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataproc::V1beta2::CreateAutoscalingPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_autoscaling_policy(parent: nil, policy: nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
Pass arguments to create_autoscaling_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/locations/{location}

  • policy (::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy, ::Hash) — Required. The autoscaling policy to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.

#delete_autoscaling_policy

def delete_autoscaling_policy(request, options = nil) -> ::Google::Protobuf::Empty
def delete_autoscaling_policy(name: nil) -> ::Google::Protobuf::Empty

Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.

Overloads
def delete_autoscaling_policy(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_autoscaling_policy via a request object, either of type DeleteAutoscalingPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataproc::V1beta2::DeleteAutoscalingPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_autoscaling_policy(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_autoscaling_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) —

    Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}

    • For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.

#get_autoscaling_policy

def get_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
def get_autoscaling_policy(name: nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy

Retrieves autoscaling policy.

Overloads
def get_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
Pass arguments to get_autoscaling_policy via a request object, either of type GetAutoscalingPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataproc::V1beta2::GetAutoscalingPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_autoscaling_policy(name: nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
Pass arguments to get_autoscaling_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) —

    Required. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}

    • For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new AutoscalingPolicyService client object.

Yields
  • (config) — Configure the AutoscalingPolicyService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicyService::Client.new do |config|
  config.timeout = 10.0
end

#list_autoscaling_policies

def list_autoscaling_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>
def list_autoscaling_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>

Lists autoscaling policies in the project.

Overloads
def list_autoscaling_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>
Pass arguments to list_autoscaling_policies via a request object, either of type ListAutoscalingPoliciesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataproc::V1beta2::ListAutoscalingPoliciesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_autoscaling_policies(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>
Pass arguments to list_autoscaling_policies via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The "resource name" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.

    • For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region}

    • For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}

  • page_size (::Integer) — Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.
  • page_token (::String) — Optional. The page token, returned by a previous call, to request the next page of results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.

#update_autoscaling_policy

def update_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
def update_autoscaling_policy(policy: nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy

Updates (replaces) autoscaling policy.

Disabled check for update_mask, because all updates will be full replacements.

Overloads
def update_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
Pass arguments to update_autoscaling_policy via a request object, either of type UpdateAutoscalingPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataproc::V1beta2::UpdateAutoscalingPolicyRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_autoscaling_policy(policy: nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
Pass arguments to update_autoscaling_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.