use of com.google.cloud.redis.v1.Instance 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.v1.Instance in project gapic-generator-java by googleapis.
the class SyncImportInstanceStringInputconfig method syncImportInstanceStringInputconfig.
public static void syncImportInstanceStringInputconfig() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = "name3373707";
InputConfig inputConfig = InputConfig.newBuilder().build();
Instance response = cloudRedisClient.importInstanceAsync(name, inputConfig).get();
}
}
use of com.google.cloud.redis.v1.Instance in project gapic-generator-java by googleapis.
the class AsyncListInstances method asyncListInstances.
public static void asyncListInstances() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
ListInstancesRequest request = ListInstancesRequest.newBuilder().setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()).setPageSize(883849137).setPageToken("pageToken873572522").build();
ApiFuture<Instance> future = cloudRedisClient.listInstancesPagedCallable().futureCall(request);
// Do something.
for (Instance element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
}
use of com.google.cloud.redis.v1.Instance in project gapic-generator-java by googleapis.
the class SyncExportInstance method syncExportInstance.
public static void syncExportInstance() 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();
Instance response = cloudRedisClient.exportInstanceAsync(request).get();
}
}
use of com.google.cloud.redis.v1.Instance in project gapic-generator-java by googleapis.
the class SyncExportInstanceStringOutputconfig method syncExportInstanceStringOutputconfig.
public static void syncExportInstanceStringOutputconfig() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = "name3373707";
OutputConfig outputConfig = OutputConfig.newBuilder().build();
Instance response = cloudRedisClient.exportInstanceAsync(name, outputConfig).get();
}
}
Aggregations