use of com.google.cloud.redis.v1beta1.CloudRedisClient 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.v1beta1.CloudRedisClient 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();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncFailoverInstance method syncFailoverInstance.
public static void syncFailoverInstance() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
FailoverInstanceRequest request = FailoverInstanceRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).build();
Instance response = cloudRedisClient.failoverInstanceAsync(request).get();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient 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();
}
}
use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.
the class SyncFailoverInstanceStringFailoverinstancerequestdataprotectionmode method syncFailoverInstanceStringFailoverinstancerequestdataprotectionmode.
public static void syncFailoverInstanceStringFailoverinstancerequestdataprotectionmode() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
FailoverInstanceRequest.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.DataProtectionMode.forNumber(0);
Instance response = cloudRedisClient.failoverInstanceAsync(name, dataProtectionMode).get();
}
}
Aggregations