get Instance
Get info about a Google Cloud Redis instance.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.redis.RedisFunctions;
import com.pulumi.gcp.redis.inputs.GetInstanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var myInstance = RedisFunctions.getInstance(GetInstanceArgs.builder()
.name("my-redis-instance")
.build());
ctx.export("instanceMemorySizeGb", myInstance.applyValue(getInstanceResult -> getInstanceResult.memorySizeGb()));
ctx.export("instanceConnectMode", myInstance.applyValue(getInstanceResult -> getInstanceResult.connectMode()));
ctx.export("instanceAuthorizedNetwork", myInstance.applyValue(getInstanceResult -> getInstanceResult.authorizedNetwork()));
}
}
Content copied to clipboard
Return
A collection of values returned by getInstance.
Parameters
argument
A collection of arguments for invoking getInstance.
suspend fun getInstance(name: String, project: String? = null, region: String? = null): GetInstanceResult
Return
A collection of values returned by getInstance.
Parameters
name
The name of a Redis instance.
project
The project in which the resource belongs. If it is not provided, the provider project is used.
region
The region in which the resource belongs. If it is not provided, the provider region is used.
See also
suspend fun getInstance(argument: suspend GetInstancePlainArgsBuilder.() -> Unit): GetInstanceResult
Return
A collection of values returned by getInstance.
Parameters
argument
Builder for com.pulumi.gcp.redis.kotlin.inputs.GetInstancePlainArgs.