Method: OpenapiClient::ResourceRolesApi#remove_parent_resource_role_with_http_info
- Defined in:
- lib/openapi_client/api/resource_roles_api.rb
#remove_parent_resource_role_with_http_info(proj_id, env_id, resource_id, role_id, parent_role_id, opts = {}) ⇒ Array<(ResourceRoleRead, Integer, Hash)>
Remove Parent Role This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. Both roles must be defined on the same resource, identified by id `resource_id`.
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 |
# File 'lib/openapi_client/api/resource_roles_api.rb', line 565 def remove_parent_resource_role_with_http_info(proj_id, env_id, resource_id, role_id, parent_role_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResourceRolesApi.remove_parent_resource_role ...' end # verify the required parameter 'proj_id' is set if @api_client.config.client_side_validation && proj_id.nil? fail ArgumentError, "Missing the required parameter 'proj_id' when calling ResourceRolesApi.remove_parent_resource_role" end # verify the required parameter 'env_id' is set if @api_client.config.client_side_validation && env_id.nil? fail ArgumentError, "Missing the required parameter 'env_id' when calling ResourceRolesApi.remove_parent_resource_role" end # verify the required parameter 'resource_id' is set if @api_client.config.client_side_validation && resource_id.nil? fail ArgumentError, "Missing the required parameter 'resource_id' when calling ResourceRolesApi.remove_parent_resource_role" end # verify the required parameter 'role_id' is set if @api_client.config.client_side_validation && role_id.nil? fail ArgumentError, "Missing the required parameter 'role_id' when calling ResourceRolesApi.remove_parent_resource_role" end # verify the required parameter 'parent_role_id' is set if @api_client.config.client_side_validation && parent_role_id.nil? fail ArgumentError, "Missing the required parameter 'parent_role_id' when calling ResourceRolesApi.remove_parent_resource_role" end # resource path local_var_path = '/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{role_id}/parents/{parent_role_id}'.sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'resource_id' + '}', CGI.escape(resource_id.to_s)).sub('{' + 'role_id' + '}', CGI.escape(role_id.to_s)).sub('{' + 'parent_role_id' + '}', CGI.escape(parent_role_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ResourceRoleRead' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ResourceRolesApi.remove_parent_resource_role", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResourceRolesApi#remove_parent_resource_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |