use of com.google.cloud.redis.v1beta1.Instance in project gapic-generator-java by googleapis.
the class SyncRescheduleMaintenanceStringReschedulemaintenancerequestrescheduletypeTimestamp method syncRescheduleMaintenanceStringReschedulemaintenancerequestrescheduletypeTimestamp.
public static void syncRescheduleMaintenanceStringReschedulemaintenancerequestrescheduletypeTimestamp() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
RescheduleMaintenanceRequest.RescheduleType rescheduleType = RescheduleMaintenanceRequest.RescheduleType.forNumber(0);
Timestamp scheduleTime = Timestamp.newBuilder().build();
Instance response = cloudRedisClient.rescheduleMaintenanceAsync(name, rescheduleType, scheduleTime).get();
}
}
use of com.google.cloud.redis.v1beta1.Instance in project gapic-generator-java by googleapis.
the class AsyncUpdateInstanceLRO method asyncUpdateInstanceLRO.
public static void asyncUpdateInstanceLRO() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
UpdateInstanceRequest request = UpdateInstanceRequest.newBuilder().setUpdateMask(FieldMask.newBuilder().build()).setInstance(Instance.newBuilder().build()).build();
OperationFuture<Instance, Any> future = cloudRedisClient.updateInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
}
use of com.google.cloud.redis.v1beta1.Instance in project gapic-generator-java by googleapis.
the class SyncUpdateInstance method syncUpdateInstance.
public static void syncUpdateInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
UpdateInstanceRequest request = UpdateInstanceRequest.newBuilder().setUpdateMask(FieldMask.newBuilder().build()).setInstance(Instance.newBuilder().build()).build();
Instance response = cloudRedisClient.updateInstanceAsync(request).get();
}
}
use of com.google.cloud.redis.v1beta1.Instance 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.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();
}
}
Aggregations