Class: Google::Cloud::EdgeContainer::V1::EdgeContainer::Rest::Client
- Inherits:
-
Object
- Object
- Google::Cloud::EdgeContainer::V1::EdgeContainer::Rest::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/edge_container/v1/edge_container/rest/client.rb
Overview
REST client for the EdgeContainer service.
EdgeContainer API provides management of Kubernetes Clusters on Google Edge Cloud deployments.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client
readonly
Get the associated client for mix-in of the Locations.
-
#operations_client ⇒ ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Rest::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the EdgeContainer Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the EdgeContainer Client instance.
-
#create_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new Cluster in a given project and location.
-
#create_node_pool(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new NodePool in a given project and location.
-
#create_vpn_connection(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Creates a new VPN connection in a given project and location.
-
#delete_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single Cluster.
-
#delete_node_pool(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single NodePool.
-
#delete_vpn_connection(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Deletes a single VPN connection.
-
#generate_access_token(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenResponse
Generates an access token for a Cluster.
-
#generate_offline_credential(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialResponse
Generates an offline credential for a Cluster.
-
#get_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::Cluster
Gets details of a single Cluster.
-
#get_machine(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::Machine
Gets details of a single Machine.
-
#get_node_pool(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::NodePool
Gets details of a single NodePool.
-
#get_server_config(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::ServerConfig
Gets the server config.
-
#get_vpn_connection(request, options = nil) {|result, operation| ... } ⇒ ::Google::Cloud::EdgeContainer::V1::VpnConnection
Gets details of a single VPN connection.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new EdgeContainer REST client object.
-
#list_clusters(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Cluster>
Lists Clusters in a given project and location.
-
#list_machines(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Machine>
Lists Machines in a given project and location.
-
#list_node_pools(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::NodePool>
Lists NodePools in a given project and location.
-
#list_vpn_connections(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::VpnConnection>
Lists VPN connections in a given project and location.
-
#logger ⇒ Logger
The logger used for request/response debug logging.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a single Cluster.
-
#update_node_pool(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Updates the parameters of a single NodePool.
-
#upgrade_cluster(request, options = nil) {|result, operation| ... } ⇒ ::Gapic::Operation
Upgrades a single cluster.
Methods included from Paths
#cluster_path, #crypto_key_path, #crypto_key_version_path, #location_path, #machine_path, #node_pool_path, #vpn_connection_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new EdgeContainer REST client object.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 201 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::EdgeContainer::V1::EdgeContainer::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 @edge_container_stub = ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Rest::ServiceStub.new( endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, credentials: credentials, logger: @config.logger ) @edge_container_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 = @edge_container_stub.endpoint config.universe_domain = @edge_container_stub.universe_domain config.bindings_override = @config.bindings_override config.logger = @edge_container_stub.logger if config.respond_to? :logger= end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Rest::Client (readonly)
Get the associated client for mix-in of the Locations.
271 272 273 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 271 def location_client @location_client end |
#operations_client ⇒ ::Google::Cloud::EdgeContainer::V1::EdgeContainer::Rest::Operations (readonly)
Get the associated client for long-running operations.
264 265 266 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 264 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the EdgeContainer 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 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 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 66 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "EdgeContainer", "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.rpcs.list_clusters.timeout = 60.0 default_config.rpcs.list_clusters.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_cluster.timeout = 60.0 default_config.rpcs.get_cluster.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_cluster.timeout = 60.0 default_config.rpcs.update_cluster.timeout = 60.0 default_config.rpcs.upgrade_cluster.timeout = 60.0 default_config.rpcs.delete_cluster.timeout = 60.0 default_config.rpcs.generate_access_token.timeout = 60.0 default_config.rpcs.generate_access_token.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.generate_offline_credential.timeout = 60.0 default_config.rpcs.generate_offline_credential.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_node_pools.timeout = 60.0 default_config.rpcs.list_node_pools.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_node_pool.timeout = 60.0 default_config.rpcs.get_node_pool.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_node_pool.timeout = 60.0 default_config.rpcs.update_node_pool.timeout = 60.0 default_config.rpcs.delete_node_pool.timeout = 60.0 default_config.rpcs.list_machines.timeout = 60.0 default_config.rpcs.list_machines.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_machine.timeout = 60.0 default_config.rpcs.get_machine.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_vpn_connections.timeout = 60.0 default_config.rpcs.list_vpn_connections.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_vpn_connection.timeout = 60.0 default_config.rpcs.get_vpn_connection.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.create_vpn_connection.timeout = 60.0 default_config.rpcs.delete_vpn_connection.timeout = 60.0 default_config.rpcs.get_server_config.timeout = 60.0 default_config.rpcs.get_server_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#configure {|config| ... } ⇒ Client::Configuration
Configure the EdgeContainer 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.
171 172 173 174 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 171 def configure yield @config if block_given? @config end |
#create_cluster(request, options = nil) ⇒ ::Gapic::Operation #create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new Cluster in a given project and location.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 513 def create_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::CreateClusterRequest # 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_cluster..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::EdgeContainer::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_cluster.timeout, metadata: , retry_policy: @config.rpcs.create_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.create_cluster 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_node_pool(request, options = nil) ⇒ ::Gapic::Operation #create_node_pool(parent: nil, node_pool_id: nil, node_pool: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new NodePool in a given project and location.
1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1217 def create_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::CreateNodePoolRequest # 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_node_pool..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::EdgeContainer::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_node_pool.timeout, metadata: , retry_policy: @config.rpcs.create_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.create_node_pool 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_vpn_connection(request, options = nil) ⇒ ::Gapic::Operation #create_vpn_connection(parent: nil, vpn_connection_id: nil, vpn_connection: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates a new VPN connection in a given project and location.
1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1841 def create_vpn_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::CreateVpnConnectionRequest # 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_vpn_connection..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::EdgeContainer::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_vpn_connection.timeout, metadata: , retry_policy: @config.rpcs.create_vpn_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.create_vpn_connection 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_cluster(request, options = nil) ⇒ ::Gapic::Operation #delete_cluster(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a single Cluster.
796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 796 def delete_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::DeleteClusterRequest # 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_cluster..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::EdgeContainer::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_cluster.timeout, metadata: , retry_policy: @config.rpcs.delete_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.delete_cluster 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_node_pool(request, options = nil) ⇒ ::Gapic::Operation #delete_node_pool(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a single NodePool.
1405 1406 1407 1408 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 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1405 def delete_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::DeleteNodePoolRequest # 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_node_pool..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::EdgeContainer::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_node_pool.timeout, metadata: , retry_policy: @config.rpcs.delete_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.delete_node_pool 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_vpn_connection(request, options = nil) ⇒ ::Gapic::Operation #delete_vpn_connection(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Deletes a single VPN connection.
1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1932 def delete_vpn_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::DeleteVpnConnectionRequest # 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_vpn_connection..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::EdgeContainer::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_vpn_connection.timeout, metadata: , retry_policy: @config.rpcs.delete_vpn_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.delete_vpn_connection 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 |
#generate_access_token(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenResponse #generate_access_token(cluster: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenResponse
Generates an access token for a Cluster.
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 876 def generate_access_token request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GenerateAccessTokenRequest # 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.generate_access_token..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::EdgeContainer::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.generate_access_token.timeout, metadata: , retry_policy: @config.rpcs.generate_access_token.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.generate_access_token request, do |result, operation| yield result, operation if block_given? end rescue ::Gapic::Rest::Error => e raise ::Google::Cloud::Error.from_error(e) end |
#generate_offline_credential(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialResponse #generate_offline_credential(cluster: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialResponse
Generates an offline credential for a Cluster.
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 954 def generate_offline_credential request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GenerateOfflineCredentialRequest # 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.generate_offline_credential..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::EdgeContainer::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.generate_offline_credential.timeout, metadata: , retry_policy: @config.rpcs.generate_offline_credential.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.generate_offline_credential 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_cluster(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::Cluster #get_cluster(name: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::Cluster
Gets details of a single Cluster.
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 420 def get_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetClusterRequest # 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_cluster..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::EdgeContainer::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_cluster.timeout, metadata: , retry_policy: @config.rpcs.get_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.get_cluster 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_machine(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::Machine #get_machine(name: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::Machine
Gets details of a single Machine.
1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1577 def get_machine request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetMachineRequest # 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_machine..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::EdgeContainer::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_machine.timeout, metadata: , retry_policy: @config.rpcs.get_machine.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.get_machine 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_node_pool(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::NodePool #get_node_pool(name: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::NodePool
Gets details of a single NodePool.
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1124 def get_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetNodePoolRequest # 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_node_pool..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::EdgeContainer::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_node_pool.timeout, metadata: , retry_policy: @config.rpcs.get_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.get_node_pool 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_server_config(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::ServerConfig #get_server_config(name: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::ServerConfig
Gets the server config.
2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 2013 def get_server_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetServerConfigRequest # 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_server_config..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::EdgeContainer::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_server_config.timeout, metadata: , retry_policy: @config.rpcs.get_server_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.get_server_config 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_vpn_connection(request, options = nil) ⇒ ::Google::Cloud::EdgeContainer::V1::VpnConnection #get_vpn_connection(name: nil) ⇒ ::Google::Cloud::EdgeContainer::V1::VpnConnection
Gets details of a single VPN connection.
1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1748 def get_vpn_connection request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::GetVpnConnectionRequest # 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_vpn_connection..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::EdgeContainer::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_vpn_connection.timeout, metadata: , retry_policy: @config.rpcs.get_vpn_connection.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.get_vpn_connection 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_clusters(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Cluster> #list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Cluster>
Lists Clusters in a given project and location.
340 341 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 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 340 def list_clusters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListClustersRequest # 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_clusters..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::EdgeContainer::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_clusters.timeout, metadata: , retry_policy: @config.rpcs.list_clusters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.list_clusters request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @edge_container_stub, :list_clusters, "clusters", 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_machines(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Machine> #list_machines(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::Machine>
Lists Machines in a given project and location.
1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1497 def list_machines request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListMachinesRequest # 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_machines..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::EdgeContainer::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_machines.timeout, metadata: , retry_policy: @config.rpcs.list_machines.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.list_machines request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @edge_container_stub, :list_machines, "machines", 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_node_pools(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::NodePool> #list_node_pools(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::NodePool>
Lists NodePools in a given project and location.
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 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 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1044 def list_node_pools request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListNodePoolsRequest # 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_node_pools..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::EdgeContainer::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_node_pools.timeout, metadata: , retry_policy: @config.rpcs.list_node_pools.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.list_node_pools request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @edge_container_stub, :list_node_pools, "node_pools", 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_vpn_connections(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::VpnConnection> #list_vpn_connections(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::EdgeContainer::V1::VpnConnection>
Lists VPN connections in a given project and location.
1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1668 def list_vpn_connections request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::ListVpnConnectionsRequest # 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_vpn_connections..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::EdgeContainer::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_vpn_connections.timeout, metadata: , retry_policy: @config.rpcs.list_vpn_connections.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.list_vpn_connections request, do |result, operation| result = ::Gapic::Rest::PagedEnumerable.new @edge_container_stub, :list_vpn_connections, "vpn_connections", 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.
278 279 280 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 278 def logger @edge_container_stub.logger end |
#universe_domain ⇒ String
The effective universe domain
181 182 183 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 181 def universe_domain @edge_container_stub.universe_domain end |
#update_cluster(request, options = nil) ⇒ ::Gapic::Operation #update_cluster(update_mask: nil, cluster: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the parameters of a single Cluster.
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 610 def update_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::UpdateClusterRequest # 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_cluster..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::EdgeContainer::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_cluster.timeout, metadata: , retry_policy: @config.rpcs.update_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.update_cluster 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 |
#update_node_pool(request, options = nil) ⇒ ::Gapic::Operation #update_node_pool(update_mask: nil, node_pool: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the parameters of a single NodePool.
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 1314 def update_node_pool request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::UpdateNodePoolRequest # 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_node_pool..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::EdgeContainer::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_node_pool.timeout, metadata: , retry_policy: @config.rpcs.update_node_pool.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.update_node_pool 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 |
#upgrade_cluster(request, options = nil) ⇒ ::Gapic::Operation #upgrade_cluster(name: nil, target_version: nil, schedule: nil, request_id: nil) ⇒ ::Gapic::Operation
Upgrades a single cluster.
705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
# File 'lib/google/cloud/edge_container/v1/edge_container/rest/client.rb', line 705 def upgrade_cluster request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::EdgeContainer::V1::UpgradeClusterRequest # 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_cluster..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::EdgeContainer::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_cluster.timeout, metadata: , retry_policy: @config.rpcs.upgrade_cluster.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @edge_container_stub.upgrade_cluster 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 |