insights-rbac-api-client 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (259) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +49 -22
  4. data/client-meta.json +1 -1
  5. data/docs/Access.md +10 -9
  6. data/docs/AccessApi.md +39 -19
  7. data/docs/AccessPagination.md +12 -11
  8. data/docs/AddRoleToGroup200Response.md +18 -0
  9. data/docs/AdditionalGroup.md +12 -11
  10. data/docs/CrossAccountRequest.md +30 -0
  11. data/docs/CrossAccountRequestApi.md +386 -0
  12. data/docs/CrossAccountRequestByAccount.md +36 -0
  13. data/docs/CrossAccountRequestByUserId.md +32 -0
  14. data/docs/CrossAccountRequestDetail.md +49 -0
  15. data/docs/CrossAccountRequestDetailByAccount.md +38 -0
  16. data/docs/CrossAccountRequestDetailByUseId.md +34 -0
  17. data/docs/CrossAccountRequestIn.md +26 -0
  18. data/docs/CrossAccountRequestOut.md +34 -0
  19. data/docs/CrossAccountRequestPagination.md +22 -0
  20. data/docs/CrossAccountRequestPaginationAllOfDataInner.md +49 -0
  21. data/docs/CrossAccountRequestPatch.md +24 -0
  22. data/docs/CrossAccountRequestUpdateIn.md +22 -0
  23. data/docs/CrossAccountRequestWithRoles.md +32 -0
  24. data/docs/CrossAccountRequestWithRolesRolesInner.md +22 -0
  25. data/docs/Error.md +8 -7
  26. data/docs/Error403.md +8 -7
  27. data/docs/Error403ErrorsInner.md +22 -0
  28. data/docs/ErrorErrorsInner.md +20 -0
  29. data/docs/ErrorNotFound.md +18 -0
  30. data/docs/ErrorNotFoundErrorsInner.md +22 -0
  31. data/docs/Group.md +10 -9
  32. data/docs/GroupApi.md +369 -163
  33. data/docs/GroupOut.md +26 -23
  34. data/docs/GroupPagination.md +12 -11
  35. data/docs/GroupPrincipalIn.md +8 -7
  36. data/docs/GroupRoleIn.md +8 -7
  37. data/docs/GroupRolesPagination.md +12 -11
  38. data/docs/GroupWithPrincipals.md +18 -17
  39. data/docs/GroupWithPrincipalsAndRoles.md +20 -19
  40. data/docs/ListPagination.md +10 -9
  41. data/docs/PaginationLinks.md +14 -13
  42. data/docs/PaginationMeta.md +8 -7
  43. data/docs/Permission.md +26 -0
  44. data/docs/PermissionApi.md +185 -0
  45. data/docs/PermissionOptionsPagination.md +22 -0
  46. data/docs/PermissionPagination.md +22 -0
  47. data/docs/Policy.md +10 -9
  48. data/docs/PolicyApi.md +153 -69
  49. data/docs/PolicyExtended.md +20 -19
  50. data/docs/PolicyIn.md +14 -13
  51. data/docs/PolicyPagination.md +12 -11
  52. data/docs/Principal.md +20 -15
  53. data/docs/PrincipalApi.md +49 -23
  54. data/docs/PrincipalExternalSourceId.md +49 -0
  55. data/docs/PrincipalIn.md +8 -7
  56. data/docs/PrincipalMinimal.md +18 -0
  57. data/docs/PrincipalOut.md +22 -17
  58. data/docs/PrincipalPagination.md +12 -11
  59. data/docs/PrincipalPaginationAllOfDataInner.md +49 -0
  60. data/docs/ResourceDefinition.md +8 -7
  61. data/docs/ResourceDefinitionFilter.md +12 -11
  62. data/docs/ResourceDefinitionFilterValue.md +49 -0
  63. data/docs/ResourceDefinitionFilterValueOneOfInner.md +47 -0
  64. data/docs/Role.md +12 -9
  65. data/docs/RoleApi.md +279 -89
  66. data/docs/RoleIn.md +14 -11
  67. data/docs/RoleOut.md +34 -25
  68. data/docs/RoleOutDynamic.md +40 -29
  69. data/docs/RolePagination.md +12 -11
  70. data/docs/RolePaginationDynamic.md +12 -11
  71. data/docs/RolePatch.md +22 -0
  72. data/docs/RoleWithAccess.md +36 -27
  73. data/docs/Status.md +10 -17
  74. data/docs/StatusApi.md +27 -10
  75. data/docs/Timestamped.md +10 -9
  76. data/docs/UUID.md +8 -7
  77. data/git_push.sh +3 -4
  78. data/insights-rbac-api-client.gemspec +3 -4
  79. data/lib/insights-rbac-api-client/api/access_api.rb +21 -6
  80. data/lib/insights-rbac-api-client/api/cross_account_request_api.rb +423 -0
  81. data/lib/insights-rbac-api-client/api/group_api.rb +120 -55
  82. data/lib/insights-rbac-api-client/api/permission_api.rb +243 -0
  83. data/lib/insights-rbac-api-client/api/policy_api.rb +38 -23
  84. data/lib/insights-rbac-api-client/api/principal_api.rb +44 -12
  85. data/lib/insights-rbac-api-client/api/role_api.rb +154 -41
  86. data/lib/insights-rbac-api-client/api/status_api.rb +5 -4
  87. data/lib/insights-rbac-api-client/api_client.rb +57 -51
  88. data/lib/insights-rbac-api-client/api_error.rb +2 -1
  89. data/lib/insights-rbac-api-client/configuration.rb +62 -13
  90. data/lib/insights-rbac-api-client/models/access.rb +34 -22
  91. data/lib/insights-rbac-api-client/models/access_pagination.rb +32 -23
  92. data/lib/insights-rbac-api-client/models/{inline_response200.rb → add_role_to_group200_response.rb} +35 -25
  93. data/lib/insights-rbac-api-client/models/additional_group.rb +30 -22
  94. data/lib/insights-rbac-api-client/models/cross_account_request.rb +270 -0
  95. data/lib/insights-rbac-api-client/models/cross_account_request_by_account.rb +304 -0
  96. data/lib/insights-rbac-api-client/models/cross_account_request_by_user_id.rb +286 -0
  97. data/lib/insights-rbac-api-client/models/cross_account_request_detail.rb +105 -0
  98. data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_account.rb +316 -0
  99. data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_use_id.rb +296 -0
  100. data/lib/insights-rbac-api-client/models/cross_account_request_in.rb +280 -0
  101. data/lib/insights-rbac-api-client/models/cross_account_request_out.rb +295 -0
  102. data/lib/insights-rbac-api-client/models/cross_account_request_pagination.rb +248 -0
  103. data/lib/insights-rbac-api-client/models/cross_account_request_pagination_all_of_data_inner.rb +105 -0
  104. data/lib/insights-rbac-api-client/models/cross_account_request_patch.rb +277 -0
  105. data/lib/insights-rbac-api-client/models/cross_account_request_update_in.rb +255 -0
  106. data/lib/insights-rbac-api-client/models/cross_account_request_with_roles.rb +279 -0
  107. data/lib/insights-rbac-api-client/models/cross_account_request_with_roles_roles_inner.rb +234 -0
  108. data/lib/insights-rbac-api-client/models/error.rb +33 -23
  109. data/lib/insights-rbac-api-client/models/error403.rb +33 -23
  110. data/lib/insights-rbac-api-client/models/{policy_extended_all_of.rb → error403_errors_inner.rb} +55 -50
  111. data/lib/insights-rbac-api-client/models/{group_with_principals_all_of.rb → error_errors_inner.rb} +49 -39
  112. data/lib/insights-rbac-api-client/models/{policy_in_all_of.rb → error_not_found.rb} +47 -50
  113. data/lib/insights-rbac-api-client/models/{principal_pagination_all_of.rb → error_not_found_errors_inner.rb} +61 -39
  114. data/lib/insights-rbac-api-client/models/group.rb +32 -22
  115. data/lib/insights-rbac-api-client/models/group_out.rb +65 -30
  116. data/lib/insights-rbac-api-client/models/group_pagination.rb +32 -23
  117. data/lib/insights-rbac-api-client/models/group_principal_in.rb +32 -22
  118. data/lib/insights-rbac-api-client/models/group_role_in.rb +32 -22
  119. data/lib/insights-rbac-api-client/models/group_roles_pagination.rb +32 -23
  120. data/lib/insights-rbac-api-client/models/group_with_principals.rb +42 -25
  121. data/lib/insights-rbac-api-client/models/group_with_principals_and_roles.rb +44 -25
  122. data/lib/insights-rbac-api-client/models/list_pagination.rb +30 -22
  123. data/lib/insights-rbac-api-client/models/pagination_links.rb +30 -22
  124. data/lib/insights-rbac-api-client/models/pagination_meta.rb +30 -22
  125. data/lib/insights-rbac-api-client/models/permission.rb +250 -0
  126. data/lib/insights-rbac-api-client/models/{policy_pagination_all_of.rb → permission_options_pagination.rb} +62 -27
  127. data/lib/insights-rbac-api-client/models/{group_pagination_all_of.rb → permission_pagination.rb} +62 -27
  128. data/lib/insights-rbac-api-client/models/policy.rb +32 -22
  129. data/lib/insights-rbac-api-client/models/policy_extended.rb +44 -25
  130. data/lib/insights-rbac-api-client/models/policy_in.rb +37 -24
  131. data/lib/insights-rbac-api-client/models/policy_pagination.rb +33 -24
  132. data/lib/insights-rbac-api-client/models/principal.rb +56 -26
  133. data/lib/insights-rbac-api-client/models/principal_external_source_id.rb +105 -0
  134. data/lib/insights-rbac-api-client/models/principal_in.rb +32 -22
  135. data/lib/insights-rbac-api-client/models/{access_pagination_all_of.rb → principal_minimal.rb} +45 -37
  136. data/lib/insights-rbac-api-client/models/principal_out.rb +55 -23
  137. data/lib/insights-rbac-api-client/models/principal_pagination.rb +34 -25
  138. data/lib/insights-rbac-api-client/models/principal_pagination_all_of_data_inner.rb +105 -0
  139. data/lib/insights-rbac-api-client/models/resource_definition.rb +32 -22
  140. data/lib/insights-rbac-api-client/models/resource_definition_filter.rb +37 -23
  141. data/lib/insights-rbac-api-client/models/resource_definition_filter_value.rb +105 -0
  142. data/lib/insights-rbac-api-client/models/resource_definition_filter_value_one_of_inner.rb +104 -0
  143. data/lib/insights-rbac-api-client/models/role.rb +42 -23
  144. data/lib/insights-rbac-api-client/models/role_in.rb +45 -25
  145. data/lib/insights-rbac-api-client/models/role_out.rb +92 -30
  146. data/lib/insights-rbac-api-client/models/role_out_dynamic.rb +109 -30
  147. data/lib/insights-rbac-api-client/models/role_pagination.rb +32 -23
  148. data/lib/insights-rbac-api-client/models/role_pagination_dynamic.rb +33 -24
  149. data/lib/insights-rbac-api-client/models/{group_with_principals_and_roles_all_of.rb → role_patch.rb} +55 -52
  150. data/lib/insights-rbac-api-client/models/role_with_access.rb +91 -28
  151. data/lib/insights-rbac-api-client/models/status.rb +36 -62
  152. data/lib/insights-rbac-api-client/models/timestamped.rb +36 -24
  153. data/lib/insights-rbac-api-client/models/uuid.rb +32 -22
  154. data/lib/insights-rbac-api-client/version.rb +2 -2
  155. data/lib/insights-rbac-api-client.rb +31 -13
  156. data/openapi.json +1741 -162
  157. data/spec/api/access_api_spec.rb +4 -2
  158. data/spec/api/cross_account_request_api_spec.rb +105 -0
  159. data/spec/api/group_api_spec.rb +26 -16
  160. data/spec/api/permission_api_spec.rb +75 -0
  161. data/spec/api/policy_api_spec.rb +7 -7
  162. data/spec/api/principal_api_spec.rb +10 -5
  163. data/spec/api/role_api_spec.rb +32 -13
  164. data/spec/api/status_api_spec.rb +2 -2
  165. data/spec/api_client_spec.rb +6 -4
  166. data/spec/configuration_spec.rb +4 -4
  167. data/spec/models/access_pagination_spec.rb +9 -14
  168. data/spec/models/access_spec.rb +8 -13
  169. data/spec/models/add_role_to_group200_response_spec.rb +36 -0
  170. data/spec/models/additional_group_spec.rb +9 -14
  171. data/spec/models/cross_account_request_by_account_spec.rb +90 -0
  172. data/spec/models/cross_account_request_by_user_id_spec.rb +78 -0
  173. data/spec/models/cross_account_request_detail_by_account_spec.rb +96 -0
  174. data/spec/models/cross_account_request_detail_by_use_id_spec.rb +84 -0
  175. data/spec/models/cross_account_request_detail_spec.rb +32 -0
  176. data/spec/models/cross_account_request_in_spec.rb +60 -0
  177. data/spec/models/cross_account_request_out_spec.rb +84 -0
  178. data/spec/models/cross_account_request_pagination_all_of_data_inner_spec.rb +32 -0
  179. data/spec/models/cross_account_request_pagination_spec.rb +48 -0
  180. data/spec/models/cross_account_request_patch_spec.rb +58 -0
  181. data/spec/models/cross_account_request_spec.rb +72 -0
  182. data/spec/models/cross_account_request_update_in_spec.rb +48 -0
  183. data/spec/models/cross_account_request_with_roles_roles_inner_spec.rb +48 -0
  184. data/spec/models/cross_account_request_with_roles_spec.rb +78 -0
  185. data/spec/models/error403_errors_inner_spec.rb +48 -0
  186. data/spec/models/error403_spec.rb +7 -12
  187. data/spec/models/error_errors_inner_spec.rb +42 -0
  188. data/spec/models/error_not_found_errors_inner_spec.rb +48 -0
  189. data/spec/models/error_not_found_spec.rb +36 -0
  190. data/spec/models/error_spec.rb +7 -12
  191. data/spec/models/group_out_spec.rb +21 -20
  192. data/spec/models/group_pagination_spec.rb +9 -14
  193. data/spec/models/group_principal_in_spec.rb +7 -12
  194. data/spec/models/group_role_in_spec.rb +7 -12
  195. data/spec/models/group_roles_pagination_spec.rb +9 -14
  196. data/spec/models/group_spec.rb +8 -13
  197. data/spec/models/group_with_principals_and_roles_spec.rb +13 -18
  198. data/spec/models/group_with_principals_spec.rb +12 -17
  199. data/spec/models/list_pagination_spec.rb +8 -13
  200. data/spec/models/pagination_links_spec.rb +10 -15
  201. data/spec/models/pagination_meta_spec.rb +7 -12
  202. data/spec/models/permission_options_pagination_spec.rb +48 -0
  203. data/spec/models/permission_pagination_spec.rb +48 -0
  204. data/spec/models/permission_spec.rb +60 -0
  205. data/spec/models/policy_extended_spec.rb +13 -18
  206. data/spec/models/policy_in_spec.rb +10 -15
  207. data/spec/models/policy_pagination_spec.rb +9 -14
  208. data/spec/models/policy_spec.rb +8 -13
  209. data/spec/models/principal_external_source_id_spec.rb +32 -0
  210. data/spec/models/principal_in_spec.rb +7 -12
  211. data/spec/models/principal_minimal_spec.rb +36 -0
  212. data/spec/models/principal_out_spec.rb +24 -17
  213. data/spec/models/principal_pagination_all_of_data_inner_spec.rb +32 -0
  214. data/spec/models/principal_pagination_spec.rb +9 -14
  215. data/spec/models/principal_spec.rb +23 -16
  216. data/spec/models/resource_definition_filter_spec.rb +10 -15
  217. data/spec/models/resource_definition_filter_value_one_of_inner_spec.rb +32 -0
  218. data/spec/models/resource_definition_filter_value_spec.rb +32 -0
  219. data/spec/models/resource_definition_spec.rb +7 -12
  220. data/spec/models/role_in_spec.rb +15 -14
  221. data/spec/models/role_out_dynamic_spec.rb +48 -23
  222. data/spec/models/role_out_spec.rb +40 -21
  223. data/spec/models/role_pagination_dynamic_spec.rb +9 -14
  224. data/spec/models/role_pagination_spec.rb +9 -14
  225. data/spec/models/role_patch_spec.rb +48 -0
  226. data/spec/models/role_spec.rb +14 -13
  227. data/spec/models/role_with_access_spec.rb +41 -22
  228. data/spec/models/status_spec.rb +8 -37
  229. data/spec/models/timestamped_spec.rb +8 -13
  230. data/spec/models/uuid_spec.rb +7 -12
  231. data/spec/spec_helper.rb +1 -1
  232. metadata +161 -109
  233. data/docs/AccessPaginationAllOf.md +0 -17
  234. data/docs/GroupPaginationAllOf.md +0 -17
  235. data/docs/GroupWithPrincipalsAllOf.md +0 -17
  236. data/docs/GroupWithPrincipalsAndRolesAllOf.md +0 -19
  237. data/docs/InlineResponse200.md +0 -17
  238. data/docs/PolicyExtendedAllOf.md +0 -19
  239. data/docs/PolicyInAllOf.md +0 -19
  240. data/docs/PolicyPaginationAllOf.md +0 -17
  241. data/docs/PrincipalPaginationAllOf.md +0 -17
  242. data/docs/RoleInAllOf.md +0 -17
  243. data/docs/RoleOutDynamicAllOf.md +0 -29
  244. data/docs/RolePaginationDynamicAllOf.md +0 -17
  245. data/lib/insights-rbac-api-client/models/role_in_all_of.rb +0 -213
  246. data/lib/insights-rbac-api-client/models/role_out_dynamic_all_of.rb +0 -346
  247. data/lib/insights-rbac-api-client/models/role_pagination_dynamic_all_of.rb +0 -213
  248. data/spec/models/access_pagination_all_of_spec.rb +0 -41
  249. data/spec/models/group_pagination_all_of_spec.rb +0 -41
  250. data/spec/models/group_with_principals_all_of_spec.rb +0 -41
  251. data/spec/models/group_with_principals_and_roles_all_of_spec.rb +0 -47
  252. data/spec/models/inline_response200_spec.rb +0 -41
  253. data/spec/models/policy_extended_all_of_spec.rb +0 -47
  254. data/spec/models/policy_in_all_of_spec.rb +0 -47
  255. data/spec/models/policy_pagination_all_of_spec.rb +0 -41
  256. data/spec/models/principal_pagination_all_of_spec.rb +0 -41
  257. data/spec/models/role_in_all_of_spec.rb +0 -41
  258. data/spec/models/role_out_dynamic_all_of_spec.rb +0 -77
  259. data/spec/models/role_pagination_dynamic_all_of_spec.rb +0 -41
data/docs/RoleApi.md CHANGED
@@ -1,28 +1,28 @@
1
1
  # RBACApiClient::RoleApi
2
2
 
3
- All URIs are relative to *http://localhost/api/rbac/v1*
3
+ All URIs are relative to */api/rbac/v1*
4
4
 
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**create_roles**](RoleApi.md#create_roles) | **POST** /roles/ | Create a roles for a tenant
8
- [**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{uuid}/ | Delete a role in the tenant
9
- [**get_role**](RoleApi.md#get_role) | **GET** /roles/{uuid}/ | Get a role in the tenant
10
- [**get_role_access**](RoleApi.md#get_role_access) | **GET** /roles/{uuid}/access/ | Get access for a role in the tenant
11
- [**list_roles**](RoleApi.md#list_roles) | **GET** /roles/ | List the roles for a tenant
12
- [**update_role**](RoleApi.md#update_role) | **PUT** /roles/{uuid}/ | Update a Role in the tenant
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_role**](RoleApi.md#create_role) | **POST** /roles/ | Create a role for a tenant |
8
+ | [**delete_role**](RoleApi.md#delete_role) | **DELETE** /roles/{uuid}/ | Delete a role in the tenant |
9
+ | [**get_role**](RoleApi.md#get_role) | **GET** /roles/{uuid}/ | Get a role in the tenant |
10
+ | [**get_role_access**](RoleApi.md#get_role_access) | **GET** /roles/{uuid}/access/ | Get access for a role in the tenant |
11
+ | [**list_roles**](RoleApi.md#list_roles) | **GET** /roles/ | List the roles for a tenant |
12
+ | [**patch_role**](RoleApi.md#patch_role) | **PATCH** /roles/{uuid}/ | Patch a role in the tenant |
13
+ | [**update_role**](RoleApi.md#update_role) | **PUT** /roles/{uuid}/ | Update a role in the tenant |
13
14
 
14
15
 
16
+ ## create_role
15
17
 
16
- ## create_roles
18
+ > <RoleWithAccess> create_role(role_in)
17
19
 
18
- > RoleWithAccess create_roles(role_in)
20
+ Create a role for a tenant
19
21
 
20
- Create a roles for a tenant
21
-
22
- ### Example
22
+ ### Examples
23
23
 
24
24
  ```ruby
25
- # load the gem
25
+ require 'time'
26
26
  require 'insights-rbac-api-client'
27
27
  # setup authorization
28
28
  RBACApiClient.configure do |config|
@@ -32,23 +32,40 @@ RBACApiClient.configure do |config|
32
32
  end
33
33
 
34
34
  api_instance = RBACApiClient::RoleApi.new
35
- role_in = RBACApiClient::RoleIn.new # RoleIn | Role to create
35
+ role_in = RBACApiClient::RoleIn.new({name: 'RoleA', access: [RBACApiClient::Access.new({permission: 'cost-management:*:read', resource_definitions: [RBACApiClient::ResourceDefinition.new({attribute_filter: RBACApiClient::ResourceDefinitionFilter.new({key: 'cost-management.aws.account', operation: 'equal', value: nil})})]})]}) # RoleIn | Role to create
36
36
 
37
37
  begin
38
- #Create a roles for a tenant
39
- result = api_instance.create_roles(role_in)
38
+ # Create a role for a tenant
39
+ result = api_instance.create_role(role_in)
40
40
  p result
41
41
  rescue RBACApiClient::ApiError => e
42
- puts "Exception when calling RoleApi->create_roles: #{e}"
42
+ puts "Error when calling RoleApi->create_role: #{e}"
43
43
  end
44
44
  ```
45
45
 
46
- ### Parameters
46
+ #### Using the create_role_with_http_info variant
47
+
48
+ This returns an Array which contains the response data, status code and headers.
49
+
50
+ > <Array(<RoleWithAccess>, Integer, Hash)> create_role_with_http_info(role_in)
51
+
52
+ ```ruby
53
+ begin
54
+ # Create a role for a tenant
55
+ data, status_code, headers = api_instance.create_role_with_http_info(role_in)
56
+ p status_code # => 2xx
57
+ p headers # => { ... }
58
+ p data # => <RoleWithAccess>
59
+ rescue RBACApiClient::ApiError => e
60
+ puts "Error when calling RoleApi->create_role_with_http_info: #{e}"
61
+ end
62
+ ```
47
63
 
64
+ ### Parameters
48
65
 
49
- Name | Type | Description | Notes
50
- ------------- | ------------- | ------------- | -------------
51
- **role_in** | [**RoleIn**](RoleIn.md)| Role to create |
66
+ | Name | Type | Description | Notes |
67
+ | ---- | ---- | ----------- | ----- |
68
+ | **role_in** | [**RoleIn**](RoleIn.md) | Role to create | |
52
69
 
53
70
  ### Return type
54
71
 
@@ -70,10 +87,10 @@ Name | Type | Description | Notes
70
87
 
71
88
  Delete a role in the tenant
72
89
 
73
- ### Example
90
+ ### Examples
74
91
 
75
92
  ```ruby
76
- # load the gem
93
+ require 'time'
77
94
  require 'insights-rbac-api-client'
78
95
  # setup authorization
79
96
  RBACApiClient.configure do |config|
@@ -83,22 +100,39 @@ RBACApiClient.configure do |config|
83
100
  end
84
101
 
85
102
  api_instance = RBACApiClient::RoleApi.new
86
- uuid = 'uuid_example' # String | ID of role to delete
103
+ uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | ID of role to delete
87
104
 
88
105
  begin
89
- #Delete a role in the tenant
106
+ # Delete a role in the tenant
90
107
  api_instance.delete_role(uuid)
91
108
  rescue RBACApiClient::ApiError => e
92
- puts "Exception when calling RoleApi->delete_role: #{e}"
109
+ puts "Error when calling RoleApi->delete_role: #{e}"
93
110
  end
94
111
  ```
95
112
 
96
- ### Parameters
113
+ #### Using the delete_role_with_http_info variant
114
+
115
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
116
+
117
+ > <Array(nil, Integer, Hash)> delete_role_with_http_info(uuid)
97
118
 
119
+ ```ruby
120
+ begin
121
+ # Delete a role in the tenant
122
+ data, status_code, headers = api_instance.delete_role_with_http_info(uuid)
123
+ p status_code # => 2xx
124
+ p headers # => { ... }
125
+ p data # => nil
126
+ rescue RBACApiClient::ApiError => e
127
+ puts "Error when calling RoleApi->delete_role_with_http_info: #{e}"
128
+ end
129
+ ```
130
+
131
+ ### Parameters
98
132
 
99
- Name | Type | Description | Notes
100
- ------------- | ------------- | ------------- | -------------
101
- **uuid** | [**String**](.md)| ID of role to delete |
133
+ | Name | Type | Description | Notes |
134
+ | ---- | ---- | ----------- | ----- |
135
+ | **uuid** | **String** | ID of role to delete | |
102
136
 
103
137
  ### Return type
104
138
 
@@ -116,14 +150,14 @@ nil (empty response body)
116
150
 
117
151
  ## get_role
118
152
 
119
- > RoleWithAccess get_role(uuid)
153
+ > <RoleWithAccess> get_role(uuid, opts)
120
154
 
121
155
  Get a role in the tenant
122
156
 
123
- ### Example
157
+ ### Examples
124
158
 
125
159
  ```ruby
126
- # load the gem
160
+ require 'time'
127
161
  require 'insights-rbac-api-client'
128
162
  # setup authorization
129
163
  RBACApiClient.configure do |config|
@@ -133,23 +167,44 @@ RBACApiClient.configure do |config|
133
167
  end
134
168
 
135
169
  api_instance = RBACApiClient::RoleApi.new
136
- uuid = 'uuid_example' # String | ID of role to get
170
+ uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | ID of role to get
171
+ opts = {
172
+ scope: 'account' # String | Parameter for filtering resource by scope.
173
+ }
137
174
 
138
175
  begin
139
- #Get a role in the tenant
140
- result = api_instance.get_role(uuid)
176
+ # Get a role in the tenant
177
+ result = api_instance.get_role(uuid, opts)
141
178
  p result
142
179
  rescue RBACApiClient::ApiError => e
143
- puts "Exception when calling RoleApi->get_role: #{e}"
180
+ puts "Error when calling RoleApi->get_role: #{e}"
144
181
  end
145
182
  ```
146
183
 
147
- ### Parameters
184
+ #### Using the get_role_with_http_info variant
185
+
186
+ This returns an Array which contains the response data, status code and headers.
187
+
188
+ > <Array(<RoleWithAccess>, Integer, Hash)> get_role_with_http_info(uuid, opts)
189
+
190
+ ```ruby
191
+ begin
192
+ # Get a role in the tenant
193
+ data, status_code, headers = api_instance.get_role_with_http_info(uuid, opts)
194
+ p status_code # => 2xx
195
+ p headers # => { ... }
196
+ p data # => <RoleWithAccess>
197
+ rescue RBACApiClient::ApiError => e
198
+ puts "Error when calling RoleApi->get_role_with_http_info: #{e}"
199
+ end
200
+ ```
148
201
 
202
+ ### Parameters
149
203
 
150
- Name | Type | Description | Notes
151
- ------------- | ------------- | ------------- | -------------
152
- **uuid** | [**String**](.md)| ID of role to get |
204
+ | Name | Type | Description | Notes |
205
+ | ---- | ---- | ----------- | ----- |
206
+ | **uuid** | **String** | ID of role to get | |
207
+ | **scope** | **String** | Parameter for filtering resource by scope. | [optional][default to &#39;account&#39;] |
153
208
 
154
209
  ### Return type
155
210
 
@@ -167,14 +222,14 @@ Name | Type | Description | Notes
167
222
 
168
223
  ## get_role_access
169
224
 
170
- > AccessPagination get_role_access(uuid, opts)
225
+ > <AccessPagination> get_role_access(uuid, opts)
171
226
 
172
227
  Get access for a role in the tenant
173
228
 
174
- ### Example
229
+ ### Examples
175
230
 
176
231
  ```ruby
177
- # load the gem
232
+ require 'time'
178
233
  require 'insights-rbac-api-client'
179
234
  # setup authorization
180
235
  RBACApiClient.configure do |config|
@@ -184,29 +239,46 @@ RBACApiClient.configure do |config|
184
239
  end
185
240
 
186
241
  api_instance = RBACApiClient::RoleApi.new
187
- uuid = 'uuid_example' # String | ID of the role
242
+ uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | ID of the role
188
243
  opts = {
189
- limit: 10, # Integer | Parameter for selecting the amount of data returned.
190
- offset: 0 # Integer | Parameter for selecting the offset of data.
244
+ limit: 56, # Integer | Parameter for selecting the amount of data returned.
245
+ offset: 56 # Integer | Parameter for selecting the offset of data.
191
246
  }
192
247
 
193
248
  begin
194
- #Get access for a role in the tenant
249
+ # Get access for a role in the tenant
195
250
  result = api_instance.get_role_access(uuid, opts)
196
251
  p result
197
252
  rescue RBACApiClient::ApiError => e
198
- puts "Exception when calling RoleApi->get_role_access: #{e}"
253
+ puts "Error when calling RoleApi->get_role_access: #{e}"
199
254
  end
200
255
  ```
201
256
 
202
- ### Parameters
257
+ #### Using the get_role_access_with_http_info variant
258
+
259
+ This returns an Array which contains the response data, status code and headers.
260
+
261
+ > <Array(<AccessPagination>, Integer, Hash)> get_role_access_with_http_info(uuid, opts)
262
+
263
+ ```ruby
264
+ begin
265
+ # Get access for a role in the tenant
266
+ data, status_code, headers = api_instance.get_role_access_with_http_info(uuid, opts)
267
+ p status_code # => 2xx
268
+ p headers # => { ... }
269
+ p data # => <AccessPagination>
270
+ rescue RBACApiClient::ApiError => e
271
+ puts "Error when calling RoleApi->get_role_access_with_http_info: #{e}"
272
+ end
273
+ ```
203
274
 
275
+ ### Parameters
204
276
 
205
- Name | Type | Description | Notes
206
- ------------- | ------------- | ------------- | -------------
207
- **uuid** | [**String**](.md)| ID of the role |
208
- **limit** | **Integer**| Parameter for selecting the amount of data returned. | [optional] [default to 10]
209
- **offset** | **Integer**| Parameter for selecting the offset of data. | [optional] [default to 0]
277
+ | Name | Type | Description | Notes |
278
+ | ---- | ---- | ----------- | ----- |
279
+ | **uuid** | **String** | ID of the role | |
280
+ | **limit** | **Integer** | Parameter for selecting the amount of data returned. | [optional][default to 10] |
281
+ | **offset** | **Integer** | Parameter for selecting the offset of data. | [optional][default to 0] |
210
282
 
211
283
  ### Return type
212
284
 
@@ -224,16 +296,16 @@ Name | Type | Description | Notes
224
296
 
225
297
  ## list_roles
226
298
 
227
- > RolePaginationDynamic list_roles(opts)
299
+ > <RolePaginationDynamic> list_roles(opts)
228
300
 
229
301
  List the roles for a tenant
230
302
 
231
303
  By default, responses are sorted in ascending order by role name
232
304
 
233
- ### Example
305
+ ### Examples
234
306
 
235
307
  ```ruby
236
- # load the gem
308
+ require 'time'
237
309
  require 'insights-rbac-api-client'
238
310
  # setup authorization
239
311
  RBACApiClient.configure do |config|
@@ -244,36 +316,65 @@ end
244
316
 
245
317
  api_instance = RBACApiClient::RoleApi.new
246
318
  opts = {
247
- limit: 10, # Integer | Parameter for selecting the amount of data returned.
248
- offset: 0, # Integer | Parameter for selecting the offset of data.
319
+ limit: 56, # Integer | Parameter for selecting the amount of data returned.
320
+ offset: 56, # Integer | Parameter for selecting the offset of data.
249
321
  name: 'name_example', # String | Parameter for filtering resource by name using string contains search.
322
+ system: true, # Boolean | Parameter for filtering resource by system flag.
323
+ display_name: 'display_name_example', # String | Parameter for filtering resource by display_name using string contains search.
324
+ name_match: 'partial', # String | Parameter for specifying the matching criteria for an object's name or display_name.
250
325
  scope: 'account', # String | Parameter for filtering resource by scope.
251
- order_by: 'order_by_example', # String | Parameter for ordering resource by value. For inverse ordering, supply '-' before the param value, such as: ?order_by=-name
252
- add_fields: ['add_fields_example'], # Array<String> | Parameter for add list of fields to display for roles.
253
- username: 'username_example' # String | Unique username of the principal to obtain roles for (only available for admins, and if supplied, takes precedence over the identity header).
326
+ order_by: 'name', # String | Parameter for ordering roles by value. For inverse ordering, supply '-' before the param value, such as: ?order_by=-name
327
+ add_fields: ['groups_in'], # Array<String> | Parameter for add list of fields to display for roles.
328
+ username: 'username_example', # String | Unique username of the principal to obtain roles for (only available for admins, and if supplied, takes precedence over the identity header).
329
+ application: 'application_example', # String | The application name(s) to filter roles by, from permissions or external tenant name. This is an exact match. You may also use a comma-separated list to match on multiple applications.
330
+ permission: 'permission_example', # String | The permission(s) to filter roles by. This is an exact match. You may also use a comma-separated list to match on multiple permissions.
331
+ external_tenant: 'external_tenant_example' # String | Parameter for filtering roles by external tenant name using string search.
254
332
  }
255
333
 
256
334
  begin
257
- #List the roles for a tenant
335
+ # List the roles for a tenant
258
336
  result = api_instance.list_roles(opts)
259
337
  p result
260
338
  rescue RBACApiClient::ApiError => e
261
- puts "Exception when calling RoleApi->list_roles: #{e}"
339
+ puts "Error when calling RoleApi->list_roles: #{e}"
262
340
  end
263
341
  ```
264
342
 
265
- ### Parameters
343
+ #### Using the list_roles_with_http_info variant
344
+
345
+ This returns an Array which contains the response data, status code and headers.
346
+
347
+ > <Array(<RolePaginationDynamic>, Integer, Hash)> list_roles_with_http_info(opts)
348
+
349
+ ```ruby
350
+ begin
351
+ # List the roles for a tenant
352
+ data, status_code, headers = api_instance.list_roles_with_http_info(opts)
353
+ p status_code # => 2xx
354
+ p headers # => { ... }
355
+ p data # => <RolePaginationDynamic>
356
+ rescue RBACApiClient::ApiError => e
357
+ puts "Error when calling RoleApi->list_roles_with_http_info: #{e}"
358
+ end
359
+ ```
266
360
 
361
+ ### Parameters
267
362
 
268
- Name | Type | Description | Notes
269
- ------------- | ------------- | ------------- | -------------
270
- **limit** | **Integer**| Parameter for selecting the amount of data returned. | [optional] [default to 10]
271
- **offset** | **Integer**| Parameter for selecting the offset of data. | [optional] [default to 0]
272
- **name** | **String**| Parameter for filtering resource by name using string contains search. | [optional]
273
- **scope** | **String**| Parameter for filtering resource by scope. | [optional] [default to &#39;account&#39;]
274
- **order_by** | **String**| Parameter for ordering resource by value. For inverse ordering, supply &#39;-&#39; before the param value, such as: ?order_by&#x3D;-name | [optional]
275
- **add_fields** | [**Array&lt;String&gt;**](String.md)| Parameter for add list of fields to display for roles. | [optional]
276
- **username** | **String**| Unique username of the principal to obtain roles for (only available for admins, and if supplied, takes precedence over the identity header). | [optional]
363
+ | Name | Type | Description | Notes |
364
+ | ---- | ---- | ----------- | ----- |
365
+ | **limit** | **Integer** | Parameter for selecting the amount of data returned. | [optional][default to 10] |
366
+ | **offset** | **Integer** | Parameter for selecting the offset of data. | [optional][default to 0] |
367
+ | **name** | **String** | Parameter for filtering resource by name using string contains search. | [optional] |
368
+ | **system** | **Boolean** | Parameter for filtering resource by system flag. | [optional] |
369
+ | **display_name** | **String** | Parameter for filtering resource by display_name using string contains search. | [optional] |
370
+ | **name_match** | **String** | Parameter for specifying the matching criteria for an object&#39;s name or display_name. | [optional] |
371
+ | **scope** | **String** | Parameter for filtering resource by scope. | [optional][default to &#39;account&#39;] |
372
+ | **order_by** | **String** | Parameter for ordering roles by value. For inverse ordering, supply &#39;-&#39; before the param value, such as: ?order_by&#x3D;-name | [optional] |
373
+ | **add_fields** | [**Array&lt;String&gt;**](String.md) | Parameter for add list of fields to display for roles. | [optional] |
374
+ | **username** | **String** | Unique username of the principal to obtain roles for (only available for admins, and if supplied, takes precedence over the identity header). | [optional] |
375
+ | **application** | **String** | The application name(s) to filter roles by, from permissions or external tenant name. This is an exact match. You may also use a comma-separated list to match on multiple applications. | [optional] |
376
+ | **permission** | **String** | The permission(s) to filter roles by. This is an exact match. You may also use a comma-separated list to match on multiple permissions. | [optional] |
377
+ | **external_tenant** | **String** | Parameter for filtering roles by external tenant name using string search. | [optional] |
277
378
 
278
379
  ### Return type
279
380
 
@@ -289,16 +390,88 @@ Name | Type | Description | Notes
289
390
  - **Accept**: application/json
290
391
 
291
392
 
393
+ ## patch_role
394
+
395
+ > <RoleWithAccess> patch_role(uuid, opts)
396
+
397
+ Patch a role in the tenant
398
+
399
+ ### Examples
400
+
401
+ ```ruby
402
+ require 'time'
403
+ require 'insights-rbac-api-client'
404
+ # setup authorization
405
+ RBACApiClient.configure do |config|
406
+ # Configure HTTP basic authorization: basic_auth
407
+ config.username = 'YOUR USERNAME'
408
+ config.password = 'YOUR PASSWORD'
409
+ end
410
+
411
+ api_instance = RBACApiClient::RoleApi.new
412
+ uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | ID of role to update
413
+ opts = {
414
+ role_patch: RBACApiClient::RolePatch.new # RolePatch | Patch to a role
415
+ }
416
+
417
+ begin
418
+ # Patch a role in the tenant
419
+ result = api_instance.patch_role(uuid, opts)
420
+ p result
421
+ rescue RBACApiClient::ApiError => e
422
+ puts "Error when calling RoleApi->patch_role: #{e}"
423
+ end
424
+ ```
425
+
426
+ #### Using the patch_role_with_http_info variant
427
+
428
+ This returns an Array which contains the response data, status code and headers.
429
+
430
+ > <Array(<RoleWithAccess>, Integer, Hash)> patch_role_with_http_info(uuid, opts)
431
+
432
+ ```ruby
433
+ begin
434
+ # Patch a role in the tenant
435
+ data, status_code, headers = api_instance.patch_role_with_http_info(uuid, opts)
436
+ p status_code # => 2xx
437
+ p headers # => { ... }
438
+ p data # => <RoleWithAccess>
439
+ rescue RBACApiClient::ApiError => e
440
+ puts "Error when calling RoleApi->patch_role_with_http_info: #{e}"
441
+ end
442
+ ```
443
+
444
+ ### Parameters
445
+
446
+ | Name | Type | Description | Notes |
447
+ | ---- | ---- | ----------- | ----- |
448
+ | **uuid** | **String** | ID of role to update | |
449
+ | **role_patch** | [**RolePatch**](RolePatch.md) | Patch to a role | [optional] |
450
+
451
+ ### Return type
452
+
453
+ [**RoleWithAccess**](RoleWithAccess.md)
454
+
455
+ ### Authorization
456
+
457
+ [basic_auth](../README.md#basic_auth)
458
+
459
+ ### HTTP request headers
460
+
461
+ - **Content-Type**: application/json
462
+ - **Accept**: application/json
463
+
464
+
292
465
  ## update_role
293
466
 
294
467
  > update_role(uuid, role_with_access)
295
468
 
296
- Update a Role in the tenant
469
+ Update a role in the tenant
297
470
 
298
- ### Example
471
+ ### Examples
299
472
 
300
473
  ```ruby
301
- # load the gem
474
+ require 'time'
302
475
  require 'insights-rbac-api-client'
303
476
  # setup authorization
304
477
  RBACApiClient.configure do |config|
@@ -308,24 +481,41 @@ RBACApiClient.configure do |config|
308
481
  end
309
482
 
310
483
  api_instance = RBACApiClient::RoleApi.new
311
- uuid = 'uuid_example' # String | ID of role to update
312
- role_with_access = RBACApiClient::RoleWithAccess.new # RoleWithAccess | Update to a Role
484
+ uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | ID of role to update
485
+ role_with_access = RBACApiClient::RoleWithAccess.new({name: 'RoleA', uuid: '57e60f90-8c0c-4bd1-87a0-2143759aae1c', created: Time.parse('2019-01-21T17:32:28Z'), modified: Time.parse('2019-03-04T07:25:58Z'), access: [RBACApiClient::Access.new({permission: 'cost-management:*:read', resource_definitions: [RBACApiClient::ResourceDefinition.new({attribute_filter: RBACApiClient::ResourceDefinitionFilter.new({key: 'cost-management.aws.account', operation: 'equal', value: nil})})]})]}) # RoleWithAccess | Update to a role
313
486
 
314
487
  begin
315
- #Update a Role in the tenant
488
+ # Update a role in the tenant
316
489
  api_instance.update_role(uuid, role_with_access)
317
490
  rescue RBACApiClient::ApiError => e
318
- puts "Exception when calling RoleApi->update_role: #{e}"
491
+ puts "Error when calling RoleApi->update_role: #{e}"
319
492
  end
320
493
  ```
321
494
 
322
- ### Parameters
495
+ #### Using the update_role_with_http_info variant
496
+
497
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
498
+
499
+ > <Array(nil, Integer, Hash)> update_role_with_http_info(uuid, role_with_access)
323
500
 
501
+ ```ruby
502
+ begin
503
+ # Update a role in the tenant
504
+ data, status_code, headers = api_instance.update_role_with_http_info(uuid, role_with_access)
505
+ p status_code # => 2xx
506
+ p headers # => { ... }
507
+ p data # => nil
508
+ rescue RBACApiClient::ApiError => e
509
+ puts "Error when calling RoleApi->update_role_with_http_info: #{e}"
510
+ end
511
+ ```
512
+
513
+ ### Parameters
324
514
 
325
- Name | Type | Description | Notes
326
- ------------- | ------------- | ------------- | -------------
327
- **uuid** | [**String**](.md)| ID of role to update |
328
- **role_with_access** | [**RoleWithAccess**](RoleWithAccess.md)| Update to a Role |
515
+ | Name | Type | Description | Notes |
516
+ | ---- | ---- | ----------- | ----- |
517
+ | **uuid** | **String** | ID of role to update | |
518
+ | **role_with_access** | [**RoleWithAccess**](RoleWithAccess.md) | Update to a role | |
329
519
 
330
520
  ### Return type
331
521
 
data/docs/RoleIn.md CHANGED
@@ -2,20 +2,23 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | |
8
- **description** | **String** | | [optional]
9
- **access** | [**Array&lt;Access&gt;**](Access.md) | |
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | |
8
+ | **display_name** | **String** | | [optional] |
9
+ | **description** | **String** | | [optional] |
10
+ | **access** | [**Array&lt;Access&gt;**](Access.md) | | |
10
11
 
11
- ## Code Sample
12
+ ## Example
12
13
 
13
14
  ```ruby
14
- require 'RBACApiClient'
15
+ require 'insights-rbac-api-client'
15
16
 
16
- instance = RBACApiClient::RoleIn.new(name: RoleA,
17
- description: A description of RoleA,
18
- access: null)
17
+ instance = RBACApiClient::RoleIn.new(
18
+ name: RoleA,
19
+ display_name: ARoleName,
20
+ description: A description of RoleA,
21
+ access: null
22
+ )
19
23
  ```
20
24
 
21
-
data/docs/RoleOut.md CHANGED
@@ -2,34 +2,43 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **name** | **String** | |
8
- **description** | **String** | | [optional]
9
- **uuid** | **String** | |
10
- **created** | **DateTime** | |
11
- **modified** | **DateTime** | |
12
- **policy_count** | **Integer** | | [optional]
13
- **access_count** | **Integer** | | [optional]
14
- **applications** | **Array&lt;String&gt;** | | [optional]
15
- **system** | **Boolean** | | [optional] [default to false]
16
- **platform_default** | **Boolean** | | [optional] [default to false]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | | |
8
+ | **display_name** | **String** | | [optional] |
9
+ | **description** | **String** | | [optional] |
10
+ | **uuid** | **String** | | |
11
+ | **created** | **Time** | | |
12
+ | **modified** | **Time** | | |
13
+ | **policy_count** | **Integer** | | [optional] |
14
+ | **access_count** | **Integer** | | [optional] |
15
+ | **applications** | **Array&lt;String&gt;** | | [optional] |
16
+ | **system** | **Boolean** | | [optional][default to false] |
17
+ | **platform_default** | **Boolean** | | [optional][default to false] |
18
+ | **admin_default** | **Boolean** | | [optional][default to false] |
19
+ | **external_role_id** | **String** | | [optional] |
20
+ | **external_tenant** | **String** | | [optional] |
17
21
 
18
- ## Code Sample
22
+ ## Example
19
23
 
20
24
  ```ruby
21
- require 'RBACApiClient'
25
+ require 'insights-rbac-api-client'
22
26
 
23
- instance = RBACApiClient::RoleOut.new(name: RoleA,
24
- description: A description of RoleA,
25
- uuid: 57e60f90-8c0c-4bd1-87a0-2143759aae1c,
26
- created: 2019-01-21T17:32:28Z,
27
- modified: 2019-03-04T07:25:58Z,
28
- policy_count: null,
29
- access_count: null,
30
- applications: null,
31
- system: null,
32
- platform_default: null)
27
+ instance = RBACApiClient::RoleOut.new(
28
+ name: RoleA,
29
+ display_name: ARoleName,
30
+ description: A description of RoleA,
31
+ uuid: 57e60f90-8c0c-4bd1-87a0-2143759aae1c,
32
+ created: 2019-01-21T17:32:28Z,
33
+ modified: 2019-03-04T07:25:58Z,
34
+ policy_count: null,
35
+ access_count: null,
36
+ applications: null,
37
+ system: null,
38
+ platform_default: null,
39
+ admin_default: null,
40
+ external_role_id: ExternalRoleId,
41
+ external_tenant: ExternalTenant
42
+ )
33
43
  ```
34
44
 
35
-