use of com.google.spanner.admin.instance.v1.CreateInstanceMetadata in project spanner-jdbc by olavloite.
the class AbstractSpecificIntegrationTest method createInstance.
private static void createInstance() {
InstanceAdminClient instanceAdminClient = spanner.getInstanceAdminClient();
InstanceConfig config = instanceAdminClient.getInstanceConfig("regional-europe-west1");
Instance instance = instanceAdminClient.newInstanceBuilder(InstanceId.of(projectId, instanceId)).setDisplayName("Test Instance").setInstanceConfigId(config.getId()).setNodeCount(1).build();
Operation<Instance, CreateInstanceMetadata> createInstance = instanceAdminClient.createInstance(instance);
createInstance = createInstance.waitFor();
}
use of com.google.spanner.admin.instance.v1.CreateInstanceMetadata in project spanner-jdbc by olavloite.
the class CloudSpannerIT method createInstance.
private void createInstance() {
InstanceAdminClient instanceAdminClient = spanner.getInstanceAdminClient();
InstanceConfig config = instanceAdminClient.getInstanceConfig("regional-europe-west1");
Instance instance = instanceAdminClient.newInstanceBuilder(InstanceId.of(getProject(), instanceId)).setDisplayName("Test Instance").setInstanceConfigId(config.getId()).setNodeCount(1).build();
Operation<Instance, CreateInstanceMetadata> createInstance = instanceAdminClient.createInstance(instance);
createInstance = createInstance.waitFor();
}
Aggregations