Reference documentation and code samples for the Cloud Bigtable API module Google::Cloud.
Methods
.bigtable
def self.bigtable(project_id: nil, credentials: nil, scope: nil, timeout: nil) -> Google::Cloud::Bigtable::ProjectCreates a Cloud Bigtable client instance for data, table admin and instance admin operations.
- project_id (String) (defaults to: nil) — Project identifier for the Bigtable service you are connecting to. If not present, the default project for the credentials is used.
-
credentials (Google::Auth::Credentials, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc) (defaults to: nil) — The means for authenticating requests made by the client. This parameter can
be one of the following types.
Google::Auth::Credentialsuses the properties of its represented keyfile for authenticating requests made by this client.GRPC::Core::Channelwill be used to make calls through.GRPC::Core::ChannelCredentialswill be used to set up the gRPC client. The channel credentials should already be composed with aGRPC::Core::CallCredentialsobject.Procwill be used as an updater_proc for the gRPC channel. The proc transforms the metadata for requests, generally, to give OAuth credentials. @note Warning: Passing aStringto a keyfile path or aHashof credentials is deprecated. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data.@example
# The recommended way to provide credentials is to use the
make_credsmethod # on the appropriate credentials class for your environment.credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( json_key_io: ::File.open("/path/to/keyfile.json") )
client = Google::Cloud.bigtable credentials: credentials
- scope (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 OAuth scopes for this service. This parameter is ignored if an updater_proc is supplied.
- timeout (Integer) (defaults to: nil) — The default timeout, in seconds, for calls made through this client.
require "google/cloud/bigtable" bigtable = Google::Cloud.bigtable
#bigtable
def bigtable(scope: nil, timeout: nil, credentials: nil)Creates a new object for connecting to the Cloud Bigtable service.
For more information on connecting to Google Cloud Platform, see the Authentication Guide.
- scope (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 OAuth scopes for this service. This parameter is ignored if an updater_proc is supplied.
- timeout (Integer) (defaults to: nil) — The default timeout, in seconds, for calls made through this client.
-
credentials (Google::Auth::Credentials, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc) (defaults to: nil) — The means for authenticating requests made by the client. This parameter can
be one of the following types.
Google::Auth::Credentialsuses the properties of its represented keyfile for authenticating requests made by this client.GRPC::Core::Channelwill be used to make calls through.GRPC::Core::ChannelCredentialswill be used to set up the gRPC client. The channel credentials should already be composed with aGRPC::Core::CallCredentialsobject.Procwill be used as an updater_proc for the gRPC channel. The proc transforms the metadata for requests, generally, to give OAuth credentials. @note Warning: Passing aStringto a keyfile path or aHashof credentials is deprecated. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data.@example
# The recommended way to provide credentials is to use the
make_credsmethod # on the appropriate credentials class for your environment.credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( json_key_io: ::File.open("/path/to/keyfile.json") )
gcloud = Google::Cloud.new
bigtable = gcloud.bigtable credentials: credentials