google-cloud-gke_hub-v1beta1 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6839d3339f55e54c697ad5ad2a9f8cb15bad54c7eefe67f9b443f0b4ac5446b0
4
- data.tar.gz: 7b302bc97d963d3ed930d4e22563e5c8d1b994c783035e7a544c747a1edfdb0d
3
+ metadata.gz: 718c4f4e7822f2854e3d0bf972e221f6ee5e25182c8c2e74cca5823e24b562d3
4
+ data.tar.gz: b23faed4354600da9c06945d353a02704258459722b3632c741c7713c117b96e
5
5
  SHA512:
6
- metadata.gz: ee11a554ae4fcfa6aba2d3abd3d4926bce69eb34899f3797dd3d3d8dedc86bbca41b304f1ae4ad33a648ce50b58ac6fc8c816a1d657ba9d1d1cd9c561675f55e
7
- data.tar.gz: 8112840aeb8d4e1a887d96594b692a7596113f2cd6751f6807608f143b2d0d1d15c7f850b395cbdcba60587a7f3aeb2b16fd3667e50f1e6ccdc215a36051796e
6
+ metadata.gz: 2d4d122d174189c7ef42318fe7c5154fe75ed8363fa755a850716913db6ff6b4e256658c96dd13c0ab8991ec0118eeed78c95ba688c0fa45c8b4028ed7ec1050
7
+ data.tar.gz: 8dcd23a1eac1744ba2757f67dc42fa8aee124aff3b804003ba2d703c3304a93bcdb6f2086f3684eb7093d69592f130cd2fcae8757cabca396260097cc8a49fc2
data/AUTHENTICATION.md CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-gke_hub-v1beta1
66
66
  checks for credentials are configured on the service Credentials class (such as
67
67
  {::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Credentials}):
68
68
 
69
- 1. `GKE_HUB_CREDENTIALS` - Path to JSON file, or JSON contents
70
- 2. `GKE_HUB_KEYFILE` - Path to JSON file, or JSON contents
71
- 3. `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
- 4. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
- 5. `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
69
+ * `GKE_HUB_CREDENTIALS` - Path to JSON file, or JSON contents
70
+ * `GKE_HUB_KEYFILE` - Path to JSON file, or JSON contents
71
+ * `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
72
+ * `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
73
+ * `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
74
74
 
75
75
  ```ruby
76
76
  require "google/cloud/gke_hub/v1beta1"
@@ -82,8 +82,8 @@ client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/gke_hub/v1beta1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new d
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/gke_hub/v1beta1"
data/README.md CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
33
33
  require "google/cloud/gke_hub/v1beta1"
34
34
 
35
35
  client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
36
- request = my_create_request
36
+ request = ::Google::Cloud::GkeHub::V1beta1::ListMembershipsRequest.new # (request fields as keyword arguments...)
37
37
  response = client.list_memberships request
