permit-sdk 0.0.1
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/lib/api/api.rb +25 -0
- data/lib/api/base.rb +26 -0
- data/lib/api/resources.rb +13 -0
- data/lib/api/tenants.rb +11 -0
- data/lib/api/users.rb +50 -0
- data/lib/api/utils.rb +9 -0
- data/lib/config.rb +23 -0
- data/lib/main.rb +49 -0
- data/lib/openapi_client/api/api_keys_api.rb +413 -0
- data/lib/openapi_client/api/audit_elements_data_api.rb +118 -0
- data/lib/openapi_client/api/audit_logs_api.rb +204 -0
- data/lib/openapi_client/api/authentication_api.rb +512 -0
- data/lib/openapi_client/api/condition_set_rules_api.rb +278 -0
- data/lib/openapi_client/api/condition_sets_api.rb +428 -0
- data/lib/openapi_client/api/decision_logs_api.rb +128 -0
- data/lib/openapi_client/api/decision_logs_ingress_api.rb +90 -0
- data/lib/openapi_client/api/default_api.rb +297 -0
- data/lib/openapi_client/api/elements_configs_api.rb +657 -0
- data/lib/openapi_client/api/environments_api.rb +462 -0
- data/lib/openapi_client/api/instructions_api.rb +91 -0
- data/lib/openapi_client/api/members_api.rb +354 -0
- data/lib/openapi_client/api/opal_data_api.rb +343 -0
- data/lib/openapi_client/api/organizations_api.rb +652 -0
- data/lib/openapi_client/api/policy_api.rb +138 -0
- data/lib/openapi_client/api/policy_decision_points_api.rb +382 -0
- data/lib/openapi_client/api/policy_git_repositories_api.rb +510 -0
- data/lib/openapi_client/api/projects_api.rb +365 -0
- data/lib/openapi_client/api/resource_actions_api.rb +455 -0
- data/lib/openapi_client/api/resource_attributes_api.rb +473 -0
- data/lib/openapi_client/api/resource_instances_api.rb +425 -0
- data/lib/openapi_client/api/resource_roles_api.rb +813 -0
- data/lib/openapi_client/api/resources_api.rb +514 -0
- data/lib/openapi_client/api/role_assignments_api.rb +278 -0
- data/lib/openapi_client/api/roles_api.rb +759 -0
- data/lib/openapi_client/api/tenants_api.rb +603 -0
- data/lib/openapi_client/api/user_attributes_api.rb +458 -0
- data/lib/openapi_client/api/users_api.rb +684 -0
- data/lib/openapi_client/api/users_elements_data_api.rb +638 -0
- data/lib/openapi_client/api_client.rb +392 -0
- data/lib/openapi_client/api_error.rb +57 -0
- data/lib/openapi_client/configuration.rb +280 -0
- data/lib/openapi_client/models/action_block_editable.rb +230 -0
- data/lib/openapi_client/models/action_block_read.rb +255 -0
- data/lib/openapi_client/models/action_object.rb +275 -0
- data/lib/openapi_client/models/actor.rb +57 -0
- data/lib/openapi_client/models/add_role_permissions.rb +227 -0
- data/lib/openapi_client/models/api_key_create.rb +269 -0
- data/lib/openapi_client/models/api_key_owner_type.rb +41 -0
- data/lib/openapi_client/models/api_key_read.rb +329 -0
- data/lib/openapi_client/models/api_key_scope_read.rb +245 -0
- data/lib/openapi_client/models/attribute_block_editable.rb +235 -0
- data/lib/openapi_client/models/attribute_block_read.rb +260 -0
- data/lib/openapi_client/models/attribute_type.rb +44 -0
- data/lib/openapi_client/models/attributes.rb +231 -0
- data/lib/openapi_client/models/audit_log.rb +415 -0
- data/lib/openapi_client/models/audit_log_objects.rb +282 -0
- data/lib/openapi_client/models/authn_me_api_key_read.rb +329 -0
- data/lib/openapi_client/models/authn_me_member_read.rb +352 -0
- data/lib/openapi_client/models/authn_me_read.rb +224 -0
- data/lib/openapi_client/models/authn_me_user_read.rb +440 -0
- data/lib/openapi_client/models/condition_set_create.rb +340 -0
- data/lib/openapi_client/models/condition_set_read.rb +409 -0
- data/lib/openapi_client/models/condition_set_rule_create.rb +279 -0
- data/lib/openapi_client/models/condition_set_rule_read.rb +360 -0
- data/lib/openapi_client/models/condition_set_rule_remove.rb +279 -0
- data/lib/openapi_client/models/condition_set_type.rb +40 -0
- data/lib/openapi_client/models/condition_set_update.rb +255 -0
- data/lib/openapi_client/models/data_source_config.rb +228 -0
- data/lib/openapi_client/models/data_source_entry.rb +272 -0
- data/lib/openapi_client/models/detailed_audit_log.rb +443 -0
- data/lib/openapi_client/models/dev_login.rb +225 -0
- data/lib/openapi_client/models/dummy_engine_model.rb +229 -0
- data/lib/openapi_client/models/elements_config_create.rb +319 -0
- data/lib/openapi_client/models/elements_config_read.rb +402 -0
- data/lib/openapi_client/models/elements_config_runtime_read.rb +238 -0
- data/lib/openapi_client/models/elements_config_update.rb +268 -0
- data/lib/openapi_client/models/elements_env_type_read.rb +242 -0
- data/lib/openapi_client/models/elements_env_type_update.rb +222 -0
- data/lib/openapi_client/models/elements_permission_level.rb +44 -0
- data/lib/openapi_client/models/elements_role_read.rb +378 -0
- data/lib/openapi_client/models/elements_type.rb +41 -0
- data/lib/openapi_client/models/elements_user_create.rb +295 -0
- data/lib/openapi_client/models/elements_user_role_create.rb +225 -0
- data/lib/openapi_client/models/elements_user_role_remove.rb +225 -0
- data/lib/openapi_client/models/embedded_login_request_output.rb +265 -0
- data/lib/openapi_client/models/engine.rb +39 -0
- data/lib/openapi_client/models/environment_create.rb +281 -0
- data/lib/openapi_client/models/environment_object.rb +295 -0
- data/lib/openapi_client/models/environment_read.rb +335 -0
- data/lib/openapi_client/models/environment_stats.rb +365 -0
- data/lib/openapi_client/models/environment_update.rb +240 -0
- data/lib/openapi_client/models/failed_invite.rb +238 -0
- data/lib/openapi_client/models/full_data.rb +258 -0
- data/lib/openapi_client/models/http_validation_error.rb +221 -0
- data/lib/openapi_client/models/identity_read.rb +300 -0
- data/lib/openapi_client/models/invite_attempt_result.rb +232 -0
- data/lib/openapi_client/models/invite_create.rb +240 -0
- data/lib/openapi_client/models/invite_read.rb +325 -0
- data/lib/openapi_client/models/invite_status.rb +42 -0
- data/lib/openapi_client/models/labels.rb +238 -0
- data/lib/openapi_client/models/language_instructions.rb +252 -0
- data/lib/openapi_client/models/location_inner.rb +230 -0
- data/lib/openapi_client/models/login_result.rb +259 -0
- data/lib/openapi_client/models/member_access_level.rb +41 -0
- data/lib/openapi_client/models/member_access_obj.rb +41 -0
- data/lib/openapi_client/models/multi_invite_result.rb +238 -0
- data/lib/openapi_client/models/onboarding_step.rb +46 -0
- data/lib/openapi_client/models/opa_decision_log.rb +288 -0
- data/lib/openapi_client/models/opa_engine_decision_log.rb +345 -0
- data/lib/openapi_client/models/opa_labels.rb +238 -0
- data/lib/openapi_client/models/opa_metrics.rb +273 -0
- data/lib/openapi_client/models/opal_client.rb +305 -0
- data/lib/openapi_client/models/org_member_read.rb +420 -0
- data/lib/openapi_client/models/org_member_update.rb +230 -0
- data/lib/openapi_client/models/organization_create.rb +292 -0
- data/lib/openapi_client/models/organization_object.rb +295 -0
- data/lib/openapi_client/models/organization_read.rb +295 -0
- data/lib/openapi_client/models/organization_read_with_api_key.rb +313 -0
- data/lib/openapi_client/models/organization_update.rb +247 -0
- data/lib/openapi_client/models/paginated_result_api_key_read.rb +285 -0
- data/lib/openapi_client/models/paginated_result_audit_log.rb +285 -0
- data/lib/openapi_client/models/paginated_result_elements_config_read.rb +285 -0
- data/lib/openapi_client/models/paginated_result_opa_decision_log.rb +285 -0
- data/lib/openapi_client/models/paginated_result_user_read.rb +285 -0
- data/lib/openapi_client/models/pdp.rb +259 -0
- data/lib/openapi_client/models/pdp_config_object.rb +258 -0
- data/lib/openapi_client/models/pdp_config_read.rb +292 -0
- data/lib/openapi_client/models/pdp_context.rb +291 -0
- data/lib/openapi_client/models/pdp_state.rb +224 -0
- data/lib/openapi_client/models/pdp_state_update.rb +238 -0
- data/lib/openapi_client/models/pdp_values.rb +252 -0
- data/lib/openapi_client/models/permission_level_role_read.rb +254 -0
- data/lib/openapi_client/models/policy_repo_create.rb +318 -0
- data/lib/openapi_client/models/policy_repo_read.rb +347 -0
- data/lib/openapi_client/models/policy_repo_status.rb +41 -0
- data/lib/openapi_client/models/programming_language.rb +43 -0
- data/lib/openapi_client/models/project_create.rb +318 -0
- data/lib/openapi_client/models/project_object.rb +295 -0
- data/lib/openapi_client/models/project_read.rb +357 -0
- data/lib/openapi_client/models/project_update.rb +250 -0
- data/lib/openapi_client/models/raw_data.rb +329 -0
- data/lib/openapi_client/models/relationship_tuple_object.rb +252 -0
- data/lib/openapi_client/models/remote_config.rb +256 -0
- data/lib/openapi_client/models/remove_role_permissions.rb +227 -0
- data/lib/openapi_client/models/resource_action_create.rb +271 -0
- data/lib/openapi_client/models/resource_action_read.rb +370 -0
- data/lib/openapi_client/models/resource_action_update.rb +230 -0
- data/lib/openapi_client/models/resource_attribute_create.rb +271 -0
- data/lib/openapi_client/models/resource_attribute_read.rb +370 -0
- data/lib/openapi_client/models/resource_attribute_update.rb +230 -0
- data/lib/openapi_client/models/resource_attributes.rb +238 -0
- data/lib/openapi_client/models/resource_create.rb +310 -0
- data/lib/openapi_client/models/resource_id.rb +230 -0
- data/lib/openapi_client/models/resource_instance_create.rb +281 -0
- data/lib/openapi_client/models/resource_instance_read.rb +375 -0
- data/lib/openapi_client/models/resource_instance_update.rb +220 -0
- data/lib/openapi_client/models/resource_read.rb +374 -0
- data/lib/openapi_client/models/resource_replace.rb +274 -0
- data/lib/openapi_client/models/resource_role_create.rb +295 -0
- data/lib/openapi_client/models/resource_role_read.rb +379 -0
- data/lib/openapi_client/models/resource_role_update.rb +254 -0
- data/lib/openapi_client/models/resource_type_object.rb +286 -0
- data/lib/openapi_client/models/resource_update.rb +264 -0
- data/lib/openapi_client/models/role_assignment_create.rb +255 -0
- data/lib/openapi_client/models/role_assignment_read.rb +375 -0
- data/lib/openapi_client/models/role_assignment_remove.rb +255 -0
- data/lib/openapi_client/models/role_block.rb +244 -0
- data/lib/openapi_client/models/role_create.rb +295 -0
- data/lib/openapi_client/models/role_data.rb +221 -0
- data/lib/openapi_client/models/role_read.rb +364 -0
- data/lib/openapi_client/models/role_update.rb +254 -0
- data/lib/openapi_client/models/settings.rb +231 -0
- data/lib/openapi_client/models/ssh_auth_data.rb +295 -0
- data/lib/openapi_client/models/statistics.rb +389 -0
- data/lib/openapi_client/models/tenant_create.rb +281 -0
- data/lib/openapi_client/models/tenant_object.rb +284 -0
- data/lib/openapi_client/models/tenant_read.rb +365 -0
- data/lib/openapi_client/models/tenant_update.rb +240 -0
- data/lib/openapi_client/models/user_create.rb +286 -0
- data/lib/openapi_client/models/user_data.rb +232 -0
- data/lib/openapi_client/models/user_login_request_input.rb +240 -0
- data/lib/openapi_client/models/user_object.rb +313 -0
- data/lib/openapi_client/models/user_read.rb +336 -0
- data/lib/openapi_client/models/user_role.rb +240 -0
- data/lib/openapi_client/models/user_role_create.rb +240 -0
- data/lib/openapi_client/models/user_role_remove.rb +240 -0
- data/lib/openapi_client/models/user_update.rb +250 -0
- data/lib/openapi_client/models/validation_error.rb +254 -0
- data/lib/openapi_client/models/webhook_create.rb +235 -0
- data/lib/openapi_client/models/webhook_read.rb +315 -0
- data/lib/openapi_client/models/webhook_update.rb +230 -0
- data/lib/openapi_client/version.rb +15 -0
- data/lib/openapi_client.rb +220 -0
- data/lib/permit.rb +58 -0
- metadata +251 -0
@@ -0,0 +1,343 @@
|
|
1
|
+
=begin
|
2
|
+
#Permit.io API
|
3
|
+
|
4
|
+
# Authorization as a service
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.2.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module OpenapiClient
|
16
|
+
class OPALDataApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get All Data
|
23
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
24
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
25
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [Boolean] :__internal_update_cache (default to false)
|
28
|
+
# @return [FullData]
|
29
|
+
def get_all_data(org_id, proj_id, env_id, opts = {})
|
30
|
+
data, _status_code, _headers = get_all_data_with_http_info(org_id, proj_id, env_id, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get All Data
|
35
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
36
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
37
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [Boolean] :__internal_update_cache (default to false)
|
40
|
+
# @return [Array<(FullData, Integer, Hash)>] FullData data, response status code and response headers
|
41
|
+
def get_all_data_with_http_info(org_id, proj_id, env_id, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: OPALDataApi.get_all_data ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'org_id' is set
|
46
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling OPALDataApi.get_all_data"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'proj_id' is set
|
50
|
+
if @api_client.config.client_side_validation && proj_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'proj_id' when calling OPALDataApi.get_all_data"
|
52
|
+
end
|
53
|
+
# verify the required parameter 'env_id' is set
|
54
|
+
if @api_client.config.client_side_validation && env_id.nil?
|
55
|
+
fail ArgumentError, "Missing the required parameter 'env_id' when calling OPALDataApi.get_all_data"
|
56
|
+
end
|
57
|
+
# resource path
|
58
|
+
local_var_path = '/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s))
|
59
|
+
|
60
|
+
# query parameters
|
61
|
+
query_params = opts[:query_params] || {}
|
62
|
+
query_params[:'__internal_update_cache'] = opts[:'__internal_update_cache'] if !opts[:'__internal_update_cache'].nil?
|
63
|
+
|
64
|
+
# header parameters
|
65
|
+
header_params = opts[:header_params] || {}
|
66
|
+
# HTTP header 'Accept' (if needed)
|
67
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:debug_body]
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:debug_return_type] || 'FullData'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:operation => :"OPALDataApi.get_all_data",
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type
|
89
|
+
)
|
90
|
+
|
91
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug "API called: OPALDataApi#get_all_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
94
|
+
end
|
95
|
+
return data, status_code, headers
|
96
|
+
end
|
97
|
+
|
98
|
+
# Get Data For Role
|
99
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
100
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
101
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
102
|
+
# @param role_id [String]
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [RoleData]
|
105
|
+
def get_data_for_role(org_id, proj_id, env_id, role_id, opts = {})
|
106
|
+
data, _status_code, _headers = get_data_for_role_with_http_info(org_id, proj_id, env_id, role_id, opts)
|
107
|
+
data
|
108
|
+
end
|
109
|
+
|
110
|
+
# Get Data For Role
|
111
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
112
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
113
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
114
|
+
# @param role_id [String]
|
115
|
+
# @param [Hash] opts the optional parameters
|
116
|
+
# @return [Array<(RoleData, Integer, Hash)>] RoleData data, response status code and response headers
|
117
|
+
def get_data_for_role_with_http_info(org_id, proj_id, env_id, role_id, opts = {})
|
118
|
+
if @api_client.config.debugging
|
119
|
+
@api_client.config.logger.debug 'Calling API: OPALDataApi.get_data_for_role ...'
|
120
|
+
end
|
121
|
+
# verify the required parameter 'org_id' is set
|
122
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling OPALDataApi.get_data_for_role"
|
124
|
+
end
|
125
|
+
# verify the required parameter 'proj_id' is set
|
126
|
+
if @api_client.config.client_side_validation && proj_id.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'proj_id' when calling OPALDataApi.get_data_for_role"
|
128
|
+
end
|
129
|
+
# verify the required parameter 'env_id' is set
|
130
|
+
if @api_client.config.client_side_validation && env_id.nil?
|
131
|
+
fail ArgumentError, "Missing the required parameter 'env_id' when calling OPALDataApi.get_data_for_role"
|
132
|
+
end
|
133
|
+
# verify the required parameter 'role_id' is set
|
134
|
+
if @api_client.config.client_side_validation && role_id.nil?
|
135
|
+
fail ArgumentError, "Missing the required parameter 'role_id' when calling OPALDataApi.get_data_for_role"
|
136
|
+
end
|
137
|
+
# resource path
|
138
|
+
local_var_path = '/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/roles/{role_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s))
|
139
|
+
|
140
|
+
# query parameters
|
141
|
+
query_params = opts[:query_params] || {}
|
142
|
+
|
143
|
+
# header parameters
|
144
|
+
header_params = opts[:header_params] || {}
|
145
|
+
# HTTP header 'Accept' (if needed)
|
146
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
147
|
+
|
148
|
+
# form parameters
|
149
|
+
form_params = opts[:form_params] || {}
|
150
|
+
|
151
|
+
# http body (model)
|
152
|
+
post_body = opts[:debug_body]
|
153
|
+
|
154
|
+
# return_type
|
155
|
+
return_type = opts[:debug_return_type] || 'RoleData'
|
156
|
+
|
157
|
+
# auth_names
|
158
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
159
|
+
|
160
|
+
new_options = opts.merge(
|
161
|
+
:operation => :"OPALDataApi.get_data_for_role",
|
162
|
+
:header_params => header_params,
|
163
|
+
:query_params => query_params,
|
164
|
+
:form_params => form_params,
|
165
|
+
:body => post_body,
|
166
|
+
:auth_names => auth_names,
|
167
|
+
:return_type => return_type
|
168
|
+
)
|
169
|
+
|
170
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
171
|
+
if @api_client.config.debugging
|
172
|
+
@api_client.config.logger.debug "API called: OPALDataApi#get_data_for_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
173
|
+
end
|
174
|
+
return data, status_code, headers
|
175
|
+
end
|
176
|
+
|
177
|
+
# Get Data For Set Rule
|
178
|
+
# return permission assignment data between user sets and resource sets (i.e: condition set rules data)
|
179
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
180
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
181
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
182
|
+
# @param user_set_id [String]
|
183
|
+
# @param resource_set_id [String]
|
184
|
+
# @param [Hash] opts the optional parameters
|
185
|
+
# @return [Hash<String, Array<String>>]
|
186
|
+
def get_data_for_set_rule(org_id, proj_id, env_id, user_set_id, resource_set_id, opts = {})
|
187
|
+
data, _status_code, _headers = get_data_for_set_rule_with_http_info(org_id, proj_id, env_id, user_set_id, resource_set_id, opts)
|
188
|
+
data
|
189
|
+
end
|
190
|
+
|
191
|
+
# Get Data For Set Rule
|
192
|
+
# return permission assignment data between user sets and resource sets (i.e: condition set rules data)
|
193
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
194
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
195
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
196
|
+
# @param user_set_id [String]
|
197
|
+
# @param resource_set_id [String]
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @return [Array<(Hash<String, Array<String>>, Integer, Hash)>] Hash<String, Array<String>> data, response status code and response headers
|
200
|
+
def get_data_for_set_rule_with_http_info(org_id, proj_id, env_id, user_set_id, resource_set_id, opts = {})
|
201
|
+
if @api_client.config.debugging
|
202
|
+
@api_client.config.logger.debug 'Calling API: OPALDataApi.get_data_for_set_rule ...'
|
203
|
+
end
|
204
|
+
# verify the required parameter 'org_id' is set
|
205
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
206
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling OPALDataApi.get_data_for_set_rule"
|
207
|
+
end
|
208
|
+
# verify the required parameter 'proj_id' is set
|
209
|
+
if @api_client.config.client_side_validation && proj_id.nil?
|
210
|
+
fail ArgumentError, "Missing the required parameter 'proj_id' when calling OPALDataApi.get_data_for_set_rule"
|
211
|
+
end
|
212
|
+
# verify the required parameter 'env_id' is set
|
213
|
+
if @api_client.config.client_side_validation && env_id.nil?
|
214
|
+
fail ArgumentError, "Missing the required parameter 'env_id' when calling OPALDataApi.get_data_for_set_rule"
|
215
|
+
end
|
216
|
+
# verify the required parameter 'user_set_id' is set
|
217
|
+
if @api_client.config.client_side_validation && user_set_id.nil?
|
218
|
+
fail ArgumentError, "Missing the required parameter 'user_set_id' when calling OPALDataApi.get_data_for_set_rule"
|
219
|
+
end
|
220
|
+
# verify the required parameter 'resource_set_id' is set
|
221
|
+
if @api_client.config.client_side_validation && resource_set_id.nil?
|
222
|
+
fail ArgumentError, "Missing the required parameter 'resource_set_id' when calling OPALDataApi.get_data_for_set_rule"
|
223
|
+
end
|
224
|
+
# resource path
|
225
|
+
local_var_path = '/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/condition_set_rules/{user_set_id}/{resource_set_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'user_set_id' + '}', CGI.escape(user_set_id.to_s)).sub('{' + 'resource_set_id' + '}', CGI.escape(resource_set_id.to_s))
|
226
|
+
|
227
|
+
# query parameters
|
228
|
+
query_params = opts[:query_params] || {}
|
229
|
+
|
230
|
+
# header parameters
|
231
|
+
header_params = opts[:header_params] || {}
|
232
|
+
# HTTP header 'Accept' (if needed)
|
233
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
234
|
+
|
235
|
+
# form parameters
|
236
|
+
form_params = opts[:form_params] || {}
|
237
|
+
|
238
|
+
# http body (model)
|
239
|
+
post_body = opts[:debug_body]
|
240
|
+
|
241
|
+
# return_type
|
242
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Array<String>>'
|
243
|
+
|
244
|
+
# auth_names
|
245
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
246
|
+
|
247
|
+
new_options = opts.merge(
|
248
|
+
:operation => :"OPALDataApi.get_data_for_set_rule",
|
249
|
+
:header_params => header_params,
|
250
|
+
:query_params => query_params,
|
251
|
+
:form_params => form_params,
|
252
|
+
:body => post_body,
|
253
|
+
:auth_names => auth_names,
|
254
|
+
:return_type => return_type
|
255
|
+
)
|
256
|
+
|
257
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
258
|
+
if @api_client.config.debugging
|
259
|
+
@api_client.config.logger.debug "API called: OPALDataApi#get_data_for_set_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
260
|
+
end
|
261
|
+
return data, status_code, headers
|
262
|
+
end
|
263
|
+
|
264
|
+
# Get Data For User
|
265
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
266
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
267
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
268
|
+
# @param user_id [String]
|
269
|
+
# @param [Hash] opts the optional parameters
|
270
|
+
# @return [UserData]
|
271
|
+
def get_data_for_user(org_id, proj_id, env_id, user_id, opts = {})
|
272
|
+
data, _status_code, _headers = get_data_for_user_with_http_info(org_id, proj_id, env_id, user_id, opts)
|
273
|
+
data
|
274
|
+
end
|
275
|
+
|
276
|
+
# Get Data For User
|
277
|
+
# @param org_id [String] Either the unique id of the organization, or the URL-friendly key of the organization (i.e: the \"slug\").
|
278
|
+
# @param proj_id [String] Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
|
279
|
+
# @param env_id [String] Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
|
280
|
+
# @param user_id [String]
|
281
|
+
# @param [Hash] opts the optional parameters
|
282
|
+
# @return [Array<(UserData, Integer, Hash)>] UserData data, response status code and response headers
|
283
|
+
def get_data_for_user_with_http_info(org_id, proj_id, env_id, user_id, opts = {})
|
284
|
+
if @api_client.config.debugging
|
285
|
+
@api_client.config.logger.debug 'Calling API: OPALDataApi.get_data_for_user ...'
|
286
|
+
end
|
287
|
+
# verify the required parameter 'org_id' is set
|
288
|
+
if @api_client.config.client_side_validation && org_id.nil?
|
289
|
+
fail ArgumentError, "Missing the required parameter 'org_id' when calling OPALDataApi.get_data_for_user"
|
290
|
+
end
|
291
|
+
# verify the required parameter 'proj_id' is set
|
292
|
+
if @api_client.config.client_side_validation && proj_id.nil?
|
293
|
+
fail ArgumentError, "Missing the required parameter 'proj_id' when calling OPALDataApi.get_data_for_user"
|
294
|
+
end
|
295
|
+
# verify the required parameter 'env_id' is set
|
296
|
+
if @api_client.config.client_side_validation && env_id.nil?
|
297
|
+
fail ArgumentError, "Missing the required parameter 'env_id' when calling OPALDataApi.get_data_for_user"
|
298
|
+
end
|
299
|
+
# verify the required parameter 'user_id' is set
|
300
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
301
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling OPALDataApi.get_data_for_user"
|
302
|
+
end
|
303
|
+
# resource path
|
304
|
+
local_var_path = '/v2/internal/opal_data/{org_id}/{proj_id}/{env_id}/users/{user_id}'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
|
305
|
+
|
306
|
+
# query parameters
|
307
|
+
query_params = opts[:query_params] || {}
|
308
|
+
|
309
|
+
# header parameters
|
310
|
+
header_params = opts[:header_params] || {}
|
311
|
+
# HTTP header 'Accept' (if needed)
|
312
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
313
|
+
|
314
|
+
# form parameters
|
315
|
+
form_params = opts[:form_params] || {}
|
316
|
+
|
317
|
+
# http body (model)
|
318
|
+
post_body = opts[:debug_body]
|
319
|
+
|
320
|
+
# return_type
|
321
|
+
return_type = opts[:debug_return_type] || 'UserData'
|
322
|
+
|
323
|
+
# auth_names
|
324
|
+
auth_names = opts[:debug_auth_names] || ['HTTPBearer']
|
325
|
+
|
326
|
+
new_options = opts.merge(
|
327
|
+
:operation => :"OPALDataApi.get_data_for_user",
|
328
|
+
:header_params => header_params,
|
329
|
+
:query_params => query_params,
|
330
|
+
:form_params => form_params,
|
331
|
+
:body => post_body,
|
332
|
+
:auth_names => auth_names,
|
333
|
+
:return_type => return_type
|
334
|
+
)
|
335
|
+
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug "API called: OPALDataApi#get_data_for_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
+
end
|
340
|
+
return data, status_code, headers
|
341
|
+
end
|
342
|
+
end
|
343
|
+
end
|