google-cloud-gke_multi_cloud-v1 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +72 -99
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/client.rb +157 -12
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/operations.rb +28 -6
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/client.rb +1354 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/operations.rb +895 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest/service_stub.rb +595 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters/rest.rb +55 -0
- data/lib/google/cloud/gke_multi_cloud/v1/attached_clusters.rb +6 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/client.rb +492 -10
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/operations.rb +28 -6
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/client.rb +2122 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/operations.rb +895 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest/service_stub.rb +1010 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters/rest.rb +54 -0
- data/lib/google/cloud/gke_multi_cloud/v1/aws_clusters.rb +6 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/client.rb +356 -10
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/operations.rb +28 -6
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/client.rb +2430 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/operations.rb +895 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest/service_stub.rb +1187 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters/rest.rb +54 -0
- data/lib/google/cloud/gke_multi_cloud/v1/azure_clusters.rb +6 -0
- data/lib/google/cloud/gke_multi_cloud/v1/rest.rb +39 -0
- data/lib/google/cloud/gke_multi_cloud/v1/version.rb +1 -1
- data/lib/google/cloud/gke_multi_cloud/v1.rb +5 -0
- data/lib/google/cloud/gkemulticloud/v1/attached_resources_pb.rb +4 -1
- data/lib/google/cloud/gkemulticloud/v1/attached_service_pb.rb +6 -2
- data/lib/google/cloud/gkemulticloud/v1/attached_service_services_pb.rb +2 -0
- data/lib/google/cloud/gkemulticloud/v1/aws_resources_pb.rb +10 -1
- data/lib/google/cloud/gkemulticloud/v1/aws_service_pb.rb +8 -1
- data/lib/google/cloud/gkemulticloud/v1/aws_service_services_pb.rb +18 -0
- data/lib/google/cloud/gkemulticloud/v1/azure_resources_pb.rb +7 -1
- data/lib/google/cloud/gkemulticloud/v1/azure_service_pb.rb +7 -1
- data/lib/google/cloud/gkemulticloud/v1/azure_service_services_pb.rb +11 -0
- data/lib/google/cloud/gkemulticloud/v1/common_resources_pb.rb +4 -1
- data/proto_docs/google/api/client.rb +14 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/attached_resources.rb +48 -2
- data/proto_docs/google/cloud/gkemulticloud/v1/attached_service.rb +55 -2
- data/proto_docs/google/cloud/gkemulticloud/v1/aws_resources.rb +181 -6
- data/proto_docs/google/cloud/gkemulticloud/v1/aws_service.rb +117 -0
- data/proto_docs/google/cloud/gkemulticloud/v1/azure_resources.rb +103 -6
- data/proto_docs/google/cloud/gkemulticloud/v1/azure_service.rb +80 -4
- data/proto_docs/google/cloud/gkemulticloud/v1/common_resources.rb +56 -0
- data/proto_docs/google/type/date.rb +53 -0
- metadata +19 -5
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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 "gapic/rest"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/gke_multi_cloud/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/credentials"
|
26
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/paths"
|
27
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest/operations"
|
28
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest/client"
|
29
|
+
|
30
|
+
module Google
|
31
|
+
module Cloud
|
32
|
+
module GkeMultiCloud
|
33
|
+
module V1
|
34
|
+
##
|
35
|
+
# The AwsClusters API provides a single centrally managed service
|
36
|
+
# to create and manage Anthos clusters that run on AWS infrastructure.
|
37
|
+
#
|
38
|
+
# To load this service and instantiate a REST client:
|
39
|
+
#
|
40
|
+
# require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest"
|
41
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
42
|
+
#
|
43
|
+
module AwsClusters
|
44
|
+
# Client for the REST transport
|
45
|
+
module Rest
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
helper_path = ::File.join __dir__, "rest", "helpers.rb"
|
54
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest/helpers" if ::File.file? helper_path
|
@@ -26,6 +26,7 @@ require "google/cloud/gke_multi_cloud/v1/aws_clusters/credentials"
|
|
26
26
|
require "google/cloud/gke_multi_cloud/v1/aws_clusters/paths"
|
27
27
|
require "google/cloud/gke_multi_cloud/v1/aws_clusters/operations"
|
28
28
|
require "google/cloud/gke_multi_cloud/v1/aws_clusters/client"
|
29
|
+
require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest"
|
29
30
|
|
30
31
|
module Google
|
31
32
|
module Cloud
|
@@ -40,6 +41,11 @@ module Google
|
|
40
41
|
# require "google/cloud/gke_multi_cloud/v1/aws_clusters"
|
41
42
|
# client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Client.new
|
42
43
|
#
|
44
|
+
# @example Load this service and instantiate a REST client
|
45
|
+
#
|
46
|
+
# require "google/cloud/gke_multi_cloud/v1/aws_clusters/rest"
|
47
|
+
# client = ::Google::Cloud::GkeMultiCloud::V1::AwsClusters::Rest::Client.new
|
48
|
+
#
|
43
49
|
module AwsClusters
|
44
50
|
end
|
45
51
|
end
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# to create and manage Anthos clusters that run on Azure infrastructure.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "gkemulticloud.$UNIVERSE_DOMAIN$"
|
36
|
+
|
34
37
|
include Paths
|
35
38
|
|
36
39
|
# @private
|
@@ -95,6 +98,11 @@ module Google
|
|
95
98
|
|
96
99
|
default_config.rpcs.delete_azure_cluster.timeout = 60.0
|
97
100
|
|
101
|
+
default_config.rpcs.generate_azure_cluster_agent_token.timeout = 60.0
|
102
|
+
default_config.rpcs.generate_azure_cluster_agent_token.retry_policy = {
|
103
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
104
|
+
}
|
105
|
+
|
98
106
|
default_config.rpcs.generate_azure_access_token.timeout = 60.0
|
99
107
|
default_config.rpcs.generate_azure_access_token.retry_policy = {
|
100
108
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
@@ -116,6 +124,16 @@ module Google
|
|
116
124
|
|
117
125
|
default_config.rpcs.delete_azure_node_pool.timeout = 60.0
|
118
126
|
|
127
|
+
default_config.rpcs.get_azure_open_id_config.timeout = 60.0
|
128
|
+
default_config.rpcs.get_azure_open_id_config.retry_policy = {
|
129
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
130
|
+
}
|
131
|
+
|
132
|
+
default_config.rpcs.get_azure_json_web_keys.timeout = 60.0
|
133
|
+
default_config.rpcs.get_azure_json_web_keys.retry_policy = {
|
134
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
135
|
+
}
|
136
|
+
|
119
137
|
default_config.rpcs.get_azure_server_config.timeout = 60.0
|
120
138
|
default_config.rpcs.get_azure_server_config.retry_policy = {
|
121
139
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
@@ -147,6 +165,15 @@ module Google
|
|
147
165
|
@config
|
148
166
|
end
|
149
167
|
|
168
|
+
##
|
169
|
+
# The effective universe domain
|
170
|
+
#
|
171
|
+
# @return [String]
|
172
|
+
#
|
173
|
+
def universe_domain
|
174
|
+
@azure_clusters_stub.universe_domain
|
175
|
+
end
|
176
|
+
|
150
177
|
##
|
151
178
|
# Create a new AzureClusters client object.
|
152
179
|
#
|
@@ -180,8 +207,9 @@ module Google
|
|
180
207
|
credentials = @config.credentials
|
181
208
|
# Use self-signed JWT if the endpoint is unchanged from default,
|
182
209
|
# but only if the default endpoint does not have a region prefix.
|
183
|
-
enable_self_signed_jwt = @config.endpoint
|
184
|
-
|
210
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
211
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
212
|
+
!@config.endpoint.split(".").first.include?("-"))
|
185
213
|
credentials ||= Credentials.default scope: @config.scope,
|
186
214
|
enable_self_signed_jwt: enable_self_signed_jwt
|
187
215
|
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
@@ -194,12 +222,15 @@ module Google
|
|
194
222
|
config.credentials = credentials
|
195
223
|
config.quota_project = @quota_project_id
|
196
224
|
config.endpoint = @config.endpoint
|
225
|
+
config.universe_domain = @config.universe_domain
|
197
226
|
end
|
198
227
|
|
199
228
|
@azure_clusters_stub = ::Gapic::ServiceStub.new(
|
200
229
|
::Google::Cloud::GkeMultiCloud::V1::AzureClusters::Stub,
|
201
|
-
credentials:
|
202
|
-
endpoint:
|
230
|
+
credentials: credentials,
|
231
|
+
endpoint: @config.endpoint,
|
232
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
233
|
+
universe_domain: @config.universe_domain,
|
203
234
|
channel_args: @config.channel_args,
|
204
235
|
interceptors: @config.interceptors,
|
205
236
|
channel_pool_config: @config.channel_pool
|
@@ -815,6 +846,7 @@ module Google
|
|
815
846
|
# * `control_plane.vm_size`.
|
816
847
|
# * `annotations`.
|
817
848
|
# * `authorization.admin_users`.
|
849
|
+
# * `authorization.admin_groups`.
|
818
850
|
# * `control_plane.root_volume.size_gib`.
|
819
851
|
# * `azure_services_authentication`.
|
820
852
|
# * `azure_services_authentication.tenant_id`.
|
@@ -1226,6 +1258,109 @@ module Google
|
|
1226
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
1227
1259
|
end
|
1228
1260
|
|
1261
|
+
##
|
1262
|
+
# Generates an access token for a cluster agent.
|
1263
|
+
#
|
1264
|
+
# @overload generate_azure_cluster_agent_token(request, options = nil)
|
1265
|
+
# Pass arguments to `generate_azure_cluster_agent_token` via a request object, either of type
|
1266
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenRequest} or an equivalent Hash.
|
1267
|
+
#
|
1268
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenRequest, ::Hash]
|
1269
|
+
# A request object representing the call parameters. Required. To specify no
|
1270
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1271
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1272
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1273
|
+
#
|
1274
|
+
# @overload generate_azure_cluster_agent_token(azure_cluster: nil, subject_token: nil, subject_token_type: nil, version: nil, node_pool_id: nil, grant_type: nil, audience: nil, scope: nil, requested_token_type: nil, options: nil)
|
1275
|
+
# Pass arguments to `generate_azure_cluster_agent_token` via keyword arguments. Note that at
|
1276
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1277
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1278
|
+
#
|
1279
|
+
# @param azure_cluster [::String]
|
1280
|
+
# Required.
|
1281
|
+
# @param subject_token [::String]
|
1282
|
+
# Required.
|
1283
|
+
# @param subject_token_type [::String]
|
1284
|
+
# Required.
|
1285
|
+
# @param version [::String]
|
1286
|
+
# Required.
|
1287
|
+
# @param node_pool_id [::String]
|
1288
|
+
# Optional.
|
1289
|
+
# @param grant_type [::String]
|
1290
|
+
# Optional.
|
1291
|
+
# @param audience [::String]
|
1292
|
+
# Optional.
|
1293
|
+
# @param scope [::String]
|
1294
|
+
# Optional.
|
1295
|
+
# @param requested_token_type [::String]
|
1296
|
+
# Optional.
|
1297
|
+
# @param options [::String]
|
1298
|
+
# Optional.
|
1299
|
+
#
|
1300
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1301
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenResponse]
|
1302
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1303
|
+
#
|
1304
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenResponse]
|
1305
|
+
#
|
1306
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1307
|
+
#
|
1308
|
+
# @example Basic example
|
1309
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
1310
|
+
#
|
1311
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1312
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
1313
|
+
#
|
1314
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1315
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenRequest.new
|
1316
|
+
#
|
1317
|
+
# # Call the generate_azure_cluster_agent_token method.
|
1318
|
+
# result = client.generate_azure_cluster_agent_token request
|
1319
|
+
#
|
1320
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenResponse.
|
1321
|
+
# p result
|
1322
|
+
#
|
1323
|
+
def generate_azure_cluster_agent_token request, options = nil
|
1324
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1325
|
+
|
1326
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GenerateAzureClusterAgentTokenRequest
|
1327
|
+
|
1328
|
+
# Converts hash and nil to an options object
|
1329
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1330
|
+
|
1331
|
+
# Customize the options with defaults
|
1332
|
+
metadata = @config.rpcs.generate_azure_cluster_agent_token.metadata.to_h
|
1333
|
+
|
1334
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1335
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1336
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1337
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
1338
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1339
|
+
|
1340
|
+
header_params = {}
|
1341
|
+
if request.azure_cluster
|
1342
|
+
header_params["azure_cluster"] = request.azure_cluster
|
1343
|
+
end
|
1344
|
+
|
1345
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1346
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1347
|
+
|
1348
|
+
options.apply_defaults timeout: @config.rpcs.generate_azure_cluster_agent_token.timeout,
|
1349
|
+
metadata: metadata,
|
1350
|
+
retry_policy: @config.rpcs.generate_azure_cluster_agent_token.retry_policy
|
1351
|
+
|
1352
|
+
options.apply_defaults timeout: @config.timeout,
|
1353
|
+
metadata: @config.metadata,
|
1354
|
+
retry_policy: @config.retry_policy
|
1355
|
+
|
1356
|
+
@azure_clusters_stub.call_rpc :generate_azure_cluster_agent_token, request, options: options do |response, operation|
|
1357
|
+
yield response, operation if block_given?
|
1358
|
+
return response
|
1359
|
+
end
|
1360
|
+
rescue ::GRPC::BadStatus => e
|
1361
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1362
|
+
end
|
1363
|
+
|
1229
1364
|
##
|
1230
1365
|
# Generates a short-lived access token to authenticate to a given
|
1231
1366
|
# {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster} resource.
|
@@ -1251,7 +1386,7 @@ module Google
|
|
1251
1386
|
# authenticate to.
|
1252
1387
|
#
|
1253
1388
|
# `AzureCluster` names are formatted as
|
1254
|
-
# `projects/<project-id>/locations/<region>/
|
1389
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
|
1255
1390
|
#
|
1256
1391
|
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1257
1392
|
# for more details on Google Cloud resource names.
|
@@ -1348,7 +1483,8 @@ module Google
|
|
1348
1483
|
# Required. The {::Google::Cloud::GkeMultiCloud::V1::AzureCluster AzureCluster}
|
1349
1484
|
# resource where this node pool will be created.
|
1350
1485
|
#
|
1351
|
-
#
|
1486
|
+
# `AzureCluster` names are formatted as
|
1487
|
+
# `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>`.
|
1352
1488
|
#
|
1353
1489
|
# See [Resource Names](https://cloud.google.com/apis/design/resource_names)
|
1354
1490
|
# for more details on Google Cloud resource names.
|
@@ -1474,6 +1610,8 @@ module Google
|
|
1474
1610
|
# * `autoscaling.min_node_count`.
|
1475
1611
|
# * `autoscaling.max_node_count`.
|
1476
1612
|
# * `config.ssh_config.authorized_key`.
|
1613
|
+
# * `management.auto_repair`.
|
1614
|
+
# * `management`.
|
1477
1615
|
#
|
1478
1616
|
# @yield [response, operation] Access the result along with the RPC operation
|
1479
1617
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1876,6 +2014,185 @@ module Google
|
|
1876
2014
|
raise ::Google::Cloud::Error.from_error(e)
|
1877
2015
|
end
|
1878
2016
|
|
2017
|
+
##
|
2018
|
+
# Gets the OIDC discovery document for the cluster.
|
2019
|
+
# See the
|
2020
|
+
# [OpenID Connect Discovery 1.0
|
2021
|
+
# specification](https://openid.net/specs/openid-connect-discovery-1_0.html)
|
2022
|
+
# for details.
|
2023
|
+
#
|
2024
|
+
# @overload get_azure_open_id_config(request, options = nil)
|
2025
|
+
# Pass arguments to `get_azure_open_id_config` via a request object, either of type
|
2026
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAzureOpenIdConfigRequest} or an equivalent Hash.
|
2027
|
+
#
|
2028
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAzureOpenIdConfigRequest, ::Hash]
|
2029
|
+
# A request object representing the call parameters. Required. To specify no
|
2030
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2031
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2032
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2033
|
+
#
|
2034
|
+
# @overload get_azure_open_id_config(azure_cluster: nil)
|
2035
|
+
# Pass arguments to `get_azure_open_id_config` via keyword arguments. Note that at
|
2036
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2037
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2038
|
+
#
|
2039
|
+
# @param azure_cluster [::String]
|
2040
|
+
# Required. The AzureCluster, which owns the OIDC discovery document.
|
2041
|
+
# Format:
|
2042
|
+
# projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
|
2043
|
+
#
|
2044
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2045
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig]
|
2046
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2047
|
+
#
|
2048
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig]
|
2049
|
+
#
|
2050
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2051
|
+
#
|
2052
|
+
# @example Basic example
|
2053
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
2054
|
+
#
|
2055
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2056
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
2057
|
+
#
|
2058
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2059
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAzureOpenIdConfigRequest.new
|
2060
|
+
#
|
2061
|
+
# # Call the get_azure_open_id_config method.
|
2062
|
+
# result = client.get_azure_open_id_config request
|
2063
|
+
#
|
2064
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AzureOpenIdConfig.
|
2065
|
+
# p result
|
2066
|
+
#
|
2067
|
+
def get_azure_open_id_config request, options = nil
|
2068
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2069
|
+
|
2070
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAzureOpenIdConfigRequest
|
2071
|
+
|
2072
|
+
# Converts hash and nil to an options object
|
2073
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2074
|
+
|
2075
|
+
# Customize the options with defaults
|
2076
|
+
metadata = @config.rpcs.get_azure_open_id_config.metadata.to_h
|
2077
|
+
|
2078
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2079
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2080
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2081
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
2082
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2083
|
+
|
2084
|
+
header_params = {}
|
2085
|
+
if request.azure_cluster
|
2086
|
+
header_params["azure_cluster"] = request.azure_cluster
|
2087
|
+
end
|
2088
|
+
|
2089
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2090
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2091
|
+
|
2092
|
+
options.apply_defaults timeout: @config.rpcs.get_azure_open_id_config.timeout,
|
2093
|
+
metadata: metadata,
|
2094
|
+
retry_policy: @config.rpcs.get_azure_open_id_config.retry_policy
|
2095
|
+
|
2096
|
+
options.apply_defaults timeout: @config.timeout,
|
2097
|
+
metadata: @config.metadata,
|
2098
|
+
retry_policy: @config.retry_policy
|
2099
|
+
|
2100
|
+
@azure_clusters_stub.call_rpc :get_azure_open_id_config, request, options: options do |response, operation|
|
2101
|
+
yield response, operation if block_given?
|
2102
|
+
return response
|
2103
|
+
end
|
2104
|
+
rescue ::GRPC::BadStatus => e
|
2105
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2106
|
+
end
|
2107
|
+
|
2108
|
+
##
|
2109
|
+
# Gets the public component of the cluster signing keys in
|
2110
|
+
# JSON Web Key format.
|
2111
|
+
#
|
2112
|
+
# @overload get_azure_json_web_keys(request, options = nil)
|
2113
|
+
# Pass arguments to `get_azure_json_web_keys` via a request object, either of type
|
2114
|
+
# {::Google::Cloud::GkeMultiCloud::V1::GetAzureJsonWebKeysRequest} or an equivalent Hash.
|
2115
|
+
#
|
2116
|
+
# @param request [::Google::Cloud::GkeMultiCloud::V1::GetAzureJsonWebKeysRequest, ::Hash]
|
2117
|
+
# A request object representing the call parameters. Required. To specify no
|
2118
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
2119
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
2120
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
2121
|
+
#
|
2122
|
+
# @overload get_azure_json_web_keys(azure_cluster: nil)
|
2123
|
+
# Pass arguments to `get_azure_json_web_keys` via keyword arguments. Note that at
|
2124
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
2125
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
2126
|
+
#
|
2127
|
+
# @param azure_cluster [::String]
|
2128
|
+
# Required. The AzureCluster, which owns the JsonWebKeys.
|
2129
|
+
# Format:
|
2130
|
+
# projects/<project-id>/locations/<region>/azureClusters/<cluster-id>
|
2131
|
+
#
|
2132
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
2133
|
+
# @yieldparam response [::Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys]
|
2134
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
2135
|
+
#
|
2136
|
+
# @return [::Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys]
|
2137
|
+
#
|
2138
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
2139
|
+
#
|
2140
|
+
# @example Basic example
|
2141
|
+
# require "google/cloud/gke_multi_cloud/v1"
|
2142
|
+
#
|
2143
|
+
# # Create a client object. The client can be reused for multiple calls.
|
2144
|
+
# client = Google::Cloud::GkeMultiCloud::V1::AzureClusters::Client.new
|
2145
|
+
#
|
2146
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
2147
|
+
# request = Google::Cloud::GkeMultiCloud::V1::GetAzureJsonWebKeysRequest.new
|
2148
|
+
#
|
2149
|
+
# # Call the get_azure_json_web_keys method.
|
2150
|
+
# result = client.get_azure_json_web_keys request
|
2151
|
+
#
|
2152
|
+
# # The returned object is of type Google::Cloud::GkeMultiCloud::V1::AzureJsonWebKeys.
|
2153
|
+
# p result
|
2154
|
+
#
|
2155
|
+
def get_azure_json_web_keys request, options = nil
|
2156
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2157
|
+
|
2158
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeMultiCloud::V1::GetAzureJsonWebKeysRequest
|
2159
|
+
|
2160
|
+
# Converts hash and nil to an options object
|
2161
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2162
|
+
|
2163
|
+
# Customize the options with defaults
|
2164
|
+
metadata = @config.rpcs.get_azure_json_web_keys.metadata.to_h
|
2165
|
+
|
2166
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2167
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2168
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2169
|
+
gapic_version: ::Google::Cloud::GkeMultiCloud::V1::VERSION
|
2170
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2171
|
+
|
2172
|
+
header_params = {}
|
2173
|
+
if request.azure_cluster
|
2174
|
+
header_params["azure_cluster"] = request.azure_cluster
|
2175
|
+
end
|
2176
|
+
|
2177
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
2178
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
2179
|
+
|
2180
|
+
options.apply_defaults timeout: @config.rpcs.get_azure_json_web_keys.timeout,
|
2181
|
+
metadata: metadata,
|
2182
|
+
retry_policy: @config.rpcs.get_azure_json_web_keys.retry_policy
|
2183
|
+
|
2184
|
+
options.apply_defaults timeout: @config.timeout,
|
2185
|
+
metadata: @config.metadata,
|
2186
|
+
retry_policy: @config.retry_policy
|
2187
|
+
|
2188
|
+
@azure_clusters_stub.call_rpc :get_azure_json_web_keys, request, options: options do |response, operation|
|
2189
|
+
yield response, operation if block_given?
|
2190
|
+
return response
|
2191
|
+
end
|
2192
|
+
rescue ::GRPC::BadStatus => e
|
2193
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2194
|
+
end
|
2195
|
+
|
1879
2196
|
##
|
1880
2197
|
# Returns information, such as supported Azure regions and Kubernetes
|
1881
2198
|
# versions, on a given Google Cloud location.
|
@@ -2000,9 +2317,9 @@ module Google
|
|
2000
2317
|
# end
|
2001
2318
|
#
|
2002
2319
|
# @!attribute [rw] endpoint
|
2003
|
-
#
|
2004
|
-
#
|
2005
|
-
# @return [::String]
|
2320
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
2321
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
2322
|
+
# @return [::String,nil]
|
2006
2323
|
# @!attribute [rw] credentials
|
2007
2324
|
# Credentials to send with calls. You may provide any of the following types:
|
2008
2325
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -2048,13 +2365,20 @@ module Google
|
|
2048
2365
|
# @!attribute [rw] quota_project
|
2049
2366
|
# A separate project against which to charge quota.
|
2050
2367
|
# @return [::String]
|
2368
|
+
# @!attribute [rw] universe_domain
|
2369
|
+
# The universe domain within which to make requests. This determines the
|
2370
|
+
# default endpoint URL. The default value of nil uses the environment
|
2371
|
+
# universe (usually the default "googleapis.com" universe).
|
2372
|
+
# @return [::String,nil]
|
2051
2373
|
#
|
2052
2374
|
class Configuration
|
2053
2375
|
extend ::Gapic::Config
|
2054
2376
|
|
2377
|
+
# @private
|
2378
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
2055
2379
|
DEFAULT_ENDPOINT = "gkemulticloud.googleapis.com"
|
2056
2380
|
|
2057
|
-
config_attr :endpoint,
|
2381
|
+
config_attr :endpoint, nil, ::String, nil
|
2058
2382
|
config_attr :credentials, nil do |value|
|
2059
2383
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
2060
2384
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -2069,6 +2393,7 @@ module Google
|
|
2069
2393
|
config_attr :metadata, nil, ::Hash, nil
|
2070
2394
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2071
2395
|
config_attr :quota_project, nil, ::String, nil
|
2396
|
+
config_attr :universe_domain, nil, ::String, nil
|
2072
2397
|
|
2073
2398
|
# @private
|
2074
2399
|
def initialize parent_config = nil
|
@@ -2161,6 +2486,11 @@ module Google
|
|
2161
2486
|
#
|
2162
2487
|
attr_reader :delete_azure_cluster
|
2163
2488
|
##
|
2489
|
+
# RPC-specific configuration for `generate_azure_cluster_agent_token`
|
2490
|
+
# @return [::Gapic::Config::Method]
|
2491
|
+
#
|
2492
|
+
attr_reader :generate_azure_cluster_agent_token
|
2493
|
+
##
|
2164
2494
|
# RPC-specific configuration for `generate_azure_access_token`
|
2165
2495
|
# @return [::Gapic::Config::Method]
|
2166
2496
|
#
|
@@ -2191,6 +2521,16 @@ module Google
|
|
2191
2521
|
#
|
2192
2522
|
attr_reader :delete_azure_node_pool
|
2193
2523
|
##
|
2524
|
+
# RPC-specific configuration for `get_azure_open_id_config`
|
2525
|
+
# @return [::Gapic::Config::Method]
|
2526
|
+
#
|
2527
|
+
attr_reader :get_azure_open_id_config
|
2528
|
+
##
|
2529
|
+
# RPC-specific configuration for `get_azure_json_web_keys`
|
2530
|
+
# @return [::Gapic::Config::Method]
|
2531
|
+
#
|
2532
|
+
attr_reader :get_azure_json_web_keys
|
2533
|
+
##
|
2194
2534
|
# RPC-specific configuration for `get_azure_server_config`
|
2195
2535
|
# @return [::Gapic::Config::Method]
|
2196
2536
|
#
|
@@ -2216,6 +2556,8 @@ module Google
|
|
2216
2556
|
@list_azure_clusters = ::Gapic::Config::Method.new list_azure_clusters_config
|
2217
2557
|
delete_azure_cluster_config = parent_rpcs.delete_azure_cluster if parent_rpcs.respond_to? :delete_azure_cluster
|
2218
2558
|
@delete_azure_cluster = ::Gapic::Config::Method.new delete_azure_cluster_config
|
2559
|
+
generate_azure_cluster_agent_token_config = parent_rpcs.generate_azure_cluster_agent_token if parent_rpcs.respond_to? :generate_azure_cluster_agent_token
|
2560
|
+
@generate_azure_cluster_agent_token = ::Gapic::Config::Method.new generate_azure_cluster_agent_token_config
|
2219
2561
|
generate_azure_access_token_config = parent_rpcs.generate_azure_access_token if parent_rpcs.respond_to? :generate_azure_access_token
|
2220
2562
|
@generate_azure_access_token = ::Gapic::Config::Method.new generate_azure_access_token_config
|
2221
2563
|
create_azure_node_pool_config = parent_rpcs.create_azure_node_pool if parent_rpcs.respond_to? :create_azure_node_pool
|
@@ -2228,6 +2570,10 @@ module Google
|
|
2228
2570
|
@list_azure_node_pools = ::Gapic::Config::Method.new list_azure_node_pools_config
|
2229
2571
|
delete_azure_node_pool_config = parent_rpcs.delete_azure_node_pool if parent_rpcs.respond_to? :delete_azure_node_pool
|
2230
2572
|
@delete_azure_node_pool = ::Gapic::Config::Method.new delete_azure_node_pool_config
|
2573
|
+
get_azure_open_id_config_config = parent_rpcs.get_azure_open_id_config if parent_rpcs.respond_to? :get_azure_open_id_config
|
2574
|
+
@get_azure_open_id_config = ::Gapic::Config::Method.new get_azure_open_id_config_config
|
2575
|
+
get_azure_json_web_keys_config = parent_rpcs.get_azure_json_web_keys if parent_rpcs.respond_to? :get_azure_json_web_keys
|
2576
|
+
@get_azure_json_web_keys = ::Gapic::Config::Method.new get_azure_json_web_keys_config
|
2231
2577
|
get_azure_server_config_config = parent_rpcs.get_azure_server_config if parent_rpcs.respond_to? :get_azure_server_config
|
2232
2578
|
@get_azure_server_config = ::Gapic::Config::Method.new get_azure_server_config_config
|
2233
2579
|
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module AzureClusters
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
DEFAULT_ENDPOINT_TEMPLATE = "gkemulticloud.$UNIVERSE_DOMAIN$"
|
31
|
+
|
29
32
|
# @private
|
30
33
|
attr_reader :operations_stub
|
31
34
|
|
@@ -60,6 +63,15 @@ module Google
|
|
60
63
|
@config
|
61
64
|
end
|
62
65
|
|
66
|
+
##
|
67
|
+
# The effective universe domain
|
68
|
+
#
|
69
|
+
# @return [String]
|
70
|
+
#
|
71
|
+
def universe_domain
|
72
|
+
@operations_stub.universe_domain
|
73
|
+
end
|
74
|
+
|
63
75
|
##
|
64
76
|
# Create a new Operations client object.
|
65
77
|
#
|
@@ -90,8 +102,10 @@ module Google
|
|
90
102
|
|
91
103
|
@operations_stub = ::Gapic::ServiceStub.new(
|
92
104
|
::Google::Longrunning::Operations::Stub,
|
93
|
-
credentials:
|
94
|
-
endpoint:
|
105
|
+
credentials: credentials,
|
106
|
+
endpoint: @config.endpoint,
|
107
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
108
|
+
universe_domain: @config.universe_domain,
|
95
109
|
channel_args: @config.channel_args,
|
96
110
|
interceptors: @config.interceptors,
|
97
111
|
channel_pool_config: @config.channel_pool
|
@@ -613,9 +627,9 @@ module Google
|
|
613
627
|
# end
|
614
628
|
#
|
615
629
|
# @!attribute [rw] endpoint
|
616
|
-
#
|
617
|
-
#
|
618
|
-
# @return [::String]
|
630
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
631
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
632
|
+
# @return [::String,nil]
|
619
633
|
# @!attribute [rw] credentials
|
620
634
|
# Credentials to send with calls. You may provide any of the following types:
|
621
635
|
# * (`String`) The path to a service account key file in JSON format
|
@@ -661,13 +675,20 @@ module Google
|
|
661
675
|
# @!attribute [rw] quota_project
|
662
676
|
# A separate project against which to charge quota.
|
663
677
|
# @return [::String]
|
678
|
+
# @!attribute [rw] universe_domain
|
679
|
+
# The universe domain within which to make requests. This determines the
|
680
|
+
# default endpoint URL. The default value of nil uses the environment
|
681
|
+
# universe (usually the default "googleapis.com" universe).
|
682
|
+
# @return [::String,nil]
|
664
683
|
#
|
665
684
|
class Configuration
|
666
685
|
extend ::Gapic::Config
|
667
686
|
|
687
|
+
# @private
|
688
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
668
689
|
DEFAULT_ENDPOINT = "gkemulticloud.googleapis.com"
|
669
690
|
|
670
|
-
config_attr :endpoint,
|
691
|
+
config_attr :endpoint, nil, ::String, nil
|
671
692
|
config_attr :credentials, nil do |value|
|
672
693
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
673
694
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
@@ -682,6 +703,7 @@ module Google
|
|
682
703
|
config_attr :metadata, nil, ::Hash, nil
|
683
704
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
684
705
|
config_attr :quota_project, nil, ::String, nil
|
706
|
+
config_attr :universe_domain, nil, ::String, nil
|
685
707
|
|
686
708
|
# @private
|
687
709
|
def initialize parent_config = nil
|