Reference documentation and code samples for the AI Platform Notebooks V1beta1 API class Google::Cloud::Notebooks::V1beta1::NotebookService::Client.
Client for the NotebookService service.
API v1beta1 service for Cloud AI Platform Notebooks.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the NotebookService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all NotebookService clients ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the NotebookService 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_environment
def create_environment(request, options = nil) -> ::Gapic::Operation
def create_environment(parent: nil, environment_id: nil, environment: nil) -> ::Gapic::Operation
Creates a new Environment.
def create_environment(request, options = nil) -> ::Gapic::Operation
create_environment
via a request object, either of type
CreateEnvironmentRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::CreateEnvironmentRequest, ::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_environment(parent: nil, environment_id: nil, environment: nil) -> ::Gapic::Operation
create_environment
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. Format:
projects/{project_id}/locations/{location}
-
environment_id (::String) — Required. User-defined unique ID of this environment. The
environment_id
must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash. - environment (::Google::Cloud::Notebooks::V1beta1::Environment, ::Hash) — Required. The environment to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::CreateEnvironmentRequest.new # Call the create_environment method. result = client.create_environment 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#create_instance
def create_instance(request, options = nil) -> ::Gapic::Operation
def create_instance(parent: nil, instance_id: nil, instance: nil) -> ::Gapic::Operation
Creates a new Instance in a given project and location.
def create_instance(request, options = nil) -> ::Gapic::Operation
create_instance
via a request object, either of type
CreateInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::CreateInstanceRequest, ::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_instance(parent: nil, instance_id: nil, instance: nil) -> ::Gapic::Operation
create_instance
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. Format:
parent=projects/{project_id}/locations/{location}
- instance_id (::String) — Required. User-defined unique ID of this instance.
- instance (::Google::Cloud::Notebooks::V1beta1::Instance, ::Hash) — Required. The instance to be created.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::CreateInstanceRequest.new # Call the create_instance method. result = client.create_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_environment
def delete_environment(request, options = nil) -> ::Gapic::Operation
def delete_environment(name: nil) -> ::Gapic::Operation
Deletes a single Environment.
def delete_environment(request, options = nil) -> ::Gapic::Operation
delete_environment
via a request object, either of type
DeleteEnvironmentRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::DeleteEnvironmentRequest, ::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_environment(name: nil) -> ::Gapic::Operation
delete_environment
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. Format:
projects/{project_id}/locations/{location}/environments/{environment_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::DeleteEnvironmentRequest.new # Call the delete_environment method. result = client.delete_environment 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_instance
def delete_instance(request, options = nil) -> ::Gapic::Operation
def delete_instance(name: nil) -> ::Gapic::Operation
Deletes a single Instance.
def delete_instance(request, options = nil) -> ::Gapic::Operation
delete_instance
via a request object, either of type
DeleteInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::DeleteInstanceRequest, ::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_instance(name: nil) -> ::Gapic::Operation
delete_instance
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::DeleteInstanceRequest.new # Call the delete_instance method. result = client.delete_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#get_environment
def get_environment(request, options = nil) -> ::Google::Cloud::Notebooks::V1beta1::Environment
def get_environment(name: nil) -> ::Google::Cloud::Notebooks::V1beta1::Environment
Gets details of a single Environment.
def get_environment(request, options = nil) -> ::Google::Cloud::Notebooks::V1beta1::Environment
get_environment
via a request object, either of type
GetEnvironmentRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::GetEnvironmentRequest, ::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_environment(name: nil) -> ::Google::Cloud::Notebooks::V1beta1::Environment
get_environment
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. Format:
projects/{project_id}/locations/{location}/environments/{environment_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1beta1::Environment)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::GetEnvironmentRequest.new # Call the get_environment method. result = client.get_environment request # The returned object is of type Google::Cloud::Notebooks::V1beta1::Environment. p result
#get_instance
def get_instance(request, options = nil) -> ::Google::Cloud::Notebooks::V1beta1::Instance
def get_instance(name: nil) -> ::Google::Cloud::Notebooks::V1beta1::Instance
Gets details of a single Instance.
def get_instance(request, options = nil) -> ::Google::Cloud::Notebooks::V1beta1::Instance
get_instance
via a request object, either of type
GetInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::GetInstanceRequest, ::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_instance(name: nil) -> ::Google::Cloud::Notebooks::V1beta1::Instance
get_instance
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1beta1::Instance)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::GetInstanceRequest.new # Call the get_instance method. result = client.get_instance request # The returned object is of type Google::Cloud::Notebooks::V1beta1::Instance. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new NotebookService client object.
- (config) — Configure the NotebookService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new do |config| config.timeout = 10.0 end
#is_instance_upgradeable
def is_instance_upgradeable(request, options = nil) -> ::Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse
def is_instance_upgradeable(notebook_instance: nil) -> ::Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse
Check if a notebook instance is upgradable. Deprecated. Please consider using v1.
def is_instance_upgradeable(request, options = nil) -> ::Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse
is_instance_upgradeable
via a request object, either of type
IsInstanceUpgradeableRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableRequest, ::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 is_instance_upgradeable(notebook_instance: nil) -> ::Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse
is_instance_upgradeable
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).
-
notebook_instance (::String) — Required. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableRequest.new # Call the is_instance_upgradeable method. result = client.is_instance_upgradeable request # The returned object is of type Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse. p result
#list_environments
def list_environments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Environment>
def list_environments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Environment>
Lists environments in a project.
def list_environments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Environment>
list_environments
via a request object, either of type
ListEnvironmentsRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::ListEnvironmentsRequest, ::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_environments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Environment>
list_environments
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. Format:
projects/{project_id}/locations/{location}
- page_size (::Integer) — Maximum return size of the list call.
- page_token (::String) — A previous returned page token that can be used to continue listing from the last result.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Environment>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Environment>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::ListEnvironmentsRequest.new # Call the list_environments method. result = client.list_environments 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| # Each element is of type ::Google::Cloud::Notebooks::V1beta1::Environment. p response end
#list_instances
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Instance>
def list_instances(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Instance>
Lists instances in a given project and location.
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Instance>
list_instances
via a request object, either of type
ListInstancesRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::ListInstancesRequest, ::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_instances(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Instance>
list_instances
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. Format:
parent=projects/{project_id}/locations/{location}
- page_size (::Integer) — Maximum return size of the list call.
- page_token (::String) — A previous returned page token that can be used to continue listing from the last result.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Instance>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1beta1::Instance>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::ListInstancesRequest.new # Call the list_instances method. result = client.list_instances 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| # Each element is of type ::Google::Cloud::Notebooks::V1beta1::Instance. p response end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#operations_client
def operations_client() -> ::Google::Cloud::Notebooks::V1beta1::NotebookService::Operations
Get the associated client for long-running operations.
#register_instance
def register_instance(request, options = nil) -> ::Gapic::Operation
def register_instance(parent: nil, instance_id: nil) -> ::Gapic::Operation
Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.
def register_instance(request, options = nil) -> ::Gapic::Operation
register_instance
via a request object, either of type
RegisterInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::RegisterInstanceRequest, ::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 register_instance(parent: nil, instance_id: nil) -> ::Gapic::Operation
register_instance
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. Format:
parent=projects/{project_id}/locations/{location}
-
instance_id (::String) — Required. User defined unique ID of this instance. The
instance_id
must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::RegisterInstanceRequest.new # Call the register_instance method. result = client.register_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#report_instance_info
def report_instance_info(request, options = nil) -> ::Gapic::Operation
def report_instance_info(name: nil, vm_id: nil, metadata: nil) -> ::Gapic::Operation
Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.
def report_instance_info(request, options = nil) -> ::Gapic::Operation
report_instance_info
via a request object, either of type
ReportInstanceInfoRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::ReportInstanceInfoRequest, ::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 report_instance_info(name: nil, vm_id: nil, metadata: nil) -> ::Gapic::Operation
report_instance_info
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- vm_id (::String) — Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- metadata (::Hash{::String => ::String}) — The metadata reported to Notebooks API. This will be merged to the instance metadata store
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::ReportInstanceInfoRequest.new # Call the report_instance_info method. result = client.report_instance_info 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#reset_instance
def reset_instance(request, options = nil) -> ::Gapic::Operation
def reset_instance(name: nil) -> ::Gapic::Operation
Resets a notebook instance.
def reset_instance(request, options = nil) -> ::Gapic::Operation
reset_instance
via a request object, either of type
ResetInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::ResetInstanceRequest, ::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 reset_instance(name: nil) -> ::Gapic::Operation
reset_instance
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::ResetInstanceRequest.new # Call the reset_instance method. result = client.reset_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#set_instance_accelerator
def set_instance_accelerator(request, options = nil) -> ::Gapic::Operation
def set_instance_accelerator(name: nil, type: nil, core_count: nil) -> ::Gapic::Operation
Updates the guest accelerators of a single Instance.
def set_instance_accelerator(request, options = nil) -> ::Gapic::Operation
set_instance_accelerator
via a request object, either of type
SetInstanceAcceleratorRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::SetInstanceAcceleratorRequest, ::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 set_instance_accelerator(name: nil, type: nil, core_count: nil) -> ::Gapic::Operation
set_instance_accelerator
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- type (::Google::Cloud::Notebooks::V1beta1::Instance::AcceleratorType) — Required. Type of this accelerator.
-
core_count (::Integer) — Required. Count of cores of this accelerator. Note that not all combinations
of
type
andcore_count
are valid. Check GPUs on Compute Engine to find a valid combination. TPUs are not supported.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::SetInstanceAcceleratorRequest.new # Call the set_instance_accelerator method. result = client.set_instance_accelerator 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#set_instance_labels
def set_instance_labels(request, options = nil) -> ::Gapic::Operation
def set_instance_labels(name: nil, labels: nil) -> ::Gapic::Operation
Updates the labels of an Instance.
def set_instance_labels(request, options = nil) -> ::Gapic::Operation
set_instance_labels
via a request object, either of type
SetInstanceLabelsRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::SetInstanceLabelsRequest, ::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 set_instance_labels(name: nil, labels: nil) -> ::Gapic::Operation
set_instance_labels
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- labels (::Hash{::String => ::String}) — Labels to apply to this instance. These can be later modified by the setLabels method
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::SetInstanceLabelsRequest.new # Call the set_instance_labels method. result = client.set_instance_labels 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#set_instance_machine_type
def set_instance_machine_type(request, options = nil) -> ::Gapic::Operation
def set_instance_machine_type(name: nil, machine_type: nil) -> ::Gapic::Operation
Updates the machine type of a single Instance.
def set_instance_machine_type(request, options = nil) -> ::Gapic::Operation
set_instance_machine_type
via a request object, either of type
SetInstanceMachineTypeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::SetInstanceMachineTypeRequest, ::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 set_instance_machine_type(name: nil, machine_type: nil) -> ::Gapic::Operation
set_instance_machine_type
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- machine_type (::String) — Required. The Compute Engine machine type.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::SetInstanceMachineTypeRequest.new # Call the set_instance_machine_type method. result = client.set_instance_machine_type 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#start_instance
def start_instance(request, options = nil) -> ::Gapic::Operation
def start_instance(name: nil) -> ::Gapic::Operation
Starts a notebook instance.
def start_instance(request, options = nil) -> ::Gapic::Operation
start_instance
via a request object, either of type
StartInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::StartInstanceRequest, ::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 start_instance(name: nil) -> ::Gapic::Operation
start_instance
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::StartInstanceRequest.new # Call the start_instance method. result = client.start_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#stop_instance
def stop_instance(request, options = nil) -> ::Gapic::Operation
def stop_instance(name: nil) -> ::Gapic::Operation
Stops a notebook instance.
def stop_instance(request, options = nil) -> ::Gapic::Operation
stop_instance
via a request object, either of type
StopInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::StopInstanceRequest, ::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 stop_instance(name: nil) -> ::Gapic::Operation
stop_instance
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::StopInstanceRequest.new # Call the stop_instance method. result = client.stop_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#upgrade_instance
def upgrade_instance(request, options = nil) -> ::Gapic::Operation
def upgrade_instance(name: nil) -> ::Gapic::Operation
Upgrades a notebook instance to the latest version. Deprecated. Please consider using v1.
def upgrade_instance(request, options = nil) -> ::Gapic::Operation
upgrade_instance
via a request object, either of type
UpgradeInstanceRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::UpgradeInstanceRequest, ::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 upgrade_instance(name: nil) -> ::Gapic::Operation
upgrade_instance
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::UpgradeInstanceRequest.new # Call the upgrade_instance method. result = client.upgrade_instance 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#upgrade_instance_internal
def upgrade_instance_internal(request, options = nil) -> ::Gapic::Operation
def upgrade_instance_internal(name: nil, vm_id: nil) -> ::Gapic::Operation
Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly. Deprecated. Please consider using v1.
def upgrade_instance_internal(request, options = nil) -> ::Gapic::Operation
upgrade_instance_internal
via a request object, either of type
UpgradeInstanceInternalRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1beta1::UpgradeInstanceInternalRequest, ::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 upgrade_instance_internal(name: nil, vm_id: nil) -> ::Gapic::Operation
upgrade_instance_internal
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. Format:
projects/{project_id}/locations/{location}/instances/{instance_id}
- vm_id (::String) — Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/notebooks/v1beta1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1beta1::UpgradeInstanceInternalRequest.new # Call the upgrade_instance_internal method. result = client.upgrade_instance_internal 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: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end