rbac-api-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +175 -0
- data/Rakefile +10 -0
- data/client-meta.json +8 -0
- data/docs/Access.md +19 -0
- data/docs/AccessApi.md +68 -0
- data/docs/AccessPagination.md +21 -0
- data/docs/AccessPaginationAllOf.md +17 -0
- data/docs/AdditionalGroup.md +19 -0
- data/docs/Error.md +17 -0
- data/docs/Error403.md +17 -0
- data/docs/Group.md +19 -0
- data/docs/GroupApi.md +623 -0
- data/docs/GroupOut.md +33 -0
- data/docs/GroupPagination.md +21 -0
- data/docs/GroupPaginationAllOf.md +17 -0
- data/docs/GroupPrincipalIn.md +17 -0
- data/docs/GroupRoleIn.md +17 -0
- data/docs/GroupRolesPagination.md +21 -0
- data/docs/GroupWithPrincipals.md +27 -0
- data/docs/GroupWithPrincipalsAllOf.md +17 -0
- data/docs/GroupWithPrincipalsAndRoles.md +29 -0
- data/docs/GroupWithPrincipalsAndRolesAllOf.md +19 -0
- data/docs/InlineResponse200.md +17 -0
- data/docs/ListPagination.md +19 -0
- data/docs/PaginationLinks.md +23 -0
- data/docs/PaginationMeta.md +17 -0
- data/docs/Policy.md +19 -0
- data/docs/PolicyApi.md +283 -0
- data/docs/PolicyExtended.md +29 -0
- data/docs/PolicyExtendedAllOf.md +19 -0
- data/docs/PolicyIn.md +23 -0
- data/docs/PolicyInAllOf.md +19 -0
- data/docs/PolicyPagination.md +21 -0
- data/docs/PolicyPaginationAllOf.md +17 -0
- data/docs/Principal.md +25 -0
- data/docs/PrincipalApi.md +68 -0
- data/docs/PrincipalIn.md +17 -0
- data/docs/PrincipalOut.md +27 -0
- data/docs/PrincipalPagination.md +21 -0
- data/docs/PrincipalPaginationAllOf.md +17 -0
- data/docs/ResourceDefinition.md +17 -0
- data/docs/ResourceDefinitionFilter.md +21 -0
- data/docs/Role.md +19 -0
- data/docs/RoleApi.md +340 -0
- data/docs/RoleIn.md +21 -0
- data/docs/RoleInAllOf.md +17 -0
- data/docs/RoleOut.md +35 -0
- data/docs/RoleOutDynamic.md +39 -0
- data/docs/RoleOutDynamicAllOf.md +29 -0
- data/docs/RolePagination.md +21 -0
- data/docs/RolePaginationDynamic.md +21 -0
- data/docs/RolePaginationDynamicAllOf.md +17 -0
- data/docs/RoleWithAccess.md +37 -0
- data/docs/Status.md +27 -0
- data/docs/StatusApi.md +56 -0
- data/docs/Timestamped.md +19 -0
- data/docs/UUID.md +17 -0
- data/generate.sh +7 -0
- data/git_push.sh +58 -0
- data/lib/rbac-api-client.rb +93 -0
- data/lib/rbac-api-client/api/access_api.rb +104 -0
- data/lib/rbac-api-client/api/group_api.rb +800 -0
- data/lib/rbac-api-client/api/policy_api.rb +363 -0
- data/lib/rbac-api-client/api/principal_api.rb +104 -0
- data/lib/rbac-api-client/api/role_api.rb +445 -0
- data/lib/rbac-api-client/api/status_api.rb +76 -0
- data/lib/rbac-api-client/api_client.rb +386 -0
- data/lib/rbac-api-client/api_error.rb +57 -0
- data/lib/rbac-api-client/configuration.rb +248 -0
- data/lib/rbac-api-client/models/access.rb +227 -0
- data/lib/rbac-api-client/models/access_pagination.rb +239 -0
- data/lib/rbac-api-client/models/access_pagination_all_of.rb +213 -0
- data/lib/rbac-api-client/models/additional_group.rb +215 -0
- data/lib/rbac-api-client/models/error.rb +213 -0
- data/lib/rbac-api-client/models/error403.rb +213 -0
- data/lib/rbac-api-client/models/group.rb +220 -0
- data/lib/rbac-api-client/models/group_out.rb +341 -0
- data/lib/rbac-api-client/models/group_pagination.rb +239 -0
- data/lib/rbac-api-client/models/group_pagination_all_of.rb +213 -0
- data/lib/rbac-api-client/models/group_principal_in.rb +213 -0
- data/lib/rbac-api-client/models/group_role_in.rb +213 -0
- data/lib/rbac-api-client/models/group_roles_pagination.rb +239 -0
- data/lib/rbac-api-client/models/group_with_principals.rb +288 -0
- data/lib/rbac-api-client/models/group_with_principals_all_of.rb +213 -0
- data/lib/rbac-api-client/models/group_with_principals_and_roles.rb +304 -0
- data/lib/rbac-api-client/models/group_with_principals_and_roles_all_of.rb +229 -0
- data/lib/rbac-api-client/models/inline_response200.rb +213 -0
- data/lib/rbac-api-client/models/list_pagination.rb +215 -0
- data/lib/rbac-api-client/models/pagination_links.rb +233 -0
- data/lib/rbac-api-client/models/pagination_meta.rb +206 -0
- data/lib/rbac-api-client/models/policy.rb +220 -0
- data/lib/rbac-api-client/models/policy_extended.rb +302 -0
- data/lib/rbac-api-client/models/policy_extended_all_of.rb +227 -0
- data/lib/rbac-api-client/models/policy_in.rb +258 -0
- data/lib/rbac-api-client/models/policy_in_all_of.rb +227 -0
- data/lib/rbac-api-client/models/policy_pagination.rb +239 -0
- data/lib/rbac-api-client/models/policy_pagination_all_of.rb +213 -0
- data/lib/rbac-api-client/models/principal.rb +252 -0
- data/lib/rbac-api-client/models/principal_in.rb +211 -0
- data/lib/rbac-api-client/models/principal_out.rb +274 -0
- data/lib/rbac-api-client/models/principal_pagination.rb +239 -0
- data/lib/rbac-api-client/models/principal_pagination_all_of.rb +213 -0
- data/lib/rbac-api-client/models/resource_definition.rb +211 -0
- data/lib/rbac-api-client/models/resource_definition_filter.rb +273 -0
- data/lib/rbac-api-client/models/role.rb +220 -0
- data/lib/rbac-api-client/models/role_in.rb +244 -0
- data/lib/rbac-api-client/models/role_in_all_of.rb +213 -0
- data/lib/rbac-api-client/models/role_out.rb +352 -0
- data/lib/rbac-api-client/models/role_out_dynamic.rb +421 -0
- data/lib/rbac-api-client/models/role_out_dynamic_all_of.rb +346 -0
- data/lib/rbac-api-client/models/role_pagination.rb +239 -0
- data/lib/rbac-api-client/models/role_pagination_dynamic.rb +239 -0
- data/lib/rbac-api-client/models/role_pagination_dynamic_all_of.rb +213 -0
- data/lib/rbac-api-client/models/role_with_access.rb +367 -0
- data/lib/rbac-api-client/models/status.rb +256 -0
- data/lib/rbac-api-client/models/timestamped.rb +225 -0
- data/lib/rbac-api-client/models/uuid.rb +211 -0
- data/lib/rbac-api-client/version.rb +15 -0
- data/openapi.json +2613 -0
- data/rbac-api-client.gemspec +39 -0
- data/spec/api/access_api_spec.rb +49 -0
- data/spec/api/group_api_spec.rb +176 -0
- data/spec/api/policy_api_spec.rb +97 -0
- data/spec/api/principal_api_spec.rb +49 -0
- data/spec/api/role_api_spec.rb +110 -0
- data/spec/api/status_api_spec.rb +45 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_pagination_all_of_spec.rb +41 -0
- data/spec/models/access_pagination_spec.rb +53 -0
- data/spec/models/access_spec.rb +47 -0
- data/spec/models/additional_group_spec.rb +47 -0
- data/spec/models/error403_spec.rb +41 -0
- data/spec/models/error_spec.rb +41 -0
- data/spec/models/group_out_spec.rb +89 -0
- data/spec/models/group_pagination_all_of_spec.rb +41 -0
- data/spec/models/group_pagination_spec.rb +53 -0
- data/spec/models/group_principal_in_spec.rb +41 -0
- data/spec/models/group_role_in_spec.rb +41 -0
- data/spec/models/group_roles_pagination_spec.rb +53 -0
- data/spec/models/group_spec.rb +47 -0
- data/spec/models/group_with_principals_all_of_spec.rb +41 -0
- data/spec/models/group_with_principals_and_roles_all_of_spec.rb +47 -0
- data/spec/models/group_with_principals_and_roles_spec.rb +77 -0
- data/spec/models/group_with_principals_spec.rb +71 -0
- data/spec/models/inline_response200_spec.rb +41 -0
- data/spec/models/list_pagination_spec.rb +47 -0
- data/spec/models/pagination_links_spec.rb +59 -0
- data/spec/models/pagination_meta_spec.rb +41 -0
- data/spec/models/policy_extended_all_of_spec.rb +47 -0
- data/spec/models/policy_extended_spec.rb +77 -0
- data/spec/models/policy_in_all_of_spec.rb +47 -0
- data/spec/models/policy_in_spec.rb +59 -0
- data/spec/models/policy_pagination_all_of_spec.rb +41 -0
- data/spec/models/policy_pagination_spec.rb +53 -0
- data/spec/models/policy_spec.rb +47 -0
- data/spec/models/principal_in_spec.rb +41 -0
- data/spec/models/principal_out_spec.rb +71 -0
- data/spec/models/principal_pagination_all_of_spec.rb +41 -0
- data/spec/models/principal_pagination_spec.rb +53 -0
- data/spec/models/principal_spec.rb +65 -0
- data/spec/models/resource_definition_filter_spec.rb +57 -0
- data/spec/models/resource_definition_spec.rb +41 -0
- data/spec/models/role_in_all_of_spec.rb +41 -0
- data/spec/models/role_in_spec.rb +53 -0
- data/spec/models/role_out_dynamic_all_of_spec.rb +77 -0
- data/spec/models/role_out_dynamic_spec.rb +107 -0
- data/spec/models/role_out_spec.rb +95 -0
- data/spec/models/role_pagination_dynamic_all_of_spec.rb +41 -0
- data/spec/models/role_pagination_dynamic_spec.rb +53 -0
- data/spec/models/role_pagination_spec.rb +53 -0
- data/spec/models/role_spec.rb +47 -0
- data/spec/models/role_with_access_spec.rb +101 -0
- data/spec/models/status_spec.rb +71 -0
- data/spec/models/timestamped_spec.rb +47 -0
- data/spec/models/uuid_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +338 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 15d1492709f5f1f1dff58bf1fb5eacc0ebbc14dbfa269cd2862c016d29cc7259
|
|
4
|
+
data.tar.gz: 279ddf83e9e936a57854cf0ad11baea36f603e35b5000f8e17b73528b82fb78e
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 8388373a5735bb9b147187422394b4b6f6c15c8ae2cdb3281f7adaea8f56178b84c6d43e3e7d598d0f1a497ee6470d362536d7cf2c8f2f6535042d64f3e4255d
|
|
7
|
+
data.tar.gz: 79ff421b9118de670a49e399fe307c68861d2074d588c0225ae504aadd927d89774338f84332b98ce3477c8add5a31d2dfa40e7bedbaf3afa06012f25a09a995
|
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# rbac-api-client
|
|
2
|
+
|
|
3
|
+
RBACApiClient - the Ruby gem for the Role Based Access Control
|
|
4
|
+
|
|
5
|
+
The API for Role Based Access Control.
|
|
6
|
+
|
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
|
+
|
|
9
|
+
- API version: 1.0.0
|
|
10
|
+
- Package version: 1.0.0
|
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### Build a gem
|
|
16
|
+
|
|
17
|
+
To build the Ruby code into a gem:
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
gem build rbac-api-client.gemspec
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then either install the gem locally:
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
gem install ./rbac-api-client-1.0.0.gem
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
(for development, run `gem install --dev ./rbac-api-client-1.0.0.gem` to install the development dependencies)
|
|
30
|
+
|
|
31
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
32
|
+
|
|
33
|
+
Finally add this to the Gemfile:
|
|
34
|
+
|
|
35
|
+
gem 'rbac-api-client', '~> 1.0.0'
|
|
36
|
+
|
|
37
|
+
### Install from Git
|
|
38
|
+
|
|
39
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
|
40
|
+
|
|
41
|
+
gem 'rbac-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
42
|
+
|
|
43
|
+
### Include the Ruby code directly
|
|
44
|
+
|
|
45
|
+
Include the Ruby code directly using `-I` as follows:
|
|
46
|
+
|
|
47
|
+
```shell
|
|
48
|
+
ruby -Ilib script.rb
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Getting Started
|
|
52
|
+
|
|
53
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
54
|
+
|
|
55
|
+
```ruby
|
|
56
|
+
# Load the gem
|
|
57
|
+
require 'rbac-api-client'
|
|
58
|
+
|
|
59
|
+
# Setup authorization
|
|
60
|
+
RBACApiClient.configure do |config|
|
|
61
|
+
# Configure HTTP basic authorization: basic_auth
|
|
62
|
+
config.username = 'YOUR_USERNAME'
|
|
63
|
+
config.password = 'YOUR_PASSWORD'
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
api_instance = RBACApiClient::AccessApi.new
|
|
67
|
+
application = 'application_example' # String | The application name to obtain access for the principal
|
|
68
|
+
opts = {
|
|
69
|
+
username: 'username_example', # String | Unique username of the principal to obtain access for (only available for admins, and if supplied, takes precedence over the identity header).
|
|
70
|
+
limit: 10, # Integer | Parameter for selecting the amount of data returned.
|
|
71
|
+
offset: 0 # Integer | Parameter for selecting the offset of data.
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
begin
|
|
75
|
+
#Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
|
|
76
|
+
result = api_instance.get_principal_access(application, opts)
|
|
77
|
+
p result
|
|
78
|
+
rescue RBACApiClient::ApiError => e
|
|
79
|
+
puts "Exception when calling AccessApi->get_principal_access: #{e}"
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Documentation for API Endpoints
|
|
85
|
+
|
|
86
|
+
All URIs are relative to *http://localhost/api/rbac/v1*
|
|
87
|
+
|
|
88
|
+
Class | Method | HTTP request | Description
|
|
89
|
+
------------ | ------------- | ------------- | -------------
|
|
90
|
+
*RBACApiClient::AccessApi* | [**get_principal_access**](docs/AccessApi.md#get_principal_access) | **GET** /access/ | Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
|
|
91
|
+
*RBACApiClient::GroupApi* | [**add_principal_to_group**](docs/GroupApi.md#add_principal_to_group) | **POST** /groups/{uuid}/principals/ | Add a principal to a group in the tenant
|
|
92
|
+
*RBACApiClient::GroupApi* | [**add_role_to_group**](docs/GroupApi.md#add_role_to_group) | **POST** /groups/{uuid}/roles/ | Add a role to a group in the tenant
|
|
93
|
+
*RBACApiClient::GroupApi* | [**create_group**](docs/GroupApi.md#create_group) | **POST** /groups/ | Create a group in a tenant
|
|
94
|
+
*RBACApiClient::GroupApi* | [**delete_group**](docs/GroupApi.md#delete_group) | **DELETE** /groups/{uuid}/ | Delete a group in the tenant
|
|
95
|
+
*RBACApiClient::GroupApi* | [**delete_principal_from_group**](docs/GroupApi.md#delete_principal_from_group) | **DELETE** /groups/{uuid}/principals/ | Remove a principal from a group in the tenant
|
|
96
|
+
*RBACApiClient::GroupApi* | [**delete_role_from_group**](docs/GroupApi.md#delete_role_from_group) | **DELETE** /groups/{uuid}/roles/ | Remove a role from a group in the tenant
|
|
97
|
+
*RBACApiClient::GroupApi* | [**get_group**](docs/GroupApi.md#get_group) | **GET** /groups/{uuid}/ | Get a group in the tenant
|
|
98
|
+
*RBACApiClient::GroupApi* | [**get_principals_from_group**](docs/GroupApi.md#get_principals_from_group) | **GET** /groups/{uuid}/principals/ | Get a list of principals from a group in the tenant
|
|
99
|
+
*RBACApiClient::GroupApi* | [**list_groups**](docs/GroupApi.md#list_groups) | **GET** /groups/ | List the groups for a tenant
|
|
100
|
+
*RBACApiClient::GroupApi* | [**list_roles_for_group**](docs/GroupApi.md#list_roles_for_group) | **GET** /groups/{uuid}/roles/ | List the roles for a group in the tenant
|
|
101
|
+
*RBACApiClient::GroupApi* | [**update_group**](docs/GroupApi.md#update_group) | **PUT** /groups/{uuid}/ | Udate a group in the tenant
|
|
102
|
+
*RBACApiClient::PolicyApi* | [**create_policies**](docs/PolicyApi.md#create_policies) | **POST** /policies/ | Create a policy in a tenant
|
|
103
|
+
*RBACApiClient::PolicyApi* | [**delete_policy**](docs/PolicyApi.md#delete_policy) | **DELETE** /policies/{uuid}/ | Delete a policy in the tenant
|
|
104
|
+
*RBACApiClient::PolicyApi* | [**get_policy**](docs/PolicyApi.md#get_policy) | **GET** /policies/{uuid}/ | Get a policy in the tenant
|
|
105
|
+
*RBACApiClient::PolicyApi* | [**list_policies**](docs/PolicyApi.md#list_policies) | **GET** /policies/ | List the policies in the tenant
|
|
106
|
+
*RBACApiClient::PolicyApi* | [**update_policy**](docs/PolicyApi.md#update_policy) | **PUT** /policies/{uuid}/ | Update a policy in the tenant
|
|
107
|
+
*RBACApiClient::PrincipalApi* | [**list_principals**](docs/PrincipalApi.md#list_principals) | **GET** /principals/ | List the principals for a tenant
|
|
108
|
+
*RBACApiClient::RoleApi* | [**create_roles**](docs/RoleApi.md#create_roles) | **POST** /roles/ | Create a roles for a tenant
|
|
109
|
+
*RBACApiClient::RoleApi* | [**delete_role**](docs/RoleApi.md#delete_role) | **DELETE** /roles/{uuid}/ | Delete a role in the tenant
|
|
110
|
+
*RBACApiClient::RoleApi* | [**get_role**](docs/RoleApi.md#get_role) | **GET** /roles/{uuid}/ | Get a role in the tenant
|
|
111
|
+
*RBACApiClient::RoleApi* | [**get_role_access**](docs/RoleApi.md#get_role_access) | **GET** /roles/{uuid}/access/ | Get access for a role in the tenant
|
|
112
|
+
*RBACApiClient::RoleApi* | [**list_roles**](docs/RoleApi.md#list_roles) | **GET** /roles/ | List the roles for a tenant
|
|
113
|
+
*RBACApiClient::RoleApi* | [**update_role**](docs/RoleApi.md#update_role) | **PUT** /roles/{uuid}/ | Update a Role in the tenant
|
|
114
|
+
*RBACApiClient::StatusApi* | [**get_status**](docs/StatusApi.md#get_status) | **GET** /status/ | Obtain server status
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## Documentation for Models
|
|
118
|
+
|
|
119
|
+
- [RBACApiClient::Access](docs/Access.md)
|
|
120
|
+
- [RBACApiClient::AccessPagination](docs/AccessPagination.md)
|
|
121
|
+
- [RBACApiClient::AccessPaginationAllOf](docs/AccessPaginationAllOf.md)
|
|
122
|
+
- [RBACApiClient::AdditionalGroup](docs/AdditionalGroup.md)
|
|
123
|
+
- [RBACApiClient::Error](docs/Error.md)
|
|
124
|
+
- [RBACApiClient::Error403](docs/Error403.md)
|
|
125
|
+
- [RBACApiClient::Group](docs/Group.md)
|
|
126
|
+
- [RBACApiClient::GroupOut](docs/GroupOut.md)
|
|
127
|
+
- [RBACApiClient::GroupPagination](docs/GroupPagination.md)
|
|
128
|
+
- [RBACApiClient::GroupPaginationAllOf](docs/GroupPaginationAllOf.md)
|
|
129
|
+
- [RBACApiClient::GroupPrincipalIn](docs/GroupPrincipalIn.md)
|
|
130
|
+
- [RBACApiClient::GroupRoleIn](docs/GroupRoleIn.md)
|
|
131
|
+
- [RBACApiClient::GroupRolesPagination](docs/GroupRolesPagination.md)
|
|
132
|
+
- [RBACApiClient::GroupWithPrincipals](docs/GroupWithPrincipals.md)
|
|
133
|
+
- [RBACApiClient::GroupWithPrincipalsAllOf](docs/GroupWithPrincipalsAllOf.md)
|
|
134
|
+
- [RBACApiClient::GroupWithPrincipalsAndRoles](docs/GroupWithPrincipalsAndRoles.md)
|
|
135
|
+
- [RBACApiClient::GroupWithPrincipalsAndRolesAllOf](docs/GroupWithPrincipalsAndRolesAllOf.md)
|
|
136
|
+
- [RBACApiClient::InlineResponse200](docs/InlineResponse200.md)
|
|
137
|
+
- [RBACApiClient::ListPagination](docs/ListPagination.md)
|
|
138
|
+
- [RBACApiClient::PaginationLinks](docs/PaginationLinks.md)
|
|
139
|
+
- [RBACApiClient::PaginationMeta](docs/PaginationMeta.md)
|
|
140
|
+
- [RBACApiClient::Policy](docs/Policy.md)
|
|
141
|
+
- [RBACApiClient::PolicyExtended](docs/PolicyExtended.md)
|
|
142
|
+
- [RBACApiClient::PolicyExtendedAllOf](docs/PolicyExtendedAllOf.md)
|
|
143
|
+
- [RBACApiClient::PolicyIn](docs/PolicyIn.md)
|
|
144
|
+
- [RBACApiClient::PolicyInAllOf](docs/PolicyInAllOf.md)
|
|
145
|
+
- [RBACApiClient::PolicyPagination](docs/PolicyPagination.md)
|
|
146
|
+
- [RBACApiClient::PolicyPaginationAllOf](docs/PolicyPaginationAllOf.md)
|
|
147
|
+
- [RBACApiClient::Principal](docs/Principal.md)
|
|
148
|
+
- [RBACApiClient::PrincipalIn](docs/PrincipalIn.md)
|
|
149
|
+
- [RBACApiClient::PrincipalOut](docs/PrincipalOut.md)
|
|
150
|
+
- [RBACApiClient::PrincipalPagination](docs/PrincipalPagination.md)
|
|
151
|
+
- [RBACApiClient::PrincipalPaginationAllOf](docs/PrincipalPaginationAllOf.md)
|
|
152
|
+
- [RBACApiClient::ResourceDefinition](docs/ResourceDefinition.md)
|
|
153
|
+
- [RBACApiClient::ResourceDefinitionFilter](docs/ResourceDefinitionFilter.md)
|
|
154
|
+
- [RBACApiClient::Role](docs/Role.md)
|
|
155
|
+
- [RBACApiClient::RoleIn](docs/RoleIn.md)
|
|
156
|
+
- [RBACApiClient::RoleInAllOf](docs/RoleInAllOf.md)
|
|
157
|
+
- [RBACApiClient::RoleOut](docs/RoleOut.md)
|
|
158
|
+
- [RBACApiClient::RoleOutDynamic](docs/RoleOutDynamic.md)
|
|
159
|
+
- [RBACApiClient::RoleOutDynamicAllOf](docs/RoleOutDynamicAllOf.md)
|
|
160
|
+
- [RBACApiClient::RolePagination](docs/RolePagination.md)
|
|
161
|
+
- [RBACApiClient::RolePaginationDynamic](docs/RolePaginationDynamic.md)
|
|
162
|
+
- [RBACApiClient::RolePaginationDynamicAllOf](docs/RolePaginationDynamicAllOf.md)
|
|
163
|
+
- [RBACApiClient::RoleWithAccess](docs/RoleWithAccess.md)
|
|
164
|
+
- [RBACApiClient::Status](docs/Status.md)
|
|
165
|
+
- [RBACApiClient::Timestamped](docs/Timestamped.md)
|
|
166
|
+
- [RBACApiClient::UUID](docs/UUID.md)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## Documentation for Authorization
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### basic_auth
|
|
173
|
+
|
|
174
|
+
- **Type**: HTTP basic authentication
|
|
175
|
+
|
data/Rakefile
ADDED
data/client-meta.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"moduleName": "RBACApiClient",
|
|
3
|
+
"gemName": "rbac-api-client",
|
|
4
|
+
"gemHomepage" : "https://github.com/ManageIQ/insights-rbac-api-client-ruby",
|
|
5
|
+
"gemAuthor" : "ManageIQ Authors",
|
|
6
|
+
"gemLicense" : "Apache-2.0",
|
|
7
|
+
"gemDescription" : "Ruby client gem to connect to Insights RBAC Service"
|
|
8
|
+
}
|
data/docs/Access.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# RBACApiClient::Access
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**permission** | **String** | |
|
|
8
|
+
**resource_definitions** | [**Array<ResourceDefinition>**](ResourceDefinition.md) | |
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'RBACApiClient'
|
|
14
|
+
|
|
15
|
+
instance = RBACApiClient::Access.new(permission: cost-management:*:read,
|
|
16
|
+
resource_definitions: null)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
data/docs/AccessApi.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# RBACApiClient::AccessApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost/api/rbac/v1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**get_principal_access**](AccessApi.md#get_principal_access) | **GET** /access/ | Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## get_principal_access
|
|
12
|
+
|
|
13
|
+
> AccessPagination get_principal_access(application, opts)
|
|
14
|
+
|
|
15
|
+
Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
# load the gem
|
|
21
|
+
require 'rbac-api-client'
|
|
22
|
+
# setup authorization
|
|
23
|
+
RBACApiClient.configure do |config|
|
|
24
|
+
# Configure HTTP basic authorization: basic_auth
|
|
25
|
+
config.username = 'YOUR USERNAME'
|
|
26
|
+
config.password = 'YOUR PASSWORD'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
api_instance = RBACApiClient::AccessApi.new
|
|
30
|
+
application = 'application_example' # String | The application name to obtain access for the principal
|
|
31
|
+
opts = {
|
|
32
|
+
username: 'username_example', # String | Unique username of the principal to obtain access for (only available for admins, and if supplied, takes precedence over the identity header).
|
|
33
|
+
limit: 10, # Integer | Parameter for selecting the amount of data returned.
|
|
34
|
+
offset: 0 # Integer | Parameter for selecting the offset of data.
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
#Get the permitted access for a principal in the tenant (defaults to principal from the identity header)
|
|
39
|
+
result = api_instance.get_principal_access(application, opts)
|
|
40
|
+
p result
|
|
41
|
+
rescue RBACApiClient::ApiError => e
|
|
42
|
+
puts "Exception when calling AccessApi->get_principal_access: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Name | Type | Description | Notes
|
|
50
|
+
------------- | ------------- | ------------- | -------------
|
|
51
|
+
**application** | **String**| The application name to obtain access for the principal |
|
|
52
|
+
**username** | **String**| Unique username of the principal to obtain access for (only available for admins, and if supplied, takes precedence over the identity header). | [optional]
|
|
53
|
+
**limit** | **Integer**| Parameter for selecting the amount of data returned. | [optional] [default to 10]
|
|
54
|
+
**offset** | **Integer**| Parameter for selecting the offset of data. | [optional] [default to 0]
|
|
55
|
+
|
|
56
|
+
### Return type
|
|
57
|
+
|
|
58
|
+
[**AccessPagination**](AccessPagination.md)
|
|
59
|
+
|
|
60
|
+
### Authorization
|
|
61
|
+
|
|
62
|
+
[basic_auth](../README.md#basic_auth)
|
|
63
|
+
|
|
64
|
+
### HTTP request headers
|
|
65
|
+
|
|
66
|
+
- **Content-Type**: Not defined
|
|
67
|
+
- **Accept**: application/json
|
|
68
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# RBACApiClient::AccessPagination
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**meta** | [**PaginationMeta**](PaginationMeta.md) | | [optional]
|
|
8
|
+
**links** | [**PaginationLinks**](PaginationLinks.md) | | [optional]
|
|
9
|
+
**data** | [**Array<Access>**](Access.md) | |
|
|
10
|
+
|
|
11
|
+
## Code Sample
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'RBACApiClient'
|
|
15
|
+
|
|
16
|
+
instance = RBACApiClient::AccessPagination.new(meta: null,
|
|
17
|
+
links: null,
|
|
18
|
+
data: null)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# RBACApiClient::AccessPaginationAllOf
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**data** | [**Array<Access>**](Access.md) | |
|
|
8
|
+
|
|
9
|
+
## Code Sample
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'RBACApiClient'
|
|
13
|
+
|
|
14
|
+
instance = RBACApiClient::AccessPaginationAllOf.new(data: null)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# RBACApiClient::AdditionalGroup
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | | [optional]
|
|
8
|
+
**uuid** | **String** | | [optional]
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'RBACApiClient'
|
|
14
|
+
|
|
15
|
+
instance = RBACApiClient::AdditionalGroup.new(name: GroupA,
|
|
16
|
+
uuid: 234df936-abb4-4238-a1c9-d91fc540c702)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
data/docs/Error.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# RBACApiClient::Error
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**errors** | **Array<Object>** | |
|
|
8
|
+
|
|
9
|
+
## Code Sample
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'RBACApiClient'
|
|
13
|
+
|
|
14
|
+
instance = RBACApiClient::Error.new(errors: null)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
data/docs/Error403.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# RBACApiClient::Error403
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**errors** | **Array<Object>** | |
|
|
8
|
+
|
|
9
|
+
## Code Sample
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'RBACApiClient'
|
|
13
|
+
|
|
14
|
+
instance = RBACApiClient::Error403.new(errors: null)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
|
data/docs/Group.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# RBACApiClient::Group
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**name** | **String** | |
|
|
8
|
+
**description** | **String** | | [optional]
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'RBACApiClient'
|
|
14
|
+
|
|
15
|
+
instance = RBACApiClient::Group.new(name: GroupA,
|
|
16
|
+
description: A description of GroupA)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
data/docs/GroupApi.md
ADDED
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
# RBACApiClient::GroupApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost/api/rbac/v1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**add_principal_to_group**](GroupApi.md#add_principal_to_group) | **POST** /groups/{uuid}/principals/ | Add a principal to a group in the tenant
|
|
8
|
+
[**add_role_to_group**](GroupApi.md#add_role_to_group) | **POST** /groups/{uuid}/roles/ | Add a role to a group in the tenant
|
|
9
|
+
[**create_group**](GroupApi.md#create_group) | **POST** /groups/ | Create a group in a tenant
|
|
10
|
+
[**delete_group**](GroupApi.md#delete_group) | **DELETE** /groups/{uuid}/ | Delete a group in the tenant
|
|
11
|
+
[**delete_principal_from_group**](GroupApi.md#delete_principal_from_group) | **DELETE** /groups/{uuid}/principals/ | Remove a principal from a group in the tenant
|
|
12
|
+
[**delete_role_from_group**](GroupApi.md#delete_role_from_group) | **DELETE** /groups/{uuid}/roles/ | Remove a role from a group in the tenant
|
|
13
|
+
[**get_group**](GroupApi.md#get_group) | **GET** /groups/{uuid}/ | Get a group in the tenant
|
|
14
|
+
[**get_principals_from_group**](GroupApi.md#get_principals_from_group) | **GET** /groups/{uuid}/principals/ | Get a list of principals from a group in the tenant
|
|
15
|
+
[**list_groups**](GroupApi.md#list_groups) | **GET** /groups/ | List the groups for a tenant
|
|
16
|
+
[**list_roles_for_group**](GroupApi.md#list_roles_for_group) | **GET** /groups/{uuid}/roles/ | List the roles for a group in the tenant
|
|
17
|
+
[**update_group**](GroupApi.md#update_group) | **PUT** /groups/{uuid}/ | Udate a group in the tenant
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## add_principal_to_group
|
|
22
|
+
|
|
23
|
+
> GroupWithPrincipalsAndRoles add_principal_to_group(uuid, group_principal_in)
|
|
24
|
+
|
|
25
|
+
Add a principal to a group in the tenant
|
|
26
|
+
|
|
27
|
+
### Example
|
|
28
|
+
|
|
29
|
+
```ruby
|
|
30
|
+
# load the gem
|
|
31
|
+
require 'rbac-api-client'
|
|
32
|
+
# setup authorization
|
|
33
|
+
RBACApiClient.configure do |config|
|
|
34
|
+
# Configure HTTP basic authorization: basic_auth
|
|
35
|
+
config.username = 'YOUR USERNAME'
|
|
36
|
+
config.password = 'YOUR PASSWORD'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
40
|
+
uuid = 'uuid_example' # String | ID of group to update
|
|
41
|
+
group_principal_in = RBACApiClient::GroupPrincipalIn.new # GroupPrincipalIn | Principal to add to a group
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
#Add a principal to a group in the tenant
|
|
45
|
+
result = api_instance.add_principal_to_group(uuid, group_principal_in)
|
|
46
|
+
p result
|
|
47
|
+
rescue RBACApiClient::ApiError => e
|
|
48
|
+
puts "Exception when calling GroupApi->add_principal_to_group: #{e}"
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Parameters
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Name | Type | Description | Notes
|
|
56
|
+
------------- | ------------- | ------------- | -------------
|
|
57
|
+
**uuid** | [**String**](.md)| ID of group to update |
|
|
58
|
+
**group_principal_in** | [**GroupPrincipalIn**](GroupPrincipalIn.md)| Principal to add to a group |
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
[**GroupWithPrincipalsAndRoles**](GroupWithPrincipalsAndRoles.md)
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
[basic_auth](../README.md#basic_auth)
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: application/json
|
|
71
|
+
- **Accept**: application/json
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## add_role_to_group
|
|
75
|
+
|
|
76
|
+
> InlineResponse200 add_role_to_group(uuid, group_role_in)
|
|
77
|
+
|
|
78
|
+
Add a role to a group in the tenant
|
|
79
|
+
|
|
80
|
+
### Example
|
|
81
|
+
|
|
82
|
+
```ruby
|
|
83
|
+
# load the gem
|
|
84
|
+
require 'rbac-api-client'
|
|
85
|
+
# setup authorization
|
|
86
|
+
RBACApiClient.configure do |config|
|
|
87
|
+
# Configure HTTP basic authorization: basic_auth
|
|
88
|
+
config.username = 'YOUR USERNAME'
|
|
89
|
+
config.password = 'YOUR PASSWORD'
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
93
|
+
uuid = 'uuid_example' # String | ID of group to update
|
|
94
|
+
group_role_in = RBACApiClient::GroupRoleIn.new # GroupRoleIn | Role to add to a group
|
|
95
|
+
|
|
96
|
+
begin
|
|
97
|
+
#Add a role to a group in the tenant
|
|
98
|
+
result = api_instance.add_role_to_group(uuid, group_role_in)
|
|
99
|
+
p result
|
|
100
|
+
rescue RBACApiClient::ApiError => e
|
|
101
|
+
puts "Exception when calling GroupApi->add_role_to_group: #{e}"
|
|
102
|
+
end
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Parameters
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
Name | Type | Description | Notes
|
|
109
|
+
------------- | ------------- | ------------- | -------------
|
|
110
|
+
**uuid** | [**String**](.md)| ID of group to update |
|
|
111
|
+
**group_role_in** | [**GroupRoleIn**](GroupRoleIn.md)| Role to add to a group |
|
|
112
|
+
|
|
113
|
+
### Return type
|
|
114
|
+
|
|
115
|
+
[**InlineResponse200**](InlineResponse200.md)
|
|
116
|
+
|
|
117
|
+
### Authorization
|
|
118
|
+
|
|
119
|
+
[basic_auth](../README.md#basic_auth)
|
|
120
|
+
|
|
121
|
+
### HTTP request headers
|
|
122
|
+
|
|
123
|
+
- **Content-Type**: application/json
|
|
124
|
+
- **Accept**: application/json
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## create_group
|
|
128
|
+
|
|
129
|
+
> GroupOut create_group(group)
|
|
130
|
+
|
|
131
|
+
Create a group in a tenant
|
|
132
|
+
|
|
133
|
+
### Example
|
|
134
|
+
|
|
135
|
+
```ruby
|
|
136
|
+
# load the gem
|
|
137
|
+
require 'rbac-api-client'
|
|
138
|
+
# setup authorization
|
|
139
|
+
RBACApiClient.configure do |config|
|
|
140
|
+
# Configure HTTP basic authorization: basic_auth
|
|
141
|
+
config.username = 'YOUR USERNAME'
|
|
142
|
+
config.password = 'YOUR PASSWORD'
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
146
|
+
group = RBACApiClient::Group.new # Group | Group to create in tenant
|
|
147
|
+
|
|
148
|
+
begin
|
|
149
|
+
#Create a group in a tenant
|
|
150
|
+
result = api_instance.create_group(group)
|
|
151
|
+
p result
|
|
152
|
+
rescue RBACApiClient::ApiError => e
|
|
153
|
+
puts "Exception when calling GroupApi->create_group: #{e}"
|
|
154
|
+
end
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Parameters
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
Name | Type | Description | Notes
|
|
161
|
+
------------- | ------------- | ------------- | -------------
|
|
162
|
+
**group** | [**Group**](Group.md)| Group to create in tenant |
|
|
163
|
+
|
|
164
|
+
### Return type
|
|
165
|
+
|
|
166
|
+
[**GroupOut**](GroupOut.md)
|
|
167
|
+
|
|
168
|
+
### Authorization
|
|
169
|
+
|
|
170
|
+
[basic_auth](../README.md#basic_auth)
|
|
171
|
+
|
|
172
|
+
### HTTP request headers
|
|
173
|
+
|
|
174
|
+
- **Content-Type**: application/json
|
|
175
|
+
- **Accept**: application/json
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## delete_group
|
|
179
|
+
|
|
180
|
+
> delete_group(uuid)
|
|
181
|
+
|
|
182
|
+
Delete a group in the tenant
|
|
183
|
+
|
|
184
|
+
### Example
|
|
185
|
+
|
|
186
|
+
```ruby
|
|
187
|
+
# load the gem
|
|
188
|
+
require 'rbac-api-client'
|
|
189
|
+
# setup authorization
|
|
190
|
+
RBACApiClient.configure do |config|
|
|
191
|
+
# Configure HTTP basic authorization: basic_auth
|
|
192
|
+
config.username = 'YOUR USERNAME'
|
|
193
|
+
config.password = 'YOUR PASSWORD'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
197
|
+
uuid = 'uuid_example' # String | ID of group to delete
|
|
198
|
+
|
|
199
|
+
begin
|
|
200
|
+
#Delete a group in the tenant
|
|
201
|
+
api_instance.delete_group(uuid)
|
|
202
|
+
rescue RBACApiClient::ApiError => e
|
|
203
|
+
puts "Exception when calling GroupApi->delete_group: #{e}"
|
|
204
|
+
end
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Parameters
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
Name | Type | Description | Notes
|
|
211
|
+
------------- | ------------- | ------------- | -------------
|
|
212
|
+
**uuid** | [**String**](.md)| ID of group to delete |
|
|
213
|
+
|
|
214
|
+
### Return type
|
|
215
|
+
|
|
216
|
+
nil (empty response body)
|
|
217
|
+
|
|
218
|
+
### Authorization
|
|
219
|
+
|
|
220
|
+
[basic_auth](../README.md#basic_auth)
|
|
221
|
+
|
|
222
|
+
### HTTP request headers
|
|
223
|
+
|
|
224
|
+
- **Content-Type**: Not defined
|
|
225
|
+
- **Accept**: application/json, */*
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
## delete_principal_from_group
|
|
229
|
+
|
|
230
|
+
> delete_principal_from_group(uuid, usernames)
|
|
231
|
+
|
|
232
|
+
Remove a principal from a group in the tenant
|
|
233
|
+
|
|
234
|
+
### Example
|
|
235
|
+
|
|
236
|
+
```ruby
|
|
237
|
+
# load the gem
|
|
238
|
+
require 'rbac-api-client'
|
|
239
|
+
# setup authorization
|
|
240
|
+
RBACApiClient.configure do |config|
|
|
241
|
+
# Configure HTTP basic authorization: basic_auth
|
|
242
|
+
config.username = 'YOUR USERNAME'
|
|
243
|
+
config.password = 'YOUR PASSWORD'
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
247
|
+
uuid = 'uuid_example' # String | ID of group to update
|
|
248
|
+
usernames = 'usernames_example' # String | A comma separated list of usernames for principals to remove from the group
|
|
249
|
+
|
|
250
|
+
begin
|
|
251
|
+
#Remove a principal from a group in the tenant
|
|
252
|
+
api_instance.delete_principal_from_group(uuid, usernames)
|
|
253
|
+
rescue RBACApiClient::ApiError => e
|
|
254
|
+
puts "Exception when calling GroupApi->delete_principal_from_group: #{e}"
|
|
255
|
+
end
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Parameters
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
Name | Type | Description | Notes
|
|
262
|
+
------------- | ------------- | ------------- | -------------
|
|
263
|
+
**uuid** | [**String**](.md)| ID of group to update |
|
|
264
|
+
**usernames** | **String**| A comma separated list of usernames for principals to remove from the group |
|
|
265
|
+
|
|
266
|
+
### Return type
|
|
267
|
+
|
|
268
|
+
nil (empty response body)
|
|
269
|
+
|
|
270
|
+
### Authorization
|
|
271
|
+
|
|
272
|
+
[basic_auth](../README.md#basic_auth)
|
|
273
|
+
|
|
274
|
+
### HTTP request headers
|
|
275
|
+
|
|
276
|
+
- **Content-Type**: Not defined
|
|
277
|
+
- **Accept**: application/json
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
## delete_role_from_group
|
|
281
|
+
|
|
282
|
+
> delete_role_from_group(uuid, roles)
|
|
283
|
+
|
|
284
|
+
Remove a role from a group in the tenant
|
|
285
|
+
|
|
286
|
+
### Example
|
|
287
|
+
|
|
288
|
+
```ruby
|
|
289
|
+
# load the gem
|
|
290
|
+
require 'rbac-api-client'
|
|
291
|
+
# setup authorization
|
|
292
|
+
RBACApiClient.configure do |config|
|
|
293
|
+
# Configure HTTP basic authorization: basic_auth
|
|
294
|
+
config.username = 'YOUR USERNAME'
|
|
295
|
+
config.password = 'YOUR PASSWORD'
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
299
|
+
uuid = 'uuid_example' # String | ID of group to update
|
|
300
|
+
roles = 'roles_example' # String | A comma separated list of role UUIDs for roles to remove from the group
|
|
301
|
+
|
|
302
|
+
begin
|
|
303
|
+
#Remove a role from a group in the tenant
|
|
304
|
+
api_instance.delete_role_from_group(uuid, roles)
|
|
305
|
+
rescue RBACApiClient::ApiError => e
|
|
306
|
+
puts "Exception when calling GroupApi->delete_role_from_group: #{e}"
|
|
307
|
+
end
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Parameters
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
Name | Type | Description | Notes
|
|
314
|
+
------------- | ------------- | ------------- | -------------
|
|
315
|
+
**uuid** | [**String**](.md)| ID of group to update |
|
|
316
|
+
**roles** | **String**| A comma separated list of role UUIDs for roles to remove from the group |
|
|
317
|
+
|
|
318
|
+
### Return type
|
|
319
|
+
|
|
320
|
+
nil (empty response body)
|
|
321
|
+
|
|
322
|
+
### Authorization
|
|
323
|
+
|
|
324
|
+
[basic_auth](../README.md#basic_auth)
|
|
325
|
+
|
|
326
|
+
### HTTP request headers
|
|
327
|
+
|
|
328
|
+
- **Content-Type**: Not defined
|
|
329
|
+
- **Accept**: application/json
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
## get_group
|
|
333
|
+
|
|
334
|
+
> GroupWithPrincipalsAndRoles get_group(uuid)
|
|
335
|
+
|
|
336
|
+
Get a group in the tenant
|
|
337
|
+
|
|
338
|
+
### Example
|
|
339
|
+
|
|
340
|
+
```ruby
|
|
341
|
+
# load the gem
|
|
342
|
+
require 'rbac-api-client'
|
|
343
|
+
# setup authorization
|
|
344
|
+
RBACApiClient.configure do |config|
|
|
345
|
+
# Configure HTTP basic authorization: basic_auth
|
|
346
|
+
config.username = 'YOUR USERNAME'
|
|
347
|
+
config.password = 'YOUR PASSWORD'
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
351
|
+
uuid = 'uuid_example' # String | ID of group to get
|
|
352
|
+
|
|
353
|
+
begin
|
|
354
|
+
#Get a group in the tenant
|
|
355
|
+
result = api_instance.get_group(uuid)
|
|
356
|
+
p result
|
|
357
|
+
rescue RBACApiClient::ApiError => e
|
|
358
|
+
puts "Exception when calling GroupApi->get_group: #{e}"
|
|
359
|
+
end
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Parameters
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
Name | Type | Description | Notes
|
|
366
|
+
------------- | ------------- | ------------- | -------------
|
|
367
|
+
**uuid** | [**String**](.md)| ID of group to get |
|
|
368
|
+
|
|
369
|
+
### Return type
|
|
370
|
+
|
|
371
|
+
[**GroupWithPrincipalsAndRoles**](GroupWithPrincipalsAndRoles.md)
|
|
372
|
+
|
|
373
|
+
### Authorization
|
|
374
|
+
|
|
375
|
+
[basic_auth](../README.md#basic_auth)
|
|
376
|
+
|
|
377
|
+
### HTTP request headers
|
|
378
|
+
|
|
379
|
+
- **Content-Type**: Not defined
|
|
380
|
+
- **Accept**: application/json
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
## get_principals_from_group
|
|
384
|
+
|
|
385
|
+
> PrincipalPagination get_principals_from_group(uuid, opts)
|
|
386
|
+
|
|
387
|
+
Get a list of principals from a group in the tenant
|
|
388
|
+
|
|
389
|
+
### Example
|
|
390
|
+
|
|
391
|
+
```ruby
|
|
392
|
+
# load the gem
|
|
393
|
+
require 'rbac-api-client'
|
|
394
|
+
# setup authorization
|
|
395
|
+
RBACApiClient.configure do |config|
|
|
396
|
+
# Configure HTTP basic authorization: basic_auth
|
|
397
|
+
config.username = 'YOUR USERNAME'
|
|
398
|
+
config.password = 'YOUR PASSWORD'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
402
|
+
uuid = 'uuid_example' # String | ID of group from which to get principals
|
|
403
|
+
opts = {
|
|
404
|
+
principal_username: 'principal_username_example' # String | Parameter for filtering group principals by principal `username` using string contains search.
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
begin
|
|
408
|
+
#Get a list of principals from a group in the tenant
|
|
409
|
+
result = api_instance.get_principals_from_group(uuid, opts)
|
|
410
|
+
p result
|
|
411
|
+
rescue RBACApiClient::ApiError => e
|
|
412
|
+
puts "Exception when calling GroupApi->get_principals_from_group: #{e}"
|
|
413
|
+
end
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Parameters
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
Name | Type | Description | Notes
|
|
420
|
+
------------- | ------------- | ------------- | -------------
|
|
421
|
+
**uuid** | [**String**](.md)| ID of group from which to get principals |
|
|
422
|
+
**principal_username** | **String**| Parameter for filtering group principals by principal `username` using string contains search. | [optional]
|
|
423
|
+
|
|
424
|
+
### Return type
|
|
425
|
+
|
|
426
|
+
[**PrincipalPagination**](PrincipalPagination.md)
|
|
427
|
+
|
|
428
|
+
### Authorization
|
|
429
|
+
|
|
430
|
+
[basic_auth](../README.md#basic_auth)
|
|
431
|
+
|
|
432
|
+
### HTTP request headers
|
|
433
|
+
|
|
434
|
+
- **Content-Type**: Not defined
|
|
435
|
+
- **Accept**: application/json
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
## list_groups
|
|
439
|
+
|
|
440
|
+
> GroupPagination list_groups(opts)
|
|
441
|
+
|
|
442
|
+
List the groups for a tenant
|
|
443
|
+
|
|
444
|
+
### Example
|
|
445
|
+
|
|
446
|
+
```ruby
|
|
447
|
+
# load the gem
|
|
448
|
+
require 'rbac-api-client'
|
|
449
|
+
# setup authorization
|
|
450
|
+
RBACApiClient.configure do |config|
|
|
451
|
+
# Configure HTTP basic authorization: basic_auth
|
|
452
|
+
config.username = 'YOUR USERNAME'
|
|
453
|
+
config.password = 'YOUR PASSWORD'
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
457
|
+
opts = {
|
|
458
|
+
limit: 10, # Integer | Parameter for selecting the amount of data returned.
|
|
459
|
+
offset: 0, # Integer | Parameter for selecting the offset of data.
|
|
460
|
+
name: 'name_example', # String | Parameter for filtering resource by name using string contains search.
|
|
461
|
+
scope: 'account', # String | Parameter for filtering resource by scope.
|
|
462
|
+
username: 'username_example', # String | A username for a principal to filter for groups
|
|
463
|
+
uuid: ['uuid_example'], # Array<String> | A list of UUIDs to filter listed groups.
|
|
464
|
+
role_names: ['role_names_example'], # Array<String> | List of role name to filter for groups. It is exact match but case-insensitive
|
|
465
|
+
role_discriminator: 'role_discriminator_example', # String | Discriminator that works with role_names to indicate matching all/any of the role names
|
|
466
|
+
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
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
begin
|
|
470
|
+
#List the groups for a tenant
|
|
471
|
+
result = api_instance.list_groups(opts)
|
|
472
|
+
p result
|
|
473
|
+
rescue RBACApiClient::ApiError => e
|
|
474
|
+
puts "Exception when calling GroupApi->list_groups: #{e}"
|
|
475
|
+
end
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Parameters
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
Name | Type | Description | Notes
|
|
482
|
+
------------- | ------------- | ------------- | -------------
|
|
483
|
+
**limit** | **Integer**| Parameter for selecting the amount of data returned. | [optional] [default to 10]
|
|
484
|
+
**offset** | **Integer**| Parameter for selecting the offset of data. | [optional] [default to 0]
|
|
485
|
+
**name** | **String**| Parameter for filtering resource by name using string contains search. | [optional]
|
|
486
|
+
**scope** | **String**| Parameter for filtering resource by scope. | [optional] [default to 'account']
|
|
487
|
+
**username** | **String**| A username for a principal to filter for groups | [optional]
|
|
488
|
+
**uuid** | [**Array<String>**](String.md)| A list of UUIDs to filter listed groups. | [optional]
|
|
489
|
+
**role_names** | [**Array<String>**](String.md)| List of role name to filter for groups. It is exact match but case-insensitive | [optional]
|
|
490
|
+
**role_discriminator** | **String**| Discriminator that works with role_names to indicate matching all/any of the role names | [optional]
|
|
491
|
+
**order_by** | **String**| Parameter for ordering resource by value. For inverse ordering, supply '-' before the param value, such as: ?order_by=-name | [optional]
|
|
492
|
+
|
|
493
|
+
### Return type
|
|
494
|
+
|
|
495
|
+
[**GroupPagination**](GroupPagination.md)
|
|
496
|
+
|
|
497
|
+
### Authorization
|
|
498
|
+
|
|
499
|
+
[basic_auth](../README.md#basic_auth)
|
|
500
|
+
|
|
501
|
+
### HTTP request headers
|
|
502
|
+
|
|
503
|
+
- **Content-Type**: Not defined
|
|
504
|
+
- **Accept**: application/json
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
## list_roles_for_group
|
|
508
|
+
|
|
509
|
+
> GroupRolesPagination list_roles_for_group(uuid, opts)
|
|
510
|
+
|
|
511
|
+
List the roles for a group in the tenant
|
|
512
|
+
|
|
513
|
+
### Example
|
|
514
|
+
|
|
515
|
+
```ruby
|
|
516
|
+
# load the gem
|
|
517
|
+
require 'rbac-api-client'
|
|
518
|
+
# setup authorization
|
|
519
|
+
RBACApiClient.configure do |config|
|
|
520
|
+
# Configure HTTP basic authorization: basic_auth
|
|
521
|
+
config.username = 'YOUR USERNAME'
|
|
522
|
+
config.password = 'YOUR PASSWORD'
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
526
|
+
uuid = 'uuid_example' # String | ID of group
|
|
527
|
+
opts = {
|
|
528
|
+
exclude: false, # Boolean | If this is set to true, the result would be roles excluding the ones in the group
|
|
529
|
+
role_name: 'role_name_example', # String | Parameter for filtering group roles by role `name` using string contains search.
|
|
530
|
+
role_description: 'role_description_example', # String | Parameter for filtering group roles by role `description` using string contains search.
|
|
531
|
+
limit: 10, # Integer | Parameter for selecting the amount of data returned.
|
|
532
|
+
offset: 0, # Integer | Parameter for selecting the offset of data.
|
|
533
|
+
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
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
begin
|
|
537
|
+
#List the roles for a group in the tenant
|
|
538
|
+
result = api_instance.list_roles_for_group(uuid, opts)
|
|
539
|
+
p result
|
|
540
|
+
rescue RBACApiClient::ApiError => e
|
|
541
|
+
puts "Exception when calling GroupApi->list_roles_for_group: #{e}"
|
|
542
|
+
end
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Parameters
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
Name | Type | Description | Notes
|
|
549
|
+
------------- | ------------- | ------------- | -------------
|
|
550
|
+
**uuid** | [**String**](.md)| ID of group |
|
|
551
|
+
**exclude** | **Boolean**| If this is set to true, the result would be roles excluding the ones in the group | [optional] [default to false]
|
|
552
|
+
**role_name** | **String**| Parameter for filtering group roles by role `name` using string contains search. | [optional]
|
|
553
|
+
**role_description** | **String**| Parameter for filtering group roles by role `description` using string contains search. | [optional]
|
|
554
|
+
**limit** | **Integer**| Parameter for selecting the amount of data returned. | [optional] [default to 10]
|
|
555
|
+
**offset** | **Integer**| Parameter for selecting the offset of data. | [optional] [default to 0]
|
|
556
|
+
**order_by** | **String**| Parameter for ordering resource by value. For inverse ordering, supply '-' before the param value, such as: ?order_by=-name | [optional]
|
|
557
|
+
|
|
558
|
+
### Return type
|
|
559
|
+
|
|
560
|
+
[**GroupRolesPagination**](GroupRolesPagination.md)
|
|
561
|
+
|
|
562
|
+
### Authorization
|
|
563
|
+
|
|
564
|
+
[basic_auth](../README.md#basic_auth)
|
|
565
|
+
|
|
566
|
+
### HTTP request headers
|
|
567
|
+
|
|
568
|
+
- **Content-Type**: Not defined
|
|
569
|
+
- **Accept**: application/json
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
## update_group
|
|
573
|
+
|
|
574
|
+
> GroupOut update_group(uuid, group)
|
|
575
|
+
|
|
576
|
+
Udate a group in the tenant
|
|
577
|
+
|
|
578
|
+
### Example
|
|
579
|
+
|
|
580
|
+
```ruby
|
|
581
|
+
# load the gem
|
|
582
|
+
require 'rbac-api-client'
|
|
583
|
+
# setup authorization
|
|
584
|
+
RBACApiClient.configure do |config|
|
|
585
|
+
# Configure HTTP basic authorization: basic_auth
|
|
586
|
+
config.username = 'YOUR USERNAME'
|
|
587
|
+
config.password = 'YOUR PASSWORD'
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
api_instance = RBACApiClient::GroupApi.new
|
|
591
|
+
uuid = 'uuid_example' # String | ID of group to update
|
|
592
|
+
group = RBACApiClient::Group.new # Group | Group to update in tenant
|
|
593
|
+
|
|
594
|
+
begin
|
|
595
|
+
#Udate a group in the tenant
|
|
596
|
+
result = api_instance.update_group(uuid, group)
|
|
597
|
+
p result
|
|
598
|
+
rescue RBACApiClient::ApiError => e
|
|
599
|
+
puts "Exception when calling GroupApi->update_group: #{e}"
|
|
600
|
+
end
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
### Parameters
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
Name | Type | Description | Notes
|
|
607
|
+
------------- | ------------- | ------------- | -------------
|
|
608
|
+
**uuid** | [**String**](.md)| ID of group to update |
|
|
609
|
+
**group** | [**Group**](Group.md)| Group to update in tenant |
|
|
610
|
+
|
|
611
|
+
### Return type
|
|
612
|
+
|
|
613
|
+
[**GroupOut**](GroupOut.md)
|
|
614
|
+
|
|
615
|
+
### Authorization
|
|
616
|
+
|
|
617
|
+
[basic_auth](../README.md#basic_auth)
|
|
618
|
+
|
|
619
|
+
### HTTP request headers
|
|
620
|
+
|
|
621
|
+
- **Content-Type**: application/json
|
|
622
|
+
- **Accept**: application/json, */*
|
|
623
|
+
|