strongdm 15.14.0__zip → 15.15.0__zip

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.
Files changed (159) hide show
  1. {strongdm-15.14.0 → strongdm-15.15.0}/PKG-INFO +2 -2
  2. {strongdm-15.14.0 → strongdm-15.15.0}/setup.py +2 -2
  3. strongdm-15.15.0/strongdm/accounts_groups_history_pb2.py +100 -0
  4. strongdm-15.15.0/strongdm/accounts_groups_history_pb2_grpc.py +84 -0
  5. strongdm-15.15.0/strongdm/accounts_groups_pb2.py +194 -0
  6. strongdm-15.15.0/strongdm/accounts_groups_pb2_grpc.py +186 -0
  7. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflows_pb2.py +5 -5
  8. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/client.py +59 -1
  9. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/drivers_pb2.py +262 -220
  10. strongdm-15.15.0/strongdm/groups_history_pb2.py +100 -0
  11. strongdm-15.15.0/strongdm/groups_history_pb2_grpc.py +84 -0
  12. strongdm-15.15.0/strongdm/groups_pb2.py +290 -0
  13. strongdm-15.15.0/strongdm/groups_pb2_grpc.py +253 -0
  14. strongdm-15.15.0/strongdm/groups_roles_history_pb2.py +100 -0
  15. strongdm-15.15.0/strongdm/groups_roles_history_pb2_grpc.py +84 -0
  16. strongdm-15.15.0/strongdm/groups_roles_pb2.py +200 -0
  17. strongdm-15.15.0/strongdm/groups_roles_pb2_grpc.py +186 -0
  18. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/models.py +6643 -4987
  19. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/plumbing.py +1256 -11
  20. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/svc.py +759 -0
  21. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm.egg-info/PKG-INFO +2 -2
  22. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm.egg-info/SOURCES.txt +12 -0
  23. {strongdm-15.14.0 → strongdm-15.15.0}/LICENSE +0 -0
  24. {strongdm-15.14.0 → strongdm-15.15.0}/README.md +0 -0
  25. {strongdm-15.14.0 → strongdm-15.15.0}/setup.cfg +0 -0
  26. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/__init__.py +0 -0
  27. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/access_request_events_history_pb2.py +0 -0
  28. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/access_request_events_history_pb2_grpc.py +0 -0
  29. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/access_requests_history_pb2.py +0 -0
  30. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/access_requests_history_pb2_grpc.py +0 -0
  31. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/access_requests_pb2.py +0 -0
  32. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/access_requests_pb2_grpc.py +0 -0
  33. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_attachments_history_pb2.py +0 -0
  34. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_attachments_history_pb2_grpc.py +0 -0
  35. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_attachments_pb2.py +0 -0
  36. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_attachments_pb2_grpc.py +0 -0
  37. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_grants_history_pb2.py +0 -0
  38. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_grants_history_pb2_grpc.py +0 -0
  39. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_grants_pb2.py +0 -0
  40. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_grants_pb2_grpc.py +0 -0
  41. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_permissions_pb2.py +0 -0
  42. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_permissions_pb2_grpc.py +0 -0
  43. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_resources_history_pb2.py +0 -0
  44. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_resources_history_pb2_grpc.py +0 -0
  45. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_resources_pb2.py +0 -0
  46. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/account_resources_pb2_grpc.py +0 -0
  47. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/accounts_history_pb2.py +0 -0
  48. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/accounts_history_pb2_grpc.py +0 -0
  49. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/accounts_pb2.py +0 -0
  50. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/accounts_pb2_grpc.py +0 -0
  51. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/activities_pb2.py +0 -0
  52. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/activities_pb2_grpc.py +0 -0
  53. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_approvers_history_pb2.py +0 -0
  54. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_approvers_history_pb2_grpc.py +0 -0
  55. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_approvers_pb2.py +0 -0
  56. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_approvers_pb2_grpc.py +0 -0
  57. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_steps_history_pb2.py +0 -0
  58. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_steps_history_pb2_grpc.py +0 -0
  59. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_steps_pb2.py +0 -0
  60. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflow_steps_pb2_grpc.py +0 -0
  61. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflows_history_pb2.py +0 -0
  62. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflows_history_pb2_grpc.py +0 -0
  63. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/approval_workflows_pb2_grpc.py +0 -0
  64. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/constants.py +0 -0
  65. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/control_panel_pb2.py +0 -0
  66. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/control_panel_pb2_grpc.py +0 -0
  67. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/drivers_pb2_grpc.py +0 -0
  68. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/errors.py +0 -0
  69. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/health_checks_pb2.py +0 -0
  70. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/health_checks_pb2_grpc.py +0 -0
  71. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_aliases_history_pb2.py +0 -0
  72. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_aliases_history_pb2_grpc.py +0 -0
  73. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_aliases_pb2.py +0 -0
  74. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_aliases_pb2_grpc.py +0 -0
  75. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_sets_history_pb2.py +0 -0
  76. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_sets_history_pb2_grpc.py +0 -0
  77. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_sets_pb2.py +0 -0
  78. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/identity_sets_pb2_grpc.py +0 -0
  79. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/managed_secrets_pb2.py +0 -0
  80. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/managed_secrets_pb2_grpc.py +0 -0
  81. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/nodes_history_pb2.py +0 -0
  82. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/nodes_history_pb2_grpc.py +0 -0
  83. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/nodes_pb2.py +0 -0
  84. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/nodes_pb2_grpc.py +0 -0
  85. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/options_pb2.py +0 -0
  86. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/options_pb2_grpc.py +0 -0
  87. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/organization_history_pb2.py +0 -0
  88. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/organization_history_pb2_grpc.py +0 -0
  89. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_group_nodes_pb2.py +0 -0
  90. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_group_nodes_pb2_grpc.py +0 -0
  91. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_group_peers_pb2.py +0 -0
  92. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_group_peers_pb2_grpc.py +0 -0
  93. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_group_resources_pb2.py +0 -0
  94. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_group_resources_pb2_grpc.py +0 -0
  95. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_groups_pb2.py +0 -0
  96. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/peering_groups_pb2_grpc.py +0 -0
  97. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/policies_history_pb2.py +0 -0
  98. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/policies_history_pb2_grpc.py +0 -0
  99. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/policies_pb2.py +0 -0
  100. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/policies_pb2_grpc.py +0 -0
  101. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/proxy_cluster_keys_pb2.py +0 -0
  102. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/proxy_cluster_keys_pb2_grpc.py +0 -0
  103. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/queries_pb2.py +0 -0
  104. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/queries_pb2_grpc.py +0 -0
  105. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identities_history_pb2.py +0 -0
  106. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identities_history_pb2_grpc.py +0 -0
  107. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identities_pb2.py +0 -0
  108. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identities_pb2_grpc.py +0 -0
  109. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identity_groups_history_pb2.py +0 -0
  110. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identity_groups_history_pb2_grpc.py +0 -0
  111. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identity_groups_pb2.py +0 -0
  112. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/remote_identity_groups_pb2_grpc.py +0 -0
  113. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/replays_pb2.py +0 -0
  114. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/replays_pb2_grpc.py +0 -0
  115. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/resources_history_pb2.py +0 -0
  116. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/resources_history_pb2_grpc.py +0 -0
  117. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/resources_pb2.py +0 -0
  118. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/resources_pb2_grpc.py +0 -0
  119. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/role_resources_history_pb2.py +0 -0
  120. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/role_resources_history_pb2_grpc.py +0 -0
  121. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/role_resources_pb2.py +0 -0
  122. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/role_resources_pb2_grpc.py +0 -0
  123. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/roles_history_pb2.py +0 -0
  124. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/roles_history_pb2_grpc.py +0 -0
  125. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/roles_pb2.py +0 -0
  126. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/roles_pb2_grpc.py +0 -0
  127. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_engine_policy_pb2.py +0 -0
  128. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_engine_policy_pb2_grpc.py +0 -0
  129. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_engine_types_pb2.py +0 -0
  130. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_engine_types_pb2_grpc.py +0 -0
  131. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_engines_pb2.py +0 -0
  132. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_engines_pb2_grpc.py +0 -0
  133. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_store_healths_pb2.py +0 -0
  134. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_store_healths_pb2_grpc.py +0 -0
  135. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_store_types_pb2.py +0 -0
  136. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_store_types_pb2_grpc.py +0 -0
  137. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_stores_history_pb2.py +0 -0
  138. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_stores_history_pb2_grpc.py +0 -0
  139. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_stores_pb2.py +0 -0
  140. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/secret_stores_pb2_grpc.py +0 -0
  141. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/spec_pb2.py +0 -0
  142. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/spec_pb2_grpc.py +0 -0
  143. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/tags_pb2.py +0 -0
  144. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/tags_pb2_grpc.py +0 -0
  145. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_approvers_history_pb2.py +0 -0
  146. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_approvers_history_pb2_grpc.py +0 -0
  147. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_approvers_pb2.py +0 -0
  148. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_approvers_pb2_grpc.py +0 -0
  149. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_roles_history_pb2.py +0 -0
  150. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_roles_history_pb2_grpc.py +0 -0
  151. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_roles_pb2.py +0 -0
  152. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflow_roles_pb2_grpc.py +0 -0
  153. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflows_history_pb2.py +0 -0
  154. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflows_history_pb2_grpc.py +0 -0
  155. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflows_pb2.py +0 -0
  156. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm/workflows_pb2_grpc.py +0 -0
  157. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm.egg-info/dependency_links.txt +0 -0
  158. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm.egg-info/requires.txt +0 -0
  159. {strongdm-15.14.0 → strongdm-15.15.0}/strongdm.egg-info/top_level.txt +0 -0
