use of com.google.cloud.redis.v1beta1.InstanceName in project gapic-generator-java by googleapis.
the class SyncFailoverInstanceInstancenameFailoverinstancerequestdataprotectionmode method syncFailoverInstanceInstancenameFailoverinstancerequestdataprotectionmode.
public static void syncFailoverInstanceInstancenameFailoverinstancerequestdataprotectionmode() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
FailoverInstanceRequest.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.DataProtectionMode.forNumber(0);
Instance response = cloudRedisClient.failoverInstanceAsync(name, dataProtectionMode).get();
}
}
Aggregations