All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.filestore.kotlin.FilestoreFunctions.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.filestore.kotlin

import com.pulumi.gcp.filestore.FilestoreFunctions.getInstancePlain
import com.pulumi.gcp.filestore.kotlin.inputs.GetInstancePlainArgs
import com.pulumi.gcp.filestore.kotlin.inputs.GetInstancePlainArgsBuilder
import com.pulumi.gcp.filestore.kotlin.outputs.GetInstanceResult
import com.pulumi.gcp.filestore.kotlin.outputs.GetInstanceResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

public object FilestoreFunctions {
    /**
     * Get info about a Google Cloud Filestore instance.
     * ## Example Usage
     * ```tf
     * data "google_filestore_instance" "my_instance" {
     *   name = "my-filestore-instance"
     * }
     * output "instance_ip_addresses" {
     *   value = data.google_filestore_instance.my_instance.networks.ip_addresses
     * }
     * output "instance_connect_mode" {
     *   value = data.google_filestore_instance.my_instance.networks.connect_mode
     * }
     * output "instance_file_share_name" {
     *   value = data.google_filestore_instance.my_instance.file_shares.name
     * }
     * ```
     * @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 location The name of the location of the instance. This
     * can be a region for ENTERPRISE tier instances. If it is not provided,
     * the provider region or zone is used.
     * @param name The name of a Filestore instance.
     * - - -
     * @param project The project in which the resource belongs. If it
     * is not provided, the provider project is used.
     * @return A collection of values returned by getInstance.
     */
    public suspend fun getInstance(
        location: String? = null,
        name: String,
        project: String? = null,
    ): GetInstanceResult {
        val argument = GetInstancePlainArgs(
            location = location,
            name = name,
            project = project,
        )
        return toKotlin(getInstancePlain(argument.toJava()).await())
    }

    /**
     * @see [getInstance].
     * @param argument Builder for [com.pulumi.gcp.filestore.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 - 2024 Weber Informatics LLC | Privacy Policy