std::string const& project_id,
std::string const& instance_id,
std::string const& display_name,
std::string const& config_id) {
namespace spanner = ::google::cloud::spanner;
std::string config_name =
project.FullName() + "/instanceConfigs/" + config_id;
auto instance =
client
.
SetLabels({{
"cloud_spanner_samples",
"true"}})
.get();
if (!instance) throw std::move(instance).status();
std::cout << "Created instance [" << in << "]:\n" << instance->DebugString();
}
CreateInstanceRequestBuilder is a builder class for google::spanner::admin::instance::v1::CreateInsta...
Definition: create_instance_request_builder.h:40
CreateInstanceRequestBuilder & SetNodeCount(int node_count) &
Definition: create_instance_request_builder.h:82
CreateInstanceRequestBuilder & SetLabels(std::map< std::string, std::string > const &labels) &
Definition: create_instance_request_builder.h:102
google::spanner::admin::instance::v1::CreateInstanceRequest & Build() &
Definition: create_instance_request_builder.h:120
CreateInstanceRequestBuilder & SetDisplayName(std::string display_name) &
Definition: create_instance_request_builder.h:72
This class identifies a Cloud Spanner Instance.
Definition: instance.h:42
Cloud Spanner Instance Admin API.
Definition: instance_admin_client.h:84
future< StatusOr< google::spanner::admin::instance::v1::Instance > > CreateInstance(std::string const &parent, std::string const &instance_id, google::spanner::admin::instance::v1::Instance const &instance, Options opts={})
Creates an instance and begins preparing it to begin serving.