Method: OpenapiClient::ResourceRolesApi#update_resource_role_with_http_info
- Defined in:
- lib/openapi_client/api/resource_roles_api.rb
#update_resource_role_with_http_info(proj_id, env_id, resource_id, role_id, resource_role_update, opts = {}) ⇒ Array<(ResourceRoleRead, Integer, Hash)>
Update Resource Role Partially updates the role defined on a resource. Fields that will be provided will be completely overwritten.
744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 |
# File 'lib/openapi_client/api/resource_roles_api.rb', line 744 def update_resource_role_with_http_info(proj_id, env_id, resource_id, role_id, resource_role_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResourceRolesApi.update_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.update_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.update_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.update_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.update_resource_role" end # verify the required parameter 'resource_role_update' is set if @api_client.config.client_side_validation && resource_role_update.nil? fail ArgumentError, "Missing the required parameter 'resource_role_update' when calling ResourceRolesApi.update_resource_role" end # resource path local_var_path = '/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles/{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)) # 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']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(resource_role_update) # return_type return_type = opts[:debug_return_type] || 'ResourceRoleRead' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ResourceRolesApi.update_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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResourceRolesApi#update_resource_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |