lib/google/cloud/dataproc/v1/cluster_controller/client.rb in google-cloud-dataproc-v1-0.15.0 vs lib/google/cloud/dataproc/v1/cluster_controller/client.rb in google-cloud-dataproc-v1-0.16.0

- old
+ new

@@ -16,10 +16,11 @@ # Auto-generated by gapic-generator-ruby. DO NOT EDIT! require "google/cloud/errors" require "google/cloud/dataproc/v1/clusters_pb" +require "google/iam/v1" module Google module Cloud module Dataproc module V1 @@ -168,10 +169,16 @@ config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint end + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + end + @cluster_controller_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Dataproc::V1::ClusterController::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, @@ -184,10 +191,17 @@ # # @return [::Google::Cloud::Dataproc::V1::ClusterController::Operations] # attr_reader :operations_client + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + # Service calls ## # Creates a cluster in a project. The returned # {::Google::Longrunning::Operation#metadata Operation.metadata} will be @@ -249,18 +263,18 @@ # request = Google::Cloud::Dataproc::V1::CreateClusterRequest.new # # # Call the create_cluster method. # result = client.create_cluster request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def create_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -337,11 +351,11 @@ # @param cluster_name [::String] # Required. The cluster name. # @param cluster [::Google::Cloud::Dataproc::V1::Cluster, ::Hash] # Required. The changes to the cluster. # @param graceful_decommission_timeout [::Google::Protobuf::Duration, ::Hash] - # Optional. Timeout for graceful YARN decomissioning. Graceful + # Optional. Timeout for graceful YARN decommissioning. Graceful # decommissioning allows removing nodes from the cluster without # interrupting jobs in progress. Timeout specifies how long to wait for jobs # in progress to finish before forcefully removing nodes (and potentially # interrupting jobs). Default timeout is 0 (for forceful decommission), and # the maximum allowed timeout is 1 day. (see JSON representation of @@ -432,18 +446,18 @@ # request = Google::Cloud::Dataproc::V1::UpdateClusterRequest.new # # # Call the update_cluster method. # result = client.update_cluster request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def update_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -552,18 +566,18 @@ # request = Google::Cloud::Dataproc::V1::StopClusterRequest.new # # # Call the stop_cluster method. # result = client.stop_cluster request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def stop_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -672,18 +686,18 @@ # request = Google::Cloud::Dataproc::V1::StartClusterRequest.new # # # Call the start_cluster method. # result = client.start_cluster request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def start_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -794,18 +808,18 @@ # request = Google::Cloud::Dataproc::V1::DeleteClusterRequest.new # # # Call the delete_cluster method. # result = client.delete_cluster request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def delete_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1016,17 +1030,15 @@ # request = Google::Cloud::Dataproc::V1::ListClustersRequest.new # # # Call the list_clusters method. # result = client.list_clusters request # - # # The returned object is of type Gapic::PagedEnumerable. You can - # # iterate over all elements by calling #each, and the enumerable - # # will lazily make API calls to fetch subsequent pages. Other - # # methods are also available for managing paging directly. - # result.each do |response| + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| # # Each element is of type ::Google::Cloud::Dataproc::V1::Cluster. - # p response + # p item # end # def list_clusters request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? @@ -1122,17 +1134,17 @@ # request = Google::Cloud::Dataproc::V1::DiagnoseClusterRequest.new # # # Call the diagnose_cluster method. # result = client.diagnose_cluster request # - # # The returned object is of type Gapic::Operation. You can use this - # # object to check the status of an operation, cancel it, or wait - # # for results. Here is how to block until completion: + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. # result.wait_until_done! timeout: 60 # if result.response? # p result.response # else - # puts "Error!" + # puts "No response received." # end # def diagnose_cluster request, options = nil raise ::ArgumentError, "request must be provided" if request.nil?