@@ -48,6 +48,10 @@ from .account_resources_history_pb2 import *
48
48
  from .account_resources_history_pb2_grpc import *
49
49
  from .accounts_pb2 import *
50
50
  from .accounts_pb2_grpc import *
51
+ from .accounts_groups_pb2 import *
52
+ from .accounts_groups_pb2_grpc import *
53
+ from .accounts_groups_history_pb2 import *
54
+ from .accounts_groups_history_pb2_grpc import *
51
55
  from .accounts_history_pb2 import *
52
56
  from .accounts_history_pb2_grpc import *
53
57
  from .activities_pb2 import *
@@ -68,6 +72,14 @@ from .control_panel_pb2 import *
68
72
  from .control_panel_pb2_grpc import *
69
73
  from .roles_pb2 import *
70
74
  from .roles_pb2_grpc import *
75
+ from .groups_pb2 import *
76
+ from .groups_pb2_grpc import *
77
+ from .groups_history_pb2 import *
78
+ from .groups_history_pb2_grpc import *
79
+ from .groups_roles_pb2 import *
80
+ from .groups_roles_pb2_grpc import *
81
+ from .groups_roles_history_pb2 import *
82
+ from .groups_roles_history_pb2_grpc import *
71
83
  from .health_checks_pb2 import *
