Class: Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb
Overview
REST client for the NotebookService service.
The interface for Vertex Notebook service (a.k.a. Colab on Workbench).
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client
readonly
Get the associated client for mix-in of the IAMPolicy.
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the NotebookService Client class.
Instance Method Summary collapse
-
#assign_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Assigns a NotebookRuntime to a user for a particular Notebook file.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the NotebookService Client instance.
-
#create_notebook_execution_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a NotebookExecutionJob.
-
#create_notebook_runtime_template(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a NotebookRuntimeTemplate.
-
#delete_notebook_execution_job(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a NotebookExecutionJob.
-
#delete_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a NotebookRuntime.
-
#delete_notebook_runtime_template(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a NotebookRuntimeTemplate.
-
#get_notebook_execution_job(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob
Gets a NotebookExecutionJob.
-
#get_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntime
Gets a NotebookRuntime.
-
#get_notebook_runtime_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Gets a NotebookRuntimeTemplate.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new NotebookService REST client object.
-
#list_notebook_execution_jobs(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookExecutionJob>
Lists NotebookExecutionJobs in a Location.
-
#list_notebook_runtime_templates(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate>
Lists NotebookRuntimeTemplates in a Location.
-
#list_notebook_runtimes(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntime>
Lists NotebookRuntimes in a Location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#start_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Starts a NotebookRuntime.
-
#stop_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Stops a NotebookRuntime.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_notebook_runtime_template(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Updates a NotebookRuntimeTemplate.
-
#upgrade_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Upgrades a NotebookRuntime.
Methods included from Paths
#location_path, #network_path, #notebook_execution_job_path, #notebook_runtime_path, #notebook_runtime_template_path, #reservation_path, #schedule_path, #subnetwork_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new NotebookService REST client object.
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 128 def initialize # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @notebook_service_stub = ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @notebook_service_stub.logger(stub: true)&.info do |entry| entry.set_system_name entry.set_service entry. = "Created client for #{entry.service}" entry.set_credentials_fields credentials entry.set "customEndpoint", @config.endpoint if @config.endpoint entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @notebook_service_stub.endpoint config.universe_domain = @notebook_service_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @notebook_service_stub.logger if config.respond_to? :logger= end @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @notebook_service_stub.endpoint config.universe_domain = @notebook_service_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @notebook_service_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#iam_policy_client ⇒ Google::Iam::V1::IAMPolicy::Rest::Client (readonly)
Get the associated client for mix-in of the IAMPolicy.
214 215 216 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 214 def iam_policy_client @iam_policy_client end |
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
207 208 209 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 207 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Operations (readonly)
Get the associated client for long-running operations.
200 201 202 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 200 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the NotebookService Client class.
See Configuration for a description of the configuration fields.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "AIPlatform", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config end yield @configure if block_given? @configure end |
Instance Method Details
#assign_notebook_runtime(request, options = nil) ⇒ ::Gapic::Operation #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.
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 765 def assign_notebook_runtime request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AssignNotebookRuntimeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.assign_notebook_runtime..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.assign_notebook_runtime.timeout, metadata: , retry_policy: @config.rpcs.assign_notebook_runtime.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.assign_notebook_runtime request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#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 configure.
See Configuration for a description of the configuration fields.
98 99 100 101 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 98 def configure yield @config if block_given? @config end |
#create_notebook_execution_job(request, options = nil) ⇒ ::Gapic::Operation #create_notebook_execution_job(parent: nil, notebook_execution_job: nil, notebook_execution_job_id: nil) ⇒ ::Gapic::Operation
Creates a NotebookExecutionJob.
1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1444 def create_notebook_execution_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateNotebookExecutionJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_notebook_execution_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_notebook_execution_job.timeout, metadata: , retry_policy: @config.rpcs.create_notebook_execution_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.create_notebook_execution_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#create_notebook_runtime_template(request, options = nil) ⇒ ::Gapic::Operation #create_notebook_runtime_template(parent: nil, notebook_runtime_template: nil, notebook_runtime_template_id: nil) ⇒ ::Gapic::Operation
Creates a NotebookRuntimeTemplate.
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 282 def create_notebook_runtime_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateNotebookRuntimeTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_notebook_runtime_template..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.create_notebook_runtime_template.timeout, metadata: , retry_policy: @config.rpcs.create_notebook_runtime_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.create_notebook_runtime_template request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_notebook_execution_job(request, options = nil) ⇒ ::Gapic::Operation #delete_notebook_execution_job(name: nil) ⇒ ::Gapic::Operation
Deletes a NotebookExecutionJob.
1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1730 def delete_notebook_execution_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteNotebookExecutionJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_notebook_execution_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_notebook_execution_job.timeout, metadata: , retry_policy: @config.rpcs.delete_notebook_execution_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.delete_notebook_execution_job request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_notebook_runtime(request, options = nil) ⇒ ::Gapic::Operation #delete_notebook_runtime(name: nil) ⇒ ::Gapic::Operation
Deletes a NotebookRuntime.
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1082 def delete_notebook_runtime request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteNotebookRuntimeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_notebook_runtime..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_notebook_runtime.timeout, metadata: , retry_policy: @config.rpcs.delete_notebook_runtime.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.delete_notebook_runtime request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_notebook_runtime_template(request, options = nil) ⇒ ::Gapic::Operation #delete_notebook_runtime_template(name: nil) ⇒ ::Gapic::Operation
Deletes a NotebookRuntimeTemplate.
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 583 def delete_notebook_runtime_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteNotebookRuntimeTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_notebook_runtime_template..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.delete_notebook_runtime_template.timeout, metadata: , retry_policy: @config.rpcs.delete_notebook_runtime_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.delete_notebook_runtime_template request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_notebook_execution_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob #get_notebook_execution_job(name: nil, view: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookExecutionJob
Gets a NotebookExecutionJob.
1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1526 def get_notebook_execution_job request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNotebookExecutionJobRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_notebook_execution_job..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_notebook_execution_job.timeout, metadata: , retry_policy: @config.rpcs.get_notebook_execution_job.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.get_notebook_execution_job request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_notebook_runtime(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntime #get_notebook_runtime(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntime
Gets a NotebookRuntime.
848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 848 def get_notebook_runtime request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNotebookRuntimeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_notebook_runtime..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_notebook_runtime.timeout, metadata: , retry_policy: @config.rpcs.get_notebook_runtime.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.get_notebook_runtime request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#get_notebook_runtime_template(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate #get_notebook_runtime_template(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Gets a NotebookRuntimeTemplate.
364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 364 def get_notebook_runtime_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNotebookRuntimeTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_notebook_runtime_template..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.get_notebook_runtime_template.timeout, metadata: , retry_policy: @config.rpcs.get_notebook_runtime_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.get_notebook_runtime_template request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_notebook_execution_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookExecutionJob> #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.
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1643 def list_notebook_execution_jobs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNotebookExecutionJobsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_notebook_execution_jobs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_notebook_execution_jobs.timeout, metadata: , retry_policy: @config.rpcs.list_notebook_execution_jobs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.list_notebook_execution_jobs request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @notebook_service_stub, :list_notebook_execution_jobs, "notebook_execution_jobs", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_notebook_runtime_templates(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate> #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.
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 494 def list_notebook_runtime_templates request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNotebookRuntimeTemplatesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_notebook_runtime_templates..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_notebook_runtime_templates.timeout, metadata: , retry_policy: @config.rpcs.list_notebook_runtime_templates.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.list_notebook_runtime_templates request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @notebook_service_stub, :list_notebook_runtime_templates, "notebook_runtime_templates", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#list_notebook_runtimes(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NotebookRuntime> #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.
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 992 def list_notebook_runtimes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNotebookRuntimesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_notebook_runtimes..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_notebook_runtimes.timeout, metadata: , retry_policy: @config.rpcs.list_notebook_runtimes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.list_notebook_runtimes request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @notebook_service_stub, :list_notebook_runtimes, "notebook_runtimes", request, result, yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#logger ⇒ Logger
The logger used for request/response debug logging.
221 222 223 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 221 def logger @notebook_service_stub.logger end |
#start_notebook_runtime(request, options = nil) ⇒ ::Gapic::Operation #start_notebook_runtime(name: nil) ⇒ ::Gapic::Operation
Starts a NotebookRuntime.
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1262 def start_notebook_runtime request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StartNotebookRuntimeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.start_notebook_runtime..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.start_notebook_runtime.timeout, metadata: , retry_policy: @config.rpcs.start_notebook_runtime.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.start_notebook_runtime request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#stop_notebook_runtime(request, options = nil) ⇒ ::Gapic::Operation #stop_notebook_runtime(name: nil) ⇒ ::Gapic::Operation
Stops a NotebookRuntime.
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1352 def stop_notebook_runtime request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.stop_notebook_runtime..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.stop_notebook_runtime.timeout, metadata: , retry_policy: @config.rpcs.stop_notebook_runtime.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.stop_notebook_runtime request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
108 109 110 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 108 def universe_domain @notebook_service_stub.universe_domain end |
#update_notebook_runtime_template(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate #update_notebook_runtime_template(notebook_runtime_template: nil, update_mask: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NotebookRuntimeTemplate
Updates a NotebookRuntimeTemplate.
670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 670 def update_notebook_runtime_template request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateNotebookRuntimeTemplateRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_notebook_runtime_template..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.update_notebook_runtime_template.timeout, metadata: , retry_policy: @config.rpcs.update_notebook_runtime_template.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.update_notebook_runtime_template request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#upgrade_notebook_runtime(request, options = nil) ⇒ ::Gapic::Operation #upgrade_notebook_runtime(name: nil) ⇒ ::Gapic::Operation
Upgrades a NotebookRuntime.
1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1172 def upgrade_notebook_runtime request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpgradeNotebookRuntimeRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.upgrade_notebook_runtime..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION, transports_version_send: [:rest] [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.upgrade_notebook_runtime.timeout, metadata: , retry_policy: @config.rpcs.upgrade_notebook_runtime.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @notebook_service_stub.upgrade_notebook_runtime request, do |result, operation| result = ::Gapic::Operation.new result, @operations_client, options: yield result, operation if block_given? throw :response, result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |