use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncGetInstanceString method syncGetInstanceString.
public static void syncGetInstanceString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Instance response = cloudRedisClient.getInstance(name);
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncCreateSetEndpoint method syncCreateSetEndpoint.
public static void syncCreateSetEndpoint() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
CloudRedisSettings cloudRedisSettings = CloudRedisSettings.newBuilder().setEndpoint(myEndpoint).build();
CloudRedisClient cloudRedisClient = CloudRedisClient.create(cloudRedisSettings);
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncCreateInstanceLocationnameStringInstance method syncCreateInstanceLocationnameStringInstance.
public static void syncCreateInstanceLocationnameStringInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
String instanceId = "instanceId902024336";
Instance instance = Instance.newBuilder().build();
Instance response = cloudRedisClient.createInstanceAsync(parent, instanceId, instance).get();
}
}
Aggregations