72
84
  from .health_checks_pb2_grpc import *
73
85
  from .identity_aliases_pb2 import *
@@ -1201,6 +1213,235 @@ class SnapshotAccounts:
1201
1213
  return self.accounts.list(filter, *args, timeout=timeout)
1202
1214
 
1203
1215
 
1216
+ class AccountsGroups:
1217
+ '''
1218
+ An AccountGroup links an account and a group.
1219
+ See `strongdm.models.AccountGroup`.
1220
+ '''
1221
+ def __init__(self, channel, client):
1222
+ self.parent = client
1223
+ self.stub = AccountsGroupsStub(channel)
1224
+
1225
+ def create(self, account_group, timeout=None):
1226
+ '''
1227
+ Create create a new AccountGroup.
1228
+ '''
1229
+ deadline = None if timeout is None else time.time() + timeout
1230
+ req = AccountGroupCreateRequest()
1231
+
1232
+ if account_group is not None:
1233
+ req.account_group.CopyFrom(
1234
+ plumbing.convert_account_group_to_plumbing(account_group))
1235
+ tries = 0
1236
+ plumbing_response = None
1237
+ while True:
1238
+ t = None if deadline is None else deadline - time.time()
1239
+ try:
1240
+ plumbing_response = self.stub.Create(
1241
+ req,
1242
+ metadata=self.parent.get_metadata('AccountsGroups.Create',
1243
+ req),
1244
+ timeout=t)
1245
+ except Exception as e:
1246
+ if self.parent.shouldRetry(tries, e, deadline):
1247
+ tries += 1
1248
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
1249
+ continue
1250
+ raise plumbing.convert_error_to_porcelain(e) from e
1251
+ break
1252
+
1253
+ resp = models.AccountGroupCreateResponse()
1254
+ resp.account_group = plumbing.convert_account_group_to_porcelain(
1255
+ plumbing_response.account_group)
1256
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
1257
+ plumbing_response.rate_limit)
1258
+ return resp
1259
+
1260
+ def get(self, id, timeout=None):
1261
+ '''
1262
+ Get reads one AccountGroup by ID.
1263
+ '''
1264
+ deadline = None if timeout is None else time.time() + timeout
1265
+ req = AccountGroupGetRequest()
1266
+ if self.parent.snapshot_datetime is not None:
1267
+ req.meta.CopyFrom(GetRequestMetadata())
1268
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
1269
+
1270
+ req.id = (id)
1271
+ tries = 0
1272
+ plumbing_response = None
1273
+ while True:
1274
+ t = None if deadline is None else deadline - time.time()
1275
+ try:
1276
+ plumbing_response = self.stub.Get(
1277
+ req,
1278
+ metadata=self.parent.get_metadata('AccountsGroups.Get',
1279
+ req),
1280
+ timeout=t)
1281
+ except Exception as e:
1282
+ if self.parent.shouldRetry(tries, e, deadline):
1283
+ tries += 1
1284
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
1285
+ continue
1286
+ raise plumbing.convert_error_to_porcelain(e) from e
1287
+ break
1288
+
1289
+ resp = models.AccountGroupGetResponse()
1290
+ resp.account_group = plumbing.convert_account_group_to_porcelain(
1291
+ plumbing_response.account_group)
1292
+ resp.meta = plumbing.convert_get_response_metadata_to_porcelain(
1293
+ plumbing_response.meta)
1294
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
1295
+ plumbing_response.rate_limit)
1296
+ return resp
1297
+
1298
+ def delete(self, id, timeout=None):
1299
+ '''
1300
+ Delete removes an AccountGroup by ID.
1301
+ '''
1302
+ deadline = None if timeout is None else time.time() + timeout
1303
+ req = AccountGroupDeleteRequest()
1304
+
1305
+ req.id = (id)
1306
+ tries = 0
1307
+ plumbing_response = None
1308
+ while True:
1309
+ t = None if deadline is None else deadline - time.time()
1310
+ try:
1311
+ plumbing_response = self.stub.Delete(
1312
+ req,
1313
+ metadata=self.parent.get_metadata('AccountsGroups.Delete',
1314
+ req),
1315
+ timeout=t)
1316
+ except Exception as e:
1317
+ if self.parent.shouldRetry(tries, e, deadline):
1318
+ tries += 1
1319
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
1320
+ continue
1321
+ raise plumbing.convert_error_to_porcelain(e) from e
1322
+ break
1323
+
1324
+ resp = models.AccountGroupDeleteResponse()
1325
+ resp.meta = plumbing.convert_delete_response_metadata_to_porcelain(
1326
+ plumbing_response.meta)
1327
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
1328
+ plumbing_response.rate_limit)
1329
+ return resp
1330
+
1331
+ def list(self, filter, *args, timeout=None):
1332
+ '''
1333
+ List gets a list of AccountGroups matching a given set of criteria.
1334
+ '''
1335
+ deadline = None if timeout is None else time.time() + timeout
1336
+ req = AccountGroupListRequest()
1337
+ req.meta.CopyFrom(ListRequestMetadata())
1338
+ if self.parent.page_limit > 0:
1339
+ req.meta.limit = self.parent.page_limit
1340
+ if self.parent.snapshot_datetime is not None:
1341
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
1342
+
1343
+ req.filter = plumbing.quote_filter_args(filter, *args)
1344
+
1345
+ def generator(svc, req):
1346
+ tries = 0
1347
+ while True:
1348
+ t = None if deadline is None else deadline - time.time()
1349
+ try:
1350
+ plumbing_response = svc.stub.List(
1351
+ req,
1352
+ metadata=svc.parent.get_metadata(
1353
+ 'AccountsGroups.List', req),
1354
+ timeout=t)
1355
+ except Exception as e:
1356
+ if self.parent.shouldRetry(tries, e, deadline):
1357
+ tries += 1
1358
+ time.sleep(
1359
+ self.parent.exponentialBackoff(tries, deadline))
1360
+ continue
1361
+ raise plumbing.convert_error_to_porcelain(e) from e
1362
+ tries = 0
1363
+ for plumbing_item in plumbing_response.account_groups:
1364
+ yield plumbing.convert_account_group_to_porcelain(
1365
+ plumbing_item)
1366
+ if plumbing_response.meta.next_cursor == '':
1367
+ break
1368
+ req.meta.cursor = plumbing_response.meta.next_cursor
1369
+
1370
+ return generator(self, req)
1371
+
1372
+
1373
+ class SnapshotAccountsGroups:
1374
+ '''
1375
+ SnapshotAccountsGroups exposes the read only methods of the AccountsGroups
1376
+ service for historical queries.
1377
+ '''
1378
+ def __init__(self, accounts_groups):
1379
+ self.accounts_groups = accounts_groups
1380
+
1381
+ def get(self, id, timeout=None):
1382
+ '''
1383
+ Get reads one AccountGroup by ID.
1384
+ '''
1385
+ return self.accounts_groups.get(id, timeout=timeout)
1386
+
1387
+ def list(self, filter, *args, timeout=None):
1388
+ '''
1389
+ List gets a list of AccountGroups matching a given set of criteria.
1390
+ '''
1391
+ return self.accounts_groups.list(filter, *args, timeout=timeout)
1392
+
1393
+
1394
+ class AccountsGroupsHistory:
1395
+ '''
1396
+ AccountsGroupsHistory records all changes to the state of an AccountGroup.
1397
+ See `strongdm.models.AccountGroupHistory`.
1398
+ '''
1399
+ def __init__(self, channel, client):
1400
+ self.parent = client
1401
+ self.stub = AccountsGroupsHistoryStub(channel)
1402
+
1403
+ def list(self, filter, *args, timeout=None):
1404
+ '''
1405
+ List gets a list of AccountGroupHistory records matching a given set of criteria.
1406
+ '''
1407
+ deadline = None if timeout is None else time.time() + timeout
1408
+ req = AccountGroupHistoryListRequest()
1409
+ req.meta.CopyFrom(ListRequestMetadata())
1410
+ if self.parent.page_limit > 0:
1411
+ req.meta.limit = self.parent.page_limit
1412
+ if self.parent.snapshot_datetime is not None:
1413
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
1414
+
1415
+ req.filter = plumbing.quote_filter_args(filter, *args)
1416
+
1417
+ def generator(svc, req):
1418
+ tries = 0
1419
+ while True:
1420
+ t = None if deadline is None else deadline - time.time()
1421
+ try:
1422
+ plumbing_response = svc.stub.List(
1423
+ req,
1424
+ metadata=svc.parent.get_metadata(
1425
+ 'AccountsGroupsHistory.List', req),
1426
+ timeout=t)
1427
+ except Exception as e:
1428
+ if self.parent.shouldRetry(tries, e, deadline):
1429
+ tries += 1
1430
+ time.sleep(
1431
+ self.parent.exponentialBackoff(tries, deadline))
1432
+ continue
1433
+ raise plumbing.convert_error_to_porcelain(e) from e
1434
+ tries = 0
1435
+ for plumbing_item in plumbing_response.history:
1436
+ yield plumbing.convert_account_group_history_to_porcelain(
1437
+ plumbing_item)
1438
+ if plumbing_response.meta.next_cursor == '':
1439
+ break
1440
+ req.meta.cursor = plumbing_response.meta.next_cursor
1441
+
1442
+ return generator(self, req)
1443
+
1444
+
1204
1445
  class AccountsHistory:
