Class Instance (2.13.0)

This class identifies a Cloud Spanner Instance.

A Cloud Spanner instance is identified by its project_id and instance_id.

For more info about the instance_id format, see https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#createinstancerequest

Constructors

Instance(Instance const &)

Copy and move

Parameter
Name Description
Instance const &

Instance(Instance &&)

Copy and move

Parameter
Name Description
Instance &&

Instance(Project, std::string)

Constructs an Instance object identified by the given project and instance_id.

Parameters
Name Description
project Project
instance_id std::string

Instance(std::string, std::string)

Constructs an Instance object identified by the given IDs.

This is equivalent to first constructing a Project from the given project_id and then calling the Instance(Project, std::string) constructor.

Parameters
Name Description
project_id std::string
instance_id std::string

Operators

operator=(Instance const &)

Copy and move

Parameter
Name Description
Instance const &
Returns
Type Description
Instance &

operator=(Instance &&)

Copy and move

Parameter
Name Description
Instance &&
Returns
Type Description
Instance &

Functions

project() const

Returns the Project containing this instance.

Returns
Type Description
Project const &

project_id() const

Returns
Type Description
std::string const &

instance_id() const

Returns the Instance ID.

Returns
Type Description
std::string const &

FullName() const

Returns the fully qualified instance name as a string of the form: "projects/

Returns
Type Description
std::string