Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client (v0.58.0)

Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.

REST client for the NotebookService service.

The interface for Vertex Notebook service (a.k.a. Colab on Workbench).

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the NotebookService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all NotebookService clients
::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#assign_notebook_runtime

def assign_notebook_runtime(request, options = nil) -> ::Gapic::Operation
def assign_notebook_runtime(parent: nil, notebook_runtime_template: nil, notebook_runtime: nil, notebook_runtime_id: nil) -> ::Gapic::Operation

Assigns a NotebookRuntime to a user for a particular Notebook file. This method will either returns an existing assignment or generates a new one.

Overloads
def assign_notebook_runtime(request, options = nil) -> ::Gapic::Operation
Pass arguments to assign_notebook_runtime via a request object, either of type AssignNotebookRuntimeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::AssignNotebookRuntimeRequest, ::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 assign_notebook_runtime(parent: nil, notebook_runtime_template: nil, notebook_runtime: nil, notebook_runtime_id: nil) -> ::Gapic::Operation
Pass arguments to assign_notebook_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).
Parameters
  • parent (::String) — Required. The resource name of the Location to get the NotebookRuntime assignment. Format: projects/{project}/locations/{location}
  • notebook_runtime_template (::String) — Required. The resource name of the NotebookRuntimeTemplate based on which a NotebookRuntime will be assigned (reuse or create a new one).
  • notebook_runtime (::Google::Cloud::AIPlatform::V1::NotebookRuntime, ::Hash) — Required. Provide runtime specific information (e.g. runtime owner, notebook id) used for NotebookRuntime assignment.
  • notebook_runtime_id (::String) — Optional. User specified ID for the notebook runtime.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::AssignNotebookRuntimeRequest.new

# Call the assign_notebook_runtime method.
result = client.assign_notebook_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

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the NotebookService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_notebook_execution_job

def create_notebook_execution_job(request, options = nil) -> ::Gapic::Operation
def create_notebook_execution_job(parent: nil, notebook_execution_job: nil, notebook_execution_job_id: nil) -> ::Gapic::Operation

Creates a NotebookExecutionJob.

Overloads
def create_notebook_execution_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_notebook_execution_job via a request object, either of type CreateNotebookExecutionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateNotebookExecutionJobRequest, ::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_notebook_execution_job(parent: nil, notebook_execution_job: nil, notebook_execution_job_id: nil) -> ::Gapic::Operation
Pass arguments to create_notebook_execution_job 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).
Parameters
  • parent (::String) — Required. The resource name of the Location to create the NotebookExecutionJob. Format: projects/{project}/locations/{location}
  • notebook_execution_job (::Google::Cloud::AIPlatform::V1::NotebookExecutionJob, ::Hash) — Required. The NotebookExecutionJob to create.
  • notebook_execution_job_id (::String) — Optional. User specified ID for the NotebookExecutionJob.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateNotebookExecutionJobRequest.new

# Call the create_notebook_execution_job method.
result = client.create_notebook_execution_job 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

#create_notebook_runtime_template

def create_notebook_runtime_template(request, options = nil) -> ::Gapic::Operation
def create_notebook_runtime_template(parent: nil, notebook_runtime_template: nil, notebook_runtime_template_id: nil) -> ::Gapic::Operation

Creates a NotebookRuntimeTemplate.

Overloads
def create_notebook_runtime_template(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_notebook_runtime_template via a request object, either of type CreateNotebookRuntimeTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateNotebookRuntimeTemplateRequest, ::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_notebook_runtime_template(parent: nil, notebook_runtime_template: nil, notebook_runtime_template_id: nil) -> ::Gapic::Operation
Pass arguments to create_notebook_runtime_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Location to create the NotebookRuntimeTemplate. Format: projects/{project}/locations/{location}
  • notebook_runtime_template (::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate, ::Hash) — Required. The NotebookRuntimeTemplate to create.
  • notebook_runtime_template_id (::String) — Optional. User specified ID for the notebook runtime template.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateNotebookRuntimeTemplateRequest.new

# Call the create_notebook_runtime_template method.
result = client.create_notebook_runtime_template 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_notebook_execution_job

def delete_notebook_execution_job(request, options = nil) -> ::Gapic::Operation
def delete_notebook_execution_job(name: nil) -> ::Gapic::Operation

Deletes a NotebookExecutionJob.

Overloads
def delete_notebook_execution_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_notebook_execution_job via a request object, either of type DeleteNotebookExecutionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteNotebookExecutionJobRequest, ::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_notebook_execution_job(name: nil) -> ::Gapic::Operation
Pass arguments to delete_notebook_execution_job 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).
Parameter
  • name (::String) — Required. The name of the NotebookExecutionJob resource to be deleted.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteNotebookExecutionJobRequest.new

# Call the delete_notebook_execution_job method.
result = client.delete_notebook_execution_job 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_notebook_runtime

def delete_notebook_runtime(request, options = nil) -> ::Gapic::Operation
def delete_notebook_runtime(name: nil) -> ::Gapic::Operation

Deletes a NotebookRuntime.

Overloads
def delete_notebook_runtime(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_notebook_runtime via a request object, either of type DeleteNotebookRuntimeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteNotebookRuntimeRequest, ::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_notebook_runtime(name: nil) -> ::Gapic::Operation
Pass arguments to delete_notebook_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).
Parameter
  • name (::String) — Required. The name of the NotebookRuntime resource to be deleted. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteNotebookRuntimeRequest.new

# Call the delete_notebook_runtime method.
result = client.delete_notebook_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_notebook_runtime_template

def delete_notebook_runtime_template(request, options = nil) -> ::Gapic::Operation
def delete_notebook_runtime_template(name: nil) -> ::Gapic::Operation

Deletes a NotebookRuntimeTemplate.

Overloads
def delete_notebook_runtime_template(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_notebook_runtime_template via a request object, either of type DeleteNotebookRuntimeTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteNotebookRuntimeTemplateRequest, ::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_notebook_runtime_template(name: nil) -> ::Gapic::Operation
Pass arguments to delete_notebook_runtime_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the NotebookRuntimeTemplate resource to be deleted. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteNotebookRuntimeTemplateRequest.new

# Call the delete_notebook_runtime_template method.
result = client.delete_notebook_runtime_template 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_notebook_execution_job

def get_notebook_execution_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob
def get_notebook_execution_job(name: nil, view: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob

Gets a NotebookExecutionJob.

Overloads
def get_notebook_execution_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob
Pass arguments to get_notebook_execution_job via a request object, either of type GetNotebookExecutionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetNotebookExecutionJobRequest, ::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_notebook_execution_job(name: nil, view: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob
Pass arguments to get_notebook_execution_job 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).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetNotebookExecutionJobRequest.new

# Call the get_notebook_execution_job method.
result = client.get_notebook_execution_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::NotebookExecutionJob.
p result

#get_notebook_runtime

def get_notebook_runtime(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntime
def get_notebook_runtime(name: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntime

Gets a NotebookRuntime.

Overloads
def get_notebook_runtime(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntime
Pass arguments to get_notebook_runtime via a request object, either of type GetNotebookRuntimeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetNotebookRuntimeRequest, ::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_notebook_runtime(name: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntime
Pass arguments to get_notebook_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).
Parameter
  • name (::String) — Required. The name of the NotebookRuntime resource. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetNotebookRuntimeRequest.new

# Call the get_notebook_runtime method.
result = client.get_notebook_runtime request

# The returned object is of type Google::Cloud::AIPlatform::V1::NotebookRuntime.
p result

#get_notebook_runtime_template

def get_notebook_runtime_template(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
def get_notebook_runtime_template(name: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate

Gets a NotebookRuntimeTemplate.

Overloads
def get_notebook_runtime_template(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Pass arguments to get_notebook_runtime_template via a request object, either of type GetNotebookRuntimeTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetNotebookRuntimeTemplateRequest, ::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_notebook_runtime_template(name: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Pass arguments to get_notebook_runtime_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the NotebookRuntimeTemplate resource. Format: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetNotebookRuntimeTemplateRequest.new

# Call the get_notebook_runtime_template method.
result = client.get_notebook_runtime_template request

# The returned object is of type Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate.
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.

Returns
  • (Google::Iam::V1::IAMPolicy::Rest::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new NotebookService REST client object.

Yields
  • (config) — Configure the NotebookService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_notebook_execution_jobs

def list_notebook_execution_jobs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookExecutionJob>
def list_notebook_execution_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookExecutionJob>

Lists NotebookExecutionJobs in a Location.

Overloads
def list_notebook_execution_jobs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookExecutionJob>
Pass arguments to list_notebook_execution_jobs via a request object, either of type ListNotebookExecutionJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListNotebookExecutionJobsRequest, ::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_notebook_execution_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, view: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookExecutionJob>
Pass arguments to list_notebook_execution_jobs 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).
Parameters
  • parent (::String) — Required. The resource name of the Location from which to list the NotebookExecutionJobs. Format: projects/{project}/locations/{location}
  • filter (::String) —

    Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.

    • notebookExecutionJob supports = and !=. notebookExecutionJob represents the NotebookExecutionJob ID.
    • displayName supports = and != and regex.
    • schedule supports = and != and regex.

    Some examples:

    • notebookExecutionJob="123"
    • notebookExecutionJob="my-execution-job"
    • displayName="myDisplayName" and displayName=~"myDisplayNameRegex"
  • page_size (::Integer) — Optional. The standard list page size.
  • page_token (::String) — Optional. The standard list page token. Typically obtained via ListNotebookExecutionJobsResponse.next_page_token of the previous NotebookService.ListNotebookExecutionJobs call.
  • order_by (::String) — Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields:

    • display_name
    • create_time
    • update_time

    Example: display_name, create_time desc.

  • view (::Google::Cloud::AIPlatform::V1::NotebookExecutionJobView) — Optional. The NotebookExecutionJob view. Defaults to BASIC.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListNotebookExecutionJobsRequest.new

# Call the list_notebook_execution_jobs method.
result = client.list_notebook_execution_jobs 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::AIPlatform::V1::NotebookExecutionJob.
  p item
end

#list_notebook_runtime_templates

def list_notebook_runtime_templates(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate>
def list_notebook_runtime_templates(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate>

Lists NotebookRuntimeTemplates in a Location.

Overloads
def list_notebook_runtime_templates(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate>
Pass arguments to list_notebook_runtime_templates via a request object, either of type ListNotebookRuntimeTemplatesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListNotebookRuntimeTemplatesRequest, ::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_notebook_runtime_templates(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate>
Pass arguments to list_notebook_runtime_templates via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Location from which to list the NotebookRuntimeTemplates. Format: projects/{project}/locations/{location}
  • filter (::String) —

    Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.

    • notebookRuntimeTemplate supports = and !=. notebookRuntimeTemplate represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's [resource name] [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
    • display_name supports = and !=
    • labels supports general map functions that is:
      • labels.key=value - key:value equality
      • `labels.key:* or labels:key - key existence
      • A key including a space must be quoted. labels."a key".
    • notebookRuntimeType supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK].

    Some examples:

    • notebookRuntimeTemplate=notebookRuntimeTemplate123
    • displayName="myDisplayName"
    • labels.myKey="myValue"
    • notebookRuntimeType=USER_DEFINED
  • page_size (::Integer) — Optional. The standard list page size.
  • page_token (::String) — Optional. The standard list page token. Typically obtained via ListNotebookRuntimeTemplatesResponse.next_page_token of the previous NotebookService.ListNotebookRuntimeTemplates call.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask specifying which fields to read.
  • order_by (::String) — Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields:

    • display_name
    • create_time
    • update_time

    Example: display_name, create_time desc.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListNotebookRuntimeTemplatesRequest.new

# Call the list_notebook_runtime_templates method.
result = client.list_notebook_runtime_templates request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate.
  p item
end

#list_notebook_runtimes

def list_notebook_runtimes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntime>
def list_notebook_runtimes(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntime>

Lists NotebookRuntimes in a Location.

Overloads
def list_notebook_runtimes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntime>
Pass arguments to list_notebook_runtimes via a request object, either of type ListNotebookRuntimesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListNotebookRuntimesRequest, ::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_notebook_runtimes(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntime>
Pass arguments to list_notebook_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).
Parameters
  • parent (::String) — Required. The resource name of the Location from which to list the NotebookRuntimes. Format: projects/{project}/locations/{location}
  • filter (::String) —

    Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.

    • notebookRuntime supports = and !=. notebookRuntime represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's [resource name] [google.cloud.aiplatform.v1.NotebookRuntime.name].
    • displayName supports = and != and regex.
    • notebookRuntimeTemplate supports = and !=. notebookRuntimeTemplate represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's [resource name] [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name].
    • healthState supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED].
    • runtimeState supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID].
    • runtimeUser supports = and !=.
    • API version is UI only: uiState supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED].
    • notebookRuntimeType supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK].

    Some examples:

    • notebookRuntime="notebookRuntime123"
    • displayName="myDisplayName" and displayName=~"myDisplayNameRegex"
    • notebookRuntimeTemplate="notebookRuntimeTemplate321"
    • healthState=HEALTHY
    • runtimeState=RUNNING
    • runtimeUser="test@google.com"
    • uiState=UI_RESOURCE_STATE_BEING_DELETED
    • notebookRuntimeType=USER_DEFINED
  • page_size (::Integer) — Optional. The standard list page size.
  • page_token (::String) — Optional. The standard list page token. Typically obtained via ListNotebookRuntimesResponse.next_page_token of the previous NotebookService.ListNotebookRuntimes call.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask specifying which fields to read.
  • order_by (::String) — Optional. A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending. Supported fields:

    • display_name
    • create_time
    • update_time

    Example: display_name, create_time desc.

Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::ListNotebookRuntimesRequest.new

# Call the list_notebook_runtimes method.
result = client.list_notebook_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::AIPlatform::V1::NotebookRuntime.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#operations_client

def operations_client() -> ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Operations

Get the associated client for long-running operations.

#start_notebook_runtime

def start_notebook_runtime(request, options = nil) -> ::Gapic::Operation
def start_notebook_runtime(name: nil) -> ::Gapic::Operation

Starts a NotebookRuntime.

Overloads
def start_notebook_runtime(request, options = nil) -> ::Gapic::Operation
Pass arguments to start_notebook_runtime via a request object, either of type StartNotebookRuntimeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::StartNotebookRuntimeRequest, ::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_notebook_runtime(name: nil) -> ::Gapic::Operation
Pass arguments to start_notebook_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).
Parameter
  • name (::String) — Required. The name of the NotebookRuntime resource to be started. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::StartNotebookRuntimeRequest.new

# Call the start_notebook_runtime method.
result = client.start_notebook_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_notebook_runtime

def stop_notebook_runtime(request, options = nil) -> ::Gapic::Operation
def stop_notebook_runtime(name: nil) -> ::Gapic::Operation

Stops a NotebookRuntime.

Overloads
def stop_notebook_runtime(request, options = nil) -> ::Gapic::Operation
Pass arguments to stop_notebook_runtime via a request object, either of type StopNotebookRuntimeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest, ::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_notebook_runtime(name: nil) -> ::Gapic::Operation
Pass arguments to stop_notebook_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).
Parameter
  • name (::String) — Required. The name of the NotebookRuntime resource to be stopped. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest.new

# Call the stop_notebook_runtime method.
result = client.stop_notebook_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

Returns
  • (String)

#update_notebook_runtime_template

def update_notebook_runtime_template(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
def update_notebook_runtime_template(notebook_runtime_template: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate

Updates a NotebookRuntimeTemplate.

Overloads
def update_notebook_runtime_template(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Pass arguments to update_notebook_runtime_template via a request object, either of type UpdateNotebookRuntimeTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::UpdateNotebookRuntimeTemplateRequest, ::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_notebook_runtime_template(notebook_runtime_template: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Pass arguments to update_notebook_runtime_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::UpdateNotebookRuntimeTemplateRequest.new

# Call the update_notebook_runtime_template method.
result = client.update_notebook_runtime_template request

# The returned object is of type Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate.
p result

#upgrade_notebook_runtime

def upgrade_notebook_runtime(request, options = nil) -> ::Gapic::Operation
def upgrade_notebook_runtime(name: nil) -> ::Gapic::Operation

Upgrades a NotebookRuntime.

Overloads
def upgrade_notebook_runtime(request, options = nil) -> ::Gapic::Operation
Pass arguments to upgrade_notebook_runtime via a request object, either of type UpgradeNotebookRuntimeRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::UpgradeNotebookRuntimeRequest, ::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_notebook_runtime(name: nil) -> ::Gapic::Operation
Pass arguments to upgrade_notebook_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).
Parameter
  • name (::String) — Required. The name of the NotebookRuntime resource to be upgrade. Instead of checking whether the name is in valid NotebookRuntime resource name format, directly throw NotFound exception if there is no such NotebookRuntime in spanner.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::UpgradeNotebookRuntimeRequest.new

# Call the upgrade_notebook_runtime method.
result = client.upgrade_notebook_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