use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncUpdateInstanceFieldmaskInstance method syncUpdateInstanceFieldmaskInstance.
public static void syncUpdateInstanceFieldmaskInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
FieldMask updateMask = FieldMask.newBuilder().build();
Instance instance = Instance.newBuilder().build();
Instance response = cloudRedisClient.updateInstanceAsync(updateMask, instance).get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncUpgradeInstanceStringString method syncUpgradeInstanceStringString.
public static void syncUpgradeInstanceStringString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
String redisVersion = "redisVersion-1972584739";
Instance response = cloudRedisClient.upgradeInstanceAsync(name, redisVersion).get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncGetInstanceAuthString method syncGetInstanceAuthString.
public static void syncGetInstanceAuthString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
GetInstanceAuthStringRequest request = GetInstanceAuthStringRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).build();
InstanceAuthString response = cloudRedisClient.getInstanceAuthString(request);
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncGetInstanceAuthStringString method syncGetInstanceAuthStringString.
public static void syncGetInstanceAuthStringString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
InstanceAuthString response = cloudRedisClient.getInstanceAuthString(name);
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class AsyncImportInstance method asyncImportInstance.
public static void asyncImportInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
ImportInstanceRequest request = ImportInstanceRequest.newBuilder().setName("name3373707").setInputConfig(InputConfig.newBuilder().build()).build();
ApiFuture<Operation> future = cloudRedisClient.importInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
}
Aggregations