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.
-
#start_notebook_runtime(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Starts 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 |
# 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 ) @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 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 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.
201 202 203 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 201 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.
194 195 196 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 194 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::AIPlatform::V1::NotebookService::Rest::Operations (readonly)
Get the associated client for long-running operations.
187 188 189 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 187 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.
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 741 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? return 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.
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1327 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? return 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.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 260 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? return 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.
1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1613 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? return 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.
1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1055 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? return 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.
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 558 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? return 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.
1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1409 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? return result 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.
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 824 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? return result 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.
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 342 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? return result 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.
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 1560 1561 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1526 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? return 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.
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 469 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? return 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.
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 965 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? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#start_notebook_runtime(request, options = nil) ⇒ ::Gapic::Operation #start_notebook_runtime(name: nil) ⇒ ::Gapic::Operation
Starts a NotebookRuntime.
1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1235 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? return 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.
645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 645 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? return result 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.
1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 |
# File 'lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb', line 1145 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? return result end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |