google-cloud-gke_multi_cloud-v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +144 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb +1729 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/credentials.rb +47 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/operations.rb +767 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/paths.rb +107 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters.rb +51 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb +2184 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/credentials.rb +47 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/operations.rb +767 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/paths.rb +126 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters.rb +51 -0
- data/lib/google/cloud/gke_multi_cloud/v1/version.rb +28 -0
- data/lib/google/cloud/gke_multi_cloud/v1.rb +41 -0
- data/lib/google/cloud/gkemulticloud/v1/aws_resources_pb.rb +187 -0
- data/lib/google/cloud/gkemulticloud/v1/aws_service_pb.rb +110 -0
- data/lib/google/cloud/gkemulticloud/v1/aws_service_services_pb.rb +90 -0
- data/lib/google/cloud/gkemulticloud/v1/azure_resources_pb.rb +183 -0
- data/lib/google/cloud/gkemulticloud/v1/azure_service_pb.rb +138 -0
- data/lib/google/cloud/gkemulticloud/v1/azure_service_services_pb.rb +115 -0
- data/lib/google/cloud/gkemulticloud/v1/common_resources_pb.rb +71 -0
- data/lib/google-cloud-gke_multi_cloud-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/aws_resources.rb +633 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/aws_service.rb +383 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/azure_resources.rb +716 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/azure_service.rb +473 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/common_resources.rb +164 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- metadata +232 -0
@@ -0,0 +1,2184 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/gkemulticloud/v1/azure_service_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module GkeMultiCloud
|
25
|
+
module V1
|
26
|
+
module AzureClusters
|
27
|
+
##
|
28
|
+
# Client for the AzureClusters service.
|
29
|
+
#
|
30
|
+
# The AzureClusters API provides a single centrally managed service
|
31
|
+
# to create and manage Anthos clusters that run on Azure infrastructure.
|
32
|
+
#
|
33
|
+
class Client
|
34
|
+
include Paths
|
35
|
+
|
36
|
+
# @private
|
37
|
+
attr_reader :azure_clusters_stub
|
38
|
+
|
39
|
+
##
|
40
|
+
# Configure the AzureClusters Client class.
|
41
|
+
#
|
42
|
+
# See {::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client::Configuration}
|
43
|
+
# for a description of the configuration fields.
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
#
|
47
|
+
# # Modify the configuration for all AzureClusters clients
|
48
|
+
# ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
51
|
+
#
|
52
|
+
# @yield [config] Configure the Client client.
|
53
|
+
# @yieldparam config [Client::Configuration]
|
54
|
+
#
|
55
|
+
# @return [Client::Configuration]
|
56
|
+
#
|
57
|
+
def self.configure
|
58
|
+
@configure ||= begin
|
59
|
+
namespace = ["Google", "Cloud", "GkeMultiCloud", "V1"]
|
60
|
+
parent_config = while namespace.any?
|
61
|
+
parent_name = namespace.join "::"
|
62
|
+
parent_const = const_get parent_name
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
64
|
+
namespace.pop
|
65
|
+
end
|
66
|
+
default_config = Client::Configuration.new parent_config
|
67
|
+
|
68
|
+
default_config.rpcs.create_azure_client.timeout = 60.0
|
69
|
+
|
70
|
+
default_config.rpcs.get_azure_client.timeout = 60.0
|
71
|
+
default_config.rpcs.get_azure_client.retry_policy = {
|
72
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
73
|
+
}
|
74
|
+
|
75
|
+
default_config.rpcs.list_azure_clients.timeout = 60.0
|
76
|
+
default_config.rpcs.list_azure_clients.retry_policy = {
|
77
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
78
|
+
}
|
79
|
+
|
80
|
+
default_config.rpcs.delete_azure_client.timeout = 60.0
|
81
|
+
|
82
|
+
default_config.rpcs.create_azure_cluster.timeout = 60.0
|
83
|
+
|
84
|
+
default_config.rpcs.update_azure_cluster.timeout = 60.0
|
85
|
+
|
86
|
+
default_config.rpcs.get_azure_cluster.timeout = 60.0
|
87
|
+
default_config.rpcs.get_azure_cluster.retry_policy = {
|
88
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
89
|
+
}
|
90
|
+
|
91
|
+
default_config.rpcs.list_azure_clusters.timeout = 60.0
|
92
|
+
default_config.rpcs.list_azure_clusters.retry_policy = {
|
93
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
94
|
+
}
|
95
|
+
|
96
|
+
default_config.rpcs.delete_azure_cluster.timeout = 60.0
|
97
|
+
|
98
|
+
default_config.rpcs.generate_azure_access_token.timeout = 60.0
|
99
|
+
default_config.rpcs.generate_azure_access_token.retry_policy = {
|
100
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
101
|
+
}
|
102
|
+
|
103
|
+
default_config.rpcs.create_azure_node_pool.timeout = 60.0
|
104
|
+
|
105
|
+
default_config.rpcs.update_azure_node_pool.timeout = 60.0
|
106
|
+
|
107
|
+
default_config.rpcs.get_azure_node_pool.timeout = 60.0
|
108
|
+
default_config.rpcs.get_azure_node_pool.retry_policy = {
|
109
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
110
|
+
}
|
111
|
+
|
112
|
+
default_config.rpcs.list_azure_node_pools.timeout = 60.0
|
113
|
+
default_config.rpcs.list_azure_node_pools.retry_policy = {
|
114
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
115
|
+
}
|
116
|
+
|
117
|
+
default_config.rpcs.delete_azure_node_pool.timeout = 60.0
|
118
|
+
|
119
|
+
default_config.rpcs.get_azure_server_config.timeout = 60.0
|
120
|
+
default_config.rpcs.get_azure_server_config.retry_policy = {
|
121
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
122
|
+
}
|
123
|
+
|
124
|
+
default_config
|
125
|
+
end
|
126
|
+
yield @configure if block_given?
|
127
|
+
@configure
|
128
|
+
end
|
129
|
+
|
130
|
+
##
|
131
|
+
# Configure the AzureClusters Client instance.
|
132
|
+
#
|
133
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
134
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
135
|
+
# should be made on {Client.configure}.
|
136
|
+
#
|
137
|
+
# See {::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client::Configuration}
|
138
|
+
# for a description of the configuration fields.
|
139
|
+
#
|
140
|
+
# @yield [config] Configure the Client client.
|
141
|
+
# @yieldparam config [Client::Configuration]
|
142
|
+
#
|
143
|
+
# @return [Client::Configuration]
|
144
|
+
#
|
145
|
+
def configure
|
146
|
+
yield @config if block_given?
|
147
|
+
@config
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Create a new AzureClusters client object.
|
152
|
+
#
|
153
|
+
# @example
|
154
|
+
#
|
155
|
+
# # Create a client using the default configuration
|
156
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
157
|
+
#
|
158
|
+
# # Create a client using a custom configuration
|
159
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new do |config|
|
160
|
+
# config.timeout = 10.0
|
161
|
+
# end
|
162
|
+
#
|
163
|
+
# @yield [config] Configure the AzureClusters client.
|
164
|
+
# @yieldparam config [Client::Configuration]
|
165
|
+
#
|
166
|
+
def initialize
|
167
|
+
# These require statements are intentionally placed here to initialize
|
168
|
+
# the gRPC module only when it's required.
|
169
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
170
|
+
require "gapic/grpc"
|
171
|
+
require "google/cloud/gkemulticloud/v1/azure_service_services_pb"
|
172
|
+
|
173
|
+
# Create the configuration object
|
174
|
+
@config = Configuration.new Client.configure
|
175
|
+
|
176
|
+
# Yield the configuration if needed
|
177
|
+
yield @config if block_given?
|
178
|
+
|
179
|
+
# Create credentials
|
180
|
+
credentials = @config.credentials
|
181
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
182
|
+
# but only if the default endpoint does not have a region prefix.
|
183
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
184
|
+
!@config.endpoint.split(".").first.include?("-")
|
185
|
+
credentials ||= Credentials.default scope: @config.scope,
|
186
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
187
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
188
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
189
|
+
end
|
190
|
+
@quota_project_id = @config.quota_project
|
191
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
192
|
+
|
193
|
+
@operations_client = Operations.new do |config|
|
194
|
+
config.credentials = credentials
|
195
|
+
config.quota_project = @quota_project_id
|
196
|
+
config.endpoint = @config.endpoint
|
197
|
+
end
|
198
|
+
|
199
|
+
@azure_clusters_stub = ::Gapic::ServiceStub.new(
|
200
|
+
::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Stub,
|
201
|
+
credentials: credentials,
|
202
|
+
endpoint: @config.endpoint,
|
203
|
+
channel_args: @config.channel_args,
|
204
|
+
interceptors: @config.interceptors
|
205
|
+
)
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# Get the associated client for long-running operations.
|
210
|
+
#
|
211
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Operations]
|
212
|
+
#
|
213
|
+
attr_reader :operations_client
|
214
|
+
|
215
|
+
# Service calls
|
216
|
+
|
217
|
+
##
|
218
|
+
# Creates a new {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resource on a given Google Cloud project
|
219
|
+
# and region.
|
220
|
+
#
|
221
|
+
# `AzureClient` resources hold client authentication
|
222
|
+
# information needed by the Anthos Multicloud API to manage Azure resources
|
223
|
+
# on your Azure subscription on your behalf.
|
224
|
+
#
|
225
|
+
# If successful, the response contains a newly created
|
226
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
227
|
+
# described to track the status of the operation.
|
228
|
+
#
|
229
|
+
# @overload create_azure_client(request, options = nil)
|
230
|
+
# Pass arguments to `create_azure_client` via a request object, either of type
|
231
|
+
# {::Google::Cloud::GkeMultiCloud::V1::CreateAzureClientRequest} or an equivalent Hash.
|
232
|
+
#
|
233
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::CreateAzureClientRequest, ::Hash]
|
234
|
+
# A request object representing the call parameters. Required. To specify no
|
235
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
236
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
237
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
238
|
+
#
|
239
|
+
# @overload create_azure_client(parent: nil, azure_client: nil, azure_client_id: nil, validate_only: nil)
|
240
|
+
# Pass arguments to `create_azure_client` via keyword arguments. Note that at
|
241
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
242
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
243
|
+
#
|
244
|
+
# @param parent [::String]
|
245
|
+
# Required. The parent location where this {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resource
|
246
|
+
# will be created.
|
247
|
+
#
|
248
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
249
|
+
#
|
250
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
251
|
+
# for more details on Google Cloud resource names.
|
252
|
+
# @param azure_client [::Google::Cloud::GkeMultiCloud::V1::AzureClient, ::Hash]
|
253
|
+
# Required. The specification of the {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} to create.
|
254
|
+
# @param azure_client_id [::String]
|
255
|
+
# Required. A client provided ID the resource. Must be unique within the parent
|
256
|
+
# resource.
|
257
|
+
#
|
258
|
+
# The provided ID will be part of the {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient}
|
259
|
+
# resource name formatted as
|
260
|
+
# `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
|
261
|
+
#
|
262
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
|
263
|
+
# @param validate_only [::Boolean]
|
264
|
+
# If set, only validate the request, but do not actually create the client.
|
265
|
+
#
|
266
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
267
|
+
# @yieldparam response [::Gapic::Operation]
|
268
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
269
|
+
#
|
270
|
+
# @return [::Gapic::Operation]
|
271
|
+
#
|
272
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
273
|
+
#
|
274
|
+
# @example Basic example
|
275
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
276
|
+
#
|
277
|
+
# # Create a client object. The client can be reused for multiple calls.
|
278
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
279
|
+
#
|
280
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
281
|
+
# request = Google::Cloud::GkeMultiCloud::V1::CreateAzureClientRequest.new
|
282
|
+
#
|
283
|
+
# # Call the create_azure_client method.
|
284
|
+
# result = client.create_azure_client request
|
285
|
+
#
|
286
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
287
|
+
# # object to check the status of an operation, cancel it, or wait
|
288
|
+
# # for results. Here is how to block until completion:
|
289
|
+
# result.wait_until_done! timeout: 60
|
290
|
+
# if result.response?
|
291
|
+
# p result.response
|
292
|
+
# else
|
293
|
+
# puts "Error!"
|
294
|
+
# end
|
295
|
+
#
|
296
|
+
def create_azure_client request, options = nil
|
297
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
298
|
+
|
299
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAzureClientRequest
|
300
|
+
|
301
|
+
# Converts hash and nil to an options object
|
302
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
303
|
+
|
304
|
+
# Customize the options with defaults
|
305
|
+
metadata = @config.rpcs.create_azure_client.metadata.to_h
|
306
|
+
|
307
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
308
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
309
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
310
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
311
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
312
|
+
|
313
|
+
header_params = {}
|
314
|
+
if request.parent
|
315
|
+
header_params["parent"] = request.parent
|
316
|
+
end
|
317
|
+
|
318
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
319
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
320
|
+
|
321
|
+
options.apply_defaults timeout: @config.rpcs.create_azure_client.timeout,
|
322
|
+
metadata: metadata,
|
323
|
+
retry_policy: @config.rpcs.create_azure_client.retry_policy
|
324
|
+
|
325
|
+
options.apply_defaults timeout: @config.timeout,
|
326
|
+
metadata: @config.metadata,
|
327
|
+
retry_policy: @config.retry_policy
|
328
|
+
|
329
|
+
@azure_clusters_stub.call_rpc :create_azure_client, request, options: options do |response, operation|
|
330
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
331
|
+
yield response, operation if block_given?
|
332
|
+
return response
|
333
|
+
end
|
334
|
+
rescue ::GRPC::BadStatus => e
|
335
|
+
raise ::Google::Cloud::Error.from_error(e)
|
336
|
+
end
|
337
|
+
|
338
|
+
##
|
339
|
+
# Describes a specific {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resource.
|
340
|
+
#
|
341
|
+
# @overload get_azure_client(request, options = nil)
|
342
|
+
# Pass arguments to `get_azure_client` via a request object, either of type
|
343
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAzureClientRequest} or an equivalent Hash.
|
344
|
+
#
|
345
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAzureClientRequest, ::Hash]
|
346
|
+
# A request object representing the call parameters. Required. To specify no
|
347
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
348
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
349
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
350
|
+
#
|
351
|
+
# @overload get_azure_client(name: nil)
|
352
|
+
# Pass arguments to `get_azure_client` via keyword arguments. Note that at
|
353
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
354
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
355
|
+
#
|
356
|
+
# @param name [::String]
|
357
|
+
# Required. The name of the {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resource to describe.
|
358
|
+
#
|
359
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} names are formatted as
|
360
|
+
# `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
|
361
|
+
#
|
362
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
363
|
+
# for more details on Google Cloud resource names.
|
364
|
+
#
|
365
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
366
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::AzureClient]
|
367
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
368
|
+
#
|
369
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureClient]
|
370
|
+
#
|
371
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
372
|
+
#
|
373
|
+
# @example Basic example
|
374
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
375
|
+
#
|
376
|
+
# # Create a client object. The client can be reused for multiple calls.
|
377
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
378
|
+
#
|
379
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
380
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAzureClientRequest.new
|
381
|
+
#
|
382
|
+
# # Call the get_azure_client method.
|
383
|
+
# result = client.get_azure_client request
|
384
|
+
#
|
385
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AzureClient.
|
386
|
+
# p result
|
387
|
+
#
|
388
|
+
def get_azure_client request, options = nil
|
389
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
390
|
+
|
391
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAzureClientRequest
|
392
|
+
|
393
|
+
# Converts hash and nil to an options object
|
394
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
395
|
+
|
396
|
+
# Customize the options with defaults
|
397
|
+
metadata = @config.rpcs.get_azure_client.metadata.to_h
|
398
|
+
|
399
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
400
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
401
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
402
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
403
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
404
|
+
|
405
|
+
header_params = {}
|
406
|
+
if request.name
|
407
|
+
header_params["name"] = request.name
|
408
|
+
end
|
409
|
+
|
410
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
411
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
412
|
+
|
413
|
+
options.apply_defaults timeout: @config.rpcs.get_azure_client.timeout,
|
414
|
+
metadata: metadata,
|
415
|
+
retry_policy: @config.rpcs.get_azure_client.retry_policy
|
416
|
+
|
417
|
+
options.apply_defaults timeout: @config.timeout,
|
418
|
+
metadata: @config.metadata,
|
419
|
+
retry_policy: @config.retry_policy
|
420
|
+
|
421
|
+
@azure_clusters_stub.call_rpc :get_azure_client, request, options: options do |response, operation|
|
422
|
+
yield response, operation if block_given?
|
423
|
+
return response
|
424
|
+
end
|
425
|
+
rescue ::GRPC::BadStatus => e
|
426
|
+
raise ::Google::Cloud::Error.from_error(e)
|
427
|
+
end
|
428
|
+
|
429
|
+
##
|
430
|
+
# Lists all {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resources on a given Google Cloud project and
|
431
|
+
# region.
|
432
|
+
#
|
433
|
+
# @overload list_azure_clients(request, options = nil)
|
434
|
+
# Pass arguments to `list_azure_clients` via a request object, either of type
|
435
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAzureClientsRequest} or an equivalent Hash.
|
436
|
+
#
|
437
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ListAzureClientsRequest, ::Hash]
|
438
|
+
# A request object representing the call parameters. Required. To specify no
|
439
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
440
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
441
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
442
|
+
#
|
443
|
+
# @overload list_azure_clients(parent: nil, page_size: nil, page_token: nil)
|
444
|
+
# Pass arguments to `list_azure_clients` via keyword arguments. Note that at
|
445
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
446
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
447
|
+
#
|
448
|
+
# @param parent [::String]
|
449
|
+
# Required. The parent location which owns this collection of
|
450
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resources.
|
451
|
+
#
|
452
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
453
|
+
#
|
454
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
455
|
+
# for more details on GCP resource names.
|
456
|
+
# @param page_size [::Integer]
|
457
|
+
# The maximum number of items to return.
|
458
|
+
#
|
459
|
+
# If not specified, a default value of 50 will be used by the service.
|
460
|
+
# Regardless of the pageSize value, the response can include a partial list
|
461
|
+
# and a caller should only rely on response's
|
462
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAzureClientsResponse#next_page_token nextPageToken} to determine if
|
463
|
+
# there are more instances left to be queried.
|
464
|
+
# @param page_token [::String]
|
465
|
+
# The `nextPageToken` value returned from a previous
|
466
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client#list_azure_clients azureClients.list} request, if any.
|
467
|
+
#
|
468
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
469
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureClient>]
|
470
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
471
|
+
#
|
472
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureClient>]
|
473
|
+
#
|
474
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
475
|
+
#
|
476
|
+
# @example Basic example
|
477
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
478
|
+
#
|
479
|
+
# # Create a client object. The client can be reused for multiple calls.
|
480
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
481
|
+
#
|
482
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
483
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ListAzureClientsRequest.new
|
484
|
+
#
|
485
|
+
# # Call the list_azure_clients method.
|
486
|
+
# result = client.list_azure_clients request
|
487
|
+
#
|
488
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
489
|
+
# # iterate over all elements by calling #each, and the enumerable
|
490
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
491
|
+
# # methods are also available for managing paging directly.
|
492
|
+
# result.each do |response|
|
493
|
+
# # Each element is of type ::Google::Cloud::GkeMultiCloud::V1::AzureClient.
|
494
|
+
# p response
|
495
|
+
# end
|
496
|
+
#
|
497
|
+
def list_azure_clients request, options = nil
|
498
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
499
|
+
|
500
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAzureClientsRequest
|
501
|
+
|
502
|
+
# Converts hash and nil to an options object
|
503
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
504
|
+
|
505
|
+
# Customize the options with defaults
|
506
|
+
metadata = @config.rpcs.list_azure_clients.metadata.to_h
|
507
|
+
|
508
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
509
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
510
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
511
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
512
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
513
|
+
|
514
|
+
header_params = {}
|
515
|
+
if request.parent
|
516
|
+
header_params["parent"] = request.parent
|
517
|
+
end
|
518
|
+
|
519
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
520
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
521
|
+
|
522
|
+
options.apply_defaults timeout: @config.rpcs.list_azure_clients.timeout,
|
523
|
+
metadata: metadata,
|
524
|
+
retry_policy: @config.rpcs.list_azure_clients.retry_policy
|
525
|
+
|
526
|
+
options.apply_defaults timeout: @config.timeout,
|
527
|
+
metadata: @config.metadata,
|
528
|
+
retry_policy: @config.retry_policy
|
529
|
+
|
530
|
+
@azure_clusters_stub.call_rpc :list_azure_clients, request, options: options do |response, operation|
|
531
|
+
response = ::Gapic::PagedEnumerable.new @azure_clusters_stub, :list_azure_clients, request, response, operation, options
|
532
|
+
yield response, operation if block_given?
|
533
|
+
return response
|
534
|
+
end
|
535
|
+
rescue ::GRPC::BadStatus => e
|
536
|
+
raise ::Google::Cloud::Error.from_error(e)
|
537
|
+
end
|
538
|
+
|
539
|
+
##
|
540
|
+
# Deletes a specific {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resource.
|
541
|
+
#
|
542
|
+
# If the client is used by one or more clusters, deletion will
|
543
|
+
# fail and a `FAILED_PRECONDITION` error will be returned.
|
544
|
+
#
|
545
|
+
# If successful, the response contains a newly created
|
546
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
547
|
+
# described to track the status of the operation.
|
548
|
+
#
|
549
|
+
# @overload delete_azure_client(request, options = nil)
|
550
|
+
# Pass arguments to `delete_azure_client` via a request object, either of type
|
551
|
+
# {::Google::Cloud::GkeMultiCloud::V1::DeleteAzureClientRequest} or an equivalent Hash.
|
552
|
+
#
|
553
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::DeleteAzureClientRequest, ::Hash]
|
554
|
+
# A request object representing the call parameters. Required. To specify no
|
555
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
556
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
557
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
558
|
+
#
|
559
|
+
# @overload delete_azure_client(name: nil, allow_missing: nil, validate_only: nil)
|
560
|
+
# Pass arguments to `delete_azure_client` via keyword arguments. Note that at
|
561
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
562
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
563
|
+
#
|
564
|
+
# @param name [::String]
|
565
|
+
# Required. The resource name the {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} to delete.
|
566
|
+
#
|
567
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} names are formatted as
|
568
|
+
# `projects/<project-id>/locations/<region>/azureClients/<client-id>`.
|
569
|
+
#
|
570
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
571
|
+
# for more details on Google Cloud resource names.
|
572
|
+
# @param allow_missing [::Boolean]
|
573
|
+
# If set to true, and the {::Google::Cloud::GkeMultiCloud::V1::AzureClient AzureClient} resource is not found,
|
574
|
+
# the request will succeed but no action will be taken on the server and a
|
575
|
+
# completed {::Google::Longrunning::Operation Operation} will be returned.
|
576
|
+
#
|
577
|
+
# Useful for idempotent deletion.
|
578
|
+
# @param validate_only [::Boolean]
|
579
|
+
# If set, only validate the request, but do not actually delete the resource.
|
580
|
+
#
|
581
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
582
|
+
# @yieldparam response [::Gapic::Operation]
|
583
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
584
|
+
#
|
585
|
+
# @return [::Gapic::Operation]
|
586
|
+
#
|
587
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
588
|
+
#
|
589
|
+
# @example Basic example
|
590
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
591
|
+
#
|
592
|
+
# # Create a client object. The client can be reused for multiple calls.
|
593
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
594
|
+
#
|
595
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
596
|
+
# request = Google::Cloud::GkeMultiCloud::V1::DeleteAzureClientRequest.new
|
597
|
+
#
|
598
|
+
# # Call the delete_azure_client method.
|
599
|
+
# result = client.delete_azure_client request
|
600
|
+
#
|
601
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
602
|
+
# # object to check the status of an operation, cancel it, or wait
|
603
|
+
# # for results. Here is how to block until completion:
|
604
|
+
# result.wait_until_done! timeout: 60
|
605
|
+
# if result.response?
|
606
|
+
# p result.response
|
607
|
+
# else
|
608
|
+
# puts "Error!"
|
609
|
+
# end
|
610
|
+
#
|
611
|
+
def delete_azure_client request, options = nil
|
612
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
613
|
+
|
614
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAzureClientRequest
|
615
|
+
|
616
|
+
# Converts hash and nil to an options object
|
617
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
618
|
+
|
619
|
+
# Customize the options with defaults
|
620
|
+
metadata = @config.rpcs.delete_azure_client.metadata.to_h
|
621
|
+
|
622
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
623
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
624
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
625
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
626
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
627
|
+
|
628
|
+
header_params = {}
|
629
|
+
if request.name
|
630
|
+
header_params["name"] = request.name
|
631
|
+
end
|
632
|
+
|
633
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
634
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
635
|
+
|
636
|
+
options.apply_defaults timeout: @config.rpcs.delete_azure_client.timeout,
|
637
|
+
metadata: metadata,
|
638
|
+
retry_policy: @config.rpcs.delete_azure_client.retry_policy
|
639
|
+
|
640
|
+
options.apply_defaults timeout: @config.timeout,
|
641
|
+
metadata: @config.metadata,
|
642
|
+
retry_policy: @config.retry_policy
|
643
|
+
|
644
|
+
@azure_clusters_stub.call_rpc :delete_azure_client, request, options: options do |response, operation|
|
645
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
646
|
+
yield response, operation if block_given?
|
647
|
+
return response
|
648
|
+
end
|
649
|
+
rescue ::GRPC::BadStatus => e
|
650
|
+
raise ::Google::Cloud::Error.from_error(e)
|
651
|
+
end
|
652
|
+
|
653
|
+
##
|
654
|
+
# Creates a new {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource on a given GCP project and region.
|
655
|
+
#
|
656
|
+
# If successful, the response contains a newly created
|
657
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
658
|
+
# described to track the status of the operation.
|
659
|
+
#
|
660
|
+
# @overload create_azure_cluster(request, options = nil)
|
661
|
+
# Pass arguments to `create_azure_cluster` via a request object, either of type
|
662
|
+
# {::Google::Cloud::GkeMultiCloud::V1::CreateAzureClusterRequest} or an equivalent Hash.
|
663
|
+
#
|
664
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::CreateAzureClusterRequest, ::Hash]
|
665
|
+
# A request object representing the call parameters. Required. To specify no
|
666
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
667
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
668
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
669
|
+
#
|
670
|
+
# @overload create_azure_cluster(parent: nil, azure_cluster: nil, azure_cluster_id: nil, validate_only: nil)
|
671
|
+
# Pass arguments to `create_azure_cluster` via keyword arguments. Note that at
|
672
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
673
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
674
|
+
#
|
675
|
+
# @param parent [::String]
|
676
|
+
# Required. The parent location where this {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource
|
677
|
+
# will be created.
|
678
|
+
#
|
679
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
680
|
+
#
|
681
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
682
|
+
# for more details on Google Cloud resource names.
|
683
|
+
# @param azure_cluster [::Google::Cloud::GkeMultiCloud::V1::AzureCluster, ::Hash]
|
684
|
+
# Required. The specification of the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} to create.
|
685
|
+
# @param azure_cluster_id [::String]
|
686
|
+
# Required. A client provided ID the resource. Must be unique within the parent
|
687
|
+
# resource.
|
688
|
+
#
|
689
|
+
# The provided ID will be part of the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}
|
690
|
+
# resource name formatted as
|
691
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
|
692
|
+
#
|
693
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
|
694
|
+
# @param validate_only [::Boolean]
|
695
|
+
# If set, only validate the request, but do not actually create the cluster.
|
696
|
+
#
|
697
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
698
|
+
# @yieldparam response [::Gapic::Operation]
|
699
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
700
|
+
#
|
701
|
+
# @return [::Gapic::Operation]
|
702
|
+
#
|
703
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
704
|
+
#
|
705
|
+
# @example Basic example
|
706
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
707
|
+
#
|
708
|
+
# # Create a client object. The client can be reused for multiple calls.
|
709
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
710
|
+
#
|
711
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
712
|
+
# request = Google::Cloud::GkeMultiCloud::V1::CreateAzureClusterRequest.new
|
713
|
+
#
|
714
|
+
# # Call the create_azure_cluster method.
|
715
|
+
# result = client.create_azure_cluster request
|
716
|
+
#
|
717
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
718
|
+
# # object to check the status of an operation, cancel it, or wait
|
719
|
+
# # for results. Here is how to block until completion:
|
720
|
+
# result.wait_until_done! timeout: 60
|
721
|
+
# if result.response?
|
722
|
+
# p result.response
|
723
|
+
# else
|
724
|
+
# puts "Error!"
|
725
|
+
# end
|
726
|
+
#
|
727
|
+
def create_azure_cluster request, options = nil
|
728
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
729
|
+
|
730
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAzureClusterRequest
|
731
|
+
|
732
|
+
# Converts hash and nil to an options object
|
733
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
734
|
+
|
735
|
+
# Customize the options with defaults
|
736
|
+
metadata = @config.rpcs.create_azure_cluster.metadata.to_h
|
737
|
+
|
738
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
739
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
740
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
741
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
742
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
743
|
+
|
744
|
+
header_params = {}
|
745
|
+
if request.parent
|
746
|
+
header_params["parent"] = request.parent
|
747
|
+
end
|
748
|
+
|
749
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
750
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
751
|
+
|
752
|
+
options.apply_defaults timeout: @config.rpcs.create_azure_cluster.timeout,
|
753
|
+
metadata: metadata,
|
754
|
+
retry_policy: @config.rpcs.create_azure_cluster.retry_policy
|
755
|
+
|
756
|
+
options.apply_defaults timeout: @config.timeout,
|
757
|
+
metadata: @config.metadata,
|
758
|
+
retry_policy: @config.retry_policy
|
759
|
+
|
760
|
+
@azure_clusters_stub.call_rpc :create_azure_cluster, request, options: options do |response, operation|
|
761
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
762
|
+
yield response, operation if block_given?
|
763
|
+
return response
|
764
|
+
end
|
765
|
+
rescue ::GRPC::BadStatus => e
|
766
|
+
raise ::Google::Cloud::Error.from_error(e)
|
767
|
+
end
|
768
|
+
|
769
|
+
##
|
770
|
+
# Updates an {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}.
|
771
|
+
#
|
772
|
+
# @overload update_azure_cluster(request, options = nil)
|
773
|
+
# Pass arguments to `update_azure_cluster` via a request object, either of type
|
774
|
+
# {::Google::Cloud::GkeMultiCloud::V1::UpdateAzureClusterRequest} or an equivalent Hash.
|
775
|
+
#
|
776
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::UpdateAzureClusterRequest, ::Hash]
|
777
|
+
# A request object representing the call parameters. Required. To specify no
|
778
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
779
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
780
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
781
|
+
#
|
782
|
+
# @overload update_azure_cluster(azure_cluster: nil, validate_only: nil, update_mask: nil)
|
783
|
+
# Pass arguments to `update_azure_cluster` via keyword arguments. Note that at
|
784
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
785
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
786
|
+
#
|
787
|
+
# @param azure_cluster [::Google::Cloud::GkeMultiCloud::V1::AzureCluster, ::Hash]
|
788
|
+
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource to update.
|
789
|
+
# @param validate_only [::Boolean]
|
790
|
+
# If set, only validate the request, but do not actually update the cluster.
|
791
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
792
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
793
|
+
# this field. The elements of the repeated paths field can only include these
|
794
|
+
# fields from {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}:
|
795
|
+
#
|
796
|
+
# * `description`.
|
797
|
+
# * `annotations`.
|
798
|
+
# * `azureClient`.
|
799
|
+
# * `control_plane.version`.
|
800
|
+
# * `control_plane.vm_size`.
|
801
|
+
# * `authorization.admin_users`.
|
802
|
+
# * `control_plane.root_volume.size_gib`.
|
803
|
+
# * `logging_config`
|
804
|
+
#
|
805
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
806
|
+
# @yieldparam response [::Gapic::Operation]
|
807
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
808
|
+
#
|
809
|
+
# @return [::Gapic::Operation]
|
810
|
+
#
|
811
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
812
|
+
#
|
813
|
+
# @example Basic example
|
814
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
815
|
+
#
|
816
|
+
# # Create a client object. The client can be reused for multiple calls.
|
817
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
818
|
+
#
|
819
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
820
|
+
# request = Google::Cloud::GkeMultiCloud::V1::UpdateAzureClusterRequest.new
|
821
|
+
#
|
822
|
+
# # Call the update_azure_cluster method.
|
823
|
+
# result = client.update_azure_cluster request
|
824
|
+
#
|
825
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
826
|
+
# # object to check the status of an operation, cancel it, or wait
|
827
|
+
# # for results. Here is how to block until completion:
|
828
|
+
# result.wait_until_done! timeout: 60
|
829
|
+
# if result.response?
|
830
|
+
# p result.response
|
831
|
+
# else
|
832
|
+
# puts "Error!"
|
833
|
+
# end
|
834
|
+
#
|
835
|
+
def update_azure_cluster request, options = nil
|
836
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
837
|
+
|
838
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAzureClusterRequest
|
839
|
+
|
840
|
+
# Converts hash and nil to an options object
|
841
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
842
|
+
|
843
|
+
# Customize the options with defaults
|
844
|
+
metadata = @config.rpcs.update_azure_cluster.metadata.to_h
|
845
|
+
|
846
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
847
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
848
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
849
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
850
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
851
|
+
|
852
|
+
header_params = {}
|
853
|
+
if request.azure_cluster&.name
|
854
|
+
header_params["azure_cluster.name"] = request.azure_cluster.name
|
855
|
+
end
|
856
|
+
|
857
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
858
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
859
|
+
|
860
|
+
options.apply_defaults timeout: @config.rpcs.update_azure_cluster.timeout,
|
861
|
+
metadata: metadata,
|
862
|
+
retry_policy: @config.rpcs.update_azure_cluster.retry_policy
|
863
|
+
|
864
|
+
options.apply_defaults timeout: @config.timeout,
|
865
|
+
metadata: @config.metadata,
|
866
|
+
retry_policy: @config.retry_policy
|
867
|
+
|
868
|
+
@azure_clusters_stub.call_rpc :update_azure_cluster, request, options: options do |response, operation|
|
869
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
870
|
+
yield response, operation if block_given?
|
871
|
+
return response
|
872
|
+
end
|
873
|
+
rescue ::GRPC::BadStatus => e
|
874
|
+
raise ::Google::Cloud::Error.from_error(e)
|
875
|
+
end
|
876
|
+
|
877
|
+
##
|
878
|
+
# Describes a specific {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource.
|
879
|
+
#
|
880
|
+
# @overload get_azure_cluster(request, options = nil)
|
881
|
+
# Pass arguments to `get_azure_cluster` via a request object, either of type
|
882
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAzureClusterRequest} or an equivalent Hash.
|
883
|
+
#
|
884
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAzureClusterRequest, ::Hash]
|
885
|
+
# A request object representing the call parameters. Required. To specify no
|
886
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
887
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
888
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
889
|
+
#
|
890
|
+
# @overload get_azure_cluster(name: nil)
|
891
|
+
# Pass arguments to `get_azure_cluster` via keyword arguments. Note that at
|
892
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
893
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
894
|
+
#
|
895
|
+
# @param name [::String]
|
896
|
+
# Required. The name of the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource to describe.
|
897
|
+
#
|
898
|
+
# `AzureCluster` names are formatted as
|
899
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
|
900
|
+
#
|
901
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
902
|
+
# for more details on GCP resource names.
|
903
|
+
#
|
904
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
905
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::AzureCluster]
|
906
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
907
|
+
#
|
908
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureCluster]
|
909
|
+
#
|
910
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
911
|
+
#
|
912
|
+
# @example Basic example
|
913
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
914
|
+
#
|
915
|
+
# # Create a client object. The client can be reused for multiple calls.
|
916
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
917
|
+
#
|
918
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
919
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAzureClusterRequest.new
|
920
|
+
#
|
921
|
+
# # Call the get_azure_cluster method.
|
922
|
+
# result = client.get_azure_cluster request
|
923
|
+
#
|
924
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AzureCluster.
|
925
|
+
# p result
|
926
|
+
#
|
927
|
+
def get_azure_cluster request, options = nil
|
928
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
929
|
+
|
930
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAzureClusterRequest
|
931
|
+
|
932
|
+
# Converts hash and nil to an options object
|
933
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
934
|
+
|
935
|
+
# Customize the options with defaults
|
936
|
+
metadata = @config.rpcs.get_azure_cluster.metadata.to_h
|
937
|
+
|
938
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
939
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
940
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
941
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
942
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
943
|
+
|
944
|
+
header_params = {}
|
945
|
+
if request.name
|
946
|
+
header_params["name"] = request.name
|
947
|
+
end
|
948
|
+
|
949
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
950
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
951
|
+
|
952
|
+
options.apply_defaults timeout: @config.rpcs.get_azure_cluster.timeout,
|
953
|
+
metadata: metadata,
|
954
|
+
retry_policy: @config.rpcs.get_azure_cluster.retry_policy
|
955
|
+
|
956
|
+
options.apply_defaults timeout: @config.timeout,
|
957
|
+
metadata: @config.metadata,
|
958
|
+
retry_policy: @config.retry_policy
|
959
|
+
|
960
|
+
@azure_clusters_stub.call_rpc :get_azure_cluster, request, options: options do |response, operation|
|
961
|
+
yield response, operation if block_given?
|
962
|
+
return response
|
963
|
+
end
|
964
|
+
rescue ::GRPC::BadStatus => e
|
965
|
+
raise ::Google::Cloud::Error.from_error(e)
|
966
|
+
end
|
967
|
+
|
968
|
+
##
|
969
|
+
# Lists all {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resources on a given Google Cloud project and
|
970
|
+
# region.
|
971
|
+
#
|
972
|
+
# @overload list_azure_clusters(request, options = nil)
|
973
|
+
# Pass arguments to `list_azure_clusters` via a request object, either of type
|
974
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAzureClustersRequest} or an equivalent Hash.
|
975
|
+
#
|
976
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ListAzureClustersRequest, ::Hash]
|
977
|
+
# A request object representing the call parameters. Required. To specify no
|
978
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
979
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
980
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
981
|
+
#
|
982
|
+
# @overload list_azure_clusters(parent: nil, page_size: nil, page_token: nil)
|
983
|
+
# Pass arguments to `list_azure_clusters` via keyword arguments. Note that at
|
984
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
985
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
986
|
+
#
|
987
|
+
# @param parent [::String]
|
988
|
+
# Required. The parent location which owns this collection of
|
989
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resources.
|
990
|
+
#
|
991
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
992
|
+
#
|
993
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
994
|
+
# for more details on GCP resource names.
|
995
|
+
# @param page_size [::Integer]
|
996
|
+
# The maximum number of items to return.
|
997
|
+
#
|
998
|
+
# If not specified, a default value of 50 will be used by the service.
|
999
|
+
# Regardless of the pageSize value, the response can include a partial list
|
1000
|
+
# and a caller should only rely on response's
|
1001
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAzureClustersResponse#next_page_token nextPageToken} to determine if
|
1002
|
+
# there are more instances left to be queried.
|
1003
|
+
# @param page_token [::String]
|
1004
|
+
# The `nextPageToken` value returned from a previous
|
1005
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client#list_azure_clusters azureClusters.list} request, if any.
|
1006
|
+
#
|
1007
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1008
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureCluster>]
|
1009
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1010
|
+
#
|
1011
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureCluster>]
|
1012
|
+
#
|
1013
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1014
|
+
#
|
1015
|
+
# @example Basic example
|
1016
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1017
|
+
#
|
1018
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1019
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1020
|
+
#
|
1021
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1022
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ListAzureClustersRequest.new
|
1023
|
+
#
|
1024
|
+
# # Call the list_azure_clusters method.
|
1025
|
+
# result = client.list_azure_clusters request
|
1026
|
+
#
|
1027
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1028
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1029
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1030
|
+
# # methods are also available for managing paging directly.
|
1031
|
+
# result.each do |response|
|
1032
|
+
# # Each element is of type ::Google::Cloud::GkeMultiCloud::V1::AzureCluster.
|
1033
|
+
# p response
|
1034
|
+
# end
|
1035
|
+
#
|
1036
|
+
def list_azure_clusters request, options = nil
|
1037
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1038
|
+
|
1039
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAzureClustersRequest
|
1040
|
+
|
1041
|
+
# Converts hash and nil to an options object
|
1042
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1043
|
+
|
1044
|
+
# Customize the options with defaults
|
1045
|
+
metadata = @config.rpcs.list_azure_clusters.metadata.to_h
|
1046
|
+
|
1047
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1048
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1049
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1050
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1051
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1052
|
+
|
1053
|
+
header_params = {}
|
1054
|
+
if request.parent
|
1055
|
+
header_params["parent"] = request.parent
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1059
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1060
|
+
|
1061
|
+
options.apply_defaults timeout: @config.rpcs.list_azure_clusters.timeout,
|
1062
|
+
metadata: metadata,
|
1063
|
+
retry_policy: @config.rpcs.list_azure_clusters.retry_policy
|
1064
|
+
|
1065
|
+
options.apply_defaults timeout: @config.timeout,
|
1066
|
+
metadata: @config.metadata,
|
1067
|
+
retry_policy: @config.retry_policy
|
1068
|
+
|
1069
|
+
@azure_clusters_stub.call_rpc :list_azure_clusters, request, options: options do |response, operation|
|
1070
|
+
response = ::Gapic::PagedEnumerable.new @azure_clusters_stub, :list_azure_clusters, request, response, operation, options
|
1071
|
+
yield response, operation if block_given?
|
1072
|
+
return response
|
1073
|
+
end
|
1074
|
+
rescue ::GRPC::BadStatus => e
|
1075
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
##
|
1079
|
+
# Deletes a specific {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource.
|
1080
|
+
#
|
1081
|
+
# Fails if the cluster has one or more associated {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool}
|
1082
|
+
# resources.
|
1083
|
+
#
|
1084
|
+
# If successful, the response contains a newly created
|
1085
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
1086
|
+
# described to track the status of the operation.
|
1087
|
+
#
|
1088
|
+
# @overload delete_azure_cluster(request, options = nil)
|
1089
|
+
# Pass arguments to `delete_azure_cluster` via a request object, either of type
|
1090
|
+
# {::Google::Cloud::GkeMultiCloud::V1::DeleteAzureClusterRequest} or an equivalent Hash.
|
1091
|
+
#
|
1092
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::DeleteAzureClusterRequest, ::Hash]
|
1093
|
+
# A request object representing the call parameters. Required. To specify no
|
1094
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1095
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1096
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1097
|
+
#
|
1098
|
+
# @overload delete_azure_cluster(name: nil, allow_missing: nil, validate_only: nil, etag: nil)
|
1099
|
+
# Pass arguments to `delete_azure_cluster` via keyword arguments. Note that at
|
1100
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1101
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1102
|
+
#
|
1103
|
+
# @param name [::String]
|
1104
|
+
# Required. The resource name the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} to delete.
|
1105
|
+
#
|
1106
|
+
# `AzureCluster` names are formatted as
|
1107
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
|
1108
|
+
#
|
1109
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1110
|
+
# for more details on GCP resource names.
|
1111
|
+
# @param allow_missing [::Boolean]
|
1112
|
+
# If set to true, and the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource is not found,
|
1113
|
+
# the request will succeed but no action will be taken on the server and a
|
1114
|
+
# completed {::Google::Longrunning::Operation Operation} will be returned.
|
1115
|
+
#
|
1116
|
+
# Useful for idempotent deletion.
|
1117
|
+
# @param validate_only [::Boolean]
|
1118
|
+
# If set, only validate the request, but do not actually delete the resource.
|
1119
|
+
# @param etag [::String]
|
1120
|
+
# The current etag of the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}.
|
1121
|
+
#
|
1122
|
+
# Allows clients to perform deletions through optimistic concurrency control.
|
1123
|
+
#
|
1124
|
+
# If the provided etag does not match the current etag of the cluster,
|
1125
|
+
# the request will fail and an ABORTED error will be returned.
|
1126
|
+
#
|
1127
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1128
|
+
# @yieldparam response [::Gapic::Operation]
|
1129
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1130
|
+
#
|
1131
|
+
# @return [::Gapic::Operation]
|
1132
|
+
#
|
1133
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1134
|
+
#
|
1135
|
+
# @example Basic example
|
1136
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1137
|
+
#
|
1138
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1139
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1140
|
+
#
|
1141
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1142
|
+
# request = Google::Cloud::GkeMultiCloud::V1::DeleteAzureClusterRequest.new
|
1143
|
+
#
|
1144
|
+
# # Call the delete_azure_cluster method.
|
1145
|
+
# result = client.delete_azure_cluster request
|
1146
|
+
#
|
1147
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1148
|
+
# # object to check the status of an operation, cancel it, or wait
|
1149
|
+
# # for results. Here is how to block until completion:
|
1150
|
+
# result.wait_until_done! timeout: 60
|
1151
|
+
# if result.response?
|
1152
|
+
# p result.response
|
1153
|
+
# else
|
1154
|
+
# puts "Error!"
|
1155
|
+
# end
|
1156
|
+
#
|
1157
|
+
def delete_azure_cluster request, options = nil
|
1158
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1159
|
+
|
1160
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAzureClusterRequest
|
1161
|
+
|
1162
|
+
# Converts hash and nil to an options object
|
1163
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1164
|
+
|
1165
|
+
# Customize the options with defaults
|
1166
|
+
metadata = @config.rpcs.delete_azure_cluster.metadata.to_h
|
1167
|
+
|
1168
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1169
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1170
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1171
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1172
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1173
|
+
|
1174
|
+
header_params = {}
|
1175
|
+
if request.name
|
1176
|
+
header_params["name"] = request.name
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1180
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1181
|
+
|
1182
|
+
options.apply_defaults timeout: @config.rpcs.delete_azure_cluster.timeout,
|
1183
|
+
metadata: metadata,
|
1184
|
+
retry_policy: @config.rpcs.delete_azure_cluster.retry_policy
|
1185
|
+
|
1186
|
+
options.apply_defaults timeout: @config.timeout,
|
1187
|
+
metadata: @config.metadata,
|
1188
|
+
retry_policy: @config.retry_policy
|
1189
|
+
|
1190
|
+
@azure_clusters_stub.call_rpc :delete_azure_cluster, request, options: options do |response, operation|
|
1191
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1192
|
+
yield response, operation if block_given?
|
1193
|
+
return response
|
1194
|
+
end
|
1195
|
+
rescue ::GRPC::BadStatus => e
|
1196
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1197
|
+
end
|
1198
|
+
|
1199
|
+
##
|
1200
|
+
# Generates a short-lived access token to authenticate to a given
|
1201
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource.
|
1202
|
+
#
|
1203
|
+
# @overload generate_azure_access_token(request, options = nil)
|
1204
|
+
# Pass arguments to `generate_azure_access_token` via a request object, either of type
|
1205
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenRequest} or an equivalent Hash.
|
1206
|
+
#
|
1207
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenRequest, ::Hash]
|
1208
|
+
# A request object representing the call parameters. Required. To specify no
|
1209
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1210
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1211
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1212
|
+
#
|
1213
|
+
# @overload generate_azure_access_token(azure_cluster: nil)
|
1214
|
+
# Pass arguments to `generate_azure_access_token` via keyword arguments. Note that at
|
1215
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1216
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1217
|
+
#
|
1218
|
+
# @param azure_cluster [::String]
|
1219
|
+
# Required. The name of the {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource to authenticate to.
|
1220
|
+
#
|
1221
|
+
# `AzureCluster` names are formatted as
|
1222
|
+
# `projects/<project-id>/locations/<region>/AzureClusters/<cluster-id>`.
|
1223
|
+
#
|
1224
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1225
|
+
# for more details on Google Cloud resource names.
|
1226
|
+
#
|
1227
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1228
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse]
|
1229
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1230
|
+
#
|
1231
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse]
|
1232
|
+
#
|
1233
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1234
|
+
#
|
1235
|
+
# @example Basic example
|
1236
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1237
|
+
#
|
1238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1239
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1240
|
+
#
|
1241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1242
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenRequest.new
|
1243
|
+
#
|
1244
|
+
# # Call the generate_azure_access_token method.
|
1245
|
+
# result = client.generate_azure_access_token request
|
1246
|
+
#
|
1247
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenResponse.
|
1248
|
+
# p result
|
1249
|
+
#
|
1250
|
+
def generate_azure_access_token request, options = nil
|
1251
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1252
|
+
|
1253
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureAccessTokenRequest
|
1254
|
+
|
1255
|
+
# Converts hash and nil to an options object
|
1256
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1257
|
+
|
1258
|
+
# Customize the options with defaults
|
1259
|
+
metadata = @config.rpcs.generate_azure_access_token.metadata.to_h
|
1260
|
+
|
1261
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1262
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1263
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1264
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1265
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1266
|
+
|
1267
|
+
header_params = {}
|
1268
|
+
if request.azure_cluster
|
1269
|
+
header_params["azure_cluster"] = request.azure_cluster
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1273
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1274
|
+
|
1275
|
+
options.apply_defaults timeout: @config.rpcs.generate_azure_access_token.timeout,
|
1276
|
+
metadata: metadata,
|
1277
|
+
retry_policy: @config.rpcs.generate_azure_access_token.retry_policy
|
1278
|
+
|
1279
|
+
options.apply_defaults timeout: @config.timeout,
|
1280
|
+
metadata: @config.metadata,
|
1281
|
+
retry_policy: @config.retry_policy
|
1282
|
+
|
1283
|
+
@azure_clusters_stub.call_rpc :generate_azure_access_token, request, options: options do |response, operation|
|
1284
|
+
yield response, operation if block_given?
|
1285
|
+
return response
|
1286
|
+
end
|
1287
|
+
rescue ::GRPC::BadStatus => e
|
1288
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
##
|
1292
|
+
# Creates a new {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool}, attached to a given {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}.
|
1293
|
+
#
|
1294
|
+
# If successful, the response contains a newly created
|
1295
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
1296
|
+
# described to track the status of the operation.
|
1297
|
+
#
|
1298
|
+
# @overload create_azure_node_pool(request, options = nil)
|
1299
|
+
# Pass arguments to `create_azure_node_pool` via a request object, either of type
|
1300
|
+
# {::Google::Cloud::GkeMultiCloud::V1::CreateAzureNodePoolRequest} or an equivalent Hash.
|
1301
|
+
#
|
1302
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::CreateAzureNodePoolRequest, ::Hash]
|
1303
|
+
# A request object representing the call parameters. Required. To specify no
|
1304
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1305
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1306
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1307
|
+
#
|
1308
|
+
# @overload create_azure_node_pool(parent: nil, azure_node_pool: nil, azure_node_pool_id: nil, validate_only: nil)
|
1309
|
+
# Pass arguments to `create_azure_node_pool` via keyword arguments. Note that at
|
1310
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1311
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1312
|
+
#
|
1313
|
+
# @param parent [::String]
|
1314
|
+
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource where this node pool will be created.
|
1315
|
+
#
|
1316
|
+
# Location names are formatted as `projects/<project-id>/locations/<region>`.
|
1317
|
+
#
|
1318
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1319
|
+
# for more details on Google Cloud resource names.
|
1320
|
+
# @param azure_node_pool [::Google::Cloud::GkeMultiCloud::V1::AzureNodePool, ::Hash]
|
1321
|
+
# Required. The specification of the {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} to create.
|
1322
|
+
# @param azure_node_pool_id [::String]
|
1323
|
+
# Required. A client provided ID the resource. Must be unique within the parent
|
1324
|
+
# resource.
|
1325
|
+
#
|
1326
|
+
# The provided ID will be part of the {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool}
|
1327
|
+
# resource name formatted as
|
1328
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
|
1329
|
+
#
|
1330
|
+
# Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 40 characters.
|
1331
|
+
# @param validate_only [::Boolean]
|
1332
|
+
# If set, only validate the request, but do not actually create the node
|
1333
|
+
# pool.
|
1334
|
+
#
|
1335
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1336
|
+
# @yieldparam response [::Gapic::Operation]
|
1337
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1338
|
+
#
|
1339
|
+
# @return [::Gapic::Operation]
|
1340
|
+
#
|
1341
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1342
|
+
#
|
1343
|
+
# @example Basic example
|
1344
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1345
|
+
#
|
1346
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1347
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1348
|
+
#
|
1349
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1350
|
+
# request = Google::Cloud::GkeMultiCloud::V1::CreateAzureNodePoolRequest.new
|
1351
|
+
#
|
1352
|
+
# # Call the create_azure_node_pool method.
|
1353
|
+
# result = client.create_azure_node_pool request
|
1354
|
+
#
|
1355
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1356
|
+
# # object to check the status of an operation, cancel it, or wait
|
1357
|
+
# # for results. Here is how to block until completion:
|
1358
|
+
# result.wait_until_done! timeout: 60
|
1359
|
+
# if result.response?
|
1360
|
+
# p result.response
|
1361
|
+
# else
|
1362
|
+
# puts "Error!"
|
1363
|
+
# end
|
1364
|
+
#
|
1365
|
+
def create_azure_node_pool request, options = nil
|
1366
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1367
|
+
|
1368
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::CreateAzureNodePoolRequest
|
1369
|
+
|
1370
|
+
# Converts hash and nil to an options object
|
1371
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1372
|
+
|
1373
|
+
# Customize the options with defaults
|
1374
|
+
metadata = @config.rpcs.create_azure_node_pool.metadata.to_h
|
1375
|
+
|
1376
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1377
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1378
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1379
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1380
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1381
|
+
|
1382
|
+
header_params = {}
|
1383
|
+
if request.parent
|
1384
|
+
header_params["parent"] = request.parent
|
1385
|
+
end
|
1386
|
+
|
1387
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1388
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1389
|
+
|
1390
|
+
options.apply_defaults timeout: @config.rpcs.create_azure_node_pool.timeout,
|
1391
|
+
metadata: metadata,
|
1392
|
+
retry_policy: @config.rpcs.create_azure_node_pool.retry_policy
|
1393
|
+
|
1394
|
+
options.apply_defaults timeout: @config.timeout,
|
1395
|
+
metadata: @config.metadata,
|
1396
|
+
retry_policy: @config.retry_policy
|
1397
|
+
|
1398
|
+
@azure_clusters_stub.call_rpc :create_azure_node_pool, request, options: options do |response, operation|
|
1399
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1400
|
+
yield response, operation if block_given?
|
1401
|
+
return response
|
1402
|
+
end
|
1403
|
+
rescue ::GRPC::BadStatus => e
|
1404
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1405
|
+
end
|
1406
|
+
|
1407
|
+
##
|
1408
|
+
# Updates an {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool}.
|
1409
|
+
#
|
1410
|
+
# @overload update_azure_node_pool(request, options = nil)
|
1411
|
+
# Pass arguments to `update_azure_node_pool` via a request object, either of type
|
1412
|
+
# {::Google::Cloud::GkeMultiCloud::V1::UpdateAzureNodePoolRequest} or an equivalent Hash.
|
1413
|
+
#
|
1414
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::UpdateAzureNodePoolRequest, ::Hash]
|
1415
|
+
# A request object representing the call parameters. Required. To specify no
|
1416
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1417
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1418
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1419
|
+
#
|
1420
|
+
# @overload update_azure_node_pool(azure_node_pool: nil, validate_only: nil, update_mask: nil)
|
1421
|
+
# Pass arguments to `update_azure_node_pool` via keyword arguments. Note that at
|
1422
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1423
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1424
|
+
#
|
1425
|
+
# @param azure_node_pool [::Google::Cloud::GkeMultiCloud::V1::AzureNodePool, ::Hash]
|
1426
|
+
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resource to update.
|
1427
|
+
# @param validate_only [::Boolean]
|
1428
|
+
# If set, only validate the request, but don't actually update the node pool.
|
1429
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1430
|
+
# Required. Mask of fields to update. At least one path must be supplied in
|
1431
|
+
# this field. The elements of the repeated paths field can only include these
|
1432
|
+
# fields from {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool}:
|
1433
|
+
#
|
1434
|
+
# *. `annotations`.
|
1435
|
+
# * `version`.
|
1436
|
+
# * `autoscaling.min_node_count`.
|
1437
|
+
# * `autoscaling.max_node_count`.
|
1438
|
+
# * `config.vm_size`.
|
1439
|
+
#
|
1440
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1441
|
+
# @yieldparam response [::Gapic::Operation]
|
1442
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1443
|
+
#
|
1444
|
+
# @return [::Gapic::Operation]
|
1445
|
+
#
|
1446
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1447
|
+
#
|
1448
|
+
# @example Basic example
|
1449
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1450
|
+
#
|
1451
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1452
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1453
|
+
#
|
1454
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1455
|
+
# request = Google::Cloud::GkeMultiCloud::V1::UpdateAzureNodePoolRequest.new
|
1456
|
+
#
|
1457
|
+
# # Call the update_azure_node_pool method.
|
1458
|
+
# result = client.update_azure_node_pool request
|
1459
|
+
#
|
1460
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1461
|
+
# # object to check the status of an operation, cancel it, or wait
|
1462
|
+
# # for results. Here is how to block until completion:
|
1463
|
+
# result.wait_until_done! timeout: 60
|
1464
|
+
# if result.response?
|
1465
|
+
# p result.response
|
1466
|
+
# else
|
1467
|
+
# puts "Error!"
|
1468
|
+
# end
|
1469
|
+
#
|
1470
|
+
def update_azure_node_pool request, options = nil
|
1471
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1472
|
+
|
1473
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::UpdateAzureNodePoolRequest
|
1474
|
+
|
1475
|
+
# Converts hash and nil to an options object
|
1476
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1477
|
+
|
1478
|
+
# Customize the options with defaults
|
1479
|
+
metadata = @config.rpcs.update_azure_node_pool.metadata.to_h
|
1480
|
+
|
1481
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1482
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1483
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1484
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1485
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1486
|
+
|
1487
|
+
header_params = {}
|
1488
|
+
if request.azure_node_pool&.name
|
1489
|
+
header_params["azure_node_pool.name"] = request.azure_node_pool.name
|
1490
|
+
end
|
1491
|
+
|
1492
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1493
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1494
|
+
|
1495
|
+
options.apply_defaults timeout: @config.rpcs.update_azure_node_pool.timeout,
|
1496
|
+
metadata: metadata,
|
1497
|
+
retry_policy: @config.rpcs.update_azure_node_pool.retry_policy
|
1498
|
+
|
1499
|
+
options.apply_defaults timeout: @config.timeout,
|
1500
|
+
metadata: @config.metadata,
|
1501
|
+
retry_policy: @config.retry_policy
|
1502
|
+
|
1503
|
+
@azure_clusters_stub.call_rpc :update_azure_node_pool, request, options: options do |response, operation|
|
1504
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1505
|
+
yield response, operation if block_given?
|
1506
|
+
return response
|
1507
|
+
end
|
1508
|
+
rescue ::GRPC::BadStatus => e
|
1509
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1510
|
+
end
|
1511
|
+
|
1512
|
+
##
|
1513
|
+
# Describes a specific {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resource.
|
1514
|
+
#
|
1515
|
+
# @overload get_azure_node_pool(request, options = nil)
|
1516
|
+
# Pass arguments to `get_azure_node_pool` via a request object, either of type
|
1517
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAzureNodePoolRequest} or an equivalent Hash.
|
1518
|
+
#
|
1519
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAzureNodePoolRequest, ::Hash]
|
1520
|
+
# A request object representing the call parameters. Required. To specify no
|
1521
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1522
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1523
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1524
|
+
#
|
1525
|
+
# @overload get_azure_node_pool(name: nil)
|
1526
|
+
# Pass arguments to `get_azure_node_pool` via keyword arguments. Note that at
|
1527
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1528
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1529
|
+
#
|
1530
|
+
# @param name [::String]
|
1531
|
+
# Required. The name of the {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resource to describe.
|
1532
|
+
#
|
1533
|
+
# `AzureNodePool` names are formatted as
|
1534
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
|
1535
|
+
#
|
1536
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1537
|
+
# for more details on Google Cloud resource names.
|
1538
|
+
#
|
1539
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1540
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::AzureNodePool]
|
1541
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1542
|
+
#
|
1543
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureNodePool]
|
1544
|
+
#
|
1545
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1546
|
+
#
|
1547
|
+
# @example Basic example
|
1548
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1549
|
+
#
|
1550
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1551
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1552
|
+
#
|
1553
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1554
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAzureNodePoolRequest.new
|
1555
|
+
#
|
1556
|
+
# # Call the get_azure_node_pool method.
|
1557
|
+
# result = client.get_azure_node_pool request
|
1558
|
+
#
|
1559
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AzureNodePool.
|
1560
|
+
# p result
|
1561
|
+
#
|
1562
|
+
def get_azure_node_pool request, options = nil
|
1563
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1564
|
+
|
1565
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAzureNodePoolRequest
|
1566
|
+
|
1567
|
+
# Converts hash and nil to an options object
|
1568
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1569
|
+
|
1570
|
+
# Customize the options with defaults
|
1571
|
+
metadata = @config.rpcs.get_azure_node_pool.metadata.to_h
|
1572
|
+
|
1573
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1574
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1575
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1576
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1577
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1578
|
+
|
1579
|
+
header_params = {}
|
1580
|
+
if request.name
|
1581
|
+
header_params["name"] = request.name
|
1582
|
+
end
|
1583
|
+
|
1584
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1585
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1586
|
+
|
1587
|
+
options.apply_defaults timeout: @config.rpcs.get_azure_node_pool.timeout,
|
1588
|
+
metadata: metadata,
|
1589
|
+
retry_policy: @config.rpcs.get_azure_node_pool.retry_policy
|
1590
|
+
|
1591
|
+
options.apply_defaults timeout: @config.timeout,
|
1592
|
+
metadata: @config.metadata,
|
1593
|
+
retry_policy: @config.retry_policy
|
1594
|
+
|
1595
|
+
@azure_clusters_stub.call_rpc :get_azure_node_pool, request, options: options do |response, operation|
|
1596
|
+
yield response, operation if block_given?
|
1597
|
+
return response
|
1598
|
+
end
|
1599
|
+
rescue ::GRPC::BadStatus => e
|
1600
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1601
|
+
end
|
1602
|
+
|
1603
|
+
##
|
1604
|
+
# Lists all {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resources on a given {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}.
|
1605
|
+
#
|
1606
|
+
# @overload list_azure_node_pools(request, options = nil)
|
1607
|
+
# Pass arguments to `list_azure_node_pools` via a request object, either of type
|
1608
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAzureNodePoolsRequest} or an equivalent Hash.
|
1609
|
+
#
|
1610
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::ListAzureNodePoolsRequest, ::Hash]
|
1611
|
+
# A request object representing the call parameters. Required. To specify no
|
1612
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1613
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1614
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1615
|
+
#
|
1616
|
+
# @overload list_azure_node_pools(parent: nil, page_size: nil, page_token: nil)
|
1617
|
+
# Pass arguments to `list_azure_node_pools` via keyword arguments. Note that at
|
1618
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1619
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1620
|
+
#
|
1621
|
+
# @param parent [::String]
|
1622
|
+
# Required. The parent `AzureCluster` which owns this collection of
|
1623
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resources.
|
1624
|
+
#
|
1625
|
+
# `AzureCluster` names are formatted as
|
1626
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
|
1627
|
+
#
|
1628
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1629
|
+
# for more details on Google Cloud resource names.
|
1630
|
+
# @param page_size [::Integer]
|
1631
|
+
# The maximum number of items to return.
|
1632
|
+
#
|
1633
|
+
# If not specified, a default value of 50 will be used by the service.
|
1634
|
+
# Regardless of the pageSize value, the response can include a partial list
|
1635
|
+
# and a caller should only rely on response's
|
1636
|
+
# {::Google::Cloud::GkeMultiCloud::V1::ListAzureNodePoolsResponse#next_page_token nextPageToken} to determine if
|
1637
|
+
# there are more instances left to be queried.
|
1638
|
+
# @param page_token [::String]
|
1639
|
+
# The `nextPageToken` value returned from a previous
|
1640
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client#list_azure_node_pools azureNodePools.list} request, if any.
|
1641
|
+
#
|
1642
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1643
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureNodePool>]
|
1644
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1645
|
+
#
|
1646
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeMultiCloud::V1::AzureNodePool>]
|
1647
|
+
#
|
1648
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1649
|
+
#
|
1650
|
+
# @example Basic example
|
1651
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1652
|
+
#
|
1653
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1654
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1655
|
+
#
|
1656
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1657
|
+
# request = Google::Cloud::GkeMultiCloud::V1::ListAzureNodePoolsRequest.new
|
1658
|
+
#
|
1659
|
+
# # Call the list_azure_node_pools method.
|
1660
|
+
# result = client.list_azure_node_pools request
|
1661
|
+
#
|
1662
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1663
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1664
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1665
|
+
# # methods are also available for managing paging directly.
|
1666
|
+
# result.each do |response|
|
1667
|
+
# # Each element is of type ::Google::Cloud::GkeMultiCloud::V1::AzureNodePool.
|
1668
|
+
# p response
|
1669
|
+
# end
|
1670
|
+
#
|
1671
|
+
def list_azure_node_pools request, options = nil
|
1672
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1673
|
+
|
1674
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::ListAzureNodePoolsRequest
|
1675
|
+
|
1676
|
+
# Converts hash and nil to an options object
|
1677
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1678
|
+
|
1679
|
+
# Customize the options with defaults
|
1680
|
+
metadata = @config.rpcs.list_azure_node_pools.metadata.to_h
|
1681
|
+
|
1682
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1683
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1684
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1685
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1686
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1687
|
+
|
1688
|
+
header_params = {}
|
1689
|
+
if request.parent
|
1690
|
+
header_params["parent"] = request.parent
|
1691
|
+
end
|
1692
|
+
|
1693
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1694
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1695
|
+
|
1696
|
+
options.apply_defaults timeout: @config.rpcs.list_azure_node_pools.timeout,
|
1697
|
+
metadata: metadata,
|
1698
|
+
retry_policy: @config.rpcs.list_azure_node_pools.retry_policy
|
1699
|
+
|
1700
|
+
options.apply_defaults timeout: @config.timeout,
|
1701
|
+
metadata: @config.metadata,
|
1702
|
+
retry_policy: @config.retry_policy
|
1703
|
+
|
1704
|
+
@azure_clusters_stub.call_rpc :list_azure_node_pools, request, options: options do |response, operation|
|
1705
|
+
response = ::Gapic::PagedEnumerable.new @azure_clusters_stub, :list_azure_node_pools, request, response, operation, options
|
1706
|
+
yield response, operation if block_given?
|
1707
|
+
return response
|
1708
|
+
end
|
1709
|
+
rescue ::GRPC::BadStatus => e
|
1710
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1711
|
+
end
|
1712
|
+
|
1713
|
+
##
|
1714
|
+
# Deletes a specific {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resource.
|
1715
|
+
#
|
1716
|
+
# If successful, the response contains a newly created
|
1717
|
+
# {::Google::Longrunning::Operation Operation} resource that can be
|
1718
|
+
# described to track the status of the operation.
|
1719
|
+
#
|
1720
|
+
# @overload delete_azure_node_pool(request, options = nil)
|
1721
|
+
# Pass arguments to `delete_azure_node_pool` via a request object, either of type
|
1722
|
+
# {::Google::Cloud::GkeMultiCloud::V1::DeleteAzureNodePoolRequest} or an equivalent Hash.
|
1723
|
+
#
|
1724
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::DeleteAzureNodePoolRequest, ::Hash]
|
1725
|
+
# A request object representing the call parameters. Required. To specify no
|
1726
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1727
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1728
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1729
|
+
#
|
1730
|
+
# @overload delete_azure_node_pool(name: nil, validate_only: nil, allow_missing: nil, etag: nil)
|
1731
|
+
# Pass arguments to `delete_azure_node_pool` via keyword arguments. Note that at
|
1732
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1733
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1734
|
+
#
|
1735
|
+
# @param name [::String]
|
1736
|
+
# Required. The resource name the {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} to delete.
|
1737
|
+
#
|
1738
|
+
# `AzureNodePool` names are formatted as
|
1739
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<node-pool-id>`.
|
1740
|
+
#
|
1741
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1742
|
+
# for more details on Google Cloud resource names.
|
1743
|
+
# @param validate_only [::Boolean]
|
1744
|
+
# If set, only validate the request, but do not actually delete the node
|
1745
|
+
# pool.
|
1746
|
+
# @param allow_missing [::Boolean]
|
1747
|
+
# If set to true, and the {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool} resource is not found,
|
1748
|
+
# the request will succeed but no action will be taken on the server and a
|
1749
|
+
# completed {::Google::Longrunning::Operation Operation} will be returned.
|
1750
|
+
#
|
1751
|
+
# Useful for idempotent deletion.
|
1752
|
+
# @param etag [::String]
|
1753
|
+
# The current ETag of the {::Google::Cloud::GkeMultiCloud::V1::AzureNodePool AzureNodePool}.
|
1754
|
+
#
|
1755
|
+
# Allows clients to perform deletions through optimistic concurrency control.
|
1756
|
+
#
|
1757
|
+
# If the provided ETag does not match the current etag of the node pool,
|
1758
|
+
# the request will fail and an ABORTED error will be returned.
|
1759
|
+
#
|
1760
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1761
|
+
# @yieldparam response [::Gapic::Operation]
|
1762
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1763
|
+
#
|
1764
|
+
# @return [::Gapic::Operation]
|
1765
|
+
#
|
1766
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1767
|
+
#
|
1768
|
+
# @example Basic example
|
1769
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1770
|
+
#
|
1771
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1772
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1773
|
+
#
|
1774
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1775
|
+
# request = Google::Cloud::GkeMultiCloud::V1::DeleteAzureNodePoolRequest.new
|
1776
|
+
#
|
1777
|
+
# # Call the delete_azure_node_pool method.
|
1778
|
+
# result = client.delete_azure_node_pool request
|
1779
|
+
#
|
1780
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
1781
|
+
# # object to check the status of an operation, cancel it, or wait
|
1782
|
+
# # for results. Here is how to block until completion:
|
1783
|
+
# result.wait_until_done! timeout: 60
|
1784
|
+
# if result.response?
|
1785
|
+
# p result.response
|
1786
|
+
# else
|
1787
|
+
# puts "Error!"
|
1788
|
+
# end
|
1789
|
+
#
|
1790
|
+
def delete_azure_node_pool request, options = nil
|
1791
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1792
|
+
|
1793
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::DeleteAzureNodePoolRequest
|
1794
|
+
|
1795
|
+
# Converts hash and nil to an options object
|
1796
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1797
|
+
|
1798
|
+
# Customize the options with defaults
|
1799
|
+
metadata = @config.rpcs.delete_azure_node_pool.metadata.to_h
|
1800
|
+
|
1801
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1802
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1803
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1804
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1805
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1806
|
+
|
1807
|
+
header_params = {}
|
1808
|
+
if request.name
|
1809
|
+
header_params["name"] = request.name
|
1810
|
+
end
|
1811
|
+
|
1812
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1813
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1814
|
+
|
1815
|
+
options.apply_defaults timeout: @config.rpcs.delete_azure_node_pool.timeout,
|
1816
|
+
metadata: metadata,
|
1817
|
+
retry_policy: @config.rpcs.delete_azure_node_pool.retry_policy
|
1818
|
+
|
1819
|
+
options.apply_defaults timeout: @config.timeout,
|
1820
|
+
metadata: @config.metadata,
|
1821
|
+
retry_policy: @config.retry_policy
|
1822
|
+
|
1823
|
+
@azure_clusters_stub.call_rpc :delete_azure_node_pool, request, options: options do |response, operation|
|
1824
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1825
|
+
yield response, operation if block_given?
|
1826
|
+
return response
|
1827
|
+
end
|
1828
|
+
rescue ::GRPC::BadStatus => e
|
1829
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1830
|
+
end
|
1831
|
+
|
1832
|
+
##
|
1833
|
+
# Returns information, such as supported Azure regions and Kubernetes
|
1834
|
+
# versions, on a given Google Cloud location.
|
1835
|
+
#
|
1836
|
+
# @overload get_azure_server_config(request, options = nil)
|
1837
|
+
# Pass arguments to `get_azure_server_config` via a request object, either of type
|
1838
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAzureServerConfigRequest} or an equivalent Hash.
|
1839
|
+
#
|
1840
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAzureServerConfigRequest, ::Hash]
|
1841
|
+
# A request object representing the call parameters. Required. To specify no
|
1842
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1843
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1844
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1845
|
+
#
|
1846
|
+
# @overload get_azure_server_config(name: nil)
|
1847
|
+
# Pass arguments to `get_azure_server_config` via keyword arguments. Note that at
|
1848
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1849
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1850
|
+
#
|
1851
|
+
# @param name [::String]
|
1852
|
+
# Required. The name of the {::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig AzureServerConfig} resource to describe.
|
1853
|
+
#
|
1854
|
+
# `AzureServerConfig` names are formatted as
|
1855
|
+
# `projects/<project-id>/locations/<region>/azureServerConfig`.
|
1856
|
+
#
|
1857
|
+
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1858
|
+
# for more details on Google Cloud resource names.
|
1859
|
+
#
|
1860
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1861
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig]
|
1862
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1863
|
+
#
|
1864
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureServerConfig]
|
1865
|
+
#
|
1866
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1867
|
+
#
|
1868
|
+
# @example Basic example
|
1869
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1870
|
+
#
|
1871
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1872
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1873
|
+
#
|
1874
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1875
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAzureServerConfigRequest.new
|
1876
|
+
#
|
1877
|
+
# # Call the get_azure_server_config method.
|
1878
|
+
# result = client.get_azure_server_config request
|
1879
|
+
#
|
1880
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AzureServerConfig.
|
1881
|
+
# p result
|
1882
|
+
#
|
1883
|
+
def get_azure_server_config request, options = nil
|
1884
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1885
|
+
|
1886
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAzureServerConfigRequest
|
1887
|
+
|
1888
|
+
# Converts hash and nil to an options object
|
1889
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1890
|
+
|
1891
|
+
# Customize the options with defaults
|
1892
|
+
metadata = @config.rpcs.get_azure_server_config.metadata.to_h
|
1893
|
+
|
1894
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1895
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1896
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1897
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1898
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1899
|
+
|
1900
|
+
header_params = {}
|
1901
|
+
if request.name
|
1902
|
+
header_params["name"] = request.name
|
1903
|
+
end
|
1904
|
+
|
1905
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1906
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1907
|
+
|
1908
|
+
options.apply_defaults timeout: @config.rpcs.get_azure_server_config.timeout,
|
1909
|
+
metadata: metadata,
|
1910
|
+
retry_policy: @config.rpcs.get_azure_server_config.retry_policy
|
1911
|
+
|
1912
|
+
options.apply_defaults timeout: @config.timeout,
|
1913
|
+
metadata: @config.metadata,
|
1914
|
+
retry_policy: @config.retry_policy
|
1915
|
+
|
1916
|
+
@azure_clusters_stub.call_rpc :get_azure_server_config, request, options: options do |response, operation|
|
1917
|
+
yield response, operation if block_given?
|
1918
|
+
return response
|
1919
|
+
end
|
1920
|
+
rescue ::GRPC::BadStatus => e
|
1921
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1922
|
+
end
|
1923
|
+
|
1924
|
+
##
|
1925
|
+
# Configuration class for the AzureClusters API.
|
1926
|
+
#
|
1927
|
+
# This class represents the configuration for AzureClusters,
|
1928
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1929
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1930
|
+
# applied individually to specific RPCs. See
|
1931
|
+
# {::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client::Configuration::Rpcs}
|
1932
|
+
# for a list of RPCs that can be configured independently.
|
1933
|
+
#
|
1934
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1935
|
+
# on construction.
|
1936
|
+
#
|
1937
|
+
# @example
|
1938
|
+
#
|
1939
|
+
# # Modify the global config, setting the timeout for
|
1940
|
+
# # create_azure_client to 20 seconds,
|
1941
|
+
# # and all remaining timeouts to 10 seconds.
|
1942
|
+
# ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.configure do |config|
|
1943
|
+
# config.timeout = 10.0
|
1944
|
+
# config.rpcs.create_azure_client.timeout = 20.0
|
1945
|
+
# end
|
1946
|
+
#
|
1947
|
+
# # Apply the above configuration only to a new client.
|
1948
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new do |config|
|
1949
|
+
# config.timeout = 10.0
|
1950
|
+
# config.rpcs.create_azure_client.timeout = 20.0
|
1951
|
+
# end
|
1952
|
+
#
|
1953
|
+
# @!attribute [rw] endpoint
|
1954
|
+
# The hostname or hostname:port of the service endpoint.
|
1955
|
+
# Defaults to `"gkemulticloud.googleapis.com"`.
|
1956
|
+
# @return [::String]
|
1957
|
+
# @!attribute [rw] credentials
|
1958
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1959
|
+
# * (`String`) The path to a service account key file in JSON format
|
1960
|
+
# * (`Hash`) A service account key as a Hash
|
1961
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1962
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1963
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1964
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1965
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1966
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1967
|
+
# * (`nil`) indicating no credentials
|
1968
|
+
# @return [::Object]
|
1969
|
+
# @!attribute [rw] scope
|
1970
|
+
# The OAuth scopes
|
1971
|
+
# @return [::Array<::String>]
|
1972
|
+
# @!attribute [rw] lib_name
|
1973
|
+
# The library name as recorded in instrumentation and logging
|
1974
|
+
# @return [::String]
|
1975
|
+
# @!attribute [rw] lib_version
|
1976
|
+
# The library version as recorded in instrumentation and logging
|
1977
|
+
# @return [::String]
|
1978
|
+
# @!attribute [rw] channel_args
|
1979
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1980
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1981
|
+
# @return [::Hash]
|
1982
|
+
# @!attribute [rw] interceptors
|
1983
|
+
# An array of interceptors that are run before calls are executed.
|
1984
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1985
|
+
# @!attribute [rw] timeout
|
1986
|
+
# The call timeout in seconds.
|
1987
|
+
# @return [::Numeric]
|
1988
|
+
# @!attribute [rw] metadata
|
1989
|
+
# Additional gRPC headers to be sent with the call.
|
1990
|
+
# @return [::Hash{::Symbol=>::String}]
|
1991
|
+
# @!attribute [rw] retry_policy
|
1992
|
+
# The retry policy. The value is a hash with the following keys:
|
1993
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1994
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1995
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1996
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1997
|
+
# trigger a retry.
|
1998
|
+
# @return [::Hash]
|
1999
|
+
# @!attribute [rw] quota_project
|
2000
|
+
# A separate project against which to charge quota.
|
2001
|
+
# @return [::String]
|
2002
|
+
#
|
2003
|
+
class Configuration
|
2004
|
+
extend ::Gapic::Config
|
2005
|
+
|
2006
|
+
config_attr :endpoint, "gkemulticloud.googleapis.com", ::String
|
2007
|
+
config_attr :credentials, nil do |value|
|
2008
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2009
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
2010
|
+
allowed.any? { |klass| klass === value }
|
2011
|
+
end
|
2012
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
2013
|
+
config_attr :lib_name, nil, ::String, nil
|
2014
|
+
config_attr :lib_version, nil, ::String, nil
|
2015
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2016
|
+
config_attr :interceptors, nil, ::Array, nil
|
2017
|
+
config_attr :timeout, nil, ::Numeric, nil
|
2018
|
+
config_attr :metadata, nil, ::Hash, nil
|
2019
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2020
|
+
config_attr :quota_project, nil, ::String, nil
|
2021
|
+
|
2022
|
+
# @private
|
2023
|
+
def initialize parent_config = nil
|
2024
|
+
@parent_config = parent_config unless parent_config.nil?
|
2025
|
+
|
2026
|
+
yield self if block_given?
|
2027
|
+
end
|
2028
|
+
|
2029
|
+
##
|
2030
|
+
# Configurations for individual RPCs
|
2031
|
+
# @return [Rpcs]
|
2032
|
+
#
|
2033
|
+
def rpcs
|
2034
|
+
@rpcs ||= begin
|
2035
|
+
parent_rpcs = nil
|
2036
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2037
|
+
Rpcs.new parent_rpcs
|
2038
|
+
end
|
2039
|
+
end
|
2040
|
+
|
2041
|
+
##
|
2042
|
+
# Configuration RPC class for the AzureClusters API.
|
2043
|
+
#
|
2044
|
+
# Includes fields providing the configuration for each RPC in this service.
|
2045
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2046
|
+
# the following configuration fields:
|
2047
|
+
#
|
2048
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2049
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
2050
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2051
|
+
# include the following keys:
|
2052
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
2053
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
2054
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
2055
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
2056
|
+
# trigger a retry.
|
2057
|
+
#
|
2058
|
+
class Rpcs
|
2059
|
+
##
|
2060
|
+
# RPC-specific configuration for `create_azure_client`
|
2061
|
+
# @return [::Gapic::Config::Method]
|
2062
|
+
#
|
2063
|
+
attr_reader :create_azure_client
|
2064
|
+
##
|
2065
|
+
# RPC-specific configuration for `get_azure_client`
|
2066
|
+
# @return [::Gapic::Config::Method]
|
2067
|
+
#
|
2068
|
+
attr_reader :get_azure_client
|
2069
|
+
##
|
2070
|
+
# RPC-specific configuration for `list_azure_clients`
|
2071
|
+
# @return [::Gapic::Config::Method]
|
2072
|
+
#
|
2073
|
+
attr_reader :list_azure_clients
|
2074
|
+
##
|
2075
|
+
# RPC-specific configuration for `delete_azure_client`
|
2076
|
+
# @return [::Gapic::Config::Method]
|
2077
|
+
#
|
2078
|
+
attr_reader :delete_azure_client
|
2079
|
+
##
|
2080
|
+
# RPC-specific configuration for `create_azure_cluster`
|
2081
|
+
# @return [::Gapic::Config::Method]
|
2082
|
+
#
|
2083
|
+
attr_reader :create_azure_cluster
|
2084
|
+
##
|
2085
|
+
# RPC-specific configuration for `update_azure_cluster`
|
2086
|
+
# @return [::Gapic::Config::Method]
|
2087
|
+
#
|
2088
|
+
attr_reader :update_azure_cluster
|
2089
|
+
##
|
2090
|
+
# RPC-specific configuration for `get_azure_cluster`
|
2091
|
+
# @return [::Gapic::Config::Method]
|
2092
|
+
#
|
2093
|
+
attr_reader :get_azure_cluster
|
2094
|
+
##
|
2095
|
+
# RPC-specific configuration for `list_azure_clusters`
|
2096
|
+
# @return [::Gapic::Config::Method]
|
2097
|
+
#
|
2098
|
+
attr_reader :list_azure_clusters
|
2099
|
+
##
|
2100
|
+
# RPC-specific configuration for `delete_azure_cluster`
|
2101
|
+
# @return [::Gapic::Config::Method]
|
2102
|
+
#
|
2103
|
+
attr_reader :delete_azure_cluster
|
2104
|
+
##
|
2105
|
+
# RPC-specific configuration for `generate_azure_access_token`
|
2106
|
+
# @return [::Gapic::Config::Method]
|
2107
|
+
#
|
2108
|
+
attr_reader :generate_azure_access_token
|
2109
|
+
##
|
2110
|
+
# RPC-specific configuration for `create_azure_node_pool`
|
2111
|
+
# @return [::Gapic::Config::Method]
|
2112
|
+
#
|
2113
|
+
attr_reader :create_azure_node_pool
|
2114
|
+
##
|
2115
|
+
# RPC-specific configuration for `update_azure_node_pool`
|
2116
|
+
# @return [::Gapic::Config::Method]
|
2117
|
+
#
|
2118
|
+
attr_reader :update_azure_node_pool
|
2119
|
+
##
|
2120
|
+
# RPC-specific configuration for `get_azure_node_pool`
|
2121
|
+
# @return [::Gapic::Config::Method]
|
2122
|
+
#
|
2123
|
+
attr_reader :get_azure_node_pool
|
2124
|
+
##
|
2125
|
+
# RPC-specific configuration for `list_azure_node_pools`
|
2126
|
+
# @return [::Gapic::Config::Method]
|
2127
|
+
#
|
2128
|
+
attr_reader :list_azure_node_pools
|
2129
|
+
##
|
2130
|
+
# RPC-specific configuration for `delete_azure_node_pool`
|
2131
|
+
# @return [::Gapic::Config::Method]
|
2132
|
+
#
|
2133
|
+
attr_reader :delete_azure_node_pool
|
2134
|
+
##
|
2135
|
+
# RPC-specific configuration for `get_azure_server_config`
|
2136
|
+
# @return [::Gapic::Config::Method]
|
2137
|
+
#
|
2138
|
+
attr_reader :get_azure_server_config
|
2139
|
+
|
2140
|
+
# @private
|
2141
|
+
def initialize parent_rpcs = nil
|
2142
|
+
create_azure_client_config = parent_rpcs.create_azure_client if parent_rpcs.respond_to? :create_azure_client
|
2143
|
+
@create_azure_client = ::Gapic::Config::Method.new create_azure_client_config
|
2144
|
+
get_azure_client_config = parent_rpcs.get_azure_client if parent_rpcs.respond_to? :get_azure_client
|
2145
|
+
@get_azure_client = ::Gapic::Config::Method.new get_azure_client_config
|
2146
|
+
list_azure_clients_config = parent_rpcs.list_azure_clients if parent_rpcs.respond_to? :list_azure_clients
|
2147
|
+
@list_azure_clients = ::Gapic::Config::Method.new list_azure_clients_config
|
2148
|
+
delete_azure_client_config = parent_rpcs.delete_azure_client if parent_rpcs.respond_to? :delete_azure_client
|
2149
|
+
@delete_azure_client = ::Gapic::Config::Method.new delete_azure_client_config
|
2150
|
+
create_azure_cluster_config = parent_rpcs.create_azure_cluster if parent_rpcs.respond_to? :create_azure_cluster
|
2151
|
+
@create_azure_cluster = ::Gapic::Config::Method.new create_azure_cluster_config
|
2152
|
+
update_azure_cluster_config = parent_rpcs.update_azure_cluster if parent_rpcs.respond_to? :update_azure_cluster
|
2153
|
+
@update_azure_cluster = ::Gapic::Config::Method.new update_azure_cluster_config
|
2154
|
+
get_azure_cluster_config = parent_rpcs.get_azure_cluster if parent_rpcs.respond_to? :get_azure_cluster
|
2155
|
+
@get_azure_cluster = ::Gapic::Config::Method.new get_azure_cluster_config
|
2156
|
+
list_azure_clusters_config = parent_rpcs.list_azure_clusters if parent_rpcs.respond_to? :list_azure_clusters
|
2157
|
+
@list_azure_clusters = ::Gapic::Config::Method.new list_azure_clusters_config
|
2158
|
+
delete_azure_cluster_config = parent_rpcs.delete_azure_cluster if parent_rpcs.respond_to? :delete_azure_cluster
|
2159
|
+
@delete_azure_cluster = ::Gapic::Config::Method.new delete_azure_cluster_config
|
2160
|
+
generate_azure_access_token_config = parent_rpcs.generate_azure_access_token if parent_rpcs.respond_to? :generate_azure_access_token
|
2161
|
+
@generate_azure_access_token = ::Gapic::Config::Method.new generate_azure_access_token_config
|
2162
|
+
create_azure_node_pool_config = parent_rpcs.create_azure_node_pool if parent_rpcs.respond_to? :create_azure_node_pool
|
2163
|
+
@create_azure_node_pool = ::Gapic::Config::Method.new create_azure_node_pool_config
|
2164
|
+
update_azure_node_pool_config = parent_rpcs.update_azure_node_pool if parent_rpcs.respond_to? :update_azure_node_pool
|
2165
|
+
@update_azure_node_pool = ::Gapic::Config::Method.new update_azure_node_pool_config
|
2166
|
+
get_azure_node_pool_config = parent_rpcs.get_azure_node_pool if parent_rpcs.respond_to? :get_azure_node_pool
|
2167
|
+
@get_azure_node_pool = ::Gapic::Config::Method.new get_azure_node_pool_config
|
2168
|
+
list_azure_node_pools_config = parent_rpcs.list_azure_node_pools if parent_rpcs.respond_to? :list_azure_node_pools
|
2169
|
+
@list_azure_node_pools = ::Gapic::Config::Method.new list_azure_node_pools_config
|
2170
|
+
delete_azure_node_pool_config = parent_rpcs.delete_azure_node_pool if parent_rpcs.respond_to? :delete_azure_node_pool
|
2171
|
+
@delete_azure_node_pool = ::Gapic::Config::Method.new delete_azure_node_pool_config
|
2172
|
+
get_azure_server_config_config = parent_rpcs.get_azure_server_config if parent_rpcs.respond_to? :get_azure_server_config
|
2173
|
+
@get_azure_server_config = ::Gapic::Config::Method.new get_azure_server_config_config
|
2174
|
+
|
2175
|
+
yield self if block_given?
|
2176
|
+
end
|
2177
|
+
end
|
2178
|
+
end
|
2179
|
+
end
|
2180
|
+
end
|
2181
|
+
end
|
2182
|
+
end
|
2183
|
+
end
|
2184
|
+
end
|