Search in sources :

Example 46 with CloudRedisClient

use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.

the class SyncGetInstanceString method syncGetInstanceString.

public static void syncGetInstanceString() throws Exception {
    // It may require modifications to work in your environment.
    try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
        String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
        Instance response = cloudRedisClient.getInstance(name);
    }
}
Also used : CloudRedisClient(com.google.cloud.redis.v1beta1.CloudRedisClient) Instance(com.google.cloud.redis.v1beta1.Instance)

Example 47 with CloudRedisClient

use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.

the class SyncCreateSetEndpoint method syncCreateSetEndpoint.

public static void syncCreateSetEndpoint() throws Exception {
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    CloudRedisSettings cloudRedisSettings = CloudRedisSettings.newBuilder().setEndpoint(myEndpoint).build();
    CloudRedisClient cloudRedisClient = CloudRedisClient.create(cloudRedisSettings);
}
Also used : CloudRedisClient(com.google.cloud.redis.v1beta1.CloudRedisClient) CloudRedisSettings(com.google.cloud.redis.v1beta1.CloudRedisSettings)

Example 48 with CloudRedisClient

use of com.google.cloud.redis.v1beta1.CloudRedisClient in project gapic-generator-java by googleapis.

the class SyncCreateInstanceLocationnameStringInstance method syncCreateInstanceLocationnameStringInstance.

public static void syncCreateInstanceLocationnameStringInstance() throws Exception {
    // It may require modifications to work in your environment.
    try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
        LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
        String instanceId = "instanceId902024336";
        Instance instance = Instance.newBuilder().build();
        Instance response = cloudRedisClient.createInstanceAsync(parent, instanceId, instance).get();
    }
}
Also used : CloudRedisClient(com.google.cloud.redis.v1beta1.CloudRedisClient) Instance(com.google.cloud.redis.v1beta1.Instance) LocationName(com.google.cloud.redis.v1beta1.LocationName)

Aggregations

CloudRedisClient (com.google.cloud.redis.v1beta1.CloudRedisClient)48 Instance (com.google.cloud.redis.v1beta1.Instance)30 Operation (com.google.longrunning.Operation)8 Any (com.google.protobuf.Any)8 InstanceName (com.google.cloud.redis.v1beta1.InstanceName)6 FailoverInstanceRequest (com.google.cloud.redis.v1beta1.FailoverInstanceRequest)5 RescheduleMaintenanceRequest (com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest)5 InstanceAuthString (com.google.cloud.redis.v1beta1.InstanceAuthString)4 CreateInstanceRequest (com.google.cloud.redis.v1beta1.CreateInstanceRequest)3 DeleteInstanceRequest (com.google.cloud.redis.v1beta1.DeleteInstanceRequest)3 ExportInstanceRequest (com.google.cloud.redis.v1beta1.ExportInstanceRequest)3 ImportInstanceRequest (com.google.cloud.redis.v1beta1.ImportInstanceRequest)3 UpdateInstanceRequest (com.google.cloud.redis.v1beta1.UpdateInstanceRequest)3 UpgradeInstanceRequest (com.google.cloud.redis.v1beta1.UpgradeInstanceRequest)3 CloudRedisSettings (com.google.cloud.redis.v1beta1.CloudRedisSettings)2 GetInstanceAuthStringRequest (com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest)2 ListInstancesRequest (com.google.cloud.redis.v1beta1.ListInstancesRequest)2 Timestamp (com.google.protobuf.Timestamp)2 GetInstanceRequest (com.google.cloud.redis.v1beta1.GetInstanceRequest)1 InputConfig (com.google.cloud.redis.v1beta1.InputConfig)1