strongdm 3.6.1 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.git/ORIG_HEAD +1 -1
- data/.git/index +0 -0
- data/.git/logs/HEAD +3 -3
- data/.git/logs/refs/heads/master +2 -2
- data/.git/logs/refs/remotes/origin/HEAD +1 -1
- data/.git/objects/pack/{pack-c0eff6575c38c9865988c2b59ce4060fff518355.idx → pack-2d53a487ade528ef84cbb5c91cde76bf875d9e95.idx} +0 -0
- data/.git/objects/pack/{pack-c0eff6575c38c9865988c2b59ce4060fff518355.pack → pack-2d53a487ade528ef84cbb5c91cde76bf875d9e95.pack} +0 -0
- data/.git/packed-refs +4 -2
- data/.git/refs/heads/master +1 -1
- data/lib/constants.rb +311 -0
- data/lib/errors/errors.rb +1 -1
- data/lib/grpc/account_attachments_history_pb.rb +48 -0
- data/lib/grpc/account_attachments_history_services_pb.rb +37 -0
- data/lib/grpc/account_grants_history_pb.rb +48 -0
- data/lib/grpc/account_grants_history_services_pb.rb +37 -0
- data/lib/grpc/account_permissions_pb.rb +48 -0
- data/lib/grpc/account_permissions_services_pb.rb +38 -0
- data/lib/grpc/account_resources_pb.rb +49 -0
- data/lib/grpc/account_resources_services_pb.rb +38 -0
- data/lib/grpc/accounts_history_pb.rb +48 -0
- data/lib/grpc/accounts_history_services_pb.rb +37 -0
- data/lib/grpc/activities_pb.rb +77 -0
- data/lib/grpc/activities_services_pb.rb +41 -0
- data/lib/grpc/drivers_pb.rb +66 -0
- data/lib/grpc/nodes_history_pb.rb +48 -0
- data/lib/grpc/nodes_history_services_pb.rb +37 -0
- data/lib/grpc/organization_history_pb.rb +74 -0
- data/lib/grpc/organization_history_services_pb.rb +37 -0
- data/lib/grpc/plumbing.rb +1106 -1
- data/lib/grpc/queries_pb.rb +67 -0
- data/lib/grpc/queries_services_pb.rb +39 -0
- data/lib/grpc/remote_identities_history_pb.rb +48 -0
- data/lib/grpc/remote_identities_history_services_pb.rb +37 -0
- data/lib/grpc/remote_identity_groups_history_pb.rb +48 -0
- data/lib/grpc/remote_identity_groups_history_services_pb.rb +37 -0
- data/lib/grpc/replays_pb.rb +50 -0
- data/lib/grpc/replays_services_pb.rb +38 -0
- data/lib/grpc/resources_history_pb.rb +48 -0
- data/lib/grpc/resources_history_services_pb.rb +37 -0
- data/lib/grpc/role_resources_history_pb.rb +48 -0
- data/lib/grpc/role_resources_history_services_pb.rb +37 -0
- data/lib/grpc/role_resources_pb.rb +46 -0
- data/lib/grpc/role_resources_services_pb.rb +38 -0
- data/lib/grpc/roles_history_pb.rb +48 -0
- data/lib/grpc/roles_history_services_pb.rb +37 -0
- data/lib/grpc/secret_stores_history_pb.rb +48 -0
- data/lib/grpc/secret_stores_history_services_pb.rb +37 -0
- data/lib/models/porcelain.rb +1177 -1
- data/lib/strongdm.rb +220 -2
- data/lib/svc.rb +1556 -121
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +38 -4
data/lib/svc.rb
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
#
|
15
15
|
|
16
|
-
# @internal
|
16
|
+
# @internal Code generated by protogen. DO NOT EDIT.
|
17
17
|
|
18
18
|
this_dir = File.expand_path(File.dirname(__FILE__))
|
19
19
|
lib_dir = File.join(this_dir, "grpc")
|
@@ -75,6 +75,10 @@ module SDM #:nodoc:
|
|
75
75
|
deadline: nil
|
76
76
|
)
|
77
77
|
req = V1::AccountAttachmentGetRequest.new()
|
78
|
+
if not @parent.snapshot_time.nil?
|
79
|
+
req.meta = V1::GetRequestMetadata.new()
|
80
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
81
|
+
end
|
78
82
|
|
79
83
|
req.id = (id)
|
80
84
|
tries = 0
|
@@ -140,6 +144,9 @@ module SDM #:nodoc:
|
|
140
144
|
if page_size_option.is_a? Integer
|
141
145
|
req.meta.limit = page_size_option
|
142
146
|
end
|
147
|
+
if not @parent.snapshot_time.nil?
|
148
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
149
|
+
end
|
143
150
|
|
144
151
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
145
152
|
resp = Enumerator::Generator.new { |g|
|
@@ -166,6 +173,96 @@ module SDM #:nodoc:
|
|
166
173
|
end
|
167
174
|
end
|
168
175
|
|
176
|
+
# SnapshotAccountAttachments exposes the read only methods of the AccountAttachments
|
177
|
+
# service for historical queries.
|
178
|
+
class SnapshotAccountAttachments
|
179
|
+
extend Gem::Deprecate
|
180
|
+
|
181
|
+
def initialize(account_attachments)
|
182
|
+
@account_attachments = account_attachments
|
183
|
+
end
|
184
|
+
|
185
|
+
# Get reads one AccountAttachment by ID.
|
186
|
+
def get(
|
187
|
+
id,
|
188
|
+
deadline: nil
|
189
|
+
)
|
190
|
+
return @account_attachments.get(
|
191
|
+
id,
|
192
|
+
deadline: deadline,
|
193
|
+
)
|
194
|
+
end
|
195
|
+
|
196
|
+
# List gets a list of AccountAttachments matching a given set of criteria.
|
197
|
+
def list(
|
198
|
+
filter,
|
199
|
+
*args,
|
200
|
+
deadline: nil
|
201
|
+
)
|
202
|
+
return @account_attachments.list(
|
203
|
+
filter,
|
204
|
+
*args,
|
205
|
+
deadline: deadline,
|
206
|
+
)
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# AccountAttachmentsHistory records all changes to the state of an AccountAttachment.
|
211
|
+
#
|
212
|
+
# See {AccountAttachmentHistory}.
|
213
|
+
class AccountAttachmentsHistory
|
214
|
+
extend Gem::Deprecate
|
215
|
+
|
216
|
+
def initialize(channel, parent)
|
217
|
+
begin
|
218
|
+
@stub = V1::AccountAttachmentsHistory::Stub.new(nil, nil, channel_override: channel)
|
219
|
+
rescue => exception
|
220
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
221
|
+
end
|
222
|
+
@parent = parent
|
223
|
+
end
|
224
|
+
|
225
|
+
# List gets a list of AccountAttachmentHistory records matching a given set of criteria.
|
226
|
+
def list(
|
227
|
+
filter,
|
228
|
+
*args,
|
229
|
+
deadline: nil
|
230
|
+
)
|
231
|
+
req = V1::AccountAttachmentHistoryListRequest.new()
|
232
|
+
req.meta = V1::ListRequestMetadata.new()
|
233
|
+
page_size_option = @parent._test_options["PageSize"]
|
234
|
+
if page_size_option.is_a? Integer
|
235
|
+
req.meta.limit = page_size_option
|
236
|
+
end
|
237
|
+
if not @parent.snapshot_time.nil?
|
238
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
239
|
+
end
|
240
|
+
|
241
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
242
|
+
resp = Enumerator::Generator.new { |g|
|
243
|
+
tries = 0
|
244
|
+
loop do
|
245
|
+
begin
|
246
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountAttachmentsHistory.List", req), deadline: deadline)
|
247
|
+
rescue => exception
|
248
|
+
if (@parent.shouldRetry(tries, exception))
|
249
|
+
tries + +@parent.jitterSleep(tries)
|
250
|
+
next
|
251
|
+
end
|
252
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
253
|
+
end
|
254
|
+
tries = 0
|
255
|
+
plumbing_response.history.each do |plumbing_item|
|
256
|
+
g.yield Plumbing::convert_account_attachment_history_to_porcelain(plumbing_item)
|
257
|
+
end
|
258
|
+
break if plumbing_response.meta.next_cursor == ""
|
259
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
260
|
+
end
|
261
|
+
}
|
262
|
+
resp
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
169
266
|
# AccountGrants assign a resource directly to an account, giving the account the permission to connect to that resource.
|
170
267
|
#
|
171
268
|
# See {AccountGrant}.
|
@@ -217,6 +314,10 @@ module SDM #:nodoc:
|
|
217
314
|
deadline: nil
|
218
315
|
)
|
219
316
|
req = V1::AccountGrantGetRequest.new()
|
317
|
+
if not @parent.snapshot_time.nil?
|
318
|
+
req.meta = V1::GetRequestMetadata.new()
|
319
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
320
|
+
end
|
220
321
|
|
221
322
|
req.id = (id)
|
222
323
|
tries = 0
|
@@ -282,6 +383,9 @@ module SDM #:nodoc:
|
|
282
383
|
if page_size_option.is_a? Integer
|
283
384
|
req.meta.limit = page_size_option
|
284
385
|
end
|
386
|
+
if not @parent.snapshot_time.nil?
|
387
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
388
|
+
end
|
285
389
|
|
286
390
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
287
391
|
resp = Enumerator::Generator.new { |g|
|
@@ -308,6 +412,256 @@ module SDM #:nodoc:
|
|
308
412
|
end
|
309
413
|
end
|
310
414
|
|
415
|
+
# SnapshotAccountGrants exposes the read only methods of the AccountGrants
|
416
|
+
# service for historical queries.
|
417
|
+
class SnapshotAccountGrants
|
418
|
+
extend Gem::Deprecate
|
419
|
+
|
420
|
+
def initialize(account_grants)
|
421
|
+
@account_grants = account_grants
|
422
|
+
end
|
423
|
+
|
424
|
+
# Get reads one AccountGrant by ID.
|
425
|
+
def get(
|
426
|
+
id,
|
427
|
+
deadline: nil
|
428
|
+
)
|
429
|
+
return @account_grants.get(
|
430
|
+
id,
|
431
|
+
deadline: deadline,
|
432
|
+
)
|
433
|
+
end
|
434
|
+
|
435
|
+
# List gets a list of AccountGrants matching a given set of criteria.
|
436
|
+
def list(
|
437
|
+
filter,
|
438
|
+
*args,
|
439
|
+
deadline: nil
|
440
|
+
)
|
441
|
+
return @account_grants.list(
|
442
|
+
filter,
|
443
|
+
*args,
|
444
|
+
deadline: deadline,
|
445
|
+
)
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
# AccountGrantsHistory records all changes to the state of an AccountGrant.
|
450
|
+
#
|
451
|
+
# See {AccountGrantHistory}.
|
452
|
+
class AccountGrantsHistory
|
453
|
+
extend Gem::Deprecate
|
454
|
+
|
455
|
+
def initialize(channel, parent)
|
456
|
+
begin
|
457
|
+
@stub = V1::AccountGrantsHistory::Stub.new(nil, nil, channel_override: channel)
|
458
|
+
rescue => exception
|
459
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
460
|
+
end
|
461
|
+
@parent = parent
|
462
|
+
end
|
463
|
+
|
464
|
+
# List gets a list of AccountGrantHistory records matching a given set of criteria.
|
465
|
+
def list(
|
466
|
+
filter,
|
467
|
+
*args,
|
468
|
+
deadline: nil
|
469
|
+
)
|
470
|
+
req = V1::AccountGrantHistoryListRequest.new()
|
471
|
+
req.meta = V1::ListRequestMetadata.new()
|
472
|
+
page_size_option = @parent._test_options["PageSize"]
|
473
|
+
if page_size_option.is_a? Integer
|
474
|
+
req.meta.limit = page_size_option
|
475
|
+
end
|
476
|
+
if not @parent.snapshot_time.nil?
|
477
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
478
|
+
end
|
479
|
+
|
480
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
481
|
+
resp = Enumerator::Generator.new { |g|
|
482
|
+
tries = 0
|
483
|
+
loop do
|
484
|
+
begin
|
485
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountGrantsHistory.List", req), deadline: deadline)
|
486
|
+
rescue => exception
|
487
|
+
if (@parent.shouldRetry(tries, exception))
|
488
|
+
tries + +@parent.jitterSleep(tries)
|
489
|
+
next
|
490
|
+
end
|
491
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
492
|
+
end
|
493
|
+
tries = 0
|
494
|
+
plumbing_response.history.each do |plumbing_item|
|
495
|
+
g.yield Plumbing::convert_account_grant_history_to_porcelain(plumbing_item)
|
496
|
+
end
|
497
|
+
break if plumbing_response.meta.next_cursor == ""
|
498
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
499
|
+
end
|
500
|
+
}
|
501
|
+
resp
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
# AccountPermissions records the granular permissions accounts have, allowing them to execute
|
506
|
+
# relevant commands via StrongDM's APIs.
|
507
|
+
#
|
508
|
+
# See {AccountPermission}.
|
509
|
+
class AccountPermissions
|
510
|
+
extend Gem::Deprecate
|
511
|
+
|
512
|
+
def initialize(channel, parent)
|
513
|
+
begin
|
514
|
+
@stub = V1::AccountPermissions::Stub.new(nil, nil, channel_override: channel)
|
515
|
+
rescue => exception
|
516
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
517
|
+
end
|
518
|
+
@parent = parent
|
519
|
+
end
|
520
|
+
|
521
|
+
# List gets a list of Permission records matching a given set of criteria.
|
522
|
+
def list(
|
523
|
+
filter,
|
524
|
+
*args,
|
525
|
+
deadline: nil
|
526
|
+
)
|
527
|
+
req = V1::AccountPermissionListRequest.new()
|
528
|
+
req.meta = V1::ListRequestMetadata.new()
|
529
|
+
page_size_option = @parent._test_options["PageSize"]
|
530
|
+
if page_size_option.is_a? Integer
|
531
|
+
req.meta.limit = page_size_option
|
532
|
+
end
|
533
|
+
if not @parent.snapshot_time.nil?
|
534
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
535
|
+
end
|
536
|
+
|
537
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
538
|
+
resp = Enumerator::Generator.new { |g|
|
539
|
+
tries = 0
|
540
|
+
loop do
|
541
|
+
begin
|
542
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountPermissions.List", req), deadline: deadline)
|
543
|
+
rescue => exception
|
544
|
+
if (@parent.shouldRetry(tries, exception))
|
545
|
+
tries + +@parent.jitterSleep(tries)
|
546
|
+
next
|
547
|
+
end
|
548
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
549
|
+
end
|
550
|
+
tries = 0
|
551
|
+
plumbing_response.permissions.each do |plumbing_item|
|
552
|
+
g.yield Plumbing::convert_account_permission_to_porcelain(plumbing_item)
|
553
|
+
end
|
554
|
+
break if plumbing_response.meta.next_cursor == ""
|
555
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
556
|
+
end
|
557
|
+
}
|
558
|
+
resp
|
559
|
+
end
|
560
|
+
end
|
561
|
+
|
562
|
+
# SnapshotAccountPermissions exposes the read only methods of the AccountPermissions
|
563
|
+
# service for historical queries.
|
564
|
+
class SnapshotAccountPermissions
|
565
|
+
extend Gem::Deprecate
|
566
|
+
|
567
|
+
def initialize(account_permissions)
|
568
|
+
@account_permissions = account_permissions
|
569
|
+
end
|
570
|
+
|
571
|
+
# List gets a list of Permission records matching a given set of criteria.
|
572
|
+
def list(
|
573
|
+
filter,
|
574
|
+
*args,
|
575
|
+
deadline: nil
|
576
|
+
)
|
577
|
+
return @account_permissions.list(
|
578
|
+
filter,
|
579
|
+
*args,
|
580
|
+
deadline: deadline,
|
581
|
+
)
|
582
|
+
end
|
583
|
+
end
|
584
|
+
|
585
|
+
# AccountResources enumerates the resources to which accounts have access.
|
586
|
+
# The AccountResources service is read-only.
|
587
|
+
#
|
588
|
+
# See {AccountResource}.
|
589
|
+
class AccountResources
|
590
|
+
extend Gem::Deprecate
|
591
|
+
|
592
|
+
def initialize(channel, parent)
|
593
|
+
begin
|
594
|
+
@stub = V1::AccountResources::Stub.new(nil, nil, channel_override: channel)
|
595
|
+
rescue => exception
|
596
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
597
|
+
end
|
598
|
+
@parent = parent
|
599
|
+
end
|
600
|
+
|
601
|
+
# List gets a list of AccountResource records matching a given set of criteria.
|
602
|
+
def list(
|
603
|
+
filter,
|
604
|
+
*args,
|
605
|
+
deadline: nil
|
606
|
+
)
|
607
|
+
req = V1::AccountResourceListRequest.new()
|
608
|
+
req.meta = V1::ListRequestMetadata.new()
|
609
|
+
page_size_option = @parent._test_options["PageSize"]
|
610
|
+
if page_size_option.is_a? Integer
|
611
|
+
req.meta.limit = page_size_option
|
612
|
+
end
|
613
|
+
if not @parent.snapshot_time.nil?
|
614
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
615
|
+
end
|
616
|
+
|
617
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
618
|
+
resp = Enumerator::Generator.new { |g|
|
619
|
+
tries = 0
|
620
|
+
loop do
|
621
|
+
begin
|
622
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountResources.List", req), deadline: deadline)
|
623
|
+
rescue => exception
|
624
|
+
if (@parent.shouldRetry(tries, exception))
|
625
|
+
tries + +@parent.jitterSleep(tries)
|
626
|
+
next
|
627
|
+
end
|
628
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
629
|
+
end
|
630
|
+
tries = 0
|
631
|
+
plumbing_response.account_resources.each do |plumbing_item|
|
632
|
+
g.yield Plumbing::convert_account_resource_to_porcelain(plumbing_item)
|
633
|
+
end
|
634
|
+
break if plumbing_response.meta.next_cursor == ""
|
635
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
636
|
+
end
|
637
|
+
}
|
638
|
+
resp
|
639
|
+
end
|
640
|
+
end
|
641
|
+
|
642
|
+
# SnapshotAccountResources exposes the read only methods of the AccountResources
|
643
|
+
# service for historical queries.
|
644
|
+
class SnapshotAccountResources
|
645
|
+
extend Gem::Deprecate
|
646
|
+
|
647
|
+
def initialize(account_resources)
|
648
|
+
@account_resources = account_resources
|
649
|
+
end
|
650
|
+
|
651
|
+
# List gets a list of AccountResource records matching a given set of criteria.
|
652
|
+
def list(
|
653
|
+
filter,
|
654
|
+
*args,
|
655
|
+
deadline: nil
|
656
|
+
)
|
657
|
+
return @account_resources.list(
|
658
|
+
filter,
|
659
|
+
*args,
|
660
|
+
deadline: deadline,
|
661
|
+
)
|
662
|
+
end
|
663
|
+
end
|
664
|
+
|
311
665
|
# Accounts are users that have access to strongDM. There are two types of accounts:
|
312
666
|
# 1. **Users:** humans who are authenticated through username and password or SSO.
|
313
667
|
# 2. **Service Accounts:** machines that are authenticated using a service token.
|
@@ -364,6 +718,10 @@ module SDM #:nodoc:
|
|
364
718
|
deadline: nil
|
365
719
|
)
|
366
720
|
req = V1::AccountGetRequest.new()
|
721
|
+
if not @parent.snapshot_time.nil?
|
722
|
+
req.meta = V1::GetRequestMetadata.new()
|
723
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
724
|
+
end
|
367
725
|
|
368
726
|
req.id = (id)
|
369
727
|
tries = 0
|
@@ -459,6 +817,9 @@ module SDM #:nodoc:
|
|
459
817
|
if page_size_option.is_a? Integer
|
460
818
|
req.meta.limit = page_size_option
|
461
819
|
end
|
820
|
+
if not @parent.snapshot_time.nil?
|
821
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
822
|
+
end
|
462
823
|
|
463
824
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
464
825
|
resp = Enumerator::Generator.new { |g|
|
@@ -485,14 +846,196 @@ module SDM #:nodoc:
|
|
485
846
|
end
|
486
847
|
end
|
487
848
|
|
488
|
-
#
|
489
|
-
|
849
|
+
# SnapshotAccounts exposes the read only methods of the Accounts
|
850
|
+
# service for historical queries.
|
851
|
+
class SnapshotAccounts
|
490
852
|
extend Gem::Deprecate
|
491
853
|
|
492
|
-
def initialize(
|
493
|
-
|
494
|
-
|
495
|
-
|
854
|
+
def initialize(accounts)
|
855
|
+
@accounts = accounts
|
856
|
+
end
|
857
|
+
|
858
|
+
# Get reads one Account by ID.
|
859
|
+
def get(
|
860
|
+
id,
|
861
|
+
deadline: nil
|
862
|
+
)
|
863
|
+
return @accounts.get(
|
864
|
+
id,
|
865
|
+
deadline: deadline,
|
866
|
+
)
|
867
|
+
end
|
868
|
+
|
869
|
+
# List gets a list of Accounts matching a given set of criteria.
|
870
|
+
def list(
|
871
|
+
filter,
|
872
|
+
*args,
|
873
|
+
deadline: nil
|
874
|
+
)
|
875
|
+
return @accounts.list(
|
876
|
+
filter,
|
877
|
+
*args,
|
878
|
+
deadline: deadline,
|
879
|
+
)
|
880
|
+
end
|
881
|
+
end
|
882
|
+
|
883
|
+
# AccountsHistory records all changes to the state of an Account.
|
884
|
+
#
|
885
|
+
# See {AccountHistory}.
|
886
|
+
class AccountsHistory
|
887
|
+
extend Gem::Deprecate
|
888
|
+
|
889
|
+
def initialize(channel, parent)
|
890
|
+
begin
|
891
|
+
@stub = V1::AccountsHistory::Stub.new(nil, nil, channel_override: channel)
|
892
|
+
rescue => exception
|
893
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
894
|
+
end
|
895
|
+
@parent = parent
|
896
|
+
end
|
897
|
+
|
898
|
+
# List gets a list of AccountHistory records matching a given set of criteria.
|
899
|
+
def list(
|
900
|
+
filter,
|
901
|
+
*args,
|
902
|
+
deadline: nil
|
903
|
+
)
|
904
|
+
req = V1::AccountHistoryListRequest.new()
|
905
|
+
req.meta = V1::ListRequestMetadata.new()
|
906
|
+
page_size_option = @parent._test_options["PageSize"]
|
907
|
+
if page_size_option.is_a? Integer
|
908
|
+
req.meta.limit = page_size_option
|
909
|
+
end
|
910
|
+
if not @parent.snapshot_time.nil?
|
911
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
912
|
+
end
|
913
|
+
|
914
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
915
|
+
resp = Enumerator::Generator.new { |g|
|
916
|
+
tries = 0
|
917
|
+
loop do
|
918
|
+
begin
|
919
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountsHistory.List", req), deadline: deadline)
|
920
|
+
rescue => exception
|
921
|
+
if (@parent.shouldRetry(tries, exception))
|
922
|
+
tries + +@parent.jitterSleep(tries)
|
923
|
+
next
|
924
|
+
end
|
925
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
926
|
+
end
|
927
|
+
tries = 0
|
928
|
+
plumbing_response.history.each do |plumbing_item|
|
929
|
+
g.yield Plumbing::convert_account_history_to_porcelain(plumbing_item)
|
930
|
+
end
|
931
|
+
break if plumbing_response.meta.next_cursor == ""
|
932
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
933
|
+
end
|
934
|
+
}
|
935
|
+
resp
|
936
|
+
end
|
937
|
+
end
|
938
|
+
|
939
|
+
# An Activity is a record of an action taken against a strongDM deployment, e.g.
|
940
|
+
# a user creation, resource deletion, sso configuration change, etc. The Activities
|
941
|
+
# service is read-only.
|
942
|
+
#
|
943
|
+
# See {Activity}.
|
944
|
+
class Activities
|
945
|
+
extend Gem::Deprecate
|
946
|
+
|
947
|
+
def initialize(channel, parent)
|
948
|
+
begin
|
949
|
+
@stub = V1::Activities::Stub.new(nil, nil, channel_override: channel)
|
950
|
+
rescue => exception
|
951
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
952
|
+
end
|
953
|
+
@parent = parent
|
954
|
+
end
|
955
|
+
|
956
|
+
# Get reads one Activity by ID.
|
957
|
+
def get(
|
958
|
+
id,
|
959
|
+
deadline: nil
|
960
|
+
)
|
961
|
+
req = V1::ActivityGetRequest.new()
|
962
|
+
if not @parent.snapshot_time.nil?
|
963
|
+
req.meta = V1::GetRequestMetadata.new()
|
964
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
965
|
+
end
|
966
|
+
|
967
|
+
req.id = (id)
|
968
|
+
tries = 0
|
969
|
+
plumbing_response = nil
|
970
|
+
loop do
|
971
|
+
begin
|
972
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("Activities.Get", req), deadline: deadline)
|
973
|
+
rescue => exception
|
974
|
+
if (@parent.shouldRetry(tries, exception))
|
975
|
+
tries + +@parent.jitterSleep(tries)
|
976
|
+
next
|
977
|
+
end
|
978
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
979
|
+
end
|
980
|
+
break
|
981
|
+
end
|
982
|
+
|
983
|
+
resp = ActivityGetResponse.new()
|
984
|
+
resp.activity = Plumbing::convert_activity_to_porcelain(plumbing_response.activity)
|
985
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
986
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
987
|
+
resp
|
988
|
+
end
|
989
|
+
|
990
|
+
# List gets a list of Activities matching a given set of criteria.
|
991
|
+
def list(
|
992
|
+
filter,
|
993
|
+
*args,
|
994
|
+
deadline: nil
|
995
|
+
)
|
996
|
+
req = V1::ActivityListRequest.new()
|
997
|
+
req.meta = V1::ListRequestMetadata.new()
|
998
|
+
page_size_option = @parent._test_options["PageSize"]
|
999
|
+
if page_size_option.is_a? Integer
|
1000
|
+
req.meta.limit = page_size_option
|
1001
|
+
end
|
1002
|
+
if not @parent.snapshot_time.nil?
|
1003
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1007
|
+
resp = Enumerator::Generator.new { |g|
|
1008
|
+
tries = 0
|
1009
|
+
loop do
|
1010
|
+
begin
|
1011
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Activities.List", req), deadline: deadline)
|
1012
|
+
rescue => exception
|
1013
|
+
if (@parent.shouldRetry(tries, exception))
|
1014
|
+
tries + +@parent.jitterSleep(tries)
|
1015
|
+
next
|
1016
|
+
end
|
1017
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1018
|
+
end
|
1019
|
+
tries = 0
|
1020
|
+
plumbing_response.activities.each do |plumbing_item|
|
1021
|
+
g.yield Plumbing::convert_activity_to_porcelain(plumbing_item)
|
1022
|
+
end
|
1023
|
+
break if plumbing_response.meta.next_cursor == ""
|
1024
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1025
|
+
end
|
1026
|
+
}
|
1027
|
+
resp
|
1028
|
+
end
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# ControlPanel contains all administrative controls.
|
1032
|
+
class ControlPanel
|
1033
|
+
extend Gem::Deprecate
|
1034
|
+
|
1035
|
+
def initialize(channel, parent)
|
1036
|
+
begin
|
1037
|
+
@stub = V1::ControlPanel::Stub.new(nil, nil, channel_override: channel)
|
1038
|
+
rescue => exception
|
496
1039
|
raise Plumbing::convert_error_to_porcelain(exception)
|
497
1040
|
end
|
498
1041
|
@parent = parent
|
@@ -613,6 +1156,10 @@ module SDM #:nodoc:
|
|
613
1156
|
deadline: nil
|
614
1157
|
)
|
615
1158
|
req = V1::NodeGetRequest.new()
|
1159
|
+
if not @parent.snapshot_time.nil?
|
1160
|
+
req.meta = V1::GetRequestMetadata.new()
|
1161
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1162
|
+
end
|
616
1163
|
|
617
1164
|
req.id = (id)
|
618
1165
|
tries = 0
|
@@ -708,6 +1255,9 @@ module SDM #:nodoc:
|
|
708
1255
|
if page_size_option.is_a? Integer
|
709
1256
|
req.meta.limit = page_size_option
|
710
1257
|
end
|
1258
|
+
if not @parent.snapshot_time.nil?
|
1259
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1260
|
+
end
|
711
1261
|
|
712
1262
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
713
1263
|
resp = Enumerator::Generator.new { |g|
|
@@ -734,87 +1284,295 @@ module SDM #:nodoc:
|
|
734
1284
|
end
|
735
1285
|
end
|
736
1286
|
|
737
|
-
#
|
1287
|
+
# SnapshotNodes exposes the read only methods of the Nodes
|
1288
|
+
# service for historical queries.
|
1289
|
+
class SnapshotNodes
|
1290
|
+
extend Gem::Deprecate
|
1291
|
+
|
1292
|
+
def initialize(nodes)
|
1293
|
+
@nodes = nodes
|
1294
|
+
end
|
1295
|
+
|
1296
|
+
# Get reads one Node by ID.
|
1297
|
+
def get(
|
1298
|
+
id,
|
1299
|
+
deadline: nil
|
1300
|
+
)
|
1301
|
+
return @nodes.get(
|
1302
|
+
id,
|
1303
|
+
deadline: deadline,
|
1304
|
+
)
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
# List gets a list of Nodes matching a given set of criteria.
|
1308
|
+
def list(
|
1309
|
+
filter,
|
1310
|
+
*args,
|
1311
|
+
deadline: nil
|
1312
|
+
)
|
1313
|
+
return @nodes.list(
|
1314
|
+
filter,
|
1315
|
+
*args,
|
1316
|
+
deadline: deadline,
|
1317
|
+
)
|
1318
|
+
end
|
1319
|
+
end
|
1320
|
+
|
1321
|
+
# NodesHistory records all changes to the state of a Node.
|
738
1322
|
#
|
739
|
-
# See {
|
740
|
-
class
|
1323
|
+
# See {NodeHistory}.
|
1324
|
+
class NodesHistory
|
741
1325
|
extend Gem::Deprecate
|
742
1326
|
|
743
1327
|
def initialize(channel, parent)
|
744
1328
|
begin
|
745
|
-
@stub = V1::
|
1329
|
+
@stub = V1::NodesHistory::Stub.new(nil, nil, channel_override: channel)
|
746
1330
|
rescue => exception
|
747
1331
|
raise Plumbing::convert_error_to_porcelain(exception)
|
748
1332
|
end
|
749
1333
|
@parent = parent
|
750
1334
|
end
|
751
1335
|
|
752
|
-
#
|
753
|
-
def
|
754
|
-
|
1336
|
+
# List gets a list of NodeHistory records matching a given set of criteria.
|
1337
|
+
def list(
|
1338
|
+
filter,
|
1339
|
+
*args,
|
755
1340
|
deadline: nil
|
756
1341
|
)
|
757
|
-
req = V1::
|
1342
|
+
req = V1::NodeHistoryListRequest.new()
|
1343
|
+
req.meta = V1::ListRequestMetadata.new()
|
1344
|
+
page_size_option = @parent._test_options["PageSize"]
|
1345
|
+
if page_size_option.is_a? Integer
|
1346
|
+
req.meta.limit = page_size_option
|
1347
|
+
end
|
1348
|
+
if not @parent.snapshot_time.nil?
|
1349
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1350
|
+
end
|
758
1351
|
|
759
|
-
req.
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
1352
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1353
|
+
resp = Enumerator::Generator.new { |g|
|
1354
|
+
tries = 0
|
1355
|
+
loop do
|
1356
|
+
begin
|
1357
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("NodesHistory.List", req), deadline: deadline)
|
1358
|
+
rescue => exception
|
1359
|
+
if (@parent.shouldRetry(tries, exception))
|
1360
|
+
tries + +@parent.jitterSleep(tries)
|
1361
|
+
next
|
1362
|
+
end
|
1363
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
769
1364
|
end
|
770
|
-
|
1365
|
+
tries = 0
|
1366
|
+
plumbing_response.history.each do |plumbing_item|
|
1367
|
+
g.yield Plumbing::convert_node_history_to_porcelain(plumbing_item)
|
1368
|
+
end
|
1369
|
+
break if plumbing_response.meta.next_cursor == ""
|
1370
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
771
1371
|
end
|
772
|
-
|
773
|
-
end
|
774
|
-
|
775
|
-
resp = RemoteIdentityCreateResponse.new()
|
776
|
-
resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
|
777
|
-
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
778
|
-
resp.remote_identity = Plumbing::convert_remote_identity_to_porcelain(plumbing_response.remote_identity)
|
1372
|
+
}
|
779
1373
|
resp
|
780
1374
|
end
|
1375
|
+
end
|
781
1376
|
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
req = V1::RemoteIdentityGetRequest.new()
|
1377
|
+
# OrganizationHistory records all changes to the state of an Organization.
|
1378
|
+
#
|
1379
|
+
# See {OrganizationHistoryRecord}.
|
1380
|
+
class OrganizationHistory
|
1381
|
+
extend Gem::Deprecate
|
788
1382
|
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("RemoteIdentities.Get", req), deadline: deadline)
|
795
|
-
rescue => exception
|
796
|
-
if (@parent.shouldRetry(tries, exception))
|
797
|
-
tries + +@parent.jitterSleep(tries)
|
798
|
-
next
|
799
|
-
end
|
800
|
-
raise Plumbing::convert_error_to_porcelain(exception)
|
801
|
-
end
|
802
|
-
break
|
1383
|
+
def initialize(channel, parent)
|
1384
|
+
begin
|
1385
|
+
@stub = V1::OrganizationHistory::Stub.new(nil, nil, channel_override: channel)
|
1386
|
+
rescue => exception
|
1387
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
803
1388
|
end
|
804
|
-
|
805
|
-
resp = RemoteIdentityGetResponse.new()
|
806
|
-
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
807
|
-
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
808
|
-
resp.remote_identity = Plumbing::convert_remote_identity_to_porcelain(plumbing_response.remote_identity)
|
809
|
-
resp
|
1389
|
+
@parent = parent
|
810
1390
|
end
|
811
1391
|
|
812
|
-
#
|
813
|
-
def
|
814
|
-
|
1392
|
+
# List gets a list of OrganizationHistory records matching a given set of criteria.
|
1393
|
+
def list(
|
1394
|
+
filter,
|
1395
|
+
*args,
|
815
1396
|
deadline: nil
|
816
1397
|
)
|
817
|
-
req = V1::
|
1398
|
+
req = V1::OrganizationHistoryListRequest.new()
|
1399
|
+
req.meta = V1::ListRequestMetadata.new()
|
1400
|
+
page_size_option = @parent._test_options["PageSize"]
|
1401
|
+
if page_size_option.is_a? Integer
|
1402
|
+
req.meta.limit = page_size_option
|
1403
|
+
end
|
1404
|
+
if not @parent.snapshot_time.nil?
|
1405
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1409
|
+
resp = Enumerator::Generator.new { |g|
|
1410
|
+
tries = 0
|
1411
|
+
loop do
|
1412
|
+
begin
|
1413
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("OrganizationHistory.List", req), deadline: deadline)
|
1414
|
+
rescue => exception
|
1415
|
+
if (@parent.shouldRetry(tries, exception))
|
1416
|
+
tries + +@parent.jitterSleep(tries)
|
1417
|
+
next
|
1418
|
+
end
|
1419
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1420
|
+
end
|
1421
|
+
tries = 0
|
1422
|
+
plumbing_response.history.each do |plumbing_item|
|
1423
|
+
g.yield Plumbing::convert_organization_history_record_to_porcelain(plumbing_item)
|
1424
|
+
end
|
1425
|
+
break if plumbing_response.meta.next_cursor == ""
|
1426
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1427
|
+
end
|
1428
|
+
}
|
1429
|
+
resp
|
1430
|
+
end
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
# A Query is a record of a single client request to a resource, such as an SQL query.
|
1434
|
+
# Long-running SSH, RDP, or Kubernetes interactive sessions also count as queries.
|
1435
|
+
# The Queries service is read-only.
|
1436
|
+
#
|
1437
|
+
# See {Query}.
|
1438
|
+
class Queries
|
1439
|
+
extend Gem::Deprecate
|
1440
|
+
|
1441
|
+
def initialize(channel, parent)
|
1442
|
+
begin
|
1443
|
+
@stub = V1::Queries::Stub.new(nil, nil, channel_override: channel)
|
1444
|
+
rescue => exception
|
1445
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1446
|
+
end
|
1447
|
+
@parent = parent
|
1448
|
+
end
|
1449
|
+
|
1450
|
+
# List gets a list of Queries matching a given set of criteria.
|
1451
|
+
def list(
|
1452
|
+
filter,
|
1453
|
+
*args,
|
1454
|
+
deadline: nil
|
1455
|
+
)
|
1456
|
+
req = V1::QueryListRequest.new()
|
1457
|
+
req.meta = V1::ListRequestMetadata.new()
|
1458
|
+
page_size_option = @parent._test_options["PageSize"]
|
1459
|
+
if page_size_option.is_a? Integer
|
1460
|
+
req.meta.limit = page_size_option
|
1461
|
+
end
|
1462
|
+
if not @parent.snapshot_time.nil?
|
1463
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1467
|
+
resp = Enumerator::Generator.new { |g|
|
1468
|
+
tries = 0
|
1469
|
+
loop do
|
1470
|
+
begin
|
1471
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Queries.List", req), deadline: deadline)
|
1472
|
+
rescue => exception
|
1473
|
+
if (@parent.shouldRetry(tries, exception))
|
1474
|
+
tries + +@parent.jitterSleep(tries)
|
1475
|
+
next
|
1476
|
+
end
|
1477
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1478
|
+
end
|
1479
|
+
tries = 0
|
1480
|
+
plumbing_response.queries.each do |plumbing_item|
|
1481
|
+
g.yield Plumbing::convert_query_to_porcelain(plumbing_item)
|
1482
|
+
end
|
1483
|
+
break if plumbing_response.meta.next_cursor == ""
|
1484
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1485
|
+
end
|
1486
|
+
}
|
1487
|
+
resp
|
1488
|
+
end
|
1489
|
+
end
|
1490
|
+
|
1491
|
+
# RemoteIdentities assign a resource directly to an account, giving the account the permission to connect to that resource.
|
1492
|
+
#
|
1493
|
+
# See {RemoteIdentity}.
|
1494
|
+
class RemoteIdentities
|
1495
|
+
extend Gem::Deprecate
|
1496
|
+
|
1497
|
+
def initialize(channel, parent)
|
1498
|
+
begin
|
1499
|
+
@stub = V1::RemoteIdentities::Stub.new(nil, nil, channel_override: channel)
|
1500
|
+
rescue => exception
|
1501
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1502
|
+
end
|
1503
|
+
@parent = parent
|
1504
|
+
end
|
1505
|
+
|
1506
|
+
# Create registers a new RemoteIdentity.
|
1507
|
+
def create(
|
1508
|
+
remote_identity,
|
1509
|
+
deadline: nil
|
1510
|
+
)
|
1511
|
+
req = V1::RemoteIdentityCreateRequest.new()
|
1512
|
+
|
1513
|
+
req.remote_identity = Plumbing::convert_remote_identity_to_plumbing(remote_identity)
|
1514
|
+
tries = 0
|
1515
|
+
plumbing_response = nil
|
1516
|
+
loop do
|
1517
|
+
begin
|
1518
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("RemoteIdentities.Create", req), deadline: deadline)
|
1519
|
+
rescue => exception
|
1520
|
+
if (@parent.shouldRetry(tries, exception))
|
1521
|
+
tries + +@parent.jitterSleep(tries)
|
1522
|
+
next
|
1523
|
+
end
|
1524
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1525
|
+
end
|
1526
|
+
break
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
resp = RemoteIdentityCreateResponse.new()
|
1530
|
+
resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
|
1531
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1532
|
+
resp.remote_identity = Plumbing::convert_remote_identity_to_porcelain(plumbing_response.remote_identity)
|
1533
|
+
resp
|
1534
|
+
end
|
1535
|
+
|
1536
|
+
# Get reads one RemoteIdentity by ID.
|
1537
|
+
def get(
|
1538
|
+
id,
|
1539
|
+
deadline: nil
|
1540
|
+
)
|
1541
|
+
req = V1::RemoteIdentityGetRequest.new()
|
1542
|
+
if not @parent.snapshot_time.nil?
|
1543
|
+
req.meta = V1::GetRequestMetadata.new()
|
1544
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
req.id = (id)
|
1548
|
+
tries = 0
|
1549
|
+
plumbing_response = nil
|
1550
|
+
loop do
|
1551
|
+
begin
|
1552
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("RemoteIdentities.Get", req), deadline: deadline)
|
1553
|
+
rescue => exception
|
1554
|
+
if (@parent.shouldRetry(tries, exception))
|
1555
|
+
tries + +@parent.jitterSleep(tries)
|
1556
|
+
next
|
1557
|
+
end
|
1558
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1559
|
+
end
|
1560
|
+
break
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
resp = RemoteIdentityGetResponse.new()
|
1564
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
1565
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1566
|
+
resp.remote_identity = Plumbing::convert_remote_identity_to_porcelain(plumbing_response.remote_identity)
|
1567
|
+
resp
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
# Update replaces all the fields of a RemoteIdentity by ID.
|
1571
|
+
def update(
|
1572
|
+
remote_identity,
|
1573
|
+
deadline: nil
|
1574
|
+
)
|
1575
|
+
req = V1::RemoteIdentityUpdateRequest.new()
|
818
1576
|
|
819
1577
|
req.remote_identity = Plumbing::convert_remote_identity_to_plumbing(remote_identity)
|
820
1578
|
tries = 0
|
@@ -880,6 +1638,9 @@ module SDM #:nodoc:
|
|
880
1638
|
if page_size_option.is_a? Integer
|
881
1639
|
req.meta.limit = page_size_option
|
882
1640
|
end
|
1641
|
+
if not @parent.snapshot_time.nil?
|
1642
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1643
|
+
end
|
883
1644
|
|
884
1645
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
885
1646
|
resp = Enumerator::Generator.new { |g|
|
@@ -906,6 +1667,96 @@ module SDM #:nodoc:
|
|
906
1667
|
end
|
907
1668
|
end
|
908
1669
|
|
1670
|
+
# SnapshotRemoteIdentities exposes the read only methods of the RemoteIdentities
|
1671
|
+
# service for historical queries.
|
1672
|
+
class SnapshotRemoteIdentities
|
1673
|
+
extend Gem::Deprecate
|
1674
|
+
|
1675
|
+
def initialize(remote_identities)
|
1676
|
+
@remote_identities = remote_identities
|
1677
|
+
end
|
1678
|
+
|
1679
|
+
# Get reads one RemoteIdentity by ID.
|
1680
|
+
def get(
|
1681
|
+
id,
|
1682
|
+
deadline: nil
|
1683
|
+
)
|
1684
|
+
return @remote_identities.get(
|
1685
|
+
id,
|
1686
|
+
deadline: deadline,
|
1687
|
+
)
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
# List gets a list of RemoteIdentities matching a given set of criteria.
|
1691
|
+
def list(
|
1692
|
+
filter,
|
1693
|
+
*args,
|
1694
|
+
deadline: nil
|
1695
|
+
)
|
1696
|
+
return @remote_identities.list(
|
1697
|
+
filter,
|
1698
|
+
*args,
|
1699
|
+
deadline: deadline,
|
1700
|
+
)
|
1701
|
+
end
|
1702
|
+
end
|
1703
|
+
|
1704
|
+
# RemoteIdentitiesHistory records all changes to the state of a RemoteIdentity.
|
1705
|
+
#
|
1706
|
+
# See {RemoteIdentityHistory}.
|
1707
|
+
class RemoteIdentitiesHistory
|
1708
|
+
extend Gem::Deprecate
|
1709
|
+
|
1710
|
+
def initialize(channel, parent)
|
1711
|
+
begin
|
1712
|
+
@stub = V1::RemoteIdentitiesHistory::Stub.new(nil, nil, channel_override: channel)
|
1713
|
+
rescue => exception
|
1714
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1715
|
+
end
|
1716
|
+
@parent = parent
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
# List gets a list of RemoteIdentityHistory records matching a given set of criteria.
|
1720
|
+
def list(
|
1721
|
+
filter,
|
1722
|
+
*args,
|
1723
|
+
deadline: nil
|
1724
|
+
)
|
1725
|
+
req = V1::RemoteIdentityHistoryListRequest.new()
|
1726
|
+
req.meta = V1::ListRequestMetadata.new()
|
1727
|
+
page_size_option = @parent._test_options["PageSize"]
|
1728
|
+
if page_size_option.is_a? Integer
|
1729
|
+
req.meta.limit = page_size_option
|
1730
|
+
end
|
1731
|
+
if not @parent.snapshot_time.nil?
|
1732
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1733
|
+
end
|
1734
|
+
|
1735
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1736
|
+
resp = Enumerator::Generator.new { |g|
|
1737
|
+
tries = 0
|
1738
|
+
loop do
|
1739
|
+
begin
|
1740
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("RemoteIdentitiesHistory.List", req), deadline: deadline)
|
1741
|
+
rescue => exception
|
1742
|
+
if (@parent.shouldRetry(tries, exception))
|
1743
|
+
tries + +@parent.jitterSleep(tries)
|
1744
|
+
next
|
1745
|
+
end
|
1746
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1747
|
+
end
|
1748
|
+
tries = 0
|
1749
|
+
plumbing_response.history.each do |plumbing_item|
|
1750
|
+
g.yield Plumbing::convert_remote_identity_history_to_porcelain(plumbing_item)
|
1751
|
+
end
|
1752
|
+
break if plumbing_response.meta.next_cursor == ""
|
1753
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1754
|
+
end
|
1755
|
+
}
|
1756
|
+
resp
|
1757
|
+
end
|
1758
|
+
end
|
1759
|
+
|
909
1760
|
# A RemoteIdentityGroup is a named grouping of Remote Identities for Accounts.
|
910
1761
|
# An Account's relationship to a RemoteIdentityGroup is defined via RemoteIdentity objects.
|
911
1762
|
#
|
@@ -928,6 +1779,10 @@ module SDM #:nodoc:
|
|
928
1779
|
deadline: nil
|
929
1780
|
)
|
930
1781
|
req = V1::RemoteIdentityGroupGetRequest.new()
|
1782
|
+
if not @parent.snapshot_time.nil?
|
1783
|
+
req.meta = V1::GetRequestMetadata.new()
|
1784
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1785
|
+
end
|
931
1786
|
|
932
1787
|
req.id = (id)
|
933
1788
|
tries = 0
|
@@ -964,6 +1819,9 @@ module SDM #:nodoc:
|
|
964
1819
|
if page_size_option.is_a? Integer
|
965
1820
|
req.meta.limit = page_size_option
|
966
1821
|
end
|
1822
|
+
if not @parent.snapshot_time.nil?
|
1823
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1824
|
+
end
|
967
1825
|
|
968
1826
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
969
1827
|
resp = Enumerator::Generator.new { |g|
|
@@ -990,6 +1848,153 @@ module SDM #:nodoc:
|
|
990
1848
|
end
|
991
1849
|
end
|
992
1850
|
|
1851
|
+
# SnapshotRemoteIdentityGroups exposes the read only methods of the RemoteIdentityGroups
|
1852
|
+
# service for historical queries.
|
1853
|
+
class SnapshotRemoteIdentityGroups
|
1854
|
+
extend Gem::Deprecate
|
1855
|
+
|
1856
|
+
def initialize(remote_identity_groups)
|
1857
|
+
@remote_identity_groups = remote_identity_groups
|
1858
|
+
end
|
1859
|
+
|
1860
|
+
# Get reads one RemoteIdentityGroup by ID.
|
1861
|
+
def get(
|
1862
|
+
id,
|
1863
|
+
deadline: nil
|
1864
|
+
)
|
1865
|
+
return @remote_identity_groups.get(
|
1866
|
+
id,
|
1867
|
+
deadline: deadline,
|
1868
|
+
)
|
1869
|
+
end
|
1870
|
+
|
1871
|
+
# List gets a list of RemoteIdentityGroups matching a given set of criteria.
|
1872
|
+
def list(
|
1873
|
+
filter,
|
1874
|
+
*args,
|
1875
|
+
deadline: nil
|
1876
|
+
)
|
1877
|
+
return @remote_identity_groups.list(
|
1878
|
+
filter,
|
1879
|
+
*args,
|
1880
|
+
deadline: deadline,
|
1881
|
+
)
|
1882
|
+
end
|
1883
|
+
end
|
1884
|
+
|
1885
|
+
# RemoteIdentityGroupsHistory records all changes to the state of a RemoteIdentityGroup.
|
1886
|
+
#
|
1887
|
+
# See {RemoteIdentityGroupHistory}.
|
1888
|
+
class RemoteIdentityGroupsHistory
|
1889
|
+
extend Gem::Deprecate
|
1890
|
+
|
1891
|
+
def initialize(channel, parent)
|
1892
|
+
begin
|
1893
|
+
@stub = V1::RemoteIdentityGroupsHistory::Stub.new(nil, nil, channel_override: channel)
|
1894
|
+
rescue => exception
|
1895
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1896
|
+
end
|
1897
|
+
@parent = parent
|
1898
|
+
end
|
1899
|
+
|
1900
|
+
# List gets a list of RemoteIdentityGroupHistory records matching a given set of criteria.
|
1901
|
+
def list(
|
1902
|
+
filter,
|
1903
|
+
*args,
|
1904
|
+
deadline: nil
|
1905
|
+
)
|
1906
|
+
req = V1::RemoteIdentityGroupHistoryListRequest.new()
|
1907
|
+
req.meta = V1::ListRequestMetadata.new()
|
1908
|
+
page_size_option = @parent._test_options["PageSize"]
|
1909
|
+
if page_size_option.is_a? Integer
|
1910
|
+
req.meta.limit = page_size_option
|
1911
|
+
end
|
1912
|
+
if not @parent.snapshot_time.nil?
|
1913
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1914
|
+
end
|
1915
|
+
|
1916
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1917
|
+
resp = Enumerator::Generator.new { |g|
|
1918
|
+
tries = 0
|
1919
|
+
loop do
|
1920
|
+
begin
|
1921
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("RemoteIdentityGroupsHistory.List", req), deadline: deadline)
|
1922
|
+
rescue => exception
|
1923
|
+
if (@parent.shouldRetry(tries, exception))
|
1924
|
+
tries + +@parent.jitterSleep(tries)
|
1925
|
+
next
|
1926
|
+
end
|
1927
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1928
|
+
end
|
1929
|
+
tries = 0
|
1930
|
+
plumbing_response.history.each do |plumbing_item|
|
1931
|
+
g.yield Plumbing::convert_remote_identity_group_history_to_porcelain(plumbing_item)
|
1932
|
+
end
|
1933
|
+
break if plumbing_response.meta.next_cursor == ""
|
1934
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1935
|
+
end
|
1936
|
+
}
|
1937
|
+
resp
|
1938
|
+
end
|
1939
|
+
end
|
1940
|
+
|
1941
|
+
# A Replay captures the data transferred over a long-running SSH, RDP, or Kubernetes interactive session
|
1942
|
+
# (otherwise referred to as a query). The Replays service is read-only.
|
1943
|
+
#
|
1944
|
+
# See {ReplayChunk}.
|
1945
|
+
class Replays
|
1946
|
+
extend Gem::Deprecate
|
1947
|
+
|
1948
|
+
def initialize(channel, parent)
|
1949
|
+
begin
|
1950
|
+
@stub = V1::Replays::Stub.new(nil, nil, channel_override: channel)
|
1951
|
+
rescue => exception
|
1952
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1953
|
+
end
|
1954
|
+
@parent = parent
|
1955
|
+
end
|
1956
|
+
|
1957
|
+
# List gets a list of ReplayChunks for the Query ID specified by the filter criteria.
|
1958
|
+
def list(
|
1959
|
+
filter,
|
1960
|
+
*args,
|
1961
|
+
deadline: nil
|
1962
|
+
)
|
1963
|
+
req = V1::ReplayListRequest.new()
|
1964
|
+
req.meta = V1::ListRequestMetadata.new()
|
1965
|
+
page_size_option = @parent._test_options["PageSize"]
|
1966
|
+
if page_size_option.is_a? Integer
|
1967
|
+
req.meta.limit = page_size_option
|
1968
|
+
end
|
1969
|
+
if not @parent.snapshot_time.nil?
|
1970
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1971
|
+
end
|
1972
|
+
|
1973
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1974
|
+
resp = Enumerator::Generator.new { |g|
|
1975
|
+
tries = 0
|
1976
|
+
loop do
|
1977
|
+
begin
|
1978
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Replays.List", req), deadline: deadline)
|
1979
|
+
rescue => exception
|
1980
|
+
if (@parent.shouldRetry(tries, exception))
|
1981
|
+
tries + +@parent.jitterSleep(tries)
|
1982
|
+
next
|
1983
|
+
end
|
1984
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1985
|
+
end
|
1986
|
+
tries = 0
|
1987
|
+
plumbing_response.chunks.each do |plumbing_item|
|
1988
|
+
g.yield Plumbing::convert_replay_chunk_to_porcelain(plumbing_item)
|
1989
|
+
end
|
1990
|
+
break if plumbing_response.meta.next_cursor == ""
|
1991
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1992
|
+
end
|
1993
|
+
}
|
1994
|
+
resp
|
1995
|
+
end
|
1996
|
+
end
|
1997
|
+
|
993
1998
|
# Resources are databases, servers, clusters, websites, or clouds that strongDM
|
994
1999
|
# delegates access to.
|
995
2000
|
#
|
@@ -1094,6 +2099,9 @@ module SDM #:nodoc:
|
|
1094
2099
|
if page_size_option.is_a? Integer
|
1095
2100
|
req.meta.limit = page_size_option
|
1096
2101
|
end
|
2102
|
+
if not @parent.snapshot_time.nil?
|
2103
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2104
|
+
end
|
1097
2105
|
|
1098
2106
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1099
2107
|
resp = Enumerator::Generator.new { |g|
|
@@ -1155,6 +2163,10 @@ module SDM #:nodoc:
|
|
1155
2163
|
deadline: nil
|
1156
2164
|
)
|
1157
2165
|
req = V1::ResourceGetRequest.new()
|
2166
|
+
if not @parent.snapshot_time.nil?
|
2167
|
+
req.meta = V1::GetRequestMetadata.new()
|
2168
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2169
|
+
end
|
1158
2170
|
|
1159
2171
|
req.id = (id)
|
1160
2172
|
tries = 0
|
@@ -1167,96 +2179,325 @@ module SDM #:nodoc:
|
|
1167
2179
|
tries + +@parent.jitterSleep(tries)
|
1168
2180
|
next
|
1169
2181
|
end
|
1170
|
-
raise Plumbing::convert_error_to_porcelain(exception)
|
2182
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2183
|
+
end
|
2184
|
+
break
|
2185
|
+
end
|
2186
|
+
|
2187
|
+
resp = ResourceGetResponse.new()
|
2188
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
2189
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2190
|
+
resp.resource = Plumbing::convert_resource_to_porcelain(plumbing_response.resource)
|
2191
|
+
resp
|
2192
|
+
end
|
2193
|
+
|
2194
|
+
# Update replaces all the fields of a Resource by ID.
|
2195
|
+
def update(
|
2196
|
+
resource,
|
2197
|
+
deadline: nil
|
2198
|
+
)
|
2199
|
+
req = V1::ResourceUpdateRequest.new()
|
2200
|
+
|
2201
|
+
req.resource = Plumbing::convert_resource_to_plumbing(resource)
|
2202
|
+
tries = 0
|
2203
|
+
plumbing_response = nil
|
2204
|
+
loop do
|
2205
|
+
begin
|
2206
|
+
plumbing_response = @stub.update(req, metadata: @parent.get_metadata("Resources.Update", req), deadline: deadline)
|
2207
|
+
rescue => exception
|
2208
|
+
if (@parent.shouldRetry(tries, exception))
|
2209
|
+
tries + +@parent.jitterSleep(tries)
|
2210
|
+
next
|
2211
|
+
end
|
2212
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2213
|
+
end
|
2214
|
+
break
|
2215
|
+
end
|
2216
|
+
|
2217
|
+
resp = ResourceUpdateResponse.new()
|
2218
|
+
resp.meta = Plumbing::convert_update_response_metadata_to_porcelain(plumbing_response.meta)
|
2219
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2220
|
+
resp.resource = Plumbing::convert_resource_to_porcelain(plumbing_response.resource)
|
2221
|
+
resp
|
2222
|
+
end
|
2223
|
+
|
2224
|
+
# Delete removes a Resource by ID.
|
2225
|
+
def delete(
|
2226
|
+
id,
|
2227
|
+
deadline: nil
|
2228
|
+
)
|
2229
|
+
req = V1::ResourceDeleteRequest.new()
|
2230
|
+
|
2231
|
+
req.id = (id)
|
2232
|
+
tries = 0
|
2233
|
+
plumbing_response = nil
|
2234
|
+
loop do
|
2235
|
+
begin
|
2236
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("Resources.Delete", req), deadline: deadline)
|
2237
|
+
rescue => exception
|
2238
|
+
if (@parent.shouldRetry(tries, exception))
|
2239
|
+
tries + +@parent.jitterSleep(tries)
|
2240
|
+
next
|
2241
|
+
end
|
2242
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2243
|
+
end
|
2244
|
+
break
|
2245
|
+
end
|
2246
|
+
|
2247
|
+
resp = ResourceDeleteResponse.new()
|
2248
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
2249
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2250
|
+
resp
|
2251
|
+
end
|
2252
|
+
|
2253
|
+
# List gets a list of Resources matching a given set of criteria.
|
2254
|
+
def list(
|
2255
|
+
filter,
|
2256
|
+
*args,
|
2257
|
+
deadline: nil
|
2258
|
+
)
|
2259
|
+
req = V1::ResourceListRequest.new()
|
2260
|
+
req.meta = V1::ListRequestMetadata.new()
|
2261
|
+
page_size_option = @parent._test_options["PageSize"]
|
2262
|
+
if page_size_option.is_a? Integer
|
2263
|
+
req.meta.limit = page_size_option
|
2264
|
+
end
|
2265
|
+
if not @parent.snapshot_time.nil?
|
2266
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2267
|
+
end
|
2268
|
+
|
2269
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2270
|
+
resp = Enumerator::Generator.new { |g|
|
2271
|
+
tries = 0
|
2272
|
+
loop do
|
2273
|
+
begin
|
2274
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Resources.List", req), deadline: deadline)
|
2275
|
+
rescue => exception
|
2276
|
+
if (@parent.shouldRetry(tries, exception))
|
2277
|
+
tries + +@parent.jitterSleep(tries)
|
2278
|
+
next
|
2279
|
+
end
|
2280
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2281
|
+
end
|
2282
|
+
tries = 0
|
2283
|
+
plumbing_response.resources.each do |plumbing_item|
|
2284
|
+
g.yield Plumbing::convert_resource_to_porcelain(plumbing_item)
|
2285
|
+
end
|
2286
|
+
break if plumbing_response.meta.next_cursor == ""
|
2287
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
2288
|
+
end
|
2289
|
+
}
|
2290
|
+
resp
|
2291
|
+
end
|
2292
|
+
end
|
2293
|
+
|
2294
|
+
# SnapshotResources exposes the read only methods of the Resources
|
2295
|
+
# service for historical queries.
|
2296
|
+
class SnapshotResources
|
2297
|
+
extend Gem::Deprecate
|
2298
|
+
|
2299
|
+
def initialize(resources)
|
2300
|
+
@resources = resources
|
2301
|
+
end
|
2302
|
+
|
2303
|
+
# Get reads one Resource by ID.
|
2304
|
+
def get(
|
2305
|
+
id,
|
2306
|
+
deadline: nil
|
2307
|
+
)
|
2308
|
+
return @resources.get(
|
2309
|
+
id,
|
2310
|
+
deadline: deadline,
|
2311
|
+
)
|
2312
|
+
end
|
2313
|
+
|
2314
|
+
# List gets a list of Resources matching a given set of criteria.
|
2315
|
+
def list(
|
2316
|
+
filter,
|
2317
|
+
*args,
|
2318
|
+
deadline: nil
|
2319
|
+
)
|
2320
|
+
return @resources.list(
|
2321
|
+
filter,
|
2322
|
+
*args,
|
2323
|
+
deadline: deadline,
|
2324
|
+
)
|
2325
|
+
end
|
2326
|
+
end
|
2327
|
+
|
2328
|
+
# ResourcesHistory records all changes to the state of a Resource.
|
2329
|
+
#
|
2330
|
+
# See {ResourceHistory}.
|
2331
|
+
class ResourcesHistory
|
2332
|
+
extend Gem::Deprecate
|
2333
|
+
|
2334
|
+
def initialize(channel, parent)
|
2335
|
+
begin
|
2336
|
+
@stub = V1::ResourcesHistory::Stub.new(nil, nil, channel_override: channel)
|
2337
|
+
rescue => exception
|
2338
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2339
|
+
end
|
2340
|
+
@parent = parent
|
2341
|
+
end
|
2342
|
+
|
2343
|
+
# List gets a list of ResourceHistory records matching a given set of criteria.
|
2344
|
+
def list(
|
2345
|
+
filter,
|
2346
|
+
*args,
|
2347
|
+
deadline: nil
|
2348
|
+
)
|
2349
|
+
req = V1::ResourceHistoryListRequest.new()
|
2350
|
+
req.meta = V1::ListRequestMetadata.new()
|
2351
|
+
page_size_option = @parent._test_options["PageSize"]
|
2352
|
+
if page_size_option.is_a? Integer
|
2353
|
+
req.meta.limit = page_size_option
|
2354
|
+
end
|
2355
|
+
if not @parent.snapshot_time.nil?
|
2356
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2357
|
+
end
|
2358
|
+
|
2359
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2360
|
+
resp = Enumerator::Generator.new { |g|
|
2361
|
+
tries = 0
|
2362
|
+
loop do
|
2363
|
+
begin
|
2364
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("ResourcesHistory.List", req), deadline: deadline)
|
2365
|
+
rescue => exception
|
2366
|
+
if (@parent.shouldRetry(tries, exception))
|
2367
|
+
tries + +@parent.jitterSleep(tries)
|
2368
|
+
next
|
2369
|
+
end
|
2370
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2371
|
+
end
|
2372
|
+
tries = 0
|
2373
|
+
plumbing_response.history.each do |plumbing_item|
|
2374
|
+
g.yield Plumbing::convert_resource_history_to_porcelain(plumbing_item)
|
2375
|
+
end
|
2376
|
+
break if plumbing_response.meta.next_cursor == ""
|
2377
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1171
2378
|
end
|
1172
|
-
|
1173
|
-
end
|
1174
|
-
|
1175
|
-
resp = ResourceGetResponse.new()
|
1176
|
-
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
1177
|
-
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1178
|
-
resp.resource = Plumbing::convert_resource_to_porcelain(plumbing_response.resource)
|
2379
|
+
}
|
1179
2380
|
resp
|
1180
2381
|
end
|
2382
|
+
end
|
1181
2383
|
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
2384
|
+
# RoleResources enumerates the resources to which roles have access.
|
2385
|
+
# The RoleResources service is read-only.
|
2386
|
+
#
|
2387
|
+
# See {RoleResource}.
|
2388
|
+
class RoleResources
|
2389
|
+
extend Gem::Deprecate
|
2390
|
+
|
2391
|
+
def initialize(channel, parent)
|
2392
|
+
begin
|
2393
|
+
@stub = V1::RoleResources::Stub.new(nil, nil, channel_override: channel)
|
2394
|
+
rescue => exception
|
2395
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2396
|
+
end
|
2397
|
+
@parent = parent
|
2398
|
+
end
|
2399
|
+
|
2400
|
+
# List gets a list of RoleResource records matching a given set of criteria.
|
2401
|
+
def list(
|
2402
|
+
filter,
|
2403
|
+
*args,
|
1185
2404
|
deadline: nil
|
1186
2405
|
)
|
1187
|
-
req = V1::
|
2406
|
+
req = V1::RoleResourceListRequest.new()
|
2407
|
+
req.meta = V1::ListRequestMetadata.new()
|
2408
|
+
page_size_option = @parent._test_options["PageSize"]
|
2409
|
+
if page_size_option.is_a? Integer
|
2410
|
+
req.meta.limit = page_size_option
|
2411
|
+
end
|
2412
|
+
if not @parent.snapshot_time.nil?
|
2413
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2414
|
+
end
|
1188
2415
|
|
1189
|
-
req.
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
2416
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2417
|
+
resp = Enumerator::Generator.new { |g|
|
2418
|
+
tries = 0
|
2419
|
+
loop do
|
2420
|
+
begin
|
2421
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("RoleResources.List", req), deadline: deadline)
|
2422
|
+
rescue => exception
|
2423
|
+
if (@parent.shouldRetry(tries, exception))
|
2424
|
+
tries + +@parent.jitterSleep(tries)
|
2425
|
+
next
|
2426
|
+
end
|
2427
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1199
2428
|
end
|
1200
|
-
|
2429
|
+
tries = 0
|
2430
|
+
plumbing_response.role_resources.each do |plumbing_item|
|
2431
|
+
g.yield Plumbing::convert_role_resource_to_porcelain(plumbing_item)
|
2432
|
+
end
|
2433
|
+
break if plumbing_response.meta.next_cursor == ""
|
2434
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1201
2435
|
end
|
1202
|
-
|
1203
|
-
end
|
1204
|
-
|
1205
|
-
resp = ResourceUpdateResponse.new()
|
1206
|
-
resp.meta = Plumbing::convert_update_response_metadata_to_porcelain(plumbing_response.meta)
|
1207
|
-
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1208
|
-
resp.resource = Plumbing::convert_resource_to_porcelain(plumbing_response.resource)
|
2436
|
+
}
|
1209
2437
|
resp
|
1210
2438
|
end
|
2439
|
+
end
|
1211
2440
|
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
2441
|
+
# SnapshotRoleResources exposes the read only methods of the RoleResources
|
2442
|
+
# service for historical queries.
|
2443
|
+
class SnapshotRoleResources
|
2444
|
+
extend Gem::Deprecate
|
2445
|
+
|
2446
|
+
def initialize(role_resources)
|
2447
|
+
@role_resources = role_resources
|
2448
|
+
end
|
2449
|
+
|
2450
|
+
# List gets a list of RoleResource records matching a given set of criteria.
|
2451
|
+
def list(
|
2452
|
+
filter,
|
2453
|
+
*args,
|
1215
2454
|
deadline: nil
|
1216
2455
|
)
|
1217
|
-
|
2456
|
+
return @role_resources.list(
|
2457
|
+
filter,
|
2458
|
+
*args,
|
2459
|
+
deadline: deadline,
|
2460
|
+
)
|
2461
|
+
end
|
2462
|
+
end
|
1218
2463
|
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("Resources.Delete", req), deadline: deadline)
|
1225
|
-
rescue => exception
|
1226
|
-
if (@parent.shouldRetry(tries, exception))
|
1227
|
-
tries + +@parent.jitterSleep(tries)
|
1228
|
-
next
|
1229
|
-
end
|
1230
|
-
raise Plumbing::convert_error_to_porcelain(exception)
|
1231
|
-
end
|
1232
|
-
break
|
1233
|
-
end
|
2464
|
+
# RoleResourcesHistory records all changes to the state of a RoleResource.
|
2465
|
+
#
|
2466
|
+
# See {RoleResourceHistory}.
|
2467
|
+
class RoleResourcesHistory
|
2468
|
+
extend Gem::Deprecate
|
1234
2469
|
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
2470
|
+
def initialize(channel, parent)
|
2471
|
+
begin
|
2472
|
+
@stub = V1::RoleResourcesHistory::Stub.new(nil, nil, channel_override: channel)
|
2473
|
+
rescue => exception
|
2474
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2475
|
+
end
|
2476
|
+
@parent = parent
|
1239
2477
|
end
|
1240
2478
|
|
1241
|
-
# List gets a list of
|
2479
|
+
# List gets a list of RoleResourceHistory records matching a given set of criteria.
|
1242
2480
|
def list(
|
1243
2481
|
filter,
|
1244
2482
|
*args,
|
1245
2483
|
deadline: nil
|
1246
2484
|
)
|
1247
|
-
req = V1::
|
2485
|
+
req = V1::RoleResourceHistoryListRequest.new()
|
1248
2486
|
req.meta = V1::ListRequestMetadata.new()
|
1249
2487
|
page_size_option = @parent._test_options["PageSize"]
|
1250
2488
|
if page_size_option.is_a? Integer
|
1251
2489
|
req.meta.limit = page_size_option
|
1252
2490
|
end
|
2491
|
+
if not @parent.snapshot_time.nil?
|
2492
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2493
|
+
end
|
1253
2494
|
|
1254
2495
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1255
2496
|
resp = Enumerator::Generator.new { |g|
|
1256
2497
|
tries = 0
|
1257
2498
|
loop do
|
1258
2499
|
begin
|
1259
|
-
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("
|
2500
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("RoleResourcesHistory.List", req), deadline: deadline)
|
1260
2501
|
rescue => exception
|
1261
2502
|
if (@parent.shouldRetry(tries, exception))
|
1262
2503
|
tries + +@parent.jitterSleep(tries)
|
@@ -1265,8 +2506,8 @@ module SDM #:nodoc:
|
|
1265
2506
|
raise Plumbing::convert_error_to_porcelain(exception)
|
1266
2507
|
end
|
1267
2508
|
tries = 0
|
1268
|
-
plumbing_response.
|
1269
|
-
g.yield Plumbing::
|
2509
|
+
plumbing_response.history.each do |plumbing_item|
|
2510
|
+
g.yield Plumbing::convert_role_resource_history_to_porcelain(plumbing_item)
|
1270
2511
|
end
|
1271
2512
|
break if plumbing_response.meta.next_cursor == ""
|
1272
2513
|
req.meta.cursor = plumbing_response.meta.next_cursor
|
@@ -1329,6 +2570,10 @@ module SDM #:nodoc:
|
|
1329
2570
|
deadline: nil
|
1330
2571
|
)
|
1331
2572
|
req = V1::RoleGetRequest.new()
|
2573
|
+
if not @parent.snapshot_time.nil?
|
2574
|
+
req.meta = V1::GetRequestMetadata.new()
|
2575
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2576
|
+
end
|
1332
2577
|
|
1333
2578
|
req.id = (id)
|
1334
2579
|
tries = 0
|
@@ -1424,6 +2669,9 @@ module SDM #:nodoc:
|
|
1424
2669
|
if page_size_option.is_a? Integer
|
1425
2670
|
req.meta.limit = page_size_option
|
1426
2671
|
end
|
2672
|
+
if not @parent.snapshot_time.nil?
|
2673
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2674
|
+
end
|
1427
2675
|
|
1428
2676
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1429
2677
|
resp = Enumerator::Generator.new { |g|
|
@@ -1450,6 +2698,96 @@ module SDM #:nodoc:
|
|
1450
2698
|
end
|
1451
2699
|
end
|
1452
2700
|
|
2701
|
+
# SnapshotRoles exposes the read only methods of the Roles
|
2702
|
+
# service for historical queries.
|
2703
|
+
class SnapshotRoles
|
2704
|
+
extend Gem::Deprecate
|
2705
|
+
|
2706
|
+
def initialize(roles)
|
2707
|
+
@roles = roles
|
2708
|
+
end
|
2709
|
+
|
2710
|
+
# Get reads one Role by ID.
|
2711
|
+
def get(
|
2712
|
+
id,
|
2713
|
+
deadline: nil
|
2714
|
+
)
|
2715
|
+
return @roles.get(
|
2716
|
+
id,
|
2717
|
+
deadline: deadline,
|
2718
|
+
)
|
2719
|
+
end
|
2720
|
+
|
2721
|
+
# List gets a list of Roles matching a given set of criteria.
|
2722
|
+
def list(
|
2723
|
+
filter,
|
2724
|
+
*args,
|
2725
|
+
deadline: nil
|
2726
|
+
)
|
2727
|
+
return @roles.list(
|
2728
|
+
filter,
|
2729
|
+
*args,
|
2730
|
+
deadline: deadline,
|
2731
|
+
)
|
2732
|
+
end
|
2733
|
+
end
|
2734
|
+
|
2735
|
+
# RolesHistory records all changes to the state of a Role.
|
2736
|
+
#
|
2737
|
+
# See {RoleHistory}.
|
2738
|
+
class RolesHistory
|
2739
|
+
extend Gem::Deprecate
|
2740
|
+
|
2741
|
+
def initialize(channel, parent)
|
2742
|
+
begin
|
2743
|
+
@stub = V1::RolesHistory::Stub.new(nil, nil, channel_override: channel)
|
2744
|
+
rescue => exception
|
2745
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2746
|
+
end
|
2747
|
+
@parent = parent
|
2748
|
+
end
|
2749
|
+
|
2750
|
+
# List gets a list of RoleHistory records matching a given set of criteria.
|
2751
|
+
def list(
|
2752
|
+
filter,
|
2753
|
+
*args,
|
2754
|
+
deadline: nil
|
2755
|
+
)
|
2756
|
+
req = V1::RoleHistoryListRequest.new()
|
2757
|
+
req.meta = V1::ListRequestMetadata.new()
|
2758
|
+
page_size_option = @parent._test_options["PageSize"]
|
2759
|
+
if page_size_option.is_a? Integer
|
2760
|
+
req.meta.limit = page_size_option
|
2761
|
+
end
|
2762
|
+
if not @parent.snapshot_time.nil?
|
2763
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2764
|
+
end
|
2765
|
+
|
2766
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2767
|
+
resp = Enumerator::Generator.new { |g|
|
2768
|
+
tries = 0
|
2769
|
+
loop do
|
2770
|
+
begin
|
2771
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("RolesHistory.List", req), deadline: deadline)
|
2772
|
+
rescue => exception
|
2773
|
+
if (@parent.shouldRetry(tries, exception))
|
2774
|
+
tries + +@parent.jitterSleep(tries)
|
2775
|
+
next
|
2776
|
+
end
|
2777
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2778
|
+
end
|
2779
|
+
tries = 0
|
2780
|
+
plumbing_response.history.each do |plumbing_item|
|
2781
|
+
g.yield Plumbing::convert_role_history_to_porcelain(plumbing_item)
|
2782
|
+
end
|
2783
|
+
break if plumbing_response.meta.next_cursor == ""
|
2784
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
2785
|
+
end
|
2786
|
+
}
|
2787
|
+
resp
|
2788
|
+
end
|
2789
|
+
end
|
2790
|
+
|
1453
2791
|
# SecretStores are servers where resource secrets (passwords, keys) are stored.
|
1454
2792
|
#
|
1455
2793
|
# See:
|
@@ -1510,6 +2848,10 @@ module SDM #:nodoc:
|
|
1510
2848
|
deadline: nil
|
1511
2849
|
)
|
1512
2850
|
req = V1::SecretStoreGetRequest.new()
|
2851
|
+
if not @parent.snapshot_time.nil?
|
2852
|
+
req.meta = V1::GetRequestMetadata.new()
|
2853
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2854
|
+
end
|
1513
2855
|
|
1514
2856
|
req.id = (id)
|
1515
2857
|
tries = 0
|
@@ -1605,6 +2947,9 @@ module SDM #:nodoc:
|
|
1605
2947
|
if page_size_option.is_a? Integer
|
1606
2948
|
req.meta.limit = page_size_option
|
1607
2949
|
end
|
2950
|
+
if not @parent.snapshot_time.nil?
|
2951
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2952
|
+
end
|
1608
2953
|
|
1609
2954
|
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1610
2955
|
resp = Enumerator::Generator.new { |g|
|
@@ -1630,4 +2975,94 @@ module SDM #:nodoc:
|
|
1630
2975
|
resp
|
1631
2976
|
end
|
1632
2977
|
end
|
2978
|
+
|
2979
|
+
# SnapshotSecretStores exposes the read only methods of the SecretStores
|
2980
|
+
# service for historical queries.
|
2981
|
+
class SnapshotSecretStores
|
2982
|
+
extend Gem::Deprecate
|
2983
|
+
|
2984
|
+
def initialize(secret_stores)
|
2985
|
+
@secret_stores = secret_stores
|
2986
|
+
end
|
2987
|
+
|
2988
|
+
# Get reads one SecretStore by ID.
|
2989
|
+
def get(
|
2990
|
+
id,
|
2991
|
+
deadline: nil
|
2992
|
+
)
|
2993
|
+
return @secret_stores.get(
|
2994
|
+
id,
|
2995
|
+
deadline: deadline,
|
2996
|
+
)
|
2997
|
+
end
|
2998
|
+
|
2999
|
+
# List gets a list of SecretStores matching a given set of criteria.
|
3000
|
+
def list(
|
3001
|
+
filter,
|
3002
|
+
*args,
|
3003
|
+
deadline: nil
|
3004
|
+
)
|
3005
|
+
return @secret_stores.list(
|
3006
|
+
filter,
|
3007
|
+
*args,
|
3008
|
+
deadline: deadline,
|
3009
|
+
)
|
3010
|
+
end
|
3011
|
+
end
|
3012
|
+
|
3013
|
+
# SecretStoresHistory records all changes to the state of a SecretStore.
|
3014
|
+
#
|
3015
|
+
# See {SecretStoreHistory}.
|
3016
|
+
class SecretStoresHistory
|
3017
|
+
extend Gem::Deprecate
|
3018
|
+
|
3019
|
+
def initialize(channel, parent)
|
3020
|
+
begin
|
3021
|
+
@stub = V1::SecretStoresHistory::Stub.new(nil, nil, channel_override: channel)
|
3022
|
+
rescue => exception
|
3023
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3024
|
+
end
|
3025
|
+
@parent = parent
|
3026
|
+
end
|
3027
|
+
|
3028
|
+
# List gets a list of SecretStoreHistory records matching a given set of criteria.
|
3029
|
+
def list(
|
3030
|
+
filter,
|
3031
|
+
*args,
|
3032
|
+
deadline: nil
|
3033
|
+
)
|
3034
|
+
req = V1::SecretStoreHistoryListRequest.new()
|
3035
|
+
req.meta = V1::ListRequestMetadata.new()
|
3036
|
+
page_size_option = @parent._test_options["PageSize"]
|
3037
|
+
if page_size_option.is_a? Integer
|
3038
|
+
req.meta.limit = page_size_option
|
3039
|
+
end
|
3040
|
+
if not @parent.snapshot_time.nil?
|
3041
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
3042
|
+
end
|
3043
|
+
|
3044
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
3045
|
+
resp = Enumerator::Generator.new { |g|
|
3046
|
+
tries = 0
|
3047
|
+
loop do
|
3048
|
+
begin
|
3049
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("SecretStoresHistory.List", req), deadline: deadline)
|
3050
|
+
rescue => exception
|
3051
|
+
if (@parent.shouldRetry(tries, exception))
|
3052
|
+
tries + +@parent.jitterSleep(tries)
|
3053
|
+
next
|
3054
|
+
end
|
3055
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3056
|
+
end
|
3057
|
+
tries = 0
|
3058
|
+
plumbing_response.history.each do |plumbing_item|
|
3059
|
+
g.yield Plumbing::convert_secret_store_history_to_porcelain(plumbing_item)
|
3060
|
+
end
|
3061
|
+
break if plumbing_response.meta.next_cursor == ""
|
3062
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
3063
|
+
end
|
3064
|
+
}
|
3065
|
+
resp
|
3066
|
+
end
|
3067
|
+
end
|
1633
3068
|
end
|