Class: Google::Cloud::Dns::Credentials

Inherits:
Auth::Credentials
  • Object
show all
Defined in:
lib/google/cloud/dns/credentials.rb

Overview

Credentials

Represents the authentication and authorization used to connect to the DNS API.

Examples:

require "google/cloud/dns"

keyfile = "/path/to/keyfile.json"
creds = Google::Cloud::Dns::Credentials.new keyfile

dns = Google::Cloud::Dns.new(
  project_id: "my-project",
  credentials: creds
)

dns.project_id #=> "my-project"

Constant Summary collapse

SCOPE =
["https://www.googleapis.com/auth/ndev.clouddns.readwrite"]
PATH_ENV_VARS =
%w(DNS_CREDENTIALS
DNS_KEYFILE
GOOGLE_CLOUD_CREDENTIALS
GOOGLE_CLOUD_KEYFILE
GCLOUD_KEYFILE)
JSON_ENV_VARS =
%w(DNS_CREDENTIALS_JSON
DNS_KEYFILE_JSON
GOOGLE_CLOUD_CREDENTIALS_JSON
GOOGLE_CLOUD_KEYFILE_JSON
GCLOUD_KEYFILE_JSON)
DEFAULT_PATHS =
["~/.config/gcloud/application_default_credentials.json"]