Reference documentation and code samples for the AI Platform Notebooks V1 API class Google::Cloud::Notebooks::V1::NotebookService::Client.
Client for the NotebookService service.
API v1 service for Cloud AI Platform Notebooks.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure 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::V1::NotebookService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure 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::OperationCreates a new Environment.
def create_environment(request, options = nil) -> ::Gapic::Operationcreate_environment via a request object, either of type CreateEnvironmentRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationcreate_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_idmust 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::V1::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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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_execution
def create_execution(request, options = nil) -> ::Gapic::Operation def create_execution(parent: nil, execution_id: nil, execution: nil) -> ::Gapic::OperationCreates a new Execution in a given project and location.
def create_execution(request, options = nil) -> ::Gapic::Operationcreate_execution via a request object, either of type CreateExecutionRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::CreateExecutionRequest, ::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_execution(parent: nil, execution_id: nil, execution: nil) -> ::Gapic::Operationcreate_execution 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} - execution_id (::String) — Required. User-defined unique ID of this execution.
- execution (::Google::Cloud::Notebooks::V1::Execution, ::Hash) — Required. The execution 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::CreateExecutionRequest.new # Call the create_execution method. result = client.create_execution 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::OperationCreates a new Instance in a given project and location.
def create_instance(request, options = nil) -> ::Gapic::Operationcreate_instance via a request object, either of type CreateInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationcreate_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::V1::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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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
#create_schedule
def create_schedule(request, options = nil) -> ::Gapic::Operation def create_schedule(parent: nil, schedule_id: nil, schedule: nil) -> ::Gapic::OperationCreates a new Scheduled Notebook in a given project and location.
def create_schedule(request, options = nil) -> ::Gapic::Operationcreate_schedule via a request object, either of type CreateScheduleRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::CreateScheduleRequest, ::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_schedule(parent: nil, schedule_id: nil, schedule: nil) -> ::Gapic::Operationcreate_schedule 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} - schedule_id (::String) — Required. User-defined unique ID of this schedule.
- schedule (::Google::Cloud::Notebooks::V1::Schedule, ::Hash) — Required. The schedule 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::CreateScheduleRequest.new # Call the create_schedule method. result = client.create_schedule 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::OperationDeletes a single Environment.
def delete_environment(request, options = nil) -> ::Gapic::Operationdelete_environment via a request object, either of type DeleteEnvironmentRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationdelete_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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_execution
def delete_execution(request, options = nil) -> ::Gapic::Operation def delete_execution(name: nil) -> ::Gapic::OperationDeletes execution
def delete_execution(request, options = nil) -> ::Gapic::Operationdelete_execution via a request object, either of type DeleteExecutionRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::DeleteExecutionRequest, ::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_execution(name: nil) -> ::Gapic::Operationdelete_execution 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}/executions/{execution_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::DeleteExecutionRequest.new # Call the delete_execution method. result = client.delete_execution 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::OperationDeletes a single Instance.
def delete_instance(request, options = nil) -> ::Gapic::Operationdelete_instance via a request object, either of type DeleteInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationdelete_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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
#delete_schedule
def delete_schedule(request, options = nil) -> ::Gapic::Operation def delete_schedule(name: nil) -> ::Gapic::OperationDeletes schedule and all underlying jobs
def delete_schedule(request, options = nil) -> ::Gapic::Operationdelete_schedule via a request object, either of type DeleteScheduleRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::DeleteScheduleRequest, ::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_schedule(name: nil) -> ::Gapic::Operationdelete_schedule 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}/schedules/{schedule_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::DeleteScheduleRequest.new # Call the delete_schedule method. result = client.delete_schedule 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::V1::Environment def get_environment(name: nil) -> ::Google::Cloud::Notebooks::V1::EnvironmentGets details of a single Environment.
def get_environment(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Environmentget_environment via a request object, either of type GetEnvironmentRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::V1::Environmentget_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::V1::Environment)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::GetEnvironmentRequest.new # Call the get_environment method. result = client.get_environment request # The returned object is of type Google::Cloud::Notebooks::V1::Environment. p result
#get_execution
def get_execution(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Execution def get_execution(name: nil) -> ::Google::Cloud::Notebooks::V1::ExecutionGets details of executions
def get_execution(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Executionget_execution via a request object, either of type GetExecutionRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::GetExecutionRequest, ::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_execution(name: nil) -> ::Google::Cloud::Notebooks::V1::Executionget_execution 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}/executions/{execution_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1::Execution)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::GetExecutionRequest.new # Call the get_execution method. result = client.get_execution request # The returned object is of type Google::Cloud::Notebooks::V1::Execution. p result
#get_instance
def get_instance(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Instance def get_instance(name: nil) -> ::Google::Cloud::Notebooks::V1::InstanceGets details of a single Instance.
def get_instance(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Instanceget_instance via a request object, either of type GetInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::V1::Instanceget_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::V1::Instance)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::GetInstanceRequest.new # Call the get_instance method. result = client.get_instance request # The returned object is of type Google::Cloud::Notebooks::V1::Instance. p result
#get_instance_health
def get_instance_health(request, options = nil) -> ::Google::Cloud::Notebooks::V1::GetInstanceHealthResponse def get_instance_health(name: nil) -> ::Google::Cloud::Notebooks::V1::GetInstanceHealthResponseCheck if a notebook instance is healthy.
def get_instance_health(request, options = nil) -> ::Google::Cloud::Notebooks::V1::GetInstanceHealthResponseget_instance_health via a request object, either of type GetInstanceHealthRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::GetInstanceHealthRequest, ::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_health(name: nil) -> ::Google::Cloud::Notebooks::V1::GetInstanceHealthResponseget_instance_health 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::V1::GetInstanceHealthResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::GetInstanceHealthRequest.new # Call the get_instance_health method. result = client.get_instance_health request # The returned object is of type Google::Cloud::Notebooks::V1::GetInstanceHealthResponse. p result
#get_schedule
def get_schedule(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Schedule def get_schedule(name: nil) -> ::Google::Cloud::Notebooks::V1::ScheduleGets details of schedule
def get_schedule(request, options = nil) -> ::Google::Cloud::Notebooks::V1::Scheduleget_schedule via a request object, either of type GetScheduleRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::GetScheduleRequest, ::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_schedule(name: nil) -> ::Google::Cloud::Notebooks::V1::Scheduleget_schedule 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}/schedules/{schedule_id}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1::Schedule)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::GetScheduleRequest.new # Call the get_schedule method. result = client.get_schedule request # The returned object is of type Google::Cloud::Notebooks::V1::Schedule. p result
#initialize
def initialize() { |config| ... } -> ClientCreate 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::V1::NotebookService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Notebooks::V1::NotebookService::Client.new do |config| config.timeout = 10.0 end
#is_instance_upgradeable
def is_instance_upgradeable(request, options = nil) -> ::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponse def is_instance_upgradeable(notebook_instance: nil, type: nil) -> ::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponseCheck if a notebook instance is upgradable.
def is_instance_upgradeable(request, options = nil) -> ::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponseis_instance_upgradeable via a request object, either of type IsInstanceUpgradeableRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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, type: nil) -> ::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponseis_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} - type (::Google::Cloud::Notebooks::V1::UpgradeType) — Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::IsInstanceUpgradeableRequest.new # Call the is_instance_upgradeable method. result = client.is_instance_upgradeable request # The returned object is of type Google::Cloud::Notebooks::V1::IsInstanceUpgradeableResponse. p result
#list_environments
def list_environments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Environment> def list_environments(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Environment>Lists environments in a project.
def list_environments(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Environment>list_environments via a request object, either of type ListEnvironmentsRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::V1::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::V1::Environment>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Environment>)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::V1::Environment. p response end
#list_executions
def list_executions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Execution> def list_executions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Execution>Lists executions in a given project and location
def list_executions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Execution>list_executions via a request object, either of type ListExecutionsRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::ListExecutionsRequest, ::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_executions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Execution>list_executions 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.
- filter (::String) — Filter applied to resulting executions. Currently only supports filtering executions by a specified schedule_id. Format:
schedule_id=<Schedule_ID> - order_by (::String) — Sort by field.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Execution>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Execution>)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::ListExecutionsRequest.new # Call the list_executions method. result = client.list_executions 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::V1::Execution. p response end
#list_instances
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Instance> def list_instances(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Instance>Lists instances in a given project and location.
def list_instances(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Instance>list_instances via a request object, either of type ListInstancesRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::V1::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::V1::Instance>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Instance>)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::V1::Instance. p response end
#list_schedules
def list_schedules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Schedule> def list_schedules(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Schedule>Lists schedules in a given project and location.
def list_schedules(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Schedule>list_schedules via a request object, either of type ListSchedulesRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::ListSchedulesRequest, ::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_schedules(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Schedule>list_schedules 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.
- filter (::String) — Filter applied to resulting schedules.
- order_by (::String) — Field to order results by.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Schedule>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Notebooks::V1::Schedule>)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::ListSchedulesRequest.new # Call the list_schedules method. result = client.list_schedules 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::V1::Schedule. p response end
#operations_client
def operations_client() -> ::Google::Cloud::Notebooks::V1::NotebookService::OperationsGet 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::OperationRegisters 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::Operationregister_instance via a request object, either of type RegisterInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationregister_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_idmust 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::OperationAllows 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::Operationreport_instance_info via a request object, either of type ReportInstanceInfoRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationreport_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::OperationResets a notebook instance.
def reset_instance(request, options = nil) -> ::Gapic::Operationreset_instance via a request object, either of type ResetInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationreset_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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
#rollback_instance
def rollback_instance(request, options = nil) -> ::Gapic::Operation def rollback_instance(name: nil, target_snapshot: nil) -> ::Gapic::OperationRollbacks a notebook instance to the previous version.
def rollback_instance(request, options = nil) -> ::Gapic::Operationrollback_instance via a request object, either of type RollbackInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::RollbackInstanceRequest, ::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 rollback_instance(name: nil, target_snapshot: nil) -> ::Gapic::Operationrollback_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} - target_snapshot (::String) — Required. The snapshot for rollback. Example: "projects/test-project/global/snapshots/krwlzipynril".
- (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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::RollbackInstanceRequest.new # Call the rollback_instance method. result = client.rollback_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::OperationUpdates the guest accelerators of a single Instance.
def set_instance_accelerator(request, options = nil) -> ::Gapic::Operationset_instance_accelerator via a request object, either of type SetInstanceAcceleratorRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationset_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::V1::Instance::AcceleratorType) — Required. Type of this accelerator.
- core_count (::Integer) — Required. Count of cores of this accelerator. Note that not all combinations of
typeandcore_countare 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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::OperationReplaces all the labels of an Instance.
def set_instance_labels(request, options = nil) -> ::Gapic::Operationset_instance_labels via a request object, either of type SetInstanceLabelsRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationset_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::OperationUpdates the machine type of a single Instance.
def set_instance_machine_type(request, options = nil) -> ::Gapic::Operationset_instance_machine_type via a request object, either of type SetInstanceMachineTypeRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationset_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::OperationStarts a notebook instance.
def start_instance(request, options = nil) -> ::Gapic::Operationstart_instance via a request object, either of type StartInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationstart_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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::OperationStops a notebook instance.
def stop_instance(request, options = nil) -> ::Gapic::Operationstop_instance via a request object, either of type StopInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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::Operationstop_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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
#trigger_schedule
def trigger_schedule(request, options = nil) -> ::Gapic::Operation def trigger_schedule(name: nil) -> ::Gapic::OperationTriggers execution of an existing schedule.
def trigger_schedule(request, options = nil) -> ::Gapic::Operationtrigger_schedule via a request object, either of type TriggerScheduleRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::TriggerScheduleRequest, ::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 trigger_schedule(name: nil) -> ::Gapic::Operationtrigger_schedule 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:
parent=projects/{project_id}/locations/{location}/schedules/{schedule_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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::TriggerScheduleRequest.new # Call the trigger_schedule method. result = client.trigger_schedule 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
#update_instance_config
def update_instance_config(request, options = nil) -> ::Gapic::Operation def update_instance_config(name: nil, config: nil) -> ::Gapic::OperationUpdate Notebook Instance configurations.
def update_instance_config(request, options = nil) -> ::Gapic::Operationupdate_instance_config via a request object, either of type UpdateInstanceConfigRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::UpdateInstanceConfigRequest, ::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_instance_config(name: nil, config: nil) -> ::Gapic::Operationupdate_instance_config 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} - config (::Google::Cloud::Notebooks::V1::InstanceConfig, ::Hash) — The instance configurations to be updated.
- (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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::UpdateInstanceConfigRequest.new # Call the update_instance_config method. result = client.update_instance_config 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
#update_instance_metadata_items
def update_instance_metadata_items(request, options = nil) -> ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse def update_instance_metadata_items(name: nil, items: nil) -> ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponseAdd/update metadata items for an instance.
def update_instance_metadata_items(request, options = nil) -> ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponseupdate_instance_metadata_items via a request object, either of type UpdateInstanceMetadataItemsRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest, ::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_instance_metadata_items(name: nil, items: nil) -> ::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponseupdate_instance_metadata_items 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} - items (::Hash{::String => ::String}) — Metadata items to add/update for the instance.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsRequest.new # Call the update_instance_metadata_items method. result = client.update_instance_metadata_items request # The returned object is of type Google::Cloud::Notebooks::V1::UpdateInstanceMetadataItemsResponse. p result
#update_shielded_instance_config
def update_shielded_instance_config(request, options = nil) -> ::Gapic::Operation def update_shielded_instance_config(name: nil, shielded_instance_config: nil) -> ::Gapic::OperationUpdates the Shielded instance configuration of a single Instance.
def update_shielded_instance_config(request, options = nil) -> ::Gapic::Operationupdate_shielded_instance_config via a request object, either of type UpdateShieldedInstanceConfigRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::UpdateShieldedInstanceConfigRequest, ::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_shielded_instance_config(name: nil, shielded_instance_config: nil) -> ::Gapic::Operationupdate_shielded_instance_config 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} - shielded_instance_config (::Google::Cloud::Notebooks::V1::Instance::ShieldedInstanceConfig, ::Hash) — ShieldedInstance configuration to be updated.
- (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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::UpdateShieldedInstanceConfigRequest.new # Call the update_shielded_instance_config method. result = client.update_shielded_instance_config 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, type: nil) -> ::Gapic::OperationUpgrades a notebook instance to the latest version.
def upgrade_instance(request, options = nil) -> ::Gapic::Operationupgrade_instance via a request object, either of type UpgradeInstanceRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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, type: nil) -> ::Gapic::Operationupgrade_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} - type (::Google::Cloud::Notebooks::V1::UpgradeType) — Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.
- (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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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, type: nil) -> ::Gapic::OperationAllows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.
def upgrade_instance_internal(request, options = nil) -> ::Gapic::Operationupgrade_instance_internal via a request object, either of type UpgradeInstanceInternalRequest or an equivalent Hash. - request (::Google::Cloud::Notebooks::V1::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, type: nil) -> ::Gapic::Operationupgrade_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
- type (::Google::Cloud::Notebooks::V1::UpgradeType) — Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.
- (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/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Notebooks::V1::NotebookService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Notebooks::V1::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