use of com.google.cloud.redis.v1beta1.InstanceAuthString in project gapic-generator-java by googleapis.
the class AsyncGetInstanceAuthString method asyncGetInstanceAuthString.
public static void asyncGetInstanceAuthString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
GetInstanceAuthStringRequest request = GetInstanceAuthStringRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).build();
ApiFuture<InstanceAuthString> future = cloudRedisClient.getInstanceAuthStringCallable().futureCall(request);
// Do something.
InstanceAuthString response = future.get();
}
}
use of com.google.cloud.redis.v1beta1.InstanceAuthString in project gapic-generator-java by googleapis.
the class SyncGetInstanceAuthStringInstancename method syncGetInstanceAuthStringInstancename.
public static void syncGetInstanceAuthStringInstancename() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
InstanceAuthString response = cloudRedisClient.getInstanceAuthString(name);
}
}
use of com.google.cloud.redis.v1beta1.InstanceAuthString in project gapic-generator-java by googleapis.
the class SyncGetInstanceAuthString method syncGetInstanceAuthString.
public static void syncGetInstanceAuthString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
GetInstanceAuthStringRequest request = GetInstanceAuthStringRequest.newBuilder().setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()).build();
InstanceAuthString response = cloudRedisClient.getInstanceAuthString(request);
}
}
use of com.google.cloud.redis.v1beta1.InstanceAuthString in project gapic-generator-java by googleapis.
the class SyncGetInstanceAuthStringString method syncGetInstanceAuthStringString.
public static void syncGetInstanceAuthStringString() throws Exception {
// It may require modifications to work in your environment.
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
InstanceAuthString response = cloudRedisClient.getInstanceAuthString(name);
}
}
Aggregations