Module: Google::Cloud
- Defined in:
- lib/google-cloud-resource_manager.rb,
lib/google/cloud/resource_manager.rb,
lib/google/cloud/resource_manager/policy.rb,
lib/google/cloud/resource_manager/manager.rb,
lib/google/cloud/resource_manager/project.rb,
lib/google/cloud/resource_manager/service.rb,
lib/google/cloud/resource_manager/version.rb,
lib/google/cloud/resource_manager/credentials.rb,
lib/google/cloud/resource_manager/project/list.rb,
lib/google/cloud/resource_manager/project/updater.rb
Defined Under Namespace
Modules: ResourceManager
Class Method Summary collapse
-
.resource_manager(keyfile = nil, scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::ResourceManager::Manager
Creates a new
Project
instance connected to the Resource Manager service.
Instance Method Summary collapse
-
#resource_manager(scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::ResourceManager::Manager
Creates a new object for connecting to the Resource Manager service.
Class Method Details
.resource_manager(keyfile = nil, scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::ResourceManager::Manager
Creates a new Project
instance connected to the Resource Manager
service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/google-cloud-resource_manager.rb', line 101 def self.resource_manager keyfile = nil, scope: nil, retries: nil, timeout: nil require "google/cloud/resource_manager" if keyfile.nil? credentials = Google::Cloud::ResourceManager::Credentials.default( scope: scope) else credentials = Google::Cloud::ResourceManager::Credentials.new( keyfile, scope: scope) end Google::Cloud::ResourceManager::Manager.new( Google::Cloud::ResourceManager::Service.new( credentials, retries: retries, timeout: timeout)) end |
Instance Method Details
#resource_manager(scope: nil, retries: nil, timeout: nil) ⇒ Google::Cloud::ResourceManager::Manager
Creates a new object for connecting to the Resource Manager service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide.
64 65 66 67 68 |
# File 'lib/google-cloud-resource_manager.rb', line 64 def resource_manager scope: nil, retries: nil, timeout: nil Google::Cloud.resource_manager @keyfile, scope: scope, retries: (retries || @retries), timeout: (timeout || @timeout) end |