Reference documentation and code samples for the AI Platform Notebooks V1 API class Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.
REST client for the ManagedNotebookService service.
API v1 service for Managed Notebooks.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ManagedNotebookService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ManagedNotebookService clients ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ManagedNotebookService 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_runtime
def create_runtime(request, options = nil) -> ::Gapic::Operation
def create_runtime(parent: nil, runtime_id: nil, runtime: nil, request_id: nil) -> ::Gapic::Operation
Creates a new Runtime in a given project and location.
def create_runtime(request, options = nil) -> ::Gapic::Operation
create_runtime
via a request object, either of type
CreateRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::CreateRuntimeRequest, ::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_runtime(parent: nil, runtime_id: nil, runtime: nil, request_id: nil) -> ::Gapic::Operation
create_runtime
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}
- runtime_id (::String) — Required. User-defined unique ID of this Runtime.
- runtime (::Google::Cloud::Notebooks::V1::Runtime, ::Hash) — Required. The Runtime to be created.
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::CreateRuntimeRequest.new # Call the create_runtime method. result = client.create_runtime request # 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 "No response received." end
#delete_runtime
def delete_runtime(request, options = nil) -> ::Gapic::Operation
def delete_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single Runtime.
def delete_runtime(request, options = nil) -> ::Gapic::Operation
delete_runtime
via a request object, either of type
DeleteRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::DeleteRuntimeRequest, ::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_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
delete_runtime
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}/runtimes/{runtime_id}
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::DeleteRuntimeRequest.new # Call the delete_runtime method. result = client.delete_runtime request # 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 "No response received." end
#diagnose_runtime
def diagnose_runtime(request, options = nil) -> ::Gapic::Operation
def diagnose_runtime(name: nil, diagnostic_config: nil) -> ::Gapic::Operation
Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.
def diagnose_runtime(request, options = nil) -> ::Gapic::Operation
diagnose_runtime
via a request object, either of type
DiagnoseRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::DiagnoseRuntimeRequest, ::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 diagnose_runtime(name: nil, diagnostic_config: nil) -> ::Gapic::Operation
diagnose_runtime
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}/runtimes/{runtimes_id}
- diagnostic_config (::Google::Cloud::Notebooks::V1::DiagnosticConfig, ::Hash) — Required. Defines flags that are used to run the diagnostic tool
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::DiagnoseRuntimeRequest.new # Call the diagnose_runtime method. result = client.diagnose_runtime request # 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 "No response received." end
#get_runtime
def get_runtime(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Runtime
def get_runtime(name: nil) -> ::Google::Cloud::Notebooks::V1::Runtime
Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.
def get_runtime(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Runtime
get_runtime
via a request object, either of type
GetRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::GetRuntimeRequest, ::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_runtime(name: nil) -> ::Google::Cloud::Notebooks::V1::Runtime
get_runtime
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}/runtimes/{runtime_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Notebooks::V1::Runtime)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::GetRuntimeRequest.new # Call the get_runtime method. result = client.get_runtime request # The returned object is of type Google::Cloud::Notebooks::V1::Runtime. 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 ManagedNotebookService REST client object.
- (config) — Configure the ManagedNotebookService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_runtimes
def list_runtimes(request, options = nil) -> ::Google::Cloud::Notebooks::V1::ListRuntimesResponse
def list_runtimes(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Notebooks::V1::ListRuntimesResponse
Lists Runtimes in a given project and location.
def list_runtimes(request, options = nil) -> ::Google::Cloud::Notebooks::V1::ListRuntimesResponse
list_runtimes
via a request object, either of type
ListRuntimesRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::ListRuntimesRequest, ::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_runtimes(parent: nil, page_size: nil, page_token: nil) -> ::Google::Cloud::Notebooks::V1::ListRuntimesResponse
list_runtimes
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.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Notebooks::V1::ListRuntimesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::ListRuntimesRequest.new # Call the list_runtimes method. result = client.list_runtimes 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::Notebooks::V1::Runtime. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Operations
Get the associated client for long-running operations.
#refresh_runtime_token_internal
def refresh_runtime_token_internal(request, options = nil) -> ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse
def refresh_runtime_token_internal(name: nil, vm_id: nil) -> ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse
Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.
def refresh_runtime_token_internal(request, options = nil) -> ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse
refresh_runtime_token_internal
via a request object, either of type
RefreshRuntimeTokenInternalRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest, ::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 refresh_runtime_token_internal(name: nil, vm_id: nil) -> ::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse
refresh_runtime_token_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}/runtimes/{runtime_id}
- vm_id (::String) — Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest.new # Call the refresh_runtime_token_internal method. result = client.refresh_runtime_token_internal request # The returned object is of type Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse. p result
#report_runtime_event
def report_runtime_event(request, options = nil) -> ::Gapic::Operation
def report_runtime_event(name: nil, vm_id: nil, event: nil) -> ::Gapic::Operation
Report and process a runtime event.
def report_runtime_event(request, options = nil) -> ::Gapic::Operation
report_runtime_event
via a request object, either of type
ReportRuntimeEventRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::ReportRuntimeEventRequest, ::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_runtime_event(name: nil, vm_id: nil, event: nil) -> ::Gapic::Operation
report_runtime_event
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}/runtimes/{runtime_id}
- vm_id (::String) — Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity
- event (::Google::Cloud::Notebooks::V1::Event, ::Hash) — Required. The Event to be reported.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::ReportRuntimeEventRequest.new # Call the report_runtime_event method. result = client.report_runtime_event request # 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 "No response received." end
#reset_runtime
def reset_runtime(request, options = nil) -> ::Gapic::Operation
def reset_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
Resets a Managed Notebook Runtime.
def reset_runtime(request, options = nil) -> ::Gapic::Operation
reset_runtime
via a request object, either of type
ResetRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::ResetRuntimeRequest, ::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_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
reset_runtime
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}/runtimes/{runtime_id}
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::ResetRuntimeRequest.new # Call the reset_runtime method. result = client.reset_runtime request # 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 "No response received." end
#start_runtime
def start_runtime(request, options = nil) -> ::Gapic::Operation
def start_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
Starts a Managed Notebook Runtime. Perform "Start" on GPU instances; "Resume" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance
def start_runtime(request, options = nil) -> ::Gapic::Operation
start_runtime
via a request object, either of type
StartRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::StartRuntimeRequest, ::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_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
start_runtime
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}/runtimes/{runtime_id}
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::StartRuntimeRequest.new # Call the start_runtime method. result = client.start_runtime request # 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 "No response received." end
#stop_runtime
def stop_runtime(request, options = nil) -> ::Gapic::Operation
def stop_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
Stops a Managed Notebook Runtime. Perform "Stop" on GPU instances; "Suspend" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance
def stop_runtime(request, options = nil) -> ::Gapic::Operation
stop_runtime
via a request object, either of type
StopRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::StopRuntimeRequest, ::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_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
stop_runtime
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}/runtimes/{runtime_id}
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::StopRuntimeRequest.new # Call the stop_runtime method. result = client.stop_runtime request # 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 "No response received." end
#switch_runtime
def switch_runtime(request, options = nil) -> ::Gapic::Operation
def switch_runtime(name: nil, machine_type: nil, accelerator_config: nil, request_id: nil) -> ::Gapic::Operation
Switch a Managed Notebook Runtime.
def switch_runtime(request, options = nil) -> ::Gapic::Operation
switch_runtime
via a request object, either of type
SwitchRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::SwitchRuntimeRequest, ::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 switch_runtime(name: nil, machine_type: nil, accelerator_config: nil, request_id: nil) -> ::Gapic::Operation
switch_runtime
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}/runtimes/{runtime_id}
- machine_type (::String) — machine type.
- accelerator_config (::Google::Cloud::Notebooks::V1::RuntimeAcceleratorConfig, ::Hash) — accelerator config.
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::SwitchRuntimeRequest.new # Call the switch_runtime method. result = client.switch_runtime request # 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 "No response received." end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_runtime
def update_runtime(request, options = nil) -> ::Gapic::Operation
def update_runtime(runtime: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operation
Update Notebook Runtime configuration.
def update_runtime(request, options = nil) -> ::Gapic::Operation
update_runtime
via a request object, either of type
UpdateRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::UpdateRuntimeRequest, ::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_runtime(runtime: nil, update_mask: nil, request_id: nil) -> ::Gapic::Operation
update_runtime
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).
- runtime (::Google::Cloud::Notebooks::V1::Runtime, ::Hash) — Required. The Runtime to be updated.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) —
Required. Specifies the path, relative to
Runtime
, of the field to update. For example, to change the software configuration kernels, theupdate_mask
parameter would be specified assoftware_config.kernels
, and thePATCH
request body would specify the new value, as follows:{ "software_config":{ "kernels": [{ 'repository': 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': 'latest' }], } }
Currently, only the following fields can be updated:
software_config.kernels
software_config.post_startup_script
software_config.custom_gpu_driver_path
software_config.idle_shutdown
software_config.idle_shutdown_timeout
software_config.disable_terminal
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::UpdateRuntimeRequest.new # Call the update_runtime method. result = client.update_runtime request # 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 "No response received." end
#upgrade_runtime
def upgrade_runtime(request, options = nil) -> ::Gapic::Operation
def upgrade_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
Upgrades a Managed Notebook Runtime to the latest version.
def upgrade_runtime(request, options = nil) -> ::Gapic::Operation
upgrade_runtime
via a request object, either of type
UpgradeRuntimeRequest or an equivalent Hash.
- request (::Google::Cloud::Notebooks::V1::UpgradeRuntimeRequest, ::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_runtime(name: nil, request_id: nil) -> ::Gapic::Operation
upgrade_runtime
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}/runtimes/{runtime_id}
- request_id (::String) — Idempotent request UUID.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/notebooks/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::UpgradeRuntimeRequest.new # Call the upgrade_runtime method. result = client.upgrade_runtime request # 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 "No response received." end