Method: Fog::Identity::HuaweiCloud::V3::Real#list_projects

Defined in:
lib/fog/identity/huaweicloud/v3/requests/list_projects.rb

#list_projects(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/fog/identity/huaweicloud/v3/requests/list_projects.rb', line 6

def list_projects(options = {})
  user_id = options.delete('user_id') || options.delete(:user_id)
  path = if user_id
           "users/#{user_id}/projects"
         else
           "projects"
         end

  request(
    :expects => [200],
    :method  => 'GET',
    :path    => path,
    :query   => options
  )
end