Class: Google::Cloud::Spanner::Credentials

Inherits:
V1::Spanner::Credentials
  • Object
show all
Defined in:
lib/google/cloud/spanner/credentials.rb

Overview

Credentials

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

Examples:

require "google/cloud/spanner"

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

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

spanner.project_id #=> "my-project"