google-cloud-assured_workloads-v1beta1 0.6.2 → 0.8.1
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/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/client.rb +157 -56
- data/lib/google/cloud/assured_workloads/v1beta1/assured_workloads_service/operations.rb +145 -33
- data/lib/google/cloud/assured_workloads/v1beta1/version.rb +1 -1
- data/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_pb.rb +8 -2
- data/lib/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1_services_pb.rb +1 -1
- data/proto_docs/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.rb +27 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e0a780eeabce7bf7b855b58fe63620614d2e3ee9b574a99e86d67dda315b48a
|
4
|
+
data.tar.gz: 3b761ae99c0777b309153122e844814ad64816e61f7903f1d8a0ba052474b6bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e63d558c2cc7c51f1d20be20296930e92bbe9a6d5bb5cd4615ef1ea3161eb30b711f69a4fa40e5aa0e649d1aa72e96b9003bed0b5bf1d02ad0cbf24ea527d9f
|
7
|
+
data.tar.gz: 2e7df0739af6f15a1417f8f69145c2e131a4e4f3e93822dd37445e794de58b8d648959ed986f01c3454f67e3f2db5e2c4fc43ef888edfe2495ed8baf0eca1eb8
|
@@ -41,13 +41,12 @@ module Google
|
|
41
41
|
# See {::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client::Configuration}
|
42
42
|
# for a description of the configuration fields.
|
43
43
|
#
|
44
|
-
#
|
44
|
+
# @example
|
45
45
|
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# end
|
46
|
+
# # Modify the configuration for all AssuredWorkloadsService clients
|
47
|
+
# ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config|
|
48
|
+
# config.timeout = 10.0
|
49
|
+
# end
|
51
50
|
#
|
52
51
|
# @yield [config] Configure the Client client.
|
53
52
|
# @yieldparam config [Client::Configuration]
|
@@ -113,19 +112,15 @@ module Google
|
|
113
112
|
##
|
114
113
|
# Create a new AssuredWorkloadsService client object.
|
115
114
|
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
# To create a new AssuredWorkloadsService client with the default
|
119
|
-
# configuration:
|
120
|
-
#
|
121
|
-
# client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
115
|
+
# @example
|
122
116
|
#
|
123
|
-
#
|
124
|
-
#
|
117
|
+
# # Create a client using the default configuration
|
118
|
+
# client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
125
119
|
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
120
|
+
# # Create a client using a custom configuration
|
121
|
+
# client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config|
|
122
|
+
# config.timeout = 10.0
|
123
|
+
# end
|
129
124
|
#
|
130
125
|
# @yield [config] Configure the AssuredWorkloadsService client.
|
131
126
|
# @yieldparam config [Client::Configuration]
|
@@ -145,10 +140,9 @@ module Google
|
|
145
140
|
|
146
141
|
# Create credentials
|
147
142
|
credentials = @config.credentials
|
148
|
-
# Use self-signed JWT if the
|
143
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
149
144
|
# but only if the default endpoint does not have a region prefix.
|
150
|
-
enable_self_signed_jwt = @config.
|
151
|
-
@config.endpoint == Client.configure.endpoint &&
|
145
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
152
146
|
!@config.endpoint.split(".").first.include?("-")
|
153
147
|
credentials ||= Credentials.default scope: @config.scope,
|
154
148
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -218,6 +212,28 @@ module Google
|
|
218
212
|
#
|
219
213
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
220
214
|
#
|
215
|
+
# @example Basic example
|
216
|
+
# require "google/cloud/assured_workloads/v1beta1"
|
217
|
+
#
|
218
|
+
# # Create a client object. The client can be reused for multiple calls.
|
219
|
+
# client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
220
|
+
#
|
221
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
222
|
+
# request = Google::Cloud::AssuredWorkloads::V1beta1::CreateWorkloadRequest.new
|
223
|
+
#
|
224
|
+
# # Call the create_workload method.
|
225
|
+
# result = client.create_workload request
|
226
|
+
#
|
227
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
228
|
+
# # object to check the status of an operation, cancel it, or wait
|
229
|
+
# # for results. Here is how to block until completion:
|
230
|
+
# result.wait_until_done! timeout: 60
|
231
|
+
# if result.response?
|
232
|
+
# p result.response
|
233
|
+
# else
|
234
|
+
# puts "Error!"
|
235
|
+
# end
|
236
|
+
#
|
221
237
|
def create_workload request, options = nil
|
222
238
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
223
239
|
|
@@ -235,16 +251,20 @@ module Google
|
|
235
251
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
236
252
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
237
253
|
|
238
|
-
header_params = {
|
239
|
-
|
240
|
-
|
254
|
+
header_params = {}
|
255
|
+
if request.parent
|
256
|
+
header_params["parent"] = request.parent
|
257
|
+
end
|
258
|
+
|
241
259
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
242
260
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
243
261
|
|
244
262
|
options.apply_defaults timeout: @config.rpcs.create_workload.timeout,
|
245
263
|
metadata: metadata,
|
246
264
|
retry_policy: @config.rpcs.create_workload.retry_policy
|
247
|
-
|
265
|
+
|
266
|
+
options.apply_defaults timeout: @config.timeout,
|
267
|
+
metadata: @config.metadata,
|
248
268
|
retry_policy: @config.retry_policy
|
249
269
|
|
250
270
|
@assured_workloads_service_stub.call_rpc :create_workload, request, options: options do |response, operation|
|
@@ -293,6 +313,21 @@ module Google
|
|
293
313
|
#
|
294
314
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
295
315
|
#
|
316
|
+
# @example Basic example
|
317
|
+
# require "google/cloud/assured_workloads/v1beta1"
|
318
|
+
#
|
319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
320
|
+
# client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
321
|
+
#
|
322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
323
|
+
# request = Google::Cloud::AssuredWorkloads::V1beta1::UpdateWorkloadRequest.new
|
324
|
+
#
|
325
|
+
# # Call the update_workload method.
|
326
|
+
# result = client.update_workload request
|
327
|
+
#
|
328
|
+
# # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload.
|
329
|
+
# p result
|
330
|
+
#
|
296
331
|
def update_workload request, options = nil
|
297
332
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
298
333
|
|
@@ -310,16 +345,20 @@ module Google
|
|
310
345
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
311
346
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
312
347
|
|
313
|
-
header_params = {
|
314
|
-
|
315
|
-
|
348
|
+
header_params = {}
|
349
|
+
if request.workload&.name
|
350
|
+
header_params["workload.name"] = request.workload.name
|
351
|
+
end
|
352
|
+
|
316
353
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
317
354
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
318
355
|
|
319
356
|
options.apply_defaults timeout: @config.rpcs.update_workload.timeout,
|
320
357
|
metadata: metadata,
|
321
358
|
retry_policy: @config.rpcs.update_workload.retry_policy
|
322
|
-
|
359
|
+
|
360
|
+
options.apply_defaults timeout: @config.timeout,
|
361
|
+
metadata: @config.metadata,
|
323
362
|
retry_policy: @config.retry_policy
|
324
363
|
|
325
364
|
@assured_workloads_service_stub.call_rpc :update_workload, request, options: options do |response, operation|
|
@@ -366,6 +405,21 @@ module Google
|
|
366
405
|
#
|
367
406
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
368
407
|
#
|
408
|
+
# @example Basic example
|
409
|
+
# require "google/cloud/assured_workloads/v1beta1"
|
410
|
+
#
|
411
|
+
# # Create a client object. The client can be reused for multiple calls.
|
412
|
+
# client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
413
|
+
#
|
414
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
415
|
+
# request = Google::Cloud::AssuredWorkloads::V1beta1::DeleteWorkloadRequest.new
|
416
|
+
#
|
417
|
+
# # Call the delete_workload method.
|
418
|
+
# result = client.delete_workload request
|
419
|
+
#
|
420
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
421
|
+
# p result
|
422
|
+
#
|
369
423
|
def delete_workload request, options = nil
|
370
424
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
371
425
|
|
@@ -383,16 +437,20 @@ module Google
|
|
383
437
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
384
438
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
385
439
|
|
386
|
-
header_params = {
|
387
|
-
|
388
|
-
|
440
|
+
header_params = {}
|
441
|
+
if request.name
|
442
|
+
header_params["name"] = request.name
|
443
|
+
end
|
444
|
+
|
389
445
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
390
446
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
391
447
|
|
392
448
|
options.apply_defaults timeout: @config.rpcs.delete_workload.timeout,
|
393
449
|
metadata: metadata,
|
394
450
|
retry_policy: @config.rpcs.delete_workload.retry_policy
|
395
|
-
|
451
|
+
|
452
|
+
options.apply_defaults timeout: @config.timeout,
|
453
|
+
metadata: @config.metadata,
|
396
454
|
retry_policy: @config.retry_policy
|
397
455
|
|
398
456
|
@assured_workloads_service_stub.call_rpc :delete_workload, request, options: options do |response, operation|
|
@@ -436,6 +494,21 @@ module Google
|
|
436
494
|
#
|
437
495
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
438
496
|
#
|
497
|
+
# @example Basic example
|
498
|
+
# require "google/cloud/assured_workloads/v1beta1"
|
499
|
+
#
|
500
|
+
# # Create a client object. The client can be reused for multiple calls.
|
501
|
+
# client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
502
|
+
#
|
503
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
504
|
+
# request = Google::Cloud::AssuredWorkloads::V1beta1::GetWorkloadRequest.new
|
505
|
+
#
|
506
|
+
# # Call the get_workload method.
|
507
|
+
# result = client.get_workload request
|
508
|
+
#
|
509
|
+
# # The returned object is of type Google::Cloud::AssuredWorkloads::V1beta1::Workload.
|
510
|
+
# p result
|
511
|
+
#
|
439
512
|
def get_workload request, options = nil
|
440
513
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
441
514
|
|
@@ -453,16 +526,20 @@ module Google
|
|
453
526
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
454
527
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
455
528
|
|
456
|
-
header_params = {
|
457
|
-
|
458
|
-
|
529
|
+
header_params = {}
|
530
|
+
if request.name
|
531
|
+
header_params["name"] = request.name
|
532
|
+
end
|
533
|
+
|
459
534
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
460
535
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
461
536
|
|
462
537
|
options.apply_defaults timeout: @config.rpcs.get_workload.timeout,
|
463
538
|
metadata: metadata,
|
464
539
|
retry_policy: @config.rpcs.get_workload.retry_policy
|
465
|
-
|
540
|
+
|
541
|
+
options.apply_defaults timeout: @config.timeout,
|
542
|
+
metadata: @config.metadata,
|
466
543
|
retry_policy: @config.retry_policy
|
467
544
|
|
468
545
|
@assured_workloads_service_stub.call_rpc :get_workload, request, options: options do |response, operation|
|
@@ -512,6 +589,27 @@ module Google
|
|
512
589
|
#
|
513
590
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
514
591
|
#
|
592
|
+
# @example Basic example
|
593
|
+
# require "google/cloud/assured_workloads/v1beta1"
|
594
|
+
#
|
595
|
+
# # Create a client object. The client can be reused for multiple calls.
|
596
|
+
# client = Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new
|
597
|
+
#
|
598
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
599
|
+
# request = Google::Cloud::AssuredWorkloads::V1beta1::ListWorkloadsRequest.new
|
600
|
+
#
|
601
|
+
# # Call the list_workloads method.
|
602
|
+
# result = client.list_workloads request
|
603
|
+
#
|
604
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
605
|
+
# # iterate over all elements by calling #each, and the enumerable
|
606
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
607
|
+
# # methods are also available for managing paging directly.
|
608
|
+
# result.each do |response|
|
609
|
+
# # Each element is of type ::Google::Cloud::AssuredWorkloads::V1beta1::Workload.
|
610
|
+
# p response
|
611
|
+
# end
|
612
|
+
#
|
515
613
|
def list_workloads request, options = nil
|
516
614
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
517
615
|
|
@@ -529,16 +627,20 @@ module Google
|
|
529
627
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
530
628
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
531
629
|
|
532
|
-
header_params = {
|
533
|
-
|
534
|
-
|
630
|
+
header_params = {}
|
631
|
+
if request.parent
|
632
|
+
header_params["parent"] = request.parent
|
633
|
+
end
|
634
|
+
|
535
635
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
536
636
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
537
637
|
|
538
638
|
options.apply_defaults timeout: @config.rpcs.list_workloads.timeout,
|
539
639
|
metadata: metadata,
|
540
640
|
retry_policy: @config.rpcs.list_workloads.retry_policy
|
541
|
-
|
641
|
+
|
642
|
+
options.apply_defaults timeout: @config.timeout,
|
643
|
+
metadata: @config.metadata,
|
542
644
|
retry_policy: @config.retry_policy
|
543
645
|
|
544
646
|
@assured_workloads_service_stub.call_rpc :list_workloads, request, options: options do |response, operation|
|
@@ -563,22 +665,21 @@ module Google
|
|
563
665
|
# Configuration can be applied globally to all clients, or to a single client
|
564
666
|
# on construction.
|
565
667
|
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
# to 20 seconds,
|
570
|
-
#
|
571
|
-
#
|
572
|
-
#
|
573
|
-
#
|
574
|
-
#
|
575
|
-
#
|
576
|
-
#
|
577
|
-
#
|
578
|
-
#
|
579
|
-
#
|
580
|
-
#
|
581
|
-
# end
|
668
|
+
# @example
|
669
|
+
#
|
670
|
+
# # Modify the global config, setting the timeout for
|
671
|
+
# # create_workload to 20 seconds,
|
672
|
+
# # and all remaining timeouts to 10 seconds.
|
673
|
+
# ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.configure do |config|
|
674
|
+
# config.timeout = 10.0
|
675
|
+
# config.rpcs.create_workload.timeout = 20.0
|
676
|
+
# end
|
677
|
+
#
|
678
|
+
# # Apply the above configuration only to a new client.
|
679
|
+
# client = ::Google::Cloud::AssuredWorkloads::V1beta1::AssuredWorkloadsService::Client.new do |config|
|
680
|
+
# config.timeout = 10.0
|
681
|
+
# config.rpcs.create_workload.timeout = 20.0
|
682
|
+
# end
|
582
683
|
#
|
583
684
|
# @!attribute [rw] endpoint
|
584
685
|
# The hostname or hostname:port of the service endpoint.
|
@@ -143,6 +143,27 @@ module Google
|
|
143
143
|
#
|
144
144
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
145
145
|
#
|
146
|
+
# @example Basic example
|
147
|
+
# require "google/longrunning"
|
148
|
+
#
|
149
|
+
# # Create a client object. The client can be reused for multiple calls.
|
150
|
+
# client = Google::Longrunning::Operations::Client.new
|
151
|
+
#
|
152
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
153
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
154
|
+
#
|
155
|
+
# # Call the list_operations method.
|
156
|
+
# result = client.list_operations request
|
157
|
+
#
|
158
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
159
|
+
# # iterate over all elements by calling #each, and the enumerable
|
160
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
161
|
+
# # methods are also available for managing paging directly.
|
162
|
+
# result.each do |response|
|
163
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
164
|
+
# p response
|
165
|
+
# end
|
166
|
+
#
|
146
167
|
def list_operations request, options = nil
|
147
168
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
148
169
|
|
@@ -160,16 +181,20 @@ module Google
|
|
160
181
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
161
182
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
162
183
|
|
163
|
-
header_params = {
|
164
|
-
|
165
|
-
|
184
|
+
header_params = {}
|
185
|
+
if request.name
|
186
|
+
header_params["name"] = request.name
|
187
|
+
end
|
188
|
+
|
166
189
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
167
190
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
168
191
|
|
169
192
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
193
|
metadata: metadata,
|
171
194
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
195
|
+
|
196
|
+
options.apply_defaults timeout: @config.timeout,
|
197
|
+
metadata: @config.metadata,
|
173
198
|
retry_policy: @config.retry_policy
|
174
199
|
|
175
200
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -213,6 +238,28 @@ module Google
|
|
213
238
|
#
|
214
239
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
215
240
|
#
|
241
|
+
# @example Basic example
|
242
|
+
# require "google/longrunning"
|
243
|
+
#
|
244
|
+
# # Create a client object. The client can be reused for multiple calls.
|
245
|
+
# client = Google::Longrunning::Operations::Client.new
|
246
|
+
#
|
247
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
248
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
249
|
+
#
|
250
|
+
# # Call the get_operation method.
|
251
|
+
# result = client.get_operation request
|
252
|
+
#
|
253
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
254
|
+
# # object to check the status of an operation, cancel it, or wait
|
255
|
+
# # for results. Here is how to block until completion:
|
256
|
+
# result.wait_until_done! timeout: 60
|
257
|
+
# if result.response?
|
258
|
+
# p result.response
|
259
|
+
# else
|
260
|
+
# puts "Error!"
|
261
|
+
# end
|
262
|
+
#
|
216
263
|
def get_operation request, options = nil
|
217
264
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
218
265
|
|
@@ -230,16 +277,20 @@ module Google
|
|
230
277
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
231
278
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
232
279
|
|
233
|
-
header_params = {
|
234
|
-
|
235
|
-
|
280
|
+
header_params = {}
|
281
|
+
if request.name
|
282
|
+
header_params["name"] = request.name
|
283
|
+
end
|
284
|
+
|
236
285
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
237
286
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
238
287
|
|
239
288
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
289
|
metadata: metadata,
|
241
290
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
291
|
+
|
292
|
+
options.apply_defaults timeout: @config.timeout,
|
293
|
+
metadata: @config.metadata,
|
243
294
|
retry_policy: @config.retry_policy
|
244
295
|
|
245
296
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -283,6 +334,21 @@ module Google
|
|
283
334
|
#
|
284
335
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
285
336
|
#
|
337
|
+
# @example Basic example
|
338
|
+
# require "google/longrunning"
|
339
|
+
#
|
340
|
+
# # Create a client object. The client can be reused for multiple calls.
|
341
|
+
# client = Google::Longrunning::Operations::Client.new
|
342
|
+
#
|
343
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
344
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
345
|
+
#
|
346
|
+
# # Call the delete_operation method.
|
347
|
+
# result = client.delete_operation request
|
348
|
+
#
|
349
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
350
|
+
# p result
|
351
|
+
#
|
286
352
|
def delete_operation request, options = nil
|
287
353
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
288
354
|
|
@@ -300,16 +366,20 @@ module Google
|
|
300
366
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
301
367
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
302
368
|
|
303
|
-
header_params = {
|
304
|
-
|
305
|
-
|
369
|
+
header_params = {}
|
370
|
+
if request.name
|
371
|
+
header_params["name"] = request.name
|
372
|
+
end
|
373
|
+
|
306
374
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
307
375
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
308
376
|
|
309
377
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
378
|
metadata: metadata,
|
311
379
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
380
|
+
|
381
|
+
options.apply_defaults timeout: @config.timeout,
|
382
|
+
metadata: @config.metadata,
|
313
383
|
retry_policy: @config.retry_policy
|
314
384
|
|
315
385
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -358,6 +428,21 @@ module Google
|
|
358
428
|
#
|
359
429
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
360
430
|
#
|
431
|
+
# @example Basic example
|
432
|
+
# require "google/longrunning"
|
433
|
+
#
|
434
|
+
# # Create a client object. The client can be reused for multiple calls.
|
435
|
+
# client = Google::Longrunning::Operations::Client.new
|
436
|
+
#
|
437
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
438
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
439
|
+
#
|
440
|
+
# # Call the cancel_operation method.
|
441
|
+
# result = client.cancel_operation request
|
442
|
+
#
|
443
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
444
|
+
# p result
|
445
|
+
#
|
361
446
|
def cancel_operation request, options = nil
|
362
447
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
363
448
|
|
@@ -375,16 +460,20 @@ module Google
|
|
375
460
|
gapic_version: ::Google::Cloud::AssuredWorkloads::V1beta1::VERSION
|
376
461
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
377
462
|
|
378
|
-
header_params = {
|
379
|
-
|
380
|
-
|
463
|
+
header_params = {}
|
464
|
+
if request.name
|
465
|
+
header_params["name"] = request.name
|
466
|
+
end
|
467
|
+
|
381
468
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
382
469
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
383
470
|
|
384
471
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
472
|
metadata: metadata,
|
386
473
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
474
|
+
|
475
|
+
options.apply_defaults timeout: @config.timeout,
|
476
|
+
metadata: @config.metadata,
|
388
477
|
retry_policy: @config.retry_policy
|
389
478
|
|
390
479
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -436,6 +525,28 @@ module Google
|
|
436
525
|
#
|
437
526
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
438
527
|
#
|
528
|
+
# @example Basic example
|
529
|
+
# require "google/longrunning"
|
530
|
+
#
|
531
|
+
# # Create a client object. The client can be reused for multiple calls.
|
532
|
+
# client = Google::Longrunning::Operations::Client.new
|
533
|
+
#
|
534
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
535
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
536
|
+
#
|
537
|
+
# # Call the wait_operation method.
|
538
|
+
# result = client.wait_operation request
|
539
|
+
#
|
540
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
541
|
+
# # object to check the status of an operation, cancel it, or wait
|
542
|
+
# # for results. Here is how to block until completion:
|
543
|
+
# result.wait_until_done! timeout: 60
|
544
|
+
# if result.response?
|
545
|
+
# p result.response
|
546
|
+
# else
|
547
|
+
# puts "Error!"
|
548
|
+
# end
|
549
|
+
#
|
439
550
|
def wait_operation request, options = nil
|
440
551
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
441
552
|
|
@@ -456,7 +567,9 @@ module Google
|
|
456
567
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
568
|
metadata: metadata,
|
458
569
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
570
|
+
|
571
|
+
options.apply_defaults timeout: @config.timeout,
|
572
|
+
metadata: @config.metadata,
|
460
573
|
retry_policy: @config.retry_policy
|
461
574
|
|
462
575
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +594,21 @@ module Google
|
|
481
594
|
# Configuration can be applied globally to all clients, or to a single client
|
482
595
|
# on construction.
|
483
596
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
597
|
+
# @example
|
598
|
+
#
|
599
|
+
# # Modify the global config, setting the timeout for
|
600
|
+
# # list_operations to 20 seconds,
|
601
|
+
# # and all remaining timeouts to 10 seconds.
|
602
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
603
|
+
# config.timeout = 10.0
|
604
|
+
# config.rpcs.list_operations.timeout = 20.0
|
605
|
+
# end
|
606
|
+
#
|
607
|
+
# # Apply the above configuration only to a new client.
|
608
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
609
|
+
# config.timeout = 10.0
|
610
|
+
# config.rpcs.list_operations.timeout = 20.0
|
611
|
+
# end
|
500
612
|
#
|
501
613
|
# @!attribute [rw] endpoint
|
502
614
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -12,6 +10,8 @@ require 'google/protobuf/duration_pb'
|
|
12
10
|
require 'google/protobuf/empty_pb'
|
13
11
|
require 'google/protobuf/field_mask_pb'
|
14
12
|
require 'google/protobuf/timestamp_pb'
|
13
|
+
require 'google/protobuf'
|
14
|
+
|
15
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
16
|
add_file("google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto", :syntax => :proto3) do
|
17
17
|
add_message "google.cloud.assuredworkloads.v1beta1.CreateWorkloadRequest" do
|
@@ -66,7 +66,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
66
|
add_enum "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType" do
|
67
67
|
value :RESOURCE_TYPE_UNSPECIFIED, 0
|
68
68
|
value :CONSUMER_PROJECT, 1
|
69
|
+
value :CONSUMER_FOLDER, 4
|
69
70
|
value :ENCRYPTION_KEYS_PROJECT, 2
|
71
|
+
value :KEYRING, 3
|
70
72
|
end
|
71
73
|
add_message "google.cloud.assuredworkloads.v1beta1.Workload.KMSSettings" do
|
72
74
|
optional :next_rotation_time, :message, 1, "google.protobuf.Timestamp"
|
@@ -87,6 +89,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
87
89
|
add_message "google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings" do
|
88
90
|
optional :resource_id, :string, 1
|
89
91
|
optional :resource_type, :enum, 2, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceInfo.ResourceType"
|
92
|
+
optional :display_name, :string, 3
|
90
93
|
end
|
91
94
|
add_enum "google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime" do
|
92
95
|
value :COMPLIANCE_REGIME_UNSPECIFIED, 0
|
@@ -97,12 +100,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
97
100
|
value :US_REGIONAL_ACCESS, 5
|
98
101
|
value :HIPAA, 6
|
99
102
|
value :HITRUST, 7
|
103
|
+
value :EU_REGIONS_AND_SUPPORT, 8
|
104
|
+
value :CA_REGIONS_AND_SUPPORT, 9
|
100
105
|
end
|
101
106
|
add_message "google.cloud.assuredworkloads.v1beta1.CreateWorkloadOperationMetadata" do
|
102
107
|
optional :create_time, :message, 1, "google.protobuf.Timestamp"
|
103
108
|
optional :display_name, :string, 2
|
104
109
|
optional :parent, :string, 3
|
105
110
|
optional :compliance_regime, :enum, 4, "google.cloud.assuredworkloads.v1beta1.Workload.ComplianceRegime"
|
111
|
+
repeated :resource_settings, :message, 5, "google.cloud.assuredworkloads.v1beta1.Workload.ResourceSettings"
|
106
112
|
end
|
107
113
|
end
|
108
114
|
end
|
@@ -148,7 +148,7 @@ module Google
|
|
148
148
|
# Output only. Immutable. The Workload creation timestamp.
|
149
149
|
# @!attribute [rw] billing_account
|
150
150
|
# @return [::String]
|
151
|
-
#
|
151
|
+
# Input only. The billing account used for the resources which are
|
152
152
|
# direct children of workload. This billing account is initially associated
|
153
153
|
# with the resources created as part of Workload creation.
|
154
154
|
# After the initial creation of these resources, the customer can change
|
@@ -178,12 +178,11 @@ module Google
|
|
178
178
|
# @!attribute [rw] provisioned_resources_parent
|
179
179
|
# @return [::String]
|
180
180
|
# Input only. The parent resource for the resources managed by this Assured Workload. May
|
181
|
-
# be either
|
181
|
+
# be either empty or a folder resource which is a child of the
|
182
182
|
# Workload parent. If not specified all resources are created under the
|
183
|
-
#
|
184
|
-
#
|
183
|
+
# parent organization.
|
184
|
+
# Format:
|
185
185
|
# folders/\\{folder_id}
|
186
|
-
# organizations/\\{organization_id}
|
187
186
|
# @!attribute [rw] kms_settings
|
188
187
|
# @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::KMSSettings]
|
189
188
|
# Input only. Settings used to create a CMEK crypto key. When set a project with a KMS
|
@@ -215,11 +214,18 @@ module Google
|
|
215
214
|
# Unknown resource type.
|
216
215
|
RESOURCE_TYPE_UNSPECIFIED = 0
|
217
216
|
|
218
|
-
#
|
217
|
+
# Deprecated. Existing workloads will continue to support this, but new
|
218
|
+
# CreateWorkloadRequests should not specify this as an input value.
|
219
219
|
CONSUMER_PROJECT = 1
|
220
220
|
|
221
|
+
# Consumer Folder.
|
222
|
+
CONSUMER_FOLDER = 4
|
223
|
+
|
221
224
|
# Consumer project containing encryption keys.
|
222
225
|
ENCRYPTION_KEYS_PROJECT = 2
|
226
|
+
|
227
|
+
# Keyring resource that hosts encryption keys.
|
228
|
+
KEYRING = 3
|
223
229
|
end
|
224
230
|
end
|
225
231
|
|
@@ -285,6 +291,11 @@ module Google
|
|
285
291
|
# Indicates the type of resource. This field should be specified to
|
286
292
|
# correspond the id to the right project type (CONSUMER_PROJECT or
|
287
293
|
# ENCRYPTION_KEYS_PROJECT)
|
294
|
+
# @!attribute [rw] display_name
|
295
|
+
# @return [::String]
|
296
|
+
# User-assigned resource display name.
|
297
|
+
# If not empty it will be used to create a resource with the specified
|
298
|
+
# name.
|
288
299
|
class ResourceSettings
|
289
300
|
include ::Google::Protobuf::MessageExts
|
290
301
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -324,6 +335,12 @@ module Google
|
|
324
335
|
|
325
336
|
# Health Information Trust Alliance controls
|
326
337
|
HITRUST = 7
|
338
|
+
|
339
|
+
# Assured Workloads For EU Regions and Support controls
|
340
|
+
EU_REGIONS_AND_SUPPORT = 8
|
341
|
+
|
342
|
+
# Assured Workloads For Canada Regions and Support controls
|
343
|
+
CA_REGIONS_AND_SUPPORT = 9
|
327
344
|
end
|
328
345
|
end
|
329
346
|
|
@@ -341,6 +358,10 @@ module Google
|
|
341
358
|
# @return [::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ComplianceRegime]
|
342
359
|
# Optional. Compliance controls that should be applied to the resources managed by
|
343
360
|
# the workload.
|
361
|
+
# @!attribute [rw] resource_settings
|
362
|
+
# @return [::Array<::Google::Cloud::AssuredWorkloads::V1beta1::Workload::ResourceSettings>]
|
363
|
+
# Optional. Resource properties in the input that are used for creating/customizing
|
364
|
+
# workload resources.
|
344
365
|
class CreateWorkloadOperationMetadata
|
345
366
|
include ::Google::Protobuf::MessageExts
|
346
367
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-assured_workloads-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.1
|
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-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|