Reference documentation and code samples for the Cloud Dataproc V1 API class Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.
REST client for the SessionTemplateController service.
The SessionTemplateController provides methods to manage session templates.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the SessionTemplateController Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SessionTemplateController clients ::Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the SessionTemplateController 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_session_template
def create_session_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
def create_session_template(parent: nil, session_template: nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
Create a session template synchronously.
def create_session_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
create_session_template
via a request object, either of type
CreateSessionTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::CreateSessionTemplateRequest, ::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_session_template(parent: nil, session_template: nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
create_session_template
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 parent resource where this session template will be created.
- session_template (::Google::Cloud::Dataproc::V1::SessionTemplate, ::Hash) — Required. The session template to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::SessionTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataproc/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataproc::V1::CreateSessionTemplateRequest.new # Call the create_session_template method. result = client.create_session_template request # The returned object is of type Google::Cloud::Dataproc::V1::SessionTemplate. p result
#delete_session_template
def delete_session_template(request, options = nil) -> ::Google::Protobuf::Empty
def delete_session_template(name: nil) -> ::Google::Protobuf::Empty
Deletes a session template.
def delete_session_template(request, options = nil) -> ::Google::Protobuf::Empty
delete_session_template
via a request object, either of type
DeleteSessionTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::DeleteSessionTemplateRequest, ::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_session_template(name: nil) -> ::Google::Protobuf::Empty
delete_session_template
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 name of the session template resource to delete.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataproc/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataproc::V1::DeleteSessionTemplateRequest.new # Call the delete_session_template method. result = client.delete_session_template request # The returned object is of type Google::Protobuf::Empty. p result
#get_session_template
def get_session_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
def get_session_template(name: nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
Gets the resource representation for a session template.
def get_session_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
get_session_template
via a request object, either of type
GetSessionTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::GetSessionTemplateRequest, ::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_session_template(name: nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
get_session_template
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 name of the session template to retrieve.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::SessionTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataproc/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataproc::V1::GetSessionTemplateRequest.new # Call the get_session_template method. result = client.get_session_template request # The returned object is of type Google::Cloud::Dataproc::V1::SessionTemplate. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new SessionTemplateController REST client object.
- (config) — Configure the SessionTemplateController client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new do |config| config.timeout = 10.0 end
#list_session_templates
def list_session_templates(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::SessionTemplate>
def list_session_templates(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::SessionTemplate>
Lists session templates.
def list_session_templates(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::SessionTemplate>
list_session_templates
via a request object, either of type
ListSessionTemplatesRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::ListSessionTemplatesRequest, ::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_session_templates(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::SessionTemplate>
list_session_templates
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 parent that owns this collection of session templates.
- page_size (::Integer) — Optional. The maximum number of sessions to return in each response. The service may return fewer than this value.
-
page_token (::String) — Optional. A page token received from a previous
ListSessions
call. Provide this token to retrieve the subsequent page. -
filter (::String) — Optional. A filter for the session templates to return in the response.
Filters are case sensitive and have the following syntax:
[field = value] AND [field [= value]] ...
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::SessionTemplate>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataproc::V1::SessionTemplate>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataproc/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataproc::V1::ListSessionTemplatesRequest.new # Call the list_session_templates method. result = client.list_session_templates request # 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::SessionTemplate. p item end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_session_template
def update_session_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
def update_session_template(session_template: nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
Updates the session template synchronously.
def update_session_template(request, options = nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
update_session_template
via a request object, either of type
UpdateSessionTemplateRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1::UpdateSessionTemplateRequest, ::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_session_template(session_template: nil) -> ::Google::Cloud::Dataproc::V1::SessionTemplate
update_session_template
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).
- session_template (::Google::Cloud::Dataproc::V1::SessionTemplate, ::Hash) — Required. The updated session template.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Dataproc::V1::SessionTemplate)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/dataproc/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataproc::V1::SessionTemplateController::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataproc::V1::UpdateSessionTemplateRequest.new # Call the update_session_template method. result = client.update_session_template request # The returned object is of type Google::Cloud::Dataproc::V1::SessionTemplate. p result