1205
1446
  '''
1206
1447
  AccountsHistory records all changes to the state of an Account.
@@ -2389,6 +2630,523 @@ class SnapshotRoles:
2389
2630
  return self.roles.list(filter, *args, timeout=timeout)
2390
2631
 
2391
2632
 
2633
+ class Groups:
2634
+ '''
2635
+ A Group is a set of principals.
2636
+ See `strongdm.models.Group`.
2637
+ '''
2638
+ def __init__(self, channel, client):
2639
+ self.parent = client
2640
+ self.stub = GroupsStub(channel)
2641
+
2642
+ def create(self, group, timeout=None):
2643
+ '''
2644
+ Create registers a new Group.
2645
+ '''
2646
+ deadline = None if timeout is None else time.time() + timeout
2647
+ req = GroupCreateRequest()
2648
+
2649
+ if group is not None:
2650
+ req.group.CopyFrom(plumbing.convert_group_to_plumbing(group))
2651
+ tries = 0
2652
+ plumbing_response = None
2653
+ while True:
2654
+ t = None if deadline is None else deadline - time.time()
2655
+ try:
2656
+ plumbing_response = self.stub.Create(
2657
+ req,
2658
+ metadata=self.parent.get_metadata('Groups.Create', req),
2659
+ timeout=t)
2660
+ except Exception as e:
2661
+ if self.parent.shouldRetry(tries, e, deadline):
2662
+ tries += 1
2663
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2664
+ continue
2665
+ raise plumbing.convert_error_to_porcelain(e) from e
2666
+ break
2667
+
2668
+ resp = models.GroupCreateResponse()
2669
+ resp.group = plumbing.convert_group_to_porcelain(
2670
+ plumbing_response.group)
2671
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2672
+ plumbing_response.rate_limit)
2673
+ return resp
2674
+
2675
+ def create_from_roles(self, role_ids, commit, timeout=None):
2676
+ deadline = None if timeout is None else time.time() + timeout
2677
+ req = GroupCreateFromRolesRequest()
2678
+
2679
+ req.role_ids.extend((role_ids))
2680
+ req.commit = (commit)
2681
+ tries = 0
2682
+ plumbing_response = None
2683
+ while True:
2684
+ t = None if deadline is None else deadline - time.time()
2685
+ try:
2686
+ plumbing_response = self.stub.CreateFromRoles(
2687
+ req,
2688
+ metadata=self.parent.get_metadata('Groups.CreateFromRoles',
2689
+ req),
2690
+ timeout=t)
2691
+ except Exception as e:
2692
+ if self.parent.shouldRetry(tries, e, deadline):
2693
+ tries += 1
2694
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2695
+ continue
2696
+ raise plumbing.convert_error_to_porcelain(e) from e
2697
+ break
2698
+
2699
+ resp = models.GroupCreateFromRolesResponse()
2700
+ resp.group_from_role = plumbing.convert_repeated_group_from_role_to_porcelain(
2701
+ plumbing_response.group_from_role)
2702
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2703
+ plumbing_response.rate_limit)
2704
+ return resp
2705
+
2706
+ def get(self, id, timeout=None):
2707
+ '''
2708
+ Get reads one Group by ID.
2709
+ '''
2710
+ deadline = None if timeout is None else time.time() + timeout
2711
+ req = GroupGetRequest()
2712
+ if self.parent.snapshot_datetime is not None:
2713
+ req.meta.CopyFrom(GetRequestMetadata())
2714
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
2715
+
2716
+ req.id = (id)
2717
+ tries = 0
2718
+ plumbing_response = None
2719
+ while True:
2720
+ t = None if deadline is None else deadline - time.time()
2721
+ try:
2722
+ plumbing_response = self.stub.Get(
2723
+ req,
2724
+ metadata=self.parent.get_metadata('Groups.Get', req),
2725
+ timeout=t)
2726
+ except Exception as e:
2727
+ if self.parent.shouldRetry(tries, e, deadline):
2728
+ tries += 1
2729
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2730
+ continue
2731
+ raise plumbing.convert_error_to_porcelain(e) from e
2732
+ break
2733
+
2734
+ resp = models.GroupGetResponse()
2735
+ resp.group = plumbing.convert_group_to_porcelain(
2736
+ plumbing_response.group)
2737
+ resp.meta = plumbing.convert_get_response_metadata_to_porcelain(
2738
+ plumbing_response.meta)
2739
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2740
+ plumbing_response.rate_limit)
2741
+ return resp
2742
+
2743
+ def update(self, group, timeout=None):
2744
+ '''
2745
+ Update replaces all the fields of a Group by ID.
2746
+ '''
2747
+ deadline = None if timeout is None else time.time() + timeout
2748
+ req = GroupUpdateRequest()
2749
+
2750
+ if group is not None:
2751
+ req.group.CopyFrom(plumbing.convert_group_to_plumbing(group))
2752
+ tries = 0
2753
+ plumbing_response = None
2754
+ while True:
2755
+ t = None if deadline is None else deadline - time.time()
2756
+ try:
2757
+ plumbing_response = self.stub.Update(
2758
+ req,
2759
+ metadata=self.parent.get_metadata('Groups.Update', req),
2760
+ timeout=t)
2761
+ except Exception as e:
2762
+ if self.parent.shouldRetry(tries, e, deadline):
2763
+ tries += 1
2764
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2765
+ continue
2766
+ raise plumbing.convert_error_to_porcelain(e) from e
2767
+ break
2768
+
2769
+ resp = models.GroupUpdateResponse()
2770
+ resp.group = plumbing.convert_group_to_porcelain(
2771
+ plumbing_response.group)
2772
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2773
+ plumbing_response.rate_limit)
2774
+ return resp
2775
+
2776
+ def delete(self, id, timeout=None):
2777
+ '''
2778
+ Delete removes a Group by ID.
2779
+ '''
2780
+ deadline = None if timeout is None else time.time() + timeout
2781
+ req = GroupDeleteRequest()
2782
+
2783
+ req.id = (id)
2784
+ tries = 0
2785
+ plumbing_response = None
2786
+ while True:
2787
+ t = None if deadline is None else deadline - time.time()
2788
+ try:
2789
+ plumbing_response = self.stub.Delete(
2790
+ req,
2791
+ metadata=self.parent.get_metadata('Groups.Delete', req),
2792
+ timeout=t)
2793
+ except Exception as e:
2794
+ if self.parent.shouldRetry(tries, e, deadline):
2795
+ tries += 1
2796
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2797
+ continue
2798
+ raise plumbing.convert_error_to_porcelain(e) from e
2799
+ break
2800
+
2801
+ resp = models.GroupDeleteResponse()
2802
+ resp.meta = plumbing.convert_delete_response_metadata_to_porcelain(
2803
+ plumbing_response.meta)
2804
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2805
+ plumbing_response.rate_limit)
2806
+ return resp
2807
+
2808
+ def list(self, filter, *args, timeout=None):
2809
+ '''
2810
+ List gets a list of Groups matching a given set of criteria.
2811
+ '''
2812
+ deadline = None if timeout is None else time.time() + timeout
2813
+ req = GroupListRequest()
2814
+ req.meta.CopyFrom(ListRequestMetadata())
2815
+ if self.parent.page_limit > 0:
2816
+ req.meta.limit = self.parent.page_limit
2817
+ if self.parent.snapshot_datetime is not None:
2818
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
2819
+
2820
+ req.filter = plumbing.quote_filter_args(filter, *args)
2821
+
2822
+ def generator(svc, req):
2823
+ tries = 0
2824
+ while True:
2825
+ t = None if deadline is None else deadline - time.time()
2826
+ try:
2827
+ plumbing_response = svc.stub.List(
2828
+ req,
2829
+ metadata=svc.parent.get_metadata('Groups.List', req),
2830
+ timeout=t)
2831
+ except Exception as e:
2832
+ if self.parent.shouldRetry(tries, e, deadline):
2833
+ tries += 1
2834
+ time.sleep(
2835
+ self.parent.exponentialBackoff(tries, deadline))
2836
+ continue
2837
+ raise plumbing.convert_error_to_porcelain(e) from e
2838
+ tries = 0
2839
+ for plumbing_item in plumbing_response.groups:
2840
+ yield plumbing.convert_group_to_porcelain(plumbing_item)
2841
+ if plumbing_response.meta.next_cursor == '':
2842
+ break
2843
+ req.meta.cursor = plumbing_response.meta.next_cursor
2844
+
2845
+ return generator(self, req)
2846
+
2847
+
2848
+ class SnapshotGroups:
2849
+ '''
2850
+ SnapshotGroups exposes the read only methods of the Groups
2851
+ service for historical queries.
2852
+ '''
2853
+ def __init__(self, groups):
2854
+ self.groups = groups
2855
+
2856
+ def get(self, id, timeout=None):
2857
+ '''
2858
+ Get reads one Group by ID.
2859
+ '''
2860
+ return self.groups.get(id, timeout=timeout)
2861
+
2862
+ def list(self, filter, *args, timeout=None):
2863
+ '''
2864
+ List gets a list of Groups matching a given set of criteria.
2865
+ '''
2866
+ return self.groups.list(filter, *args, timeout=timeout)
2867
+
2868
+
2869
+ class GroupsHistory:
2870
+ '''
2871
+ GroupsHistory records all changes to the state of a Group.
2872
+ See `strongdm.models.GroupHistory`.
2873
+ '''
2874
+ def __init__(self, channel, client):
2875
+ self.parent = client
2876
+ self.stub = GroupsHistoryStub(channel)
2877
+
2878
+ def list(self, filter, *args, timeout=None):
2879
+ '''
2880
+ List gets a list of GroupHistory records matching a given set of criteria.
2881
+ '''
2882
+ deadline = None if timeout is None else time.time() + timeout
2883
+ req = GroupHistoryListRequest()
2884
+ req.meta.CopyFrom(ListRequestMetadata())
2885
+ if self.parent.page_limit > 0:
2886
+ req.meta.limit = self.parent.page_limit
2887
+ if self.parent.snapshot_datetime is not None:
2888
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
2889
+
2890
+ req.filter = plumbing.quote_filter_args(filter, *args)
2891
+
2892
+ def generator(svc, req):
2893
+ tries = 0
2894
+ while True:
2895
+ t = None if deadline is None else deadline - time.time()
2896
+ try:
2897
+ plumbing_response = svc.stub.List(
2898
+ req,
2899
+ metadata=svc.parent.get_metadata(
2900
+ 'GroupsHistory.List', req),
2901
+ timeout=t)
2902
+ except Exception as e:
2903
+ if self.parent.shouldRetry(tries, e, deadline):
2904
+ tries += 1
2905
+ time.sleep(
2906
+ self.parent.exponentialBackoff(tries, deadline))
2907
+ continue
2908
+ raise plumbing.convert_error_to_porcelain(e) from e
2909
+ tries = 0
2910
+ for plumbing_item in plumbing_response.history:
2911
+ yield plumbing.convert_group_history_to_porcelain(
2912
+ plumbing_item)
2913
+ if plumbing_response.meta.next_cursor == '':
2914
+ break
2915
+ req.meta.cursor = plumbing_response.meta.next_cursor
2916
+
2917
+ return generator(self, req)
2918
+
2919
+
2920
+ class GroupsRoles:
2921
+ '''
2922
+ A GroupRole is an assignment of a Group to a Role.
2923
+ See `strongdm.models.GroupRole`.
2924
+ '''
2925
+ def __init__(self, channel, client):
2926
+ self.parent = client
2927
+ self.stub = GroupsRolesStub(channel)
2928
+
2929
+ def create(self, group_role, timeout=None):
2930
+ '''
2931
+ Create registers a new GroupRole.
2932
+ '''
2933
+ deadline = None if timeout is None else time.time() + timeout
2934
+ req = GroupRoleCreateRequest()
2935
+
2936
+ if group_role is not None:
2937
+ req.group_role.CopyFrom(
2938
+ plumbing.convert_group_role_to_plumbing(group_role))
2939
+ tries = 0
2940
+ plumbing_response = None
2941
+ while True:
2942
+ t = None if deadline is None else deadline - time.time()
2943
+ try:
2944
+ plumbing_response = self.stub.Create(
2945
+ req,
2946
+ metadata=self.parent.get_metadata('GroupsRoles.Create',
2947
+ req),
2948
+ timeout=t)
2949
+ except Exception as e:
2950
+ if self.parent.shouldRetry(tries, e, deadline):
2951
+ tries += 1
2952
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2953
+ continue
2954
+ raise plumbing.convert_error_to_porcelain(e) from e
2955
+ break
2956
+
2957
+ resp = models.GroupRoleCreateResponse()
2958
+ resp.group_role = plumbing.convert_group_role_to_porcelain(
2959
+ plumbing_response.group_role)
2960
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2961
+ plumbing_response.rate_limit)
2962
+ return resp
2963
+
2964
+ def get(self, id, timeout=None):
2965
+ '''
2966
+ Get reads one GroupRole by ID.
2967
+ '''
2968
+ deadline = None if timeout is None else time.time() + timeout
2969
+ req = GroupRoleGetRequest()
2970
+ if self.parent.snapshot_datetime is not None:
2971
+ req.meta.CopyFrom(GetRequestMetadata())
2972
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
2973
+
2974
+ req.id = (id)
2975
+ tries = 0
2976
+ plumbing_response = None
2977
+ while True:
2978
+ t = None if deadline is None else deadline - time.time()
2979
+ try:
2980
+ plumbing_response = self.stub.Get(
2981
+ req,
2982
+ metadata=self.parent.get_metadata('GroupsRoles.Get', req),
2983
+ timeout=t)
2984
+ except Exception as e:
2985
+ if self.parent.shouldRetry(tries, e, deadline):
2986
+ tries += 1
2987
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
2988
+ continue
2989
+ raise plumbing.convert_error_to_porcelain(e) from e
2990
+ break
2991
+
2992
+ resp = models.GroupRoleGetResponse()
2993
+ resp.group_role = plumbing.convert_group_role_to_porcelain(
2994
+ plumbing_response.group_role)
2995
+ resp.meta = plumbing.convert_get_response_metadata_to_porcelain(
2996
+ plumbing_response.meta)
2997
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
2998
+ plumbing_response.rate_limit)
2999
+ return resp
3000
+
3001
+ def delete(self, id, timeout=None):
3002
+ '''
3003
+ Delete removes a GroupRole by ID.
3004
+ '''
3005
+ deadline = None if timeout is None else time.time() + timeout
3006
+ req = GroupRoleDeleteRequest()
3007
+
3008
+ req.id = (id)
3009
+ tries = 0
3010
+ plumbing_response = None
3011
+ while True:
3012
+ t = None if deadline is None else deadline - time.time()
3013
+ try:
3014
+ plumbing_response = self.stub.Delete(
3015
+ req,
3016
+ metadata=self.parent.get_metadata('GroupsRoles.Delete',
3017
+ req),
3018
+ timeout=t)
3019
+ except Exception as e:
3020
+ if self.parent.shouldRetry(tries, e, deadline):
3021
+ tries += 1
3022
+ time.sleep(self.parent.exponentialBackoff(tries, deadline))
3023
+ continue
3024
+ raise plumbing.convert_error_to_porcelain(e) from e
3025
+ break
3026
+
3027
+ resp = models.GroupRoleDeleteResponse()
3028
+ resp.group_role = plumbing.convert_group_role_to_porcelain(
3029
+ plumbing_response.group_role)
3030
+ resp.meta = plumbing.convert_delete_response_metadata_to_porcelain(
3031
+ plumbing_response.meta)
3032
+ resp.rate_limit = plumbing.convert_rate_limit_metadata_to_porcelain(
3033
+ plumbing_response.rate_limit)
3034
+ return resp
3035
+
3036
+ def list(self, filter, *args, timeout=None):
3037
+ '''
3038
+ List gets a list of GroupRoles matching a given set of criteria.
3039
+ '''
3040
+ deadline = None if timeout is None else time.time() + timeout
3041
+ req = GroupRoleListRequest()
3042
+ req.meta.CopyFrom(ListRequestMetadata())
3043
+ if self.parent.page_limit > 0:
3044
+ req.meta.limit = self.parent.page_limit
3045
+ if self.parent.snapshot_datetime is not None:
3046
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
3047
+
3048
+ req.filter = plumbing.quote_filter_args(filter, *args)
3049
+
3050
+ def generator(svc, req):
3051
+ tries = 0
3052
+ while True:
3053
+ t = None if deadline is None else deadline - time.time()
3054
+ try:
3055
+ plumbing_response = svc.stub.List(
3056
+ req,
3057
+ metadata=svc.parent.get_metadata(
3058
+ 'GroupsRoles.List', req),
3059
+ timeout=t)
3060
+ except Exception as e:
3061
+ if self.parent.shouldRetry(tries, e, deadline):
3062
+ tries += 1
3063
+ time.sleep(
3064
+ self.parent.exponentialBackoff(tries, deadline))
3065
+ continue
3066
+ raise plumbing.convert_error_to_porcelain(e) from e
3067
+ tries = 0
3068
+ for plumbing_item in plumbing_response.groups_roles:
3069
+ yield plumbing.convert_group_role_to_porcelain(
3070
+ plumbing_item)
3071
+ if plumbing_response.meta.next_cursor == '':
3072
+ break
3073
+ req.meta.cursor = plumbing_response.meta.next_cursor
3074
+
3075
+ return generator(self, req)
3076
+
3077
+
3078
+ class SnapshotGroupsRoles:
3079
+ '''
3080
+ SnapshotGroupsRoles exposes the read only methods of the GroupsRoles
3081
+ service for historical queries.
3082
+ '''
3083
+ def __init__(self, groups_roles):
3084
+ self.groups_roles = groups_roles
3085
+
3086
+ def get(self, id, timeout=None):
3087
+ '''
3088
+ Get reads one GroupRole by ID.
3089
+ '''
3090
+ return self.groups_roles.get(id, timeout=timeout)
3091
+
3092
+ def list(self, filter, *args, timeout=None):
3093
+ '''
3094
+ List gets a list of GroupRoles matching a given set of criteria.
3095
+ '''
3096
+ return self.groups_roles.list(filter, *args, timeout=timeout)
3097
+
3098
+
3099
+ class GroupsRolesHistory:
3100
+ '''
3101
+ GroupsRolesHistory records all changes to the state of a GroupRole.
3102
+ See `strongdm.models.GroupRoleHistory`.
3103
+ '''
3104
+ def __init__(self, channel, client):
3105
+ self.parent = client
3106
+ self.stub = GroupsRolesHistoryStub(channel)
3107
+
3108
+ def list(self, filter, *args, timeout=None):
3109
+ '''
3110
+ List gets a list of GroupRoleHistory records matching a given set of criteria.
3111
+ '''
3112
+ deadline = None if timeout is None else time.time() + timeout
3113
+ req = GroupRoleHistoryListRequest()
3114
+ req.meta.CopyFrom(ListRequestMetadata())
3115
+ if self.parent.page_limit > 0:
3116
+ req.meta.limit = self.parent.page_limit
3117
+ if self.parent.snapshot_datetime is not None:
3118
+ req.meta.snapshot_at.FromDatetime(self.parent.snapshot_datetime)
3119
+
3120
+ req.filter = plumbing.quote_filter_args(filter, *args)
3121
+
3122
+ def generator(svc, req):
3123
+ tries = 0
3124
+ while True:
3125
+ t = None if deadline is None else deadline - time.time()
3126
+ try:
3127
+ plumbing_response = svc.stub.List(
3128
+ req,
3129
+ metadata=svc.parent.get_metadata(
3130
+ 'GroupsRolesHistory.List', req),
3131
+ timeout=t)
3132
+ except Exception as e:
3133
+ if self.parent.shouldRetry(tries, e, deadline):
3134
+ tries += 1
3135
+ time.sleep(
3136
+ self.parent.exponentialBackoff(tries, deadline))
3137
+ continue
3138
+ raise plumbing.convert_error_to_porcelain(e) from e
3139
+ tries = 0
3140
+ for plumbing_item in plumbing_response.history:
3141
+ yield plumbing.convert_group_role_history_to_porcelain(
3142
+ plumbing_item)
3143
+ if plumbing_response.meta.next_cursor == '':
3144
+ break
3145
+ req.meta.cursor = plumbing_response.meta.next_cursor
3146
+
3147
+ return generator(self, req)
3148
+
3149
+
2392
3150
  class HealthChecks:
2393
3151
  '''
2394
3152
  HealthChecks lists the last healthcheck between each node and resource.
@@ -5390,6 +6148,7 @@ class Resources:
5390
6148
  `strongdm.models.KubernetesServiceAccountUserImpersonation`
5391
6149
  `strongdm.models.KubernetesUserImpersonation`
5392
6150
  `strongdm.models.Maria`
6151
+ `strongdm.models.MCP`
5393
6152
  `strongdm.models.Memcached`
5394
6153
  `strongdm.models.Memsql`
5395
6154
  `strongdm.models.MongoHost`