Reference documentation and code samples for the google-cloud-resource_manager module Google::Cloud::ResourceManager.
Google Cloud Resource Manager
The Resource Manager API provides methods that you can use to programmatically manage your projects in the Google Cloud Platform.
Methods
.configure
def self.configure() -> Google::Cloud::Config
Configure the Google Cloud Resource Manager library.
The following Resource Manager configuration parameters are supported:
credentials
- (String, Hash, Google::Auth::Credentials) The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See Credentials) (The parameterkeyfile
is also available but deprecated.)scope
- (String, Arrayretries
- (Integer) Number of times to retry requests on server error.timeout
- (Integer) Default timeout to use in requests.
- (Google::Cloud.configure.resource_manager)
- (Google::Cloud::Config) — The configuration object the Google::Cloud::ResourceManager library uses.
.new
def self.new(credentials: nil, scope: nil, retries: nil, timeout: nil, endpoint: nil, keyfile: 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.
- credentials (String, Hash, Google::Auth::Credentials) (defaults to: nil) — The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See Credentials)
-
scope (String, Array<String>) (defaults to: nil) —
The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See Using OAuth 2.0 to Access Google APIs.
The default scope is:
https://www.googleapis.com/auth/cloud-platform
-
retries (Integer) (defaults to: nil) — Number of times to retry requests on server
error. The default value is
3
. Optional. - timeout (Integer) (defaults to: nil) — Default timeout to use in requests. Optional.
- endpoint (String) (defaults to: nil) — Override of the endpoint host name. Optional. If the param is nil, uses the default endpoint.
-
keyfile (String) (defaults to: nil) — Alias for the
credentials
argument. Deprecated.
require "google/cloud/resource_manager" resource_manager = Google::Cloud::ResourceManager.new resource_manager.projects.each do |project| puts projects.project_id end
Constants
VERSION
value: "0.36.2".freeze