38
38
  ```
39
39
 
@@ -27,8 +27,14 @@ module Google
27
27
  ##
28
28
  # Client for the GkeHubMembershipService service.
29
29
  #
30
- # GKE Hub CRUD API for the Membership resource.
31
- # The Membership service is currently only available in the global location.
30
+ # The GKE Hub MembershipService handles the registration of many Kubernetes
31
+ # clusters to Google Cloud, represented with the {::Google::Cloud::GkeHub::V1beta1::Membership Membership} resource.
32
+ #
33
+ # GKE Hub is currently only available in the global region.
34
+ #
35
+ # **Membership management may be non-trivial:** it is recommended to use one
36
+ # of the Google-provided client libraries or tools where possible when working
37
+ # with Membership resources.
32
38
  #
33
39
  class Client
34
40
  include Paths
@@ -42,13 +48,12 @@ module Google
42
48
  # See {::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client::Configuration}
43
49
  # for a description of the configuration fields.
44
50
  #
45
- # ## Example
46
- #
47
- # To modify the configuration for all GkeHubMembershipService clients:
51
+ # @example
48
52
  #
49
- # ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
53
+ # # Modify the configuration for all GkeHubMembershipService clients
54
+ # ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
52
57
  #
53
58
  # @yield [config] Configure the Client client.
54
59
  # @yieldparam config [Client::Configuration]
@@ -68,10 +73,7 @@ module Google
68
73
 
69
74
  default_config.timeout = 60.0
70
75
  default_config.retry_policy = {
71
- initial_delay: 1.0,
72
- max_delay: 10.0,
73
- multiplier: 1.3,
74
- retry_codes: [14]
76
+ initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
75
77
  }
76
78
 
77
79
  default_config
@@ -103,19 +105,15 @@ module Google
103
105
  ##
104
106
  # Create a new GkeHubMembershipService client object.
105
107
  #
106
- # ## Examples
108
+ # @example
107
109
  #
108
- # To create a new GkeHubMembershipService client with the default
109
- # configuration:
110
+ # # Create a client using the default configuration
111
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
110
112
  #
111
- # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
112
- #
113
- # To create a new GkeHubMembershipService client with a custom
114
- # configuration:
115
- #
116
- # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new do |config|
117
- # config.timeout = 10.0
118
- # end
113
+ # # Create a client using a custom configuration
114
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new do |config|
115
+ # config.timeout = 10.0
116
+ # end
119
117
  #
120
118
  # @yield [config] Configure the GkeHubMembershipService client.
121
119
  # @yieldparam config [Client::Configuration]
@@ -135,14 +133,13 @@ module Google
135
133
 
136
134
  # Create credentials
137
135
  credentials = @config.credentials
138
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
136
+ # Use self-signed JWT if the endpoint is unchanged from default,
139
137
  # but only if the default endpoint does not have a region prefix.
140
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
141
- @config.endpoint == Client.configure.endpoint &&
138
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
142
139
  !@config.endpoint.split(".").first.include?("-")
143
140
  credentials ||= Credentials.default scope: @config.scope,
144
141
  enable_self_signed_jwt: enable_self_signed_jwt
145
- if credentials.is_a?(String) || credentials.is_a?(Hash)
142
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
146
143
  credentials = Credentials.new credentials, scope: @config.scope
147
144
  end
148
145
  @quota_project_id = @config.quota_project
@@ -259,7 +256,9 @@ module Google
259
256
  options.apply_defaults timeout: @config.rpcs.list_memberships.timeout,
260
257
  metadata: metadata,
261
258
  retry_policy: @config.rpcs.list_memberships.retry_policy
262
- options.apply_defaults metadata: @config.metadata,
259
+
260
+ options.apply_defaults timeout: @config.timeout,
261
+ metadata: @config.metadata,
263
262
  retry_policy: @config.retry_policy
264
263
 
265
264
  @gke_hub_membership_service_stub.call_rpc :list_memberships, request, options: options do |response, operation|
@@ -327,7 +326,9 @@ module Google
327
326
  options.apply_defaults timeout: @config.rpcs.get_membership.timeout,
328
327
  metadata: metadata,
329
328
  retry_policy: @config.rpcs.get_membership.retry_policy
330
- options.apply_defaults metadata: @config.metadata,
329
+
330
+ options.apply_defaults timeout: @config.timeout,
331
+ metadata: @config.metadata,
331
332
  retry_policy: @config.retry_policy
332
333
 
333
334
  @gke_hub_membership_service_stub.call_rpc :get_membership, request, options: options do |response, operation|
@@ -339,7 +340,11 @@ module Google
339
340
  end
340
341
 
341
342
  ##
342
- # Adds a new Membership.
343
+ # Creates a new Membership.
344
+ #
345
+ # **This is currently only supported for GKE clusters on Google Cloud**.
346
+ # To register other clusters, follow the instructions at
347
+ # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
343
348
  #
344
349
  # @overload create_membership(request, options = nil)
345
350
  # Pass arguments to `create_membership` via a request object, either of type
@@ -351,7 +356,7 @@ module Google
351
356
  # @param options [::Gapic::CallOptions, ::Hash]
352
357
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
353
358
  #
354
- # @overload create_membership(parent: nil, membership_id: nil, resource: nil)
359
+ # @overload create_membership(parent: nil, membership_id: nil, resource: nil, request_id: nil)
355
360
  # Pass arguments to `create_membership` via keyword arguments. Note that at
356
361
  # least one keyword argument is required. To specify no parameters, or to keep all
357
362
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -371,6 +376,20 @@ module Google
371
376
  # with a maximum length of 63 characters.
372
377
  # @param resource [::Google::Cloud::GkeHub::V1beta1::Membership, ::Hash]
373
378
  # Required. The membership to create.
379
+ # @param request_id [::String]
380
+ # Optional. A request ID to identify requests. Specify a unique request ID
381
+ # so that if you must retry your request, the server will know to ignore
382
+ # the request if it has already been completed. The server will guarantee
383
+ # that for at least 60 minutes after the first request.
384
+ #
385
+ # For example, consider a situation where you make an initial request and
386
+ # the request times out. If you make the request again with the same request
387
+ # ID, the server can check if original operation with the same request ID
388
+ # was received, and if so, will ignore the second request. This prevents
389
+ # clients from accidentally creating duplicate commitments.
390
+ #
391
+ # The request ID must be a valid UUID with the exception that zero UUID is
392
+ # not supported (00000000-0000-0000-0000-000000000000).
374
393
  #
375
394
  # @yield [response, operation] Access the result along with the RPC operation
376
395
  # @yieldparam response [::Gapic::Operation]
@@ -406,7 +425,9 @@ module Google
406
425
  options.apply_defaults timeout: @config.rpcs.create_membership.timeout,
407
426
  metadata: metadata,
408
427
  retry_policy: @config.rpcs.create_membership.retry_policy
409
- options.apply_defaults metadata: @config.metadata,
428
+
429
+ options.apply_defaults timeout: @config.timeout,
430
+ metadata: @config.metadata,
410
431
  retry_policy: @config.retry_policy
411
432
 
412
433
  @gke_hub_membership_service_stub.call_rpc :create_membership, request, options: options do |response, operation|
@@ -421,6 +442,10 @@ module Google
421
442
  ##
422
443
  # Removes a Membership.
423
444
  #
445
+ # **This is currently only supported for GKE clusters on Google Cloud**.
446
+ # To unregister other clusters, follow the instructions at
447
+ # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
448
+ #
424
449
  # @overload delete_membership(request, options = nil)
425
450
  # Pass arguments to `delete_membership` via a request object, either of type
426
451
  # {::Google::Cloud::GkeHub::V1beta1::DeleteMembershipRequest} or an equivalent Hash.
@@ -431,7 +456,7 @@ module Google
431
456
  # @param options [::Gapic::CallOptions, ::Hash]
432
457
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
433
458
  #
434
- # @overload delete_membership(name: nil)
459
+ # @overload delete_membership(name: nil, request_id: nil)
435
460
  # Pass arguments to `delete_membership` via keyword arguments. Note that at
436
461
  # least one keyword argument is required. To specify no parameters, or to keep all
437
462
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -439,6 +464,20 @@ module Google
439
464
  # @param name [::String]
440
465
  # Required. The Membership resource name in the format
441
466
  # `projects/*/locations/*/memberships/*`.
467
+ # @param request_id [::String]
468
+ # Optional. A request ID to identify requests. Specify a unique request ID
469
+ # so that if you must retry your request, the server will know to ignore
470
+ # the request if it has already been completed. The server will guarantee
471
+ # that for at least 60 minutes after the first request.
472
+ #
473
+ # For example, consider a situation where you make an initial request and
474
+ # the request times out. If you make the request again with the same request
475
+ # ID, the server can check if original operation with the same request ID
476
+ # was received, and if so, will ignore the second request. This prevents
477
+ # clients from accidentally creating duplicate commitments.
478
+ #
479
+ # The request ID must be a valid UUID with the exception that zero UUID is
480
+ # not supported (00000000-0000-0000-0000-000000000000).
442
481
  #
443
482
  # @yield [response, operation] Access the result along with the RPC operation
444
483
  # @yieldparam response [::Gapic::Operation]
@@ -474,7 +513,9 @@ module Google
474
513
  options.apply_defaults timeout: @config.rpcs.delete_membership.timeout,
475
514
  metadata: metadata,
476
515
  retry_policy: @config.rpcs.delete_membership.retry_policy
477
- options.apply_defaults metadata: @config.metadata,
516
+
517
+ options.apply_defaults timeout: @config.timeout,
518
+ metadata: @config.metadata,
478
519
  retry_policy: @config.retry_policy
479
520
 
480
521
  @gke_hub_membership_service_stub.call_rpc :delete_membership, request, options: options do |response, operation|
@@ -499,7 +540,7 @@ module Google
499
540
  # @param options [::Gapic::CallOptions, ::Hash]
500
541
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
501
542
  #
502
- # @overload update_membership(name: nil, update_mask: nil, resource: nil)
543
+ # @overload update_membership(name: nil, update_mask: nil, resource: nil, request_id: nil)
503
544
  # Pass arguments to `update_membership` via keyword arguments. Note that at
504
545
  # least one keyword argument is required. To specify no parameters, or to keep all
505
546
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -517,6 +558,22 @@ module Google
517
558
  # If you are updating a map field, set the value of a key to null or empty
518
559
  # string to delete the key from the map. It's not possible to update a key's
519
560
  # value to the empty string.
561
+ # If you specify the update_mask to be a special path "*", fully replaces all
562
+ # user-modifiable fields to match `resource`.
563
+ # @param request_id [::String]
564
+ # Optional. A request ID to identify requests. Specify a unique request ID
565
+ # so that if you must retry your request, the server will know to ignore
566
+ # the request if it has already been completed. The server will guarantee
567
+ # that for at least 60 minutes after the first request.
568
+ #
569
+ # For example, consider a situation where you make an initial request and
570
+ # the request times out. If you make the request again with the same request
571
+ # ID, the server can check if original operation with the same request ID
572
+ # was received, and if so, will ignore the second request. This prevents
573
+ # clients from accidentally creating duplicate commitments.
574
+ #
575
+ # The request ID must be a valid UUID with the exception that zero UUID is
576
+ # not supported (00000000-0000-0000-0000-000000000000).
520
577
  #
521
578
  # @yield [response, operation] Access the result along with the RPC operation
522
579
  # @yieldparam response [::Gapic::Operation]
@@ -552,7 +609,9 @@ module Google
552
609
  options.apply_defaults timeout: @config.rpcs.update_membership.timeout,
553
610
  metadata: metadata,
554
611
  retry_policy: @config.rpcs.update_membership.retry_policy
555
- options.apply_defaults metadata: @config.metadata,
612
+
613
+ options.apply_defaults timeout: @config.timeout,
614
+ metadata: @config.metadata,
556
615
  retry_policy: @config.retry_policy
557
616
 
558
617
  @gke_hub_membership_service_stub.call_rpc :update_membership, request, options: options do |response, operation|
@@ -567,6 +626,9 @@ module Google
567
626
  ##
568
627
  # Generates the manifest for deployment of the GKE connect agent.
569
628
  #
629
+ # **This method is used internally by Google-provided libraries.**
630
+ # Most clients should not need to call this method directly.
631
+ #
570
632
  # @overload generate_connect_manifest(request, options = nil)
571
633
  # Pass arguments to `generate_connect_manifest` via a request object, either of type
572
634
  # {::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestRequest} or an equivalent Hash.
@@ -632,7 +694,9 @@ module Google
632
694
  options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout,
633
695
  metadata: metadata,
634
696
  retry_policy: @config.rpcs.generate_connect_manifest.retry_policy
635
- options.apply_defaults metadata: @config.metadata,
697
+
698
+ options.apply_defaults timeout: @config.timeout,
699
+ metadata: @config.metadata,
636
700
  retry_policy: @config.retry_policy
637
701
 
638
702
  @gke_hub_membership_service_stub.call_rpc :generate_connect_manifest, request, options: options do |response, operation|
@@ -706,7 +770,9 @@ module Google
706
770
  options.apply_defaults timeout: @config.rpcs.validate_exclusivity.timeout,
707
771
  metadata: metadata,
708
772
  retry_policy: @config.rpcs.validate_exclusivity.retry_policy
709
- options.apply_defaults metadata: @config.metadata,
773
+
774
+ options.apply_defaults timeout: @config.timeout,
775
+ metadata: @config.metadata,
710
776
  retry_policy: @config.retry_policy
711
777
 
712
778
  @gke_hub_membership_service_stub.call_rpc :validate_exclusivity, request, options: options do |response, operation|
@@ -792,7 +858,9 @@ module Google
792
858
  options.apply_defaults timeout: @config.rpcs.generate_exclusivity_manifest.timeout,
793
859
  metadata: metadata,
794
860
  retry_policy: @config.rpcs.generate_exclusivity_manifest.retry_policy
795
- options.apply_defaults metadata: @config.metadata,
861
+
862
+ options.apply_defaults timeout: @config.timeout,
863
+ metadata: @config.metadata,
796
864
  retry_policy: @config.retry_policy
797
865
 
798
866
  @gke_hub_membership_service_stub.call_rpc :generate_exclusivity_manifest, request, options: options do |response, operation|
@@ -816,22 +884,21 @@ module Google
816
884
  # Configuration can be applied globally to all clients, or to a single client
817
885
  # on construction.
818
886
  #
819
- # # Examples
820
- #
821
- # To modify the global config, setting the timeout for list_memberships
822
- # to 20 seconds, and all remaining timeouts to 10 seconds:
823
- #
824
- # ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.configure do |config|
825
- # config.timeout = 10.0
826
- # config.rpcs.list_memberships.timeout = 20.0
827
- # end
828
- #
829
- # To apply the above configuration only to a new client:
830
- #
831
- # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new do |config|
832
- # config.timeout = 10.0
833
- # config.rpcs.list_memberships.timeout = 20.0
834
- # end
887
+ # @example
888
+ #
889
+ # # Modify the global config, setting the timeout for
890
+ # # list_memberships to 20 seconds,
891
+ # # and all remaining timeouts to 10 seconds.
892
+ # ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.configure do |config|
893
+ # config.timeout = 10.0
894
+ # config.rpcs.list_memberships.timeout = 20.0
895
+ # end
896
+ #
897
+ # # Apply the above configuration only to a new client.
898
+ # client = ::Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new do |config|
899
+ # config.timeout = 10.0
900
+ # config.rpcs.list_memberships.timeout = 20.0
901
+ # end
835
902
  #
836
903
  # @!attribute [rw] endpoint
837
904
  # The hostname or hostname:port of the service endpoint.
@@ -82,7 +82,7 @@ module Google
82
82
  # Create credentials
83
83
  credentials = @config.credentials
84
84
  credentials ||= Credentials.default scope: @config.scope
85
- if credentials.is_a?(String) || credentials.is_a?(Hash)
85
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
86
86
  credentials = Credentials.new credentials, scope: @config.scope
87
87
  end
88
88
  @quota_project_id = @config.quota_project
@@ -169,7 +169,9 @@ module Google
169
169
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
170
  metadata: metadata,
171
171
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
172
+
173
+ options.apply_defaults timeout: @config.timeout,
174
+ metadata: @config.metadata,
173
175
  retry_policy: @config.retry_policy
174
176
 
175
177
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -239,7 +241,9 @@ module Google
239
241
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
242
  metadata: metadata,
241
243
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
244
+
245
+ options.apply_defaults timeout: @config.timeout,
246
+ metadata: @config.metadata,
243
247
  retry_policy: @config.retry_policy
244
248
 
245
249
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -309,7 +313,9 @@ module Google
309
313
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
314
  metadata: metadata,
311
315
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
316
+
317
+ options.apply_defaults timeout: @config.timeout,
318
+ metadata: @config.metadata,
313
319
  retry_policy: @config.retry_policy
314
320
 
315
321
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -384,7 +390,9 @@ module Google
384
390
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
391
  metadata: metadata,
386
392
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
393
+
394
+ options.apply_defaults timeout: @config.timeout,
395
+ metadata: @config.metadata,
388
396
  retry_policy: @config.retry_policy
389
397
 
390
398
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -396,9 +404,9 @@ module Google
396
404
  end
397
405
 
398
406
  ##
399
- # Waits for the specified long-running operation until it is done or reaches
400
- # at most a specified timeout, returning the latest state. If the operation
401
- # is already done, the latest state is immediately returned. If the timeout
407
+ # Waits until the specified long-running operation is done or reaches at most
408
+ # a specified timeout, returning the latest state. If the operation is
409
+ # already done, the latest state is immediately returned. If the timeout
402
410
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
403
411
  # timeout is used. If the server does not support this method, it returns
404
412
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -456,7 +464,9 @@ module Google
456
464
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
465
  metadata: metadata,
458
466
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
467
+
468
+ options.apply_defaults timeout: @config.timeout,
469
+ metadata: @config.metadata,
460
470
  retry_policy: @config.retry_policy
461
471
 
462
472
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +491,21 @@ module Google
481
491
  # Configuration can be applied globally to all clients, or to a single client
482
492
  # on construction.
483
493
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
494
+ # @example
495
+ #
496
+ # # Modify the global config, setting the timeout for
497
+ # # list_operations to 20 seconds,
498
+ # # and all remaining timeouts to 10 seconds.
499
+ # ::Google::Longrunning::Operations::Client.configure do |config|
500
+ # config.timeout = 10.0
501
+ # config.rpcs.list_operations.timeout = 20.0
502
+ # end
503
+ #
504
+ # # Apply the above configuration only to a new client.
505
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
506
+ # config.timeout = 10.0
507
+ # config.rpcs.list_operations.timeout = 20.0
508
+ # end
500
509
  #
501
510
  # @!attribute [rw] endpoint
502
511
  # The hostname or hostname:port of the service endpoint.
@@ -32,8 +32,14 @@ module Google
32
32
  module GkeHub
33
33
  module V1beta1
34
34
  ##
35
- # GKE Hub CRUD API for the Membership resource.
36
- # The Membership service is currently only available in the global location.
35
+ # The GKE Hub MembershipService handles the registration of many Kubernetes
36
+ # clusters to Google Cloud, represented with the {::Google::Cloud::GkeHub::V1beta1::Membership Membership} resource.
37
+ #
38
+ # GKE Hub is currently only available in the global region.
39
+ #
40
+ # **Membership management may be non-trivial:** it is recommended to use one
41
+ # of the Google-provided client libraries or tools where possible when working
42
+ # with Membership resources.
37
43
  #
38
44
  # To load this service and instantiate a client:
39
45
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module GkeHub
23
23
  module V1beta1
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -36,9 +36,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
36
36
  value :MULTI_CLOUD, 2
37
37
  end
38
38
  add_message "google.cloud.gkehub.v1beta1.MembershipEndpoint" do
39
- optional :gke_cluster, :message, 4, "google.cloud.gkehub.v1beta1.GkeCluster"
40
39
  optional :kubernetes_metadata, :message, 5, "google.cloud.gkehub.v1beta1.KubernetesMetadata"
41
40
  optional :kubernetes_resource, :message, 6, "google.cloud.gkehub.v1beta1.KubernetesResource"
41
+ oneof :type do
42
+ optional :gke_cluster, :message, 4, "google.cloud.gkehub.v1beta1.GkeCluster"
43
+ optional :on_prem_cluster, :message, 7, "google.cloud.gkehub.v1beta1.OnPremCluster"
44
+ optional :multi_cloud_cluster, :message, 8, "google.cloud.gkehub.v1beta1.MultiCloudCluster"
45
+ end
42
46
  end
43
47
  add_message "google.cloud.gkehub.v1beta1.KubernetesResource" do
44
48
  optional :membership_cr_manifest, :string, 1
@@ -56,6 +60,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
56
60
  end
57
61
  add_message "google.cloud.gkehub.v1beta1.GkeCluster" do
58
62
  optional :resource_link, :string, 1
63
+ optional :cluster_missing, :bool, 3
64
+ end
65
+ add_message "google.cloud.gkehub.v1beta1.OnPremCluster" do
66
+ optional :resource_link, :string, 1
67
+ optional :cluster_missing, :bool, 2
68
+ optional :admin_cluster, :bool, 3
69
+ end
70
+ add_message "google.cloud.gkehub.v1beta1.MultiCloudCluster" do
71
+ optional :resource_link, :string, 1
72
+ optional :cluster_missing, :bool, 2
59
73
  end
60
74
  add_message "google.cloud.gkehub.v1beta1.KubernetesMetadata" do
61
75
  optional :kubernetes_api_server_version, :string, 1
@@ -103,14 +117,17 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
103
117
  optional :parent, :string, 1
104
118
  optional :membership_id, :string, 2
105
119
  optional :resource, :message, 3, "google.cloud.gkehub.v1beta1.Membership"
120
+ optional :request_id, :string, 4
106
121
  end
107
122
  add_message "google.cloud.gkehub.v1beta1.DeleteMembershipRequest" do
108
123
  optional :name, :string, 1
124
+ optional :request_id, :string, 4
109
125
  end
110
126
  add_message "google.cloud.gkehub.v1beta1.UpdateMembershipRequest" do
111
127
  optional :name, :string, 1
112
128
  optional :update_mask, :message, 2, "google.protobuf.FieldMask"
113
129
  optional :resource, :message, 3, "google.cloud.gkehub.v1beta1.Membership"
130
+ optional :request_id, :string, 4
114
131
  end
115
132
  add_message "google.cloud.gkehub.v1beta1.GenerateConnectManifestRequest" do
116
133
  optional :name, :string, 1
@@ -176,6 +193,8 @@ module Google
176
193
  ResourceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.ResourceOptions").msgclass
177
194
  ResourceManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.ResourceManifest").msgclass
178
195
  GkeCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.GkeCluster").msgclass
196
+ OnPremCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.OnPremCluster").msgclass
197
+ MultiCloudCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.MultiCloudCluster").msgclass
179
198
  KubernetesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.KubernetesMetadata").msgclass
180
199
  Authority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.Authority").msgclass
181
200
  MembershipState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1beta1.MembershipState").msgclass
@@ -24,8 +24,14 @@ module Google
24
24
  module GkeHub
25
25
  module V1beta1
26
26
  module GkeHubMembershipService
27
- # GKE Hub CRUD API for the Membership resource.
28
- # The Membership service is currently only available in the global location.
27
+ # The GKE Hub MembershipService handles the registration of many Kubernetes
28
+ # clusters to Google Cloud, represented with the [Membership][google.cloud.gkehub.v1beta1.Membership] resource.
29
+ #
30
+ # GKE Hub is currently only available in the global region.
31
+ #
32
+ # **Membership management may be non-trivial:** it is recommended to use one
33
+ # of the Google-provided client libraries or tools where possible when working
34
+ # with Membership resources.
29
35
  class Service
30
36
 
31
37
  include GRPC::GenericService
@@ -38,13 +44,24 @@ module Google
38
44
  rpc :ListMemberships, ::Google::Cloud::GkeHub::V1beta1::ListMembershipsRequest, ::Google::Cloud::GkeHub::V1beta1::ListMembershipsResponse
39
45
  # Gets the details of a Membership.
40
46
  rpc :GetMembership, ::Google::Cloud::GkeHub::V1beta1::GetMembershipRequest, ::Google::Cloud::GkeHub::V1beta1::Membership
41
- # Adds a new Membership.
47
+ # Creates a new Membership.
48
+ #
49
+ # **This is currently only supported for GKE clusters on Google Cloud**.
50
+ # To register other clusters, follow the instructions at
51
+ # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
42
52
  rpc :CreateMembership, ::Google::Cloud::GkeHub::V1beta1::CreateMembershipRequest, ::Google::Longrunning::Operation
43
53
  # Removes a Membership.
54
+ #
55
+ # **This is currently only supported for GKE clusters on Google Cloud**.
56
+ # To unregister other clusters, follow the instructions at
57
+ # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
44
58
  rpc :DeleteMembership, ::Google::Cloud::GkeHub::V1beta1::DeleteMembershipRequest, ::Google::Longrunning::Operation
45
59
  # Updates an existing Membership.
46
60
  rpc :UpdateMembership, ::Google::Cloud::GkeHub::V1beta1::UpdateMembershipRequest, ::Google::Longrunning::Operation
47
61
  # Generates the manifest for deployment of the GKE connect agent.
62
+ #
63
+ # **This method is used internally by Google-provided libraries.**
64
+ # Most clients should not need to call this method directly.
48
65
  rpc :GenerateConnectManifest, ::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestRequest, ::Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestResponse
49
66
  # ValidateExclusivity validates the state of exclusivity in the cluster.
50
67
  # The validation does not depend on an existing Hub membership resource.
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -40,7 +40,7 @@ module Google
40
40
  # Optional. GCP labels for this membership.
41
41
  # @!attribute [rw] description
42
42
  # @return [::String]
43
- # Required. Description of this membership, limited to 63 characters.
43
+ # Optional. Description of this membership, limited to 63 characters.
44
44
  # Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*`
45
45
  # @!attribute [rw] endpoint
46
46
  # @return [::Google::Cloud::GkeHub::V1beta1::MembershipEndpoint]
@@ -123,7 +123,13 @@ module Google
123
123
  # endpoint and any additional Kubernetes metadata.
124
124
  # @!attribute [rw] gke_cluster
125
125
  # @return [::Google::Cloud::GkeHub::V1beta1::GkeCluster]
126
- # Optional. GKE-specific information. Only present if this Membership is a GKE cluster.
126
+ # Optional. Specific information for a GKE-on-GCP cluster.
127
+ # @!attribute [rw] on_prem_cluster
128
+ # @return [::Google::Cloud::GkeHub::V1beta1::OnPremCluster]
129
+ # Optional. Specific information for a GKE On-Prem cluster.
130
+ # @!attribute [rw] multi_cloud_cluster
131
+ # @return [::Google::Cloud::GkeHub::V1beta1::MultiCloudCluster]
132
+ # Optional. Specific information for a GKE Multi-Cloud cluster.
127
133
  # @!attribute [r] kubernetes_metadata
128
134
  # @return [::Google::Cloud::GkeHub::V1beta1::KubernetesMetadata]
129
135
  # Output only. Useful Kubernetes-specific metadata.
@@ -220,14 +226,56 @@ module Google
220
226
  # @return [::String]
221
227
  # Immutable. Self-link of the GCP resource for the GKE cluster. For example:
222
228
  #
223
- # > container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster
229
+ # //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster
224
230
  #
225
231
  # Zonal clusters are also supported.
232
+ # @!attribute [r] cluster_missing
233
+ # @return [::Boolean]
234
+ # Output only. If cluster_missing is set then it denotes that the GKE cluster no longer
235
+ # exists in the GKE Control Plane.
226
236
  class GkeCluster
227
237
  include ::Google::Protobuf::MessageExts
228
238
  extend ::Google::Protobuf::MessageExts::ClassMethods
229
239
  end
230
240
 
241
+ # OnPremCluster contains information specific to GKE On-Prem clusters.
242
+ # @!attribute [rw] resource_link
243
+ # @return [::String]
244
+ # Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example:
245
+ #
246
+ # //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster
247
+ # //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster
248
+ # @!attribute [r] cluster_missing
249
+ # @return [::Boolean]
250
+ # Output only. If cluster_missing is set then it denotes that
251
+ # API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no
252
+ # longer exists.
253
+ # @!attribute [rw] admin_cluster
254
+ # @return [::Boolean]
255
+ # Immutable. Whether the cluster is an admin cluster.
256
+ class OnPremCluster
257
+ include ::Google::Protobuf::MessageExts
258
+ extend ::Google::Protobuf::MessageExts::ClassMethods
259
+ end
260
+
261
+ # MultiCloudCluster contains information specific to GKE Multi-Cloud clusters.
262
+ # @!attribute [rw] resource_link
263
+ # @return [::String]
264
+ # Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For
265
+ # example:
266
+ #
267
+ # //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster
268
+ # //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster
269
+ # @!attribute [r] cluster_missing
270
+ # @return [::Boolean]
271
+ # Output only. If cluster_missing is set then it denotes that
272
+ # API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster
273
+ # no longer exists.
274
+ class MultiCloudCluster
275
+ include ::Google::Protobuf::MessageExts
276
+ extend ::Google::Protobuf::MessageExts::ClassMethods
277
+ end
278
+
231
279
  # KubernetesMetadata provides informational metadata for Memberships
232
280
  # representing Kubernetes clusters.
233
281
  # @!attribute [r] kubernetes_api_server_version
@@ -426,6 +474,21 @@ module Google
426
474
  # @!attribute [rw] resource
427
475
  # @return [::Google::Cloud::GkeHub::V1beta1::Membership]
428
476
  # Required. The membership to create.
477
+ # @!attribute [rw] request_id
478
+ # @return [::String]
479
+ # Optional. A request ID to identify requests. Specify a unique request ID
480
+ # so that if you must retry your request, the server will know to ignore
481
+ # the request if it has already been completed. The server will guarantee
482
+ # that for at least 60 minutes after the first request.
483
+ #
484
+ # For example, consider a situation where you make an initial request and
485
+ # the request times out. If you make the request again with the same request
486
+ # ID, the server can check if original operation with the same request ID
487
+ # was received, and if so, will ignore the second request. This prevents
488
+ # clients from accidentally creating duplicate commitments.
489
+ #
490
+ # The request ID must be a valid UUID with the exception that zero UUID is
491
+ # not supported (00000000-0000-0000-0000-000000000000).
429
492
  class CreateMembershipRequest
430
493
  include ::Google::Protobuf::MessageExts
431
494
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -436,6 +499,21 @@ module Google
436
499
  # @return [::String]
437
500
  # Required. The Membership resource name in the format
438
501
  # `projects/*/locations/*/memberships/*`.
502
+ # @!attribute [rw] request_id
503
+ # @return [::String]
504
+ # Optional. A request ID to identify requests. Specify a unique request ID
505
+ # so that if you must retry your request, the server will know to ignore
506
+ # the request if it has already been completed. The server will guarantee
507
+ # that for at least 60 minutes after the first request.
508
+ #
509
+ # For example, consider a situation where you make an initial request and
510
+ # the request times out. If you make the request again with the same request
511
+ # ID, the server can check if original operation with the same request ID
512
+ # was received, and if so, will ignore the second request. This prevents
513
+ # clients from accidentally creating duplicate commitments.
514
+ #
515
+ # The request ID must be a valid UUID with the exception that zero UUID is
516
+ # not supported (00000000-0000-0000-0000-000000000000).
439
517
  class DeleteMembershipRequest
440
518
  include ::Google::Protobuf::MessageExts
441
519
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -458,6 +536,23 @@ module Google
458
536
  # If you are updating a map field, set the value of a key to null or empty
459
537
  # string to delete the key from the map. It's not possible to update a key's
460
538
  # value to the empty string.
539
+ # If you specify the update_mask to be a special path "*", fully replaces all
540
+ # user-modifiable fields to match `resource`.
541
+ # @!attribute [rw] request_id
542
+ # @return [::String]
543
+ # Optional. A request ID to identify requests. Specify a unique request ID
544
+ # so that if you must retry your request, the server will know to ignore
545
+ # the request if it has already been completed. The server will guarantee
546
+ # that for at least 60 minutes after the first request.
547
+ #
548
+ # For example, consider a situation where you make an initial request and
549
+ # the request times out. If you make the request again with the same request
550
+ # ID, the server can check if original operation with the same request ID
551
+ # was received, and if so, will ignore the second request. This prevents
552
+ # clients from accidentally creating duplicate commitments.
553
+ #
554
+ # The request ID must be a valid UUID with the exception that zero UUID is
555
+ # not supported (00000000-0000-0000-0000-000000000000).
461
556
  class UpdateMembershipRequest
462
557
  include ::Google::Protobuf::MessageExts
463
558
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-gke_hub-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2021-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.7'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.4'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.7'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.4'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -204,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
210
  - !ruby/object:Gem::Version
205
211
  version: '0'
206
212
  requirements: []
207
- rubygems_version: 3.2.13
213
+ rubygems_version: 3.2.17
208
214
  signing_key:
209
215
  specification_version: 4
210
216
  summary: API Client library for the GKE Hub V1beta1 API