Method: OpenapiClient::ResourceRolesApi#list_resource_roles_with_http_info
- Defined in:
- lib/openapi_client/api/resource_roles_api.rb
#list_resource_roles_with_http_info(proj_id, env_id, resource_id, opts = {}) ⇒ Array<(Array<ResourceRoleRead>, Integer, Hash)>
List Resource Roles Lists all the roles defined on the resource.
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/openapi_client/api/resource_roles_api.rb', line 472 def list_resource_roles_with_http_info(proj_id, env_id, resource_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResourceRolesApi.list_resource_roles ...' 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.list_resource_roles" 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.list_resource_roles" 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.list_resource_roles" end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ResourceRolesApi.list_resource_roles, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100 fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ResourceRolesApi.list_resource_roles, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1 fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ResourceRolesApi.list_resource_roles, must be greater than or equal to 1.' end # resource path local_var_path = '/v2/schema/{proj_id}/{env_id}/resources/{resource_id}/roles'.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)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil? # 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] || 'Array<ResourceRoleRead>' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"ResourceRolesApi.list_resource_roles", :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(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResourceRolesApi#list_resource_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |