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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +49 -22
- data/client-meta.json +1 -1
- data/docs/Access.md +10 -9
- data/docs/AccessApi.md +39 -19
- data/docs/AccessPagination.md +12 -11
- data/docs/AddRoleToGroup200Response.md +18 -0
- data/docs/AdditionalGroup.md +12 -11
- data/docs/CrossAccountRequest.md +30 -0
- data/docs/CrossAccountRequestApi.md +386 -0
- data/docs/CrossAccountRequestByAccount.md +36 -0
- data/docs/CrossAccountRequestByUserId.md +32 -0
- data/docs/CrossAccountRequestDetail.md +49 -0
- data/docs/CrossAccountRequestDetailByAccount.md +38 -0
- data/docs/CrossAccountRequestDetailByUseId.md +34 -0
- data/docs/CrossAccountRequestIn.md +26 -0
- data/docs/CrossAccountRequestOut.md +34 -0
- data/docs/CrossAccountRequestPagination.md +22 -0
- data/docs/CrossAccountRequestPaginationAllOfDataInner.md +49 -0
- data/docs/CrossAccountRequestPatch.md +24 -0
- data/docs/CrossAccountRequestUpdateIn.md +22 -0
- data/docs/CrossAccountRequestWithRoles.md +32 -0
- data/docs/CrossAccountRequestWithRolesRolesInner.md +22 -0
- data/docs/Error.md +8 -7
- data/docs/Error403.md +8 -7
- data/docs/Error403ErrorsInner.md +22 -0
- data/docs/ErrorErrorsInner.md +20 -0
- data/docs/ErrorNotFound.md +18 -0
- data/docs/ErrorNotFoundErrorsInner.md +22 -0
- data/docs/Group.md +10 -9
- data/docs/GroupApi.md +369 -163
- data/docs/GroupOut.md +26 -23
- data/docs/GroupPagination.md +12 -11
- data/docs/GroupPrincipalIn.md +8 -7
- data/docs/GroupRoleIn.md +8 -7
- data/docs/GroupRolesPagination.md +12 -11
- data/docs/GroupWithPrincipals.md +18 -17
- data/docs/GroupWithPrincipalsAndRoles.md +20 -19
- data/docs/ListPagination.md +10 -9
- data/docs/PaginationLinks.md +14 -13
- data/docs/PaginationMeta.md +8 -7
- data/docs/Permission.md +26 -0
- data/docs/PermissionApi.md +185 -0
- data/docs/PermissionOptionsPagination.md +22 -0
- data/docs/PermissionPagination.md +22 -0
- data/docs/Policy.md +10 -9
- data/docs/PolicyApi.md +153 -69
- data/docs/PolicyExtended.md +20 -19
- data/docs/PolicyIn.md +14 -13
- data/docs/PolicyPagination.md +12 -11
- data/docs/Principal.md +20 -15
- data/docs/PrincipalApi.md +49 -23
- data/docs/PrincipalExternalSourceId.md +49 -0
- data/docs/PrincipalIn.md +8 -7
- data/docs/PrincipalMinimal.md +18 -0
- data/docs/PrincipalOut.md +22 -17
- data/docs/PrincipalPagination.md +12 -11
- data/docs/PrincipalPaginationAllOfDataInner.md +49 -0
- data/docs/ResourceDefinition.md +8 -7
- data/docs/ResourceDefinitionFilter.md +12 -11
- data/docs/ResourceDefinitionFilterValue.md +49 -0
- data/docs/ResourceDefinitionFilterValueOneOfInner.md +47 -0
- data/docs/Role.md +12 -9
- data/docs/RoleApi.md +279 -89
- data/docs/RoleIn.md +14 -11
- data/docs/RoleOut.md +34 -25
- data/docs/RoleOutDynamic.md +40 -29
- data/docs/RolePagination.md +12 -11
- data/docs/RolePaginationDynamic.md +12 -11
- data/docs/RolePatch.md +22 -0
- data/docs/RoleWithAccess.md +36 -27
- data/docs/Status.md +10 -17
- data/docs/StatusApi.md +27 -10
- data/docs/Timestamped.md +10 -9
- data/docs/UUID.md +8 -7
- data/git_push.sh +3 -4
- data/insights-rbac-api-client.gemspec +3 -4
- data/lib/insights-rbac-api-client/api/access_api.rb +21 -6
- data/lib/insights-rbac-api-client/api/cross_account_request_api.rb +423 -0
- data/lib/insights-rbac-api-client/api/group_api.rb +120 -55
- data/lib/insights-rbac-api-client/api/permission_api.rb +243 -0
- data/lib/insights-rbac-api-client/api/policy_api.rb +38 -23
- data/lib/insights-rbac-api-client/api/principal_api.rb +44 -12
- data/lib/insights-rbac-api-client/api/role_api.rb +154 -41
- data/lib/insights-rbac-api-client/api/status_api.rb +5 -4
- data/lib/insights-rbac-api-client/api_client.rb +57 -51
- data/lib/insights-rbac-api-client/api_error.rb +2 -1
- data/lib/insights-rbac-api-client/configuration.rb +62 -13
- data/lib/insights-rbac-api-client/models/access.rb +34 -22
- data/lib/insights-rbac-api-client/models/access_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/{inline_response200.rb → add_role_to_group200_response.rb} +35 -25
- data/lib/insights-rbac-api-client/models/additional_group.rb +30 -22
- data/lib/insights-rbac-api-client/models/cross_account_request.rb +270 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_by_account.rb +304 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_by_user_id.rb +286 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_detail.rb +105 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_account.rb +316 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_detail_by_use_id.rb +296 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_in.rb +280 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_out.rb +295 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_pagination.rb +248 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_pagination_all_of_data_inner.rb +105 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_patch.rb +277 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_update_in.rb +255 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_with_roles.rb +279 -0
- data/lib/insights-rbac-api-client/models/cross_account_request_with_roles_roles_inner.rb +234 -0
- data/lib/insights-rbac-api-client/models/error.rb +33 -23
- data/lib/insights-rbac-api-client/models/error403.rb +33 -23
- data/lib/insights-rbac-api-client/models/{policy_extended_all_of.rb → error403_errors_inner.rb} +55 -50
- data/lib/insights-rbac-api-client/models/{group_with_principals_all_of.rb → error_errors_inner.rb} +49 -39
- data/lib/insights-rbac-api-client/models/{policy_in_all_of.rb → error_not_found.rb} +47 -50
- data/lib/insights-rbac-api-client/models/{principal_pagination_all_of.rb → error_not_found_errors_inner.rb} +61 -39
- data/lib/insights-rbac-api-client/models/group.rb +32 -22
- data/lib/insights-rbac-api-client/models/group_out.rb +65 -30
- data/lib/insights-rbac-api-client/models/group_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/group_principal_in.rb +32 -22
- data/lib/insights-rbac-api-client/models/group_role_in.rb +32 -22
- data/lib/insights-rbac-api-client/models/group_roles_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/group_with_principals.rb +42 -25
- data/lib/insights-rbac-api-client/models/group_with_principals_and_roles.rb +44 -25
- data/lib/insights-rbac-api-client/models/list_pagination.rb +30 -22
- data/lib/insights-rbac-api-client/models/pagination_links.rb +30 -22
- data/lib/insights-rbac-api-client/models/pagination_meta.rb +30 -22
- data/lib/insights-rbac-api-client/models/permission.rb +250 -0
- data/lib/insights-rbac-api-client/models/{policy_pagination_all_of.rb → permission_options_pagination.rb} +62 -27
- data/lib/insights-rbac-api-client/models/{group_pagination_all_of.rb → permission_pagination.rb} +62 -27
- data/lib/insights-rbac-api-client/models/policy.rb +32 -22
- data/lib/insights-rbac-api-client/models/policy_extended.rb +44 -25
- data/lib/insights-rbac-api-client/models/policy_in.rb +37 -24
- data/lib/insights-rbac-api-client/models/policy_pagination.rb +33 -24
- data/lib/insights-rbac-api-client/models/principal.rb +56 -26
- data/lib/insights-rbac-api-client/models/principal_external_source_id.rb +105 -0
- data/lib/insights-rbac-api-client/models/principal_in.rb +32 -22
- data/lib/insights-rbac-api-client/models/{access_pagination_all_of.rb → principal_minimal.rb} +45 -37
- data/lib/insights-rbac-api-client/models/principal_out.rb +55 -23
- data/lib/insights-rbac-api-client/models/principal_pagination.rb +34 -25
- data/lib/insights-rbac-api-client/models/principal_pagination_all_of_data_inner.rb +105 -0
- data/lib/insights-rbac-api-client/models/resource_definition.rb +32 -22
- data/lib/insights-rbac-api-client/models/resource_definition_filter.rb +37 -23
- data/lib/insights-rbac-api-client/models/resource_definition_filter_value.rb +105 -0
- data/lib/insights-rbac-api-client/models/resource_definition_filter_value_one_of_inner.rb +104 -0
- data/lib/insights-rbac-api-client/models/role.rb +42 -23
- data/lib/insights-rbac-api-client/models/role_in.rb +45 -25
- data/lib/insights-rbac-api-client/models/role_out.rb +92 -30
- data/lib/insights-rbac-api-client/models/role_out_dynamic.rb +109 -30
- data/lib/insights-rbac-api-client/models/role_pagination.rb +32 -23
- data/lib/insights-rbac-api-client/models/role_pagination_dynamic.rb +33 -24
- data/lib/insights-rbac-api-client/models/{group_with_principals_and_roles_all_of.rb → role_patch.rb} +55 -52
- data/lib/insights-rbac-api-client/models/role_with_access.rb +91 -28
- data/lib/insights-rbac-api-client/models/status.rb +36 -62
- data/lib/insights-rbac-api-client/models/timestamped.rb +36 -24
- data/lib/insights-rbac-api-client/models/uuid.rb +32 -22
- data/lib/insights-rbac-api-client/version.rb +2 -2
- data/lib/insights-rbac-api-client.rb +31 -13
- data/openapi.json +1741 -162
- data/spec/api/access_api_spec.rb +4 -2
- data/spec/api/cross_account_request_api_spec.rb +105 -0
- data/spec/api/group_api_spec.rb +26 -16
- data/spec/api/permission_api_spec.rb +75 -0
- data/spec/api/policy_api_spec.rb +7 -7
- data/spec/api/principal_api_spec.rb +10 -5
- data/spec/api/role_api_spec.rb +32 -13
- data/spec/api/status_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +6 -4
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/access_pagination_spec.rb +9 -14
- data/spec/models/access_spec.rb +8 -13
- data/spec/models/add_role_to_group200_response_spec.rb +36 -0
- data/spec/models/additional_group_spec.rb +9 -14
- data/spec/models/cross_account_request_by_account_spec.rb +90 -0
- data/spec/models/cross_account_request_by_user_id_spec.rb +78 -0
- data/spec/models/cross_account_request_detail_by_account_spec.rb +96 -0
- data/spec/models/cross_account_request_detail_by_use_id_spec.rb +84 -0
- data/spec/models/cross_account_request_detail_spec.rb +32 -0
- data/spec/models/cross_account_request_in_spec.rb +60 -0
- data/spec/models/cross_account_request_out_spec.rb +84 -0
- data/spec/models/cross_account_request_pagination_all_of_data_inner_spec.rb +32 -0
- data/spec/models/cross_account_request_pagination_spec.rb +48 -0
- data/spec/models/cross_account_request_patch_spec.rb +58 -0
- data/spec/models/cross_account_request_spec.rb +72 -0
- data/spec/models/cross_account_request_update_in_spec.rb +48 -0
- data/spec/models/cross_account_request_with_roles_roles_inner_spec.rb +48 -0
- data/spec/models/cross_account_request_with_roles_spec.rb +78 -0
- data/spec/models/error403_errors_inner_spec.rb +48 -0
- data/spec/models/error403_spec.rb +7 -12
- data/spec/models/error_errors_inner_spec.rb +42 -0
- data/spec/models/error_not_found_errors_inner_spec.rb +48 -0
- data/spec/models/error_not_found_spec.rb +36 -0
- data/spec/models/error_spec.rb +7 -12
- data/spec/models/group_out_spec.rb +21 -20
- data/spec/models/group_pagination_spec.rb +9 -14
- data/spec/models/group_principal_in_spec.rb +7 -12
- data/spec/models/group_role_in_spec.rb +7 -12
- data/spec/models/group_roles_pagination_spec.rb +9 -14
- data/spec/models/group_spec.rb +8 -13
- data/spec/models/group_with_principals_and_roles_spec.rb +13 -18
- data/spec/models/group_with_principals_spec.rb +12 -17
- data/spec/models/list_pagination_spec.rb +8 -13
- data/spec/models/pagination_links_spec.rb +10 -15
- data/spec/models/pagination_meta_spec.rb +7 -12
- data/spec/models/permission_options_pagination_spec.rb +48 -0
- data/spec/models/permission_pagination_spec.rb +48 -0
- data/spec/models/permission_spec.rb +60 -0
- data/spec/models/policy_extended_spec.rb +13 -18
- data/spec/models/policy_in_spec.rb +10 -15
- data/spec/models/policy_pagination_spec.rb +9 -14
- data/spec/models/policy_spec.rb +8 -13
- data/spec/models/principal_external_source_id_spec.rb +32 -0
- data/spec/models/principal_in_spec.rb +7 -12
- data/spec/models/principal_minimal_spec.rb +36 -0
- data/spec/models/principal_out_spec.rb +24 -17
- data/spec/models/principal_pagination_all_of_data_inner_spec.rb +32 -0
- data/spec/models/principal_pagination_spec.rb +9 -14
- data/spec/models/principal_spec.rb +23 -16
- data/spec/models/resource_definition_filter_spec.rb +10 -15
- data/spec/models/resource_definition_filter_value_one_of_inner_spec.rb +32 -0
- data/spec/models/resource_definition_filter_value_spec.rb +32 -0
- data/spec/models/resource_definition_spec.rb +7 -12
- data/spec/models/role_in_spec.rb +15 -14
- data/spec/models/role_out_dynamic_spec.rb +48 -23
- data/spec/models/role_out_spec.rb +40 -21
- data/spec/models/role_pagination_dynamic_spec.rb +9 -14
- data/spec/models/role_pagination_spec.rb +9 -14
- data/spec/models/role_patch_spec.rb +48 -0
- data/spec/models/role_spec.rb +14 -13
- data/spec/models/role_with_access_spec.rb +41 -22
- data/spec/models/status_spec.rb +8 -37
- data/spec/models/timestamped_spec.rb +8 -13
- data/spec/models/uuid_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +161 -109
- data/docs/AccessPaginationAllOf.md +0 -17
- data/docs/GroupPaginationAllOf.md +0 -17
- data/docs/GroupWithPrincipalsAllOf.md +0 -17
- data/docs/GroupWithPrincipalsAndRolesAllOf.md +0 -19
- data/docs/InlineResponse200.md +0 -17
- data/docs/PolicyExtendedAllOf.md +0 -19
- data/docs/PolicyInAllOf.md +0 -19
- data/docs/PolicyPaginationAllOf.md +0 -17
- data/docs/PrincipalPaginationAllOf.md +0 -17
- data/docs/RoleInAllOf.md +0 -17
- data/docs/RoleOutDynamicAllOf.md +0 -29
- data/docs/RolePaginationDynamicAllOf.md +0 -17
- data/lib/insights-rbac-api-client/models/role_in_all_of.rb +0 -213
- data/lib/insights-rbac-api-client/models/role_out_dynamic_all_of.rb +0 -346
- data/lib/insights-rbac-api-client/models/role_pagination_dynamic_all_of.rb +0 -213
- data/spec/models/access_pagination_all_of_spec.rb +0 -41
- data/spec/models/group_pagination_all_of_spec.rb +0 -41
- data/spec/models/group_with_principals_all_of_spec.rb +0 -41
- data/spec/models/group_with_principals_and_roles_all_of_spec.rb +0 -47
- data/spec/models/inline_response200_spec.rb +0 -41
- data/spec/models/policy_extended_all_of_spec.rb +0 -47
- data/spec/models/policy_in_all_of_spec.rb +0 -47
- data/spec/models/policy_pagination_all_of_spec.rb +0 -41
- data/spec/models/principal_pagination_all_of_spec.rb +0 -41
- data/spec/models/role_in_all_of_spec.rb +0 -41
- data/spec/models/role_out_dynamic_all_of_spec.rb +0 -77
- 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
|
3
|
+
All URIs are relative to */api/rbac/v1*
|
4
4
|
|
5
|
-
Method | HTTP request | Description
|
6
|
-
|
7
|
-
[**
|
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
|
-
[**
|
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
|
-
|
18
|
+
> <RoleWithAccess> create_role(role_in)
|
17
19
|
|
18
|
-
|
20
|
+
Create a role for a tenant
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
### Example
|
22
|
+
### Examples
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
|
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
|
39
|
-
result = api_instance.
|
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 "
|
42
|
+
puts "Error when calling RoleApi->create_role: #{e}"
|
43
43
|
end
|
44
44
|
```
|
45
45
|
|
46
|
-
|
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
|
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
|
-
###
|
90
|
+
### Examples
|
74
91
|
|
75
92
|
```ruby
|
76
|
-
|
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 = '
|
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 "
|
109
|
+
puts "Error when calling RoleApi->delete_role: #{e}"
|
93
110
|
end
|
94
111
|
```
|
95
112
|
|
96
|
-
|
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
|
100
|
-
|
101
|
-
**uuid** |
|
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
|
-
###
|
157
|
+
### Examples
|
124
158
|
|
125
159
|
```ruby
|
126
|
-
|
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 = '
|
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 "
|
180
|
+
puts "Error when calling RoleApi->get_role: #{e}"
|
144
181
|
end
|
145
182
|
```
|
146
183
|
|
147
|
-
|
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
|
151
|
-
|
152
|
-
**uuid** |
|
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 'account'] |
|
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
|
-
###
|
229
|
+
### Examples
|
175
230
|
|
176
231
|
```ruby
|
177
|
-
|
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 = '
|
242
|
+
uuid = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | ID of the role
|
188
243
|
opts = {
|
189
|
-
limit:
|
190
|
-
offset:
|
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 "
|
253
|
+
puts "Error when calling RoleApi->get_role_access: #{e}"
|
199
254
|
end
|
200
255
|
```
|
201
256
|
|
202
|
-
|
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
|
206
|
-
|
207
|
-
**uuid** |
|
208
|
-
**limit** | **Integer
|
209
|
-
**offset** | **Integer
|
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
|
-
###
|
305
|
+
### Examples
|
234
306
|
|
235
307
|
```ruby
|
236
|
-
|
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:
|
248
|
-
offset:
|
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: '
|
252
|
-
add_fields: ['
|
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 "
|
339
|
+
puts "Error when calling RoleApi->list_roles: #{e}"
|
262
340
|
end
|
263
341
|
```
|
264
342
|
|
265
|
-
|
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
|
269
|
-
|
270
|
-
**limit** | **Integer
|
271
|
-
**offset** | **Integer
|
272
|
-
**name** | **String
|
273
|
-
**
|
274
|
-
**
|
275
|
-
**
|
276
|
-
**
|
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's name or display_name. | [optional] |
|
371
|
+
| **scope** | **String** | Parameter for filtering resource by scope. | [optional][default to 'account'] |
|
372
|
+
| **order_by** | **String** | Parameter for ordering roles by value. For inverse ordering, supply '-' before the param value, such as: ?order_by=-name | [optional] |
|
373
|
+
| **add_fields** | [**Array<String>**](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
|
469
|
+
Update a role in the tenant
|
297
470
|
|
298
|
-
###
|
471
|
+
### Examples
|
299
472
|
|
300
473
|
```ruby
|
301
|
-
|
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 = '
|
312
|
-
role_with_access = RBACApiClient::RoleWithAccess.new # RoleWithAccess | Update to a
|
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
|
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 "
|
491
|
+
puts "Error when calling RoleApi->update_role: #{e}"
|
319
492
|
end
|
320
493
|
```
|
321
494
|
|
322
|
-
|
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
|
326
|
-
|
327
|
-
**uuid** |
|
328
|
-
**role_with_access** | [**RoleWithAccess**](RoleWithAccess.md)| Update to a
|
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
|
-
**
|
9
|
-
**
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | |
|
8
|
+
| **display_name** | **String** | | [optional] |
|
9
|
+
| **description** | **String** | | [optional] |
|
10
|
+
| **access** | [**Array<Access>**](Access.md) | | |
|
10
11
|
|
11
|
-
##
|
12
|
+
## Example
|
12
13
|
|
13
14
|
```ruby
|
14
|
-
require '
|
15
|
+
require 'insights-rbac-api-client'
|
15
16
|
|
16
|
-
instance = RBACApiClient::RoleIn.new(
|
17
|
-
|
18
|
-
|
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
|
-
**
|
9
|
-
**
|
10
|
-
**
|
11
|
-
**
|
12
|
-
**
|
13
|
-
**
|
14
|
-
**
|
15
|
-
**
|
16
|
-
**
|
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<String>** | | [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
|
-
##
|
22
|
+
## Example
|
19
23
|
|
20
24
|
```ruby
|
21
|
-
require '
|
25
|
+
require 'insights-rbac-api-client'
|
22
26
|
|
23
|
-
instance = RBACApiClient::RoleOut.new(
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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
|
-
|