com.pulumi.gcp.redis.kotlin.RedisFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.redis.kotlin
import com.pulumi.gcp.redis.RedisFunctions.getInstancePlain
import com.pulumi.gcp.redis.kotlin.inputs.GetInstancePlainArgs
import com.pulumi.gcp.redis.kotlin.inputs.GetInstancePlainArgsBuilder
import com.pulumi.gcp.redis.kotlin.outputs.GetInstanceResult
import com.pulumi.gcp.redis.kotlin.outputs.GetInstanceResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object RedisFunctions {
/**
* Get info about a Google Cloud Redis instance.
* ## Example Usage
* ```tf
* data "google_redis_instance" "my_instance" {
* name = "my-redis-instance"
* }
* output "instance_memory_size_gb" {
* value = data.google_redis_instance.my_instance.memory_size_gb
* }
* output "instance_connect_mode" {
* value = data.google_redis_instance.my_instance.connect_mode
* }
* output "instance_authorized_network" {
* value = data.google_redis_instance.my_instance.authorized_network
* }
* ```
* @param argument A collection of arguments for invoking getInstance.
* @return A collection of values returned by getInstance.
*/
public suspend fun getInstance(argument: GetInstancePlainArgs): GetInstanceResult =
toKotlin(getInstancePlain(argument.toJava()).await())
/**
* @see [getInstance].
* @param name The name of a Redis instance.
* - - -
* @param project The project in which the resource belongs. If it
* is not provided, the provider project is used.
* @param region The region in which the resource belongs. If it
* is not provided, the provider region is used.
* @return A collection of values returned by getInstance.
*/
public suspend fun getInstance(
name: String,
project: String? = null,
region: String? = null,
): GetInstanceResult {
val argument = GetInstancePlainArgs(
name = name,
project = project,
region = region,
)
return toKotlin(getInstancePlain(argument.toJava()).await())
}
/**
* @see [getInstance].
* @param argument Builder for [com.pulumi.gcp.redis.kotlin.inputs.GetInstancePlainArgs].
* @return A collection of values returned by getInstance.
*/
public suspend fun getInstance(argument: suspend GetInstancePlainArgsBuilder.() -> Unit): GetInstanceResult {
val builder = GetInstancePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return toKotlin(getInstancePlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy