strongdm 15.14.0 → 15.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.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-c39a8f7546865b040c99432a08429c454ebf5eaf.idx → pack-22b85a8bfbae54b5ff56d876ba546055c5068835.idx} +0 -0
- data/.git/objects/pack/{pack-c39a8f7546865b040c99432a08429c454ebf5eaf.pack → pack-22b85a8bfbae54b5ff56d876ba546055c5068835.pack} +0 -0
- data/.git/packed-refs +3 -2
- data/.git/refs/heads/master +1 -1
- data/lib/grpc/accounts_groups_history_pb.rb +49 -0
- data/lib/grpc/accounts_groups_history_services_pb.rb +37 -0
- data/lib/grpc/accounts_groups_pb.rb +78 -0
- data/lib/grpc/accounts_groups_services_pb.rb +43 -0
- data/lib/grpc/drivers_pb.rb +18 -0
- data/lib/grpc/groups_history_pb.rb +49 -0
- data/lib/grpc/groups_history_services_pb.rb +37 -0
- data/lib/grpc/groups_pb.rb +116 -0
- data/lib/grpc/groups_roles_history_pb.rb +49 -0
- data/lib/grpc/groups_roles_history_services_pb.rb +37 -0
- data/lib/grpc/groups_roles_pb.rb +81 -0
- data/lib/grpc/groups_roles_services_pb.rb +43 -0
- data/lib/grpc/groups_services_pb.rb +46 -0
- data/lib/grpc/plumbing.rb +3476 -2138
- data/lib/models/porcelain.rb +990 -56
- data/lib/strongdm.rb +52 -1
- data/lib/svc.rb +769 -0
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +16 -4
data/lib/svc.rb
CHANGED
@@ -1121,6 +1121,242 @@ module SDM #:nodoc:
|
|
1121
1121
|
end
|
1122
1122
|
end
|
1123
1123
|
|
1124
|
+
# An AccountGroup links an account and a group.
|
1125
|
+
#
|
1126
|
+
# See {AccountGroup}.
|
1127
|
+
class AccountsGroups
|
1128
|
+
extend Gem::Deprecate
|
1129
|
+
|
1130
|
+
def initialize(channel, parent)
|
1131
|
+
begin
|
1132
|
+
@stub = V1::AccountsGroups::Stub.new(nil, nil, channel_override: channel)
|
1133
|
+
rescue => exception
|
1134
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1135
|
+
end
|
1136
|
+
@parent = parent
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
# Create create a new AccountGroup.
|
1140
|
+
def create(
|
1141
|
+
account_group,
|
1142
|
+
deadline: nil
|
1143
|
+
)
|
1144
|
+
req = V1::AccountGroupCreateRequest.new()
|
1145
|
+
|
1146
|
+
req.account_group = Plumbing::convert_account_group_to_plumbing(account_group)
|
1147
|
+
tries = 0
|
1148
|
+
plumbing_response = nil
|
1149
|
+
loop do
|
1150
|
+
begin
|
1151
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("AccountsGroups.Create", req), deadline: deadline)
|
1152
|
+
rescue => exception
|
1153
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
1154
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
1155
|
+
next
|
1156
|
+
end
|
1157
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1158
|
+
end
|
1159
|
+
break
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
resp = AccountGroupCreateResponse.new()
|
1163
|
+
resp.account_group = Plumbing::convert_account_group_to_porcelain(plumbing_response.account_group)
|
1164
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1165
|
+
resp
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
# Get reads one AccountGroup by ID.
|
1169
|
+
def get(
|
1170
|
+
id,
|
1171
|
+
deadline: nil
|
1172
|
+
)
|
1173
|
+
req = V1::AccountGroupGetRequest.new()
|
1174
|
+
if not @parent.snapshot_time.nil?
|
1175
|
+
req.meta = V1::GetRequestMetadata.new()
|
1176
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
req.id = (id)
|
1180
|
+
tries = 0
|
1181
|
+
plumbing_response = nil
|
1182
|
+
loop do
|
1183
|
+
begin
|
1184
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("AccountsGroups.Get", req), deadline: deadline)
|
1185
|
+
rescue => exception
|
1186
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
1187
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
1188
|
+
next
|
1189
|
+
end
|
1190
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1191
|
+
end
|
1192
|
+
break
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
resp = AccountGroupGetResponse.new()
|
1196
|
+
resp.account_group = Plumbing::convert_account_group_to_porcelain(plumbing_response.account_group)
|
1197
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
1198
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1199
|
+
resp
|
1200
|
+
end
|
1201
|
+
|
1202
|
+
# Delete removes an AccountGroup by ID.
|
1203
|
+
def delete(
|
1204
|
+
id,
|
1205
|
+
deadline: nil
|
1206
|
+
)
|
1207
|
+
req = V1::AccountGroupDeleteRequest.new()
|
1208
|
+
|
1209
|
+
req.id = (id)
|
1210
|
+
tries = 0
|
1211
|
+
plumbing_response = nil
|
1212
|
+
loop do
|
1213
|
+
begin
|
1214
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("AccountsGroups.Delete", req), deadline: deadline)
|
1215
|
+
rescue => exception
|
1216
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
1217
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
1218
|
+
next
|
1219
|
+
end
|
1220
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1221
|
+
end
|
1222
|
+
break
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
resp = AccountGroupDeleteResponse.new()
|
1226
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
1227
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1228
|
+
resp
|
1229
|
+
end
|
1230
|
+
|
1231
|
+
# List gets a list of AccountGroups matching a given set of criteria.
|
1232
|
+
def list(
|
1233
|
+
filter,
|
1234
|
+
*args,
|
1235
|
+
deadline: nil
|
1236
|
+
)
|
1237
|
+
req = V1::AccountGroupListRequest.new()
|
1238
|
+
req.meta = V1::ListRequestMetadata.new()
|
1239
|
+
if not @parent.page_limit.nil?
|
1240
|
+
req.meta.limit = @parent.page_limit
|
1241
|
+
end
|
1242
|
+
if not @parent.snapshot_time.nil?
|
1243
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1247
|
+
resp = Enumerator::Generator.new { |g|
|
1248
|
+
tries = 0
|
1249
|
+
loop do
|
1250
|
+
begin
|
1251
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountsGroups.List", req), deadline: deadline)
|
1252
|
+
rescue => exception
|
1253
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
1254
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
1255
|
+
next
|
1256
|
+
end
|
1257
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1258
|
+
end
|
1259
|
+
tries = 0
|
1260
|
+
plumbing_response.account_groups.each do |plumbing_item|
|
1261
|
+
g.yield Plumbing::convert_account_group_to_porcelain(plumbing_item)
|
1262
|
+
end
|
1263
|
+
break if plumbing_response.meta.next_cursor == ""
|
1264
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1265
|
+
end
|
1266
|
+
}
|
1267
|
+
resp
|
1268
|
+
end
|
1269
|
+
end
|
1270
|
+
|
1271
|
+
# SnapshotAccountsGroups exposes the read only methods of the AccountsGroups
|
1272
|
+
# service for historical queries.
|
1273
|
+
class SnapshotAccountsGroups
|
1274
|
+
extend Gem::Deprecate
|
1275
|
+
|
1276
|
+
def initialize(accounts_groups)
|
1277
|
+
@accounts_groups = accounts_groups
|
1278
|
+
end
|
1279
|
+
|
1280
|
+
# Get reads one AccountGroup by ID.
|
1281
|
+
def get(
|
1282
|
+
id,
|
1283
|
+
deadline: nil
|
1284
|
+
)
|
1285
|
+
return @accounts_groups.get(
|
1286
|
+
id,
|
1287
|
+
deadline: deadline,
|
1288
|
+
)
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# List gets a list of AccountGroups matching a given set of criteria.
|
1292
|
+
def list(
|
1293
|
+
filter,
|
1294
|
+
*args,
|
1295
|
+
deadline: nil
|
1296
|
+
)
|
1297
|
+
return @accounts_groups.list(
|
1298
|
+
filter,
|
1299
|
+
*args,
|
1300
|
+
deadline: deadline,
|
1301
|
+
)
|
1302
|
+
end
|
1303
|
+
end
|
1304
|
+
|
1305
|
+
# AccountsGroupsHistory records all changes to the state of an AccountGroup.
|
1306
|
+
#
|
1307
|
+
# See {AccountGroupHistory}.
|
1308
|
+
class AccountsGroupsHistory
|
1309
|
+
extend Gem::Deprecate
|
1310
|
+
|
1311
|
+
def initialize(channel, parent)
|
1312
|
+
begin
|
1313
|
+
@stub = V1::AccountsGroupsHistory::Stub.new(nil, nil, channel_override: channel)
|
1314
|
+
rescue => exception
|
1315
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1316
|
+
end
|
1317
|
+
@parent = parent
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
# List gets a list of AccountGroupHistory records matching a given set of criteria.
|
1321
|
+
def list(
|
1322
|
+
filter,
|
1323
|
+
*args,
|
1324
|
+
deadline: nil
|
1325
|
+
)
|
1326
|
+
req = V1::AccountGroupHistoryListRequest.new()
|
1327
|
+
req.meta = V1::ListRequestMetadata.new()
|
1328
|
+
if not @parent.page_limit.nil?
|
1329
|
+
req.meta.limit = @parent.page_limit
|
1330
|
+
end
|
1331
|
+
if not @parent.snapshot_time.nil?
|
1332
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1333
|
+
end
|
1334
|
+
|
1335
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1336
|
+
resp = Enumerator::Generator.new { |g|
|
1337
|
+
tries = 0
|
1338
|
+
loop do
|
1339
|
+
begin
|
1340
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("AccountsGroupsHistory.List", req), deadline: deadline)
|
1341
|
+
rescue => exception
|
1342
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
1343
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
1344
|
+
next
|
1345
|
+
end
|
1346
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1347
|
+
end
|
1348
|
+
tries = 0
|
1349
|
+
plumbing_response.history.each do |plumbing_item|
|
1350
|
+
g.yield Plumbing::convert_account_group_history_to_porcelain(plumbing_item)
|
1351
|
+
end
|
1352
|
+
break if plumbing_response.meta.next_cursor == ""
|
1353
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1354
|
+
end
|
1355
|
+
}
|
1356
|
+
resp
|
1357
|
+
end
|
1358
|
+
end
|
1359
|
+
|
1124
1360
|
# AccountsHistory records all changes to the state of an Account.
|
1125
1361
|
#
|
1126
1362
|
# See {AccountHistory}.
|
@@ -2322,6 +2558,538 @@ module SDM #:nodoc:
|
|
2322
2558
|
end
|
2323
2559
|
end
|
2324
2560
|
|
2561
|
+
# A Group is a set of principals.
|
2562
|
+
#
|
2563
|
+
# See {Group}.
|
2564
|
+
class Groups
|
2565
|
+
extend Gem::Deprecate
|
2566
|
+
|
2567
|
+
def initialize(channel, parent)
|
2568
|
+
begin
|
2569
|
+
@stub = V1::Groups::Stub.new(nil, nil, channel_override: channel)
|
2570
|
+
rescue => exception
|
2571
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2572
|
+
end
|
2573
|
+
@parent = parent
|
2574
|
+
end
|
2575
|
+
|
2576
|
+
# Create registers a new Group.
|
2577
|
+
def create(
|
2578
|
+
group,
|
2579
|
+
deadline: nil
|
2580
|
+
)
|
2581
|
+
req = V1::GroupCreateRequest.new()
|
2582
|
+
|
2583
|
+
req.group = Plumbing::convert_group_to_plumbing(group)
|
2584
|
+
tries = 0
|
2585
|
+
plumbing_response = nil
|
2586
|
+
loop do
|
2587
|
+
begin
|
2588
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("Groups.Create", req), deadline: deadline)
|
2589
|
+
rescue => exception
|
2590
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2591
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2592
|
+
next
|
2593
|
+
end
|
2594
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2595
|
+
end
|
2596
|
+
break
|
2597
|
+
end
|
2598
|
+
|
2599
|
+
resp = GroupCreateResponse.new()
|
2600
|
+
resp.group = Plumbing::convert_group_to_porcelain(plumbing_response.group)
|
2601
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2602
|
+
resp
|
2603
|
+
end
|
2604
|
+
|
2605
|
+
def create_from_roles(
|
2606
|
+
role_ids,
|
2607
|
+
commit,
|
2608
|
+
deadline: nil
|
2609
|
+
)
|
2610
|
+
req = V1::GroupCreateFromRolesRequest.new()
|
2611
|
+
|
2612
|
+
req.role_ids += (role_ids)
|
2613
|
+
req.commit = (commit)
|
2614
|
+
tries = 0
|
2615
|
+
plumbing_response = nil
|
2616
|
+
loop do
|
2617
|
+
begin
|
2618
|
+
plumbing_response = @stub.create_from_roles(req, metadata: @parent.get_metadata("Groups.CreateFromRoles", req), deadline: deadline)
|
2619
|
+
rescue => exception
|
2620
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2621
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2622
|
+
next
|
2623
|
+
end
|
2624
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2625
|
+
end
|
2626
|
+
break
|
2627
|
+
end
|
2628
|
+
|
2629
|
+
resp = GroupCreateFromRolesResponse.new()
|
2630
|
+
resp.group_from_role = Plumbing::convert_repeated_group_from_role_to_porcelain(plumbing_response.group_from_role)
|
2631
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2632
|
+
resp
|
2633
|
+
end
|
2634
|
+
|
2635
|
+
# Get reads one Group by ID.
|
2636
|
+
def get(
|
2637
|
+
id,
|
2638
|
+
deadline: nil
|
2639
|
+
)
|
2640
|
+
req = V1::GroupGetRequest.new()
|
2641
|
+
if not @parent.snapshot_time.nil?
|
2642
|
+
req.meta = V1::GetRequestMetadata.new()
|
2643
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2644
|
+
end
|
2645
|
+
|
2646
|
+
req.id = (id)
|
2647
|
+
tries = 0
|
2648
|
+
plumbing_response = nil
|
2649
|
+
loop do
|
2650
|
+
begin
|
2651
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("Groups.Get", req), deadline: deadline)
|
2652
|
+
rescue => exception
|
2653
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2654
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2655
|
+
next
|
2656
|
+
end
|
2657
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2658
|
+
end
|
2659
|
+
break
|
2660
|
+
end
|
2661
|
+
|
2662
|
+
resp = GroupGetResponse.new()
|
2663
|
+
resp.group = Plumbing::convert_group_to_porcelain(plumbing_response.group)
|
2664
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
2665
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2666
|
+
resp
|
2667
|
+
end
|
2668
|
+
|
2669
|
+
# Update replaces all the fields of a Group by ID.
|
2670
|
+
def update(
|
2671
|
+
group,
|
2672
|
+
deadline: nil
|
2673
|
+
)
|
2674
|
+
req = V1::GroupUpdateRequest.new()
|
2675
|
+
|
2676
|
+
req.group = Plumbing::convert_group_to_plumbing(group)
|
2677
|
+
tries = 0
|
2678
|
+
plumbing_response = nil
|
2679
|
+
loop do
|
2680
|
+
begin
|
2681
|
+
plumbing_response = @stub.update(req, metadata: @parent.get_metadata("Groups.Update", req), deadline: deadline)
|
2682
|
+
rescue => exception
|
2683
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2684
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2685
|
+
next
|
2686
|
+
end
|
2687
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2688
|
+
end
|
2689
|
+
break
|
2690
|
+
end
|
2691
|
+
|
2692
|
+
resp = GroupUpdateResponse.new()
|
2693
|
+
resp.group = Plumbing::convert_group_to_porcelain(plumbing_response.group)
|
2694
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2695
|
+
resp
|
2696
|
+
end
|
2697
|
+
|
2698
|
+
# Delete removes a Group by ID.
|
2699
|
+
def delete(
|
2700
|
+
id,
|
2701
|
+
deadline: nil
|
2702
|
+
)
|
2703
|
+
req = V1::GroupDeleteRequest.new()
|
2704
|
+
|
2705
|
+
req.id = (id)
|
2706
|
+
tries = 0
|
2707
|
+
plumbing_response = nil
|
2708
|
+
loop do
|
2709
|
+
begin
|
2710
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("Groups.Delete", req), deadline: deadline)
|
2711
|
+
rescue => exception
|
2712
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2713
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2714
|
+
next
|
2715
|
+
end
|
2716
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2717
|
+
end
|
2718
|
+
break
|
2719
|
+
end
|
2720
|
+
|
2721
|
+
resp = GroupDeleteResponse.new()
|
2722
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
2723
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2724
|
+
resp
|
2725
|
+
end
|
2726
|
+
|
2727
|
+
# List gets a list of Groups matching a given set of criteria.
|
2728
|
+
def list(
|
2729
|
+
filter,
|
2730
|
+
*args,
|
2731
|
+
deadline: nil
|
2732
|
+
)
|
2733
|
+
req = V1::GroupListRequest.new()
|
2734
|
+
req.meta = V1::ListRequestMetadata.new()
|
2735
|
+
if not @parent.page_limit.nil?
|
2736
|
+
req.meta.limit = @parent.page_limit
|
2737
|
+
end
|
2738
|
+
if not @parent.snapshot_time.nil?
|
2739
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2740
|
+
end
|
2741
|
+
|
2742
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2743
|
+
resp = Enumerator::Generator.new { |g|
|
2744
|
+
tries = 0
|
2745
|
+
loop do
|
2746
|
+
begin
|
2747
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("Groups.List", req), deadline: deadline)
|
2748
|
+
rescue => exception
|
2749
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2750
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2751
|
+
next
|
2752
|
+
end
|
2753
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2754
|
+
end
|
2755
|
+
tries = 0
|
2756
|
+
plumbing_response.groups.each do |plumbing_item|
|
2757
|
+
g.yield Plumbing::convert_group_to_porcelain(plumbing_item)
|
2758
|
+
end
|
2759
|
+
break if plumbing_response.meta.next_cursor == ""
|
2760
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
2761
|
+
end
|
2762
|
+
}
|
2763
|
+
resp
|
2764
|
+
end
|
2765
|
+
end
|
2766
|
+
|
2767
|
+
# SnapshotGroups exposes the read only methods of the Groups
|
2768
|
+
# service for historical queries.
|
2769
|
+
class SnapshotGroups
|
2770
|
+
extend Gem::Deprecate
|
2771
|
+
|
2772
|
+
def initialize(groups)
|
2773
|
+
@groups = groups
|
2774
|
+
end
|
2775
|
+
|
2776
|
+
# Get reads one Group by ID.
|
2777
|
+
def get(
|
2778
|
+
id,
|
2779
|
+
deadline: nil
|
2780
|
+
)
|
2781
|
+
return @groups.get(
|
2782
|
+
id,
|
2783
|
+
deadline: deadline,
|
2784
|
+
)
|
2785
|
+
end
|
2786
|
+
|
2787
|
+
# List gets a list of Groups matching a given set of criteria.
|
2788
|
+
def list(
|
2789
|
+
filter,
|
2790
|
+
*args,
|
2791
|
+
deadline: nil
|
2792
|
+
)
|
2793
|
+
return @groups.list(
|
2794
|
+
filter,
|
2795
|
+
*args,
|
2796
|
+
deadline: deadline,
|
2797
|
+
)
|
2798
|
+
end
|
2799
|
+
end
|
2800
|
+
|
2801
|
+
# GroupsHistory records all changes to the state of a Group.
|
2802
|
+
#
|
2803
|
+
# See {GroupHistory}.
|
2804
|
+
class GroupsHistory
|
2805
|
+
extend Gem::Deprecate
|
2806
|
+
|
2807
|
+
def initialize(channel, parent)
|
2808
|
+
begin
|
2809
|
+
@stub = V1::GroupsHistory::Stub.new(nil, nil, channel_override: channel)
|
2810
|
+
rescue => exception
|
2811
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2812
|
+
end
|
2813
|
+
@parent = parent
|
2814
|
+
end
|
2815
|
+
|
2816
|
+
# List gets a list of GroupHistory records matching a given set of criteria.
|
2817
|
+
def list(
|
2818
|
+
filter,
|
2819
|
+
*args,
|
2820
|
+
deadline: nil
|
2821
|
+
)
|
2822
|
+
req = V1::GroupHistoryListRequest.new()
|
2823
|
+
req.meta = V1::ListRequestMetadata.new()
|
2824
|
+
if not @parent.page_limit.nil?
|
2825
|
+
req.meta.limit = @parent.page_limit
|
2826
|
+
end
|
2827
|
+
if not @parent.snapshot_time.nil?
|
2828
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2829
|
+
end
|
2830
|
+
|
2831
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2832
|
+
resp = Enumerator::Generator.new { |g|
|
2833
|
+
tries = 0
|
2834
|
+
loop do
|
2835
|
+
begin
|
2836
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("GroupsHistory.List", req), deadline: deadline)
|
2837
|
+
rescue => exception
|
2838
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2839
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2840
|
+
next
|
2841
|
+
end
|
2842
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2843
|
+
end
|
2844
|
+
tries = 0
|
2845
|
+
plumbing_response.history.each do |plumbing_item|
|
2846
|
+
g.yield Plumbing::convert_group_history_to_porcelain(plumbing_item)
|
2847
|
+
end
|
2848
|
+
break if plumbing_response.meta.next_cursor == ""
|
2849
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
2850
|
+
end
|
2851
|
+
}
|
2852
|
+
resp
|
2853
|
+
end
|
2854
|
+
end
|
2855
|
+
|
2856
|
+
# A GroupRole is an assignment of a Group to a Role.
|
2857
|
+
#
|
2858
|
+
# See {GroupRole}.
|
2859
|
+
class GroupsRoles
|
2860
|
+
extend Gem::Deprecate
|
2861
|
+
|
2862
|
+
def initialize(channel, parent)
|
2863
|
+
begin
|
2864
|
+
@stub = V1::GroupsRoles::Stub.new(nil, nil, channel_override: channel)
|
2865
|
+
rescue => exception
|
2866
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2867
|
+
end
|
2868
|
+
@parent = parent
|
2869
|
+
end
|
2870
|
+
|
2871
|
+
# Create registers a new GroupRole.
|
2872
|
+
def create(
|
2873
|
+
group_role,
|
2874
|
+
deadline: nil
|
2875
|
+
)
|
2876
|
+
req = V1::GroupRoleCreateRequest.new()
|
2877
|
+
|
2878
|
+
req.group_role = Plumbing::convert_group_role_to_plumbing(group_role)
|
2879
|
+
tries = 0
|
2880
|
+
plumbing_response = nil
|
2881
|
+
loop do
|
2882
|
+
begin
|
2883
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("GroupsRoles.Create", req), deadline: deadline)
|
2884
|
+
rescue => exception
|
2885
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2886
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2887
|
+
next
|
2888
|
+
end
|
2889
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2890
|
+
end
|
2891
|
+
break
|
2892
|
+
end
|
2893
|
+
|
2894
|
+
resp = GroupRoleCreateResponse.new()
|
2895
|
+
resp.group_role = Plumbing::convert_group_role_to_porcelain(plumbing_response.group_role)
|
2896
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2897
|
+
resp
|
2898
|
+
end
|
2899
|
+
|
2900
|
+
# Get reads one GroupRole by ID.
|
2901
|
+
def get(
|
2902
|
+
id,
|
2903
|
+
deadline: nil
|
2904
|
+
)
|
2905
|
+
req = V1::GroupRoleGetRequest.new()
|
2906
|
+
if not @parent.snapshot_time.nil?
|
2907
|
+
req.meta = V1::GetRequestMetadata.new()
|
2908
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2909
|
+
end
|
2910
|
+
|
2911
|
+
req.id = (id)
|
2912
|
+
tries = 0
|
2913
|
+
plumbing_response = nil
|
2914
|
+
loop do
|
2915
|
+
begin
|
2916
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("GroupsRoles.Get", req), deadline: deadline)
|
2917
|
+
rescue => exception
|
2918
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2919
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2920
|
+
next
|
2921
|
+
end
|
2922
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2923
|
+
end
|
2924
|
+
break
|
2925
|
+
end
|
2926
|
+
|
2927
|
+
resp = GroupRoleGetResponse.new()
|
2928
|
+
resp.group_role = Plumbing::convert_group_role_to_porcelain(plumbing_response.group_role)
|
2929
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
2930
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2931
|
+
resp
|
2932
|
+
end
|
2933
|
+
|
2934
|
+
# Delete removes a GroupRole by ID.
|
2935
|
+
def delete(
|
2936
|
+
id,
|
2937
|
+
deadline: nil
|
2938
|
+
)
|
2939
|
+
req = V1::GroupRoleDeleteRequest.new()
|
2940
|
+
|
2941
|
+
req.id = (id)
|
2942
|
+
tries = 0
|
2943
|
+
plumbing_response = nil
|
2944
|
+
loop do
|
2945
|
+
begin
|
2946
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("GroupsRoles.Delete", req), deadline: deadline)
|
2947
|
+
rescue => exception
|
2948
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2949
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2950
|
+
next
|
2951
|
+
end
|
2952
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2953
|
+
end
|
2954
|
+
break
|
2955
|
+
end
|
2956
|
+
|
2957
|
+
resp = GroupRoleDeleteResponse.new()
|
2958
|
+
resp.group_role = Plumbing::convert_group_role_to_porcelain(plumbing_response.group_role)
|
2959
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
2960
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2961
|
+
resp
|
2962
|
+
end
|
2963
|
+
|
2964
|
+
# List gets a list of GroupRoles matching a given set of criteria.
|
2965
|
+
def list(
|
2966
|
+
filter,
|
2967
|
+
*args,
|
2968
|
+
deadline: nil
|
2969
|
+
)
|
2970
|
+
req = V1::GroupRoleListRequest.new()
|
2971
|
+
req.meta = V1::ListRequestMetadata.new()
|
2972
|
+
if not @parent.page_limit.nil?
|
2973
|
+
req.meta.limit = @parent.page_limit
|
2974
|
+
end
|
2975
|
+
if not @parent.snapshot_time.nil?
|
2976
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2977
|
+
end
|
2978
|
+
|
2979
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2980
|
+
resp = Enumerator::Generator.new { |g|
|
2981
|
+
tries = 0
|
2982
|
+
loop do
|
2983
|
+
begin
|
2984
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("GroupsRoles.List", req), deadline: deadline)
|
2985
|
+
rescue => exception
|
2986
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
2987
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
2988
|
+
next
|
2989
|
+
end
|
2990
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2991
|
+
end
|
2992
|
+
tries = 0
|
2993
|
+
plumbing_response.groups_roles.each do |plumbing_item|
|
2994
|
+
g.yield Plumbing::convert_group_role_to_porcelain(plumbing_item)
|
2995
|
+
end
|
2996
|
+
break if plumbing_response.meta.next_cursor == ""
|
2997
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
2998
|
+
end
|
2999
|
+
}
|
3000
|
+
resp
|
3001
|
+
end
|
3002
|
+
end
|
3003
|
+
|
3004
|
+
# SnapshotGroupsRoles exposes the read only methods of the GroupsRoles
|
3005
|
+
# service for historical queries.
|
3006
|
+
class SnapshotGroupsRoles
|
3007
|
+
extend Gem::Deprecate
|
3008
|
+
|
3009
|
+
def initialize(groups_roles)
|
3010
|
+
@groups_roles = groups_roles
|
3011
|
+
end
|
3012
|
+
|
3013
|
+
# Get reads one GroupRole by ID.
|
3014
|
+
def get(
|
3015
|
+
id,
|
3016
|
+
deadline: nil
|
3017
|
+
)
|
3018
|
+
return @groups_roles.get(
|
3019
|
+
id,
|
3020
|
+
deadline: deadline,
|
3021
|
+
)
|
3022
|
+
end
|
3023
|
+
|
3024
|
+
# List gets a list of GroupRoles matching a given set of criteria.
|
3025
|
+
def list(
|
3026
|
+
filter,
|
3027
|
+
*args,
|
3028
|
+
deadline: nil
|
3029
|
+
)
|
3030
|
+
return @groups_roles.list(
|
3031
|
+
filter,
|
3032
|
+
*args,
|
3033
|
+
deadline: deadline,
|
3034
|
+
)
|
3035
|
+
end
|
3036
|
+
end
|
3037
|
+
|
3038
|
+
# GroupsRolesHistory records all changes to the state of a GroupRole.
|
3039
|
+
#
|
3040
|
+
# See {GroupRoleHistory}.
|
3041
|
+
class GroupsRolesHistory
|
3042
|
+
extend Gem::Deprecate
|
3043
|
+
|
3044
|
+
def initialize(channel, parent)
|
3045
|
+
begin
|
3046
|
+
@stub = V1::GroupsRolesHistory::Stub.new(nil, nil, channel_override: channel)
|
3047
|
+
rescue => exception
|
3048
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3049
|
+
end
|
3050
|
+
@parent = parent
|
3051
|
+
end
|
3052
|
+
|
3053
|
+
# List gets a list of GroupRoleHistory records matching a given set of criteria.
|
3054
|
+
def list(
|
3055
|
+
filter,
|
3056
|
+
*args,
|
3057
|
+
deadline: nil
|
3058
|
+
)
|
3059
|
+
req = V1::GroupRoleHistoryListRequest.new()
|
3060
|
+
req.meta = V1::ListRequestMetadata.new()
|
3061
|
+
if not @parent.page_limit.nil?
|
3062
|
+
req.meta.limit = @parent.page_limit
|
3063
|
+
end
|
3064
|
+
if not @parent.snapshot_time.nil?
|
3065
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
3066
|
+
end
|
3067
|
+
|
3068
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
3069
|
+
resp = Enumerator::Generator.new { |g|
|
3070
|
+
tries = 0
|
3071
|
+
loop do
|
3072
|
+
begin
|
3073
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("GroupsRolesHistory.List", req), deadline: deadline)
|
3074
|
+
rescue => exception
|
3075
|
+
if (@parent.shouldRetry(tries, exception, deadline))
|
3076
|
+
tries + +sleep(@parent.exponentialBackoff(tries, deadline))
|
3077
|
+
next
|
3078
|
+
end
|
3079
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
3080
|
+
end
|
3081
|
+
tries = 0
|
3082
|
+
plumbing_response.history.each do |plumbing_item|
|
3083
|
+
g.yield Plumbing::convert_group_role_history_to_porcelain(plumbing_item)
|
3084
|
+
end
|
3085
|
+
break if plumbing_response.meta.next_cursor == ""
|
3086
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
3087
|
+
end
|
3088
|
+
}
|
3089
|
+
resp
|
3090
|
+
end
|
3091
|
+
end
|
3092
|
+
|
2325
3093
|
# HealthChecks lists the last healthcheck between each node and resource.
|
2326
3094
|
# Note the unconventional capitalization here is to prevent having a collision with GRPC
|
2327
3095
|
#
|
@@ -5294,6 +6062,7 @@ module SDM #:nodoc:
|
|
5294
6062
|
# {KubernetesServiceAccountUserImpersonation}
|
5295
6063
|
# {KubernetesUserImpersonation}
|
5296
6064
|
# {Maria}
|
6065
|
+
# {MCP}
|
5297
6066
|
# {Memcached}
|
5298
6067
|
# {Memsql}
|
5299
6068
|
# {MongoHost}
|