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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
create_autoscaling_policy
via a request object, either of type
CreateAutoscalingPolicyRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::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.
def delete_autoscaling_policy(request, options = nil) -> ::Google::Protobuf::Empty
delete_autoscaling_policy
via a request object, either of type
DeleteAutoscalingPolicyRequest or an equivalent Hash.
- 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
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).
-
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}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::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.
def get_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
get_autoscaling_policy
via a request object, either of type
GetAutoscalingPolicyRequest or an equivalent Hash.
- 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
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).
-
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}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
#initialize
def initialize() { |config| ... } -> Client
Create a new AutoscalingPolicyService client object.
- (config) — Configure the AutoscalingPolicyService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# 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.
def list_autoscaling_policies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>
list_autoscaling_policies
via a request object, either of type
ListAutoscalingPoliciesRequest or an equivalent Hash.
- 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>
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy>)
- (::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.
def update_autoscaling_policy(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy
update_autoscaling_policy
via a request object, either of type
UpdateAutoscalingPolicyRequest or an equivalent Hash.
- 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
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).
- policy (::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy, ::Hash) — Required. The updated autoscaling policy.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::AutoscalingPolicy)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.