use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncCreateInstanceStringStringInstance method syncCreateInstanceStringStringInstance.
public static void syncCreateInstanceStringStringInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String instanceId = "instanceId902024336";
Instance instance = Instance.newBuilder().build();
Instance response = cloudRedisClient.createInstanceAsync(parent, instanceId, instance).get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncDeleteInstanceInstancename method syncDeleteInstanceInstancename.
public static void syncDeleteInstanceInstancename() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
cloudRedisClient.deleteInstanceAsync(name).get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncDeleteInstanceString method syncDeleteInstanceString.
public static void syncDeleteInstanceString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
cloudRedisClient.deleteInstanceAsync(name).get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class AsyncExportInstance method asyncExportInstance.
public static void asyncExportInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
ExportInstanceRequest request = ExportInstanceRequest.newBuilder().setName("name3373707").setOutputConfig(OutputConfig.newBuilder().build()).build();
ApiFuture<Operation> future = cloudRedisClient.exportInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class AsyncExportInstanceLRO method asyncExportInstanceLRO.
public static void asyncExportInstanceLRO() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
ExportInstanceRequest request = ExportInstanceRequest.newBuilder().setName("name3373707").setOutputConfig(OutputConfig.newBuilder().build()).build();
OperationFuture<Instance, Any> future = cloudRedisClient.exportInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
}
Aggregations