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

com.pulumi.aws.elasticache.kotlin.ElasticacheFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.elasticache.kotlin

import com.pulumi.aws.elasticache.ElasticacheFunctions.getClusterPlain
import com.pulumi.aws.elasticache.ElasticacheFunctions.getReplicationGroupPlain
import com.pulumi.aws.elasticache.ElasticacheFunctions.getReservedCacheNodeOfferingPlain
import com.pulumi.aws.elasticache.ElasticacheFunctions.getServerlessCachePlain
import com.pulumi.aws.elasticache.ElasticacheFunctions.getSubnetGroupPlain
import com.pulumi.aws.elasticache.ElasticacheFunctions.getUserPlain
import com.pulumi.aws.elasticache.kotlin.inputs.GetClusterPlainArgs
import com.pulumi.aws.elasticache.kotlin.inputs.GetClusterPlainArgsBuilder
import com.pulumi.aws.elasticache.kotlin.inputs.GetReplicationGroupPlainArgs
import com.pulumi.aws.elasticache.kotlin.inputs.GetReplicationGroupPlainArgsBuilder
import com.pulumi.aws.elasticache.kotlin.inputs.GetReservedCacheNodeOfferingPlainArgs
import com.pulumi.aws.elasticache.kotlin.inputs.GetReservedCacheNodeOfferingPlainArgsBuilder
import com.pulumi.aws.elasticache.kotlin.inputs.GetServerlessCachePlainArgs
import com.pulumi.aws.elasticache.kotlin.inputs.GetServerlessCachePlainArgsBuilder
import com.pulumi.aws.elasticache.kotlin.inputs.GetSubnetGroupPlainArgs
import com.pulumi.aws.elasticache.kotlin.inputs.GetSubnetGroupPlainArgsBuilder
import com.pulumi.aws.elasticache.kotlin.inputs.GetUserAuthenticationMode
import com.pulumi.aws.elasticache.kotlin.inputs.GetUserPlainArgs
import com.pulumi.aws.elasticache.kotlin.inputs.GetUserPlainArgsBuilder
import com.pulumi.aws.elasticache.kotlin.outputs.GetClusterResult
import com.pulumi.aws.elasticache.kotlin.outputs.GetReplicationGroupResult
import com.pulumi.aws.elasticache.kotlin.outputs.GetReservedCacheNodeOfferingResult
import com.pulumi.aws.elasticache.kotlin.outputs.GetServerlessCacheResult
import com.pulumi.aws.elasticache.kotlin.outputs.GetSubnetGroupResult
import com.pulumi.aws.elasticache.kotlin.outputs.GetUserResult
import kotlinx.coroutines.future.await
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.aws.elasticache.kotlin.outputs.GetClusterResult.Companion.toKotlin as getClusterResultToKotlin
import com.pulumi.aws.elasticache.kotlin.outputs.GetReplicationGroupResult.Companion.toKotlin as getReplicationGroupResultToKotlin
import com.pulumi.aws.elasticache.kotlin.outputs.GetReservedCacheNodeOfferingResult.Companion.toKotlin as getReservedCacheNodeOfferingResultToKotlin
import com.pulumi.aws.elasticache.kotlin.outputs.GetServerlessCacheResult.Companion.toKotlin as getServerlessCacheResultToKotlin
import com.pulumi.aws.elasticache.kotlin.outputs.GetSubnetGroupResult.Companion.toKotlin as getSubnetGroupResultToKotlin
import com.pulumi.aws.elasticache.kotlin.outputs.GetUserResult.Companion.toKotlin as getUserResultToKotlin

public object ElasticacheFunctions {
    /**
     * Use this data source to get information about an ElastiCache Cluster
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const myCluster = aws.elasticache.getCluster({
     *     clusterId: "my-cluster-id",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * my_cluster = aws.elasticache.get_cluster(cluster_id="my-cluster-id")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var myCluster = Aws.ElastiCache.GetCluster.Invoke(new()
     *     {
     *         ClusterId = "my-cluster-id",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := elasticache.LookupCluster(ctx, &elasticache.LookupClusterArgs{
     * 			ClusterId: "my-cluster-id",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.elasticache.ElasticacheFunctions;
     * import com.pulumi.aws.elasticache.inputs.GetClusterArgs;
     * 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 myCluster = ElasticacheFunctions.getCluster(GetClusterArgs.builder()
     *             .clusterId("my-cluster-id")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   myCluster:
     *     fn::invoke:
     *       Function: aws:elasticache:getCluster
     *       Arguments:
     *         clusterId: my-cluster-id
     * ```
     * 
     * @param argument A collection of arguments for invoking getCluster.
     * @return A collection of values returned by getCluster.
     */
    public suspend fun getCluster(argument: GetClusterPlainArgs): GetClusterResult =
        getClusterResultToKotlin(getClusterPlain(argument.toJava()).await())

    /**
     * @see [getCluster].
     * @param clusterId Group identifier.
     * @param tags Tags assigned to the resource
     * @return A collection of values returned by getCluster.
     */
    public suspend fun getCluster(clusterId: String, tags: Map? = null): GetClusterResult {
        val argument = GetClusterPlainArgs(
            clusterId = clusterId,
            tags = tags,
        )
        return getClusterResultToKotlin(getClusterPlain(argument.toJava()).await())
    }

    /**
     * @see [getCluster].
     * @param argument Builder for [com.pulumi.aws.elasticache.kotlin.inputs.GetClusterPlainArgs].
     * @return A collection of values returned by getCluster.
     */
    public suspend fun getCluster(argument: suspend GetClusterPlainArgsBuilder.() -> Unit): GetClusterResult {
        val builder = GetClusterPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getClusterResultToKotlin(getClusterPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to get information about an ElastiCache Replication Group.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const bar = aws.elasticache.getReplicationGroup({
     *     replicationGroupId: "example",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * bar = aws.elasticache.get_replication_group(replication_group_id="example")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var bar = Aws.ElastiCache.GetReplicationGroup.Invoke(new()
     *     {
     *         ReplicationGroupId = "example",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := elasticache.LookupReplicationGroup(ctx, &elasticache.LookupReplicationGroupArgs{
     * 			ReplicationGroupId: "example",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.elasticache.ElasticacheFunctions;
     * import com.pulumi.aws.elasticache.inputs.GetReplicationGroupArgs;
     * 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 bar = ElasticacheFunctions.getReplicationGroup(GetReplicationGroupArgs.builder()
     *             .replicationGroupId("example")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   bar:
     *     fn::invoke:
     *       Function: aws:elasticache:getReplicationGroup
     *       Arguments:
     *         replicationGroupId: example
     * ```
     * 
     * @param argument A collection of arguments for invoking getReplicationGroup.
     * @return A collection of values returned by getReplicationGroup.
     */
    public suspend fun getReplicationGroup(argument: GetReplicationGroupPlainArgs): GetReplicationGroupResult =
        getReplicationGroupResultToKotlin(getReplicationGroupPlain(argument.toJava()).await())

    /**
     * @see [getReplicationGroup].
     * @param replicationGroupId Identifier for the replication group.
     * @return A collection of values returned by getReplicationGroup.
     */
    public suspend fun getReplicationGroup(replicationGroupId: String): GetReplicationGroupResult {
        val argument = GetReplicationGroupPlainArgs(
            replicationGroupId = replicationGroupId,
        )
        return getReplicationGroupResultToKotlin(getReplicationGroupPlain(argument.toJava()).await())
    }

    /**
     * @see [getReplicationGroup].
     * @param argument Builder for [com.pulumi.aws.elasticache.kotlin.inputs.GetReplicationGroupPlainArgs].
     * @return A collection of values returned by getReplicationGroup.
     */
    public suspend fun getReplicationGroup(argument: suspend GetReplicationGroupPlainArgsBuilder.() -> Unit): GetReplicationGroupResult {
        val builder = GetReplicationGroupPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getReplicationGroupResultToKotlin(getReplicationGroupPlain(builtArgument.toJava()).await())
    }

    /**
     * Information about a single ElastiCache Reserved Cache Node Offering.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const example = aws.elasticache.getReservedCacheNodeOffering({
     *     cacheNodeType: "cache.t4g.small",
     *     duration: "P1Y",
     *     offeringType: "No Upfront",
     *     productDescription: "redis",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * example = aws.elasticache.get_reserved_cache_node_offering(cache_node_type="cache.t4g.small",
     *     duration="P1Y",
     *     offering_type="No Upfront",
     *     product_description="redis")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Aws.ElastiCache.GetReservedCacheNodeOffering.Invoke(new()
     *     {
     *         CacheNodeType = "cache.t4g.small",
     *         Duration = "P1Y",
     *         OfferingType = "No Upfront",
     *         ProductDescription = "redis",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := elasticache.GetReservedCacheNodeOffering(ctx, &elasticache.GetReservedCacheNodeOfferingArgs{
     * 			CacheNodeType:      "cache.t4g.small",
     * 			Duration:           "P1Y",
     * 			OfferingType:       "No Upfront",
     * 			ProductDescription: "redis",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.elasticache.ElasticacheFunctions;
     * import com.pulumi.aws.elasticache.inputs.GetReservedCacheNodeOfferingArgs;
     * 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 example = ElasticacheFunctions.getReservedCacheNodeOffering(GetReservedCacheNodeOfferingArgs.builder()
     *             .cacheNodeType("cache.t4g.small")
     *             .duration("P1Y")
     *             .offeringType("No Upfront")
     *             .productDescription("redis")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: aws:elasticache:getReservedCacheNodeOffering
     *       Arguments:
     *         cacheNodeType: cache.t4g.small
     *         duration: P1Y
     *         offeringType: No Upfront
     *         productDescription: redis
     * ```
     * 
     * @param argument A collection of arguments for invoking getReservedCacheNodeOffering.
     * @return A collection of values returned by getReservedCacheNodeOffering.
     */
    public suspend fun getReservedCacheNodeOffering(argument: GetReservedCacheNodeOfferingPlainArgs): GetReservedCacheNodeOfferingResult =
        getReservedCacheNodeOfferingResultToKotlin(getReservedCacheNodeOfferingPlain(argument.toJava()).await())

    /**
     * @see [getReservedCacheNodeOffering].
     * @param cacheNodeType Node type for the reserved cache node.
     * See AWS documentation for information on [supported node types for Redis](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types for Redis](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html).
     * See AWS documentation for information on [supported node types for Memcached](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNodes.SupportedTypes.html) and [guidance on selecting node types for Memcached](https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/nodes-select-size.html).
     * @param duration Duration of the reservation in RFC3339 duration format.
     * Valid values are `P1Y` (one year) and `P3Y` (three years).
     * @param offeringType Offering type of this reserved cache node.
     * For the latest generation of nodes (e.g. M5, R5, T4 and newer) valid values are `No Upfront`, `Partial Upfront`, and `All Upfront`.
     * For other current generation nodes (i.e. T2, M3, M4, R3, or R4) the only valid value is `Heavy Utilization`.
     * For previous generation modes (i.e. T1, M1, M2, or C1) valid values are `Heavy Utilization`, `Medium Utilization`, and `Light Utilization`.
     * @param productDescription Engine type for the reserved cache node.
     * Valid values are `redis`, `valkey` and `memcached`.
     * @return A collection of values returned by getReservedCacheNodeOffering.
     */
    public suspend fun getReservedCacheNodeOffering(
        cacheNodeType: String,
        duration: String,
        offeringType: String,
        productDescription: String,
    ): GetReservedCacheNodeOfferingResult {
        val argument = GetReservedCacheNodeOfferingPlainArgs(
            cacheNodeType = cacheNodeType,
            duration = duration,
            offeringType = offeringType,
            productDescription = productDescription,
        )
        return getReservedCacheNodeOfferingResultToKotlin(getReservedCacheNodeOfferingPlain(argument.toJava()).await())
    }

    /**
     * @see [getReservedCacheNodeOffering].
     * @param argument Builder for [com.pulumi.aws.elasticache.kotlin.inputs.GetReservedCacheNodeOfferingPlainArgs].
     * @return A collection of values returned by getReservedCacheNodeOffering.
     */
    public suspend fun getReservedCacheNodeOffering(argument: suspend GetReservedCacheNodeOfferingPlainArgsBuilder.() -> Unit): GetReservedCacheNodeOfferingResult {
        val builder = GetReservedCacheNodeOfferingPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getReservedCacheNodeOfferingResultToKotlin(getReservedCacheNodeOfferingPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to get information about an ElastiCache Serverless Cache.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const example = aws.elasticache.getServerlessCache({
     *     name: "example",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * example = aws.elasticache.get_serverless_cache(name="example")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Aws.ElastiCache.GetServerlessCache.Invoke(new()
     *     {
     *         Name = "example",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := elasticache.LookupServerlessCache(ctx, &elasticache.LookupServerlessCacheArgs{
     * 			Name: "example",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.elasticache.ElasticacheFunctions;
     * import com.pulumi.aws.elasticache.inputs.GetServerlessCacheArgs;
     * 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 example = ElasticacheFunctions.getServerlessCache(GetServerlessCacheArgs.builder()
     *             .name("example")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: aws:elasticache:getServerlessCache
     *       Arguments:
     *         name: example
     * ```
     * 
     * @param argument A collection of arguments for invoking getServerlessCache.
     * @return A collection of values returned by getServerlessCache.
     */
    public suspend fun getServerlessCache(argument: GetServerlessCachePlainArgs): GetServerlessCacheResult =
        getServerlessCacheResultToKotlin(getServerlessCachePlain(argument.toJava()).await())

    /**
     * @see [getServerlessCache].
     * @param name Identifier for the serverless cache.
     * @return A collection of values returned by getServerlessCache.
     */
    public suspend fun getServerlessCache(name: String): GetServerlessCacheResult {
        val argument = GetServerlessCachePlainArgs(
            name = name,
        )
        return getServerlessCacheResultToKotlin(getServerlessCachePlain(argument.toJava()).await())
    }

    /**
     * @see [getServerlessCache].
     * @param argument Builder for [com.pulumi.aws.elasticache.kotlin.inputs.GetServerlessCachePlainArgs].
     * @return A collection of values returned by getServerlessCache.
     */
    public suspend fun getServerlessCache(argument: suspend GetServerlessCachePlainArgsBuilder.() -> Unit): GetServerlessCacheResult {
        val builder = GetServerlessCachePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getServerlessCacheResultToKotlin(getServerlessCachePlain(builtArgument.toJava()).await())
    }

    /**
     * Provides information about a ElastiCache Subnet Group.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const example = aws.elasticache.getSubnetGroup({
     *     name: "my-subnet-group",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * example = aws.elasticache.get_subnet_group(name="my-subnet-group")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var example = Aws.ElastiCache.GetSubnetGroup.Invoke(new()
     *     {
     *         Name = "my-subnet-group",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := elasticache.LookupSubnetGroup(ctx, &elasticache.LookupSubnetGroupArgs{
     * 			Name: "my-subnet-group",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.elasticache.ElasticacheFunctions;
     * import com.pulumi.aws.elasticache.inputs.GetSubnetGroupArgs;
     * 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 example = ElasticacheFunctions.getSubnetGroup(GetSubnetGroupArgs.builder()
     *             .name("my-subnet-group")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   example:
     *     fn::invoke:
     *       Function: aws:elasticache:getSubnetGroup
     *       Arguments:
     *         name: my-subnet-group
     * ```
     * 
     * @param argument A collection of arguments for invoking getSubnetGroup.
     * @return A collection of values returned by getSubnetGroup.
     */
    public suspend fun getSubnetGroup(argument: GetSubnetGroupPlainArgs): GetSubnetGroupResult =
        getSubnetGroupResultToKotlin(getSubnetGroupPlain(argument.toJava()).await())

    /**
     * @see [getSubnetGroup].
     * @param name Name of the subnet group.
     * @param tags Map of tags assigned to the subnet group.
     * @return A collection of values returned by getSubnetGroup.
     */
    public suspend fun getSubnetGroup(name: String, tags: Map? = null): GetSubnetGroupResult {
        val argument = GetSubnetGroupPlainArgs(
            name = name,
            tags = tags,
        )
        return getSubnetGroupResultToKotlin(getSubnetGroupPlain(argument.toJava()).await())
    }

    /**
     * @see [getSubnetGroup].
     * @param argument Builder for [com.pulumi.aws.elasticache.kotlin.inputs.GetSubnetGroupPlainArgs].
     * @return A collection of values returned by getSubnetGroup.
     */
    public suspend fun getSubnetGroup(argument: suspend GetSubnetGroupPlainArgsBuilder.() -> Unit): GetSubnetGroupResult {
        val builder = GetSubnetGroupPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getSubnetGroupResultToKotlin(getSubnetGroupPlain(builtArgument.toJava()).await())
    }

    /**
     * Use this data source to get information about an ElastiCache User.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as aws from "@pulumi/aws";
     * const bar = aws.elasticache.getUser({
     *     userId: "example",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_aws as aws
     * bar = aws.elasticache.get_user(user_id="example")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Aws = Pulumi.Aws;
     * return await Deployment.RunAsync(() =>
     * {
     *     var bar = Aws.ElastiCache.GetUser.Invoke(new()
     *     {
     *         UserId = "example",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elasticache"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := elasticache.LookupUser(ctx, &elasticache.LookupUserArgs{
     * 			UserId: "example",
     * 		}, nil)
     * 		if err != nil {
     * 			return err
     * 		}
     * 		return nil
     * 	})
     * }
     * ```
     * ```java
     * package generated_program;
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.elasticache.ElasticacheFunctions;
     * import com.pulumi.aws.elasticache.inputs.GetUserArgs;
     * 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 bar = ElasticacheFunctions.getUser(GetUserArgs.builder()
     *             .userId("example")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   bar:
     *     fn::invoke:
     *       Function: aws:elasticache:getUser
     *       Arguments:
     *         userId: example
     * ```
     * 
     * @param argument A collection of arguments for invoking getUser.
     * @return A collection of values returned by getUser.
     */
    public suspend fun getUser(argument: GetUserPlainArgs): GetUserResult =
        getUserResultToKotlin(getUserPlain(argument.toJava()).await())

    /**
     * @see [getUser].
     * @param accessString String for what access a user possesses within the associated ElastiCache replication groups or clusters.
     * @param authenticationModes
     * @param engine
     * @param noPasswordRequired
     * @param passwords
     * @param userId Identifier for the user.
     * @param userName User name of the user.
     * @return A collection of values returned by getUser.
     */
    public suspend fun getUser(
        accessString: String? = null,
        authenticationModes: List? = null,
        engine: String? = null,
        noPasswordRequired: Boolean? = null,
        passwords: List? = null,
        userId: String,
        userName: String? = null,
    ): GetUserResult {
        val argument = GetUserPlainArgs(
            accessString = accessString,
            authenticationModes = authenticationModes,
            engine = engine,
            noPasswordRequired = noPasswordRequired,
            passwords = passwords,
            userId = userId,
            userName = userName,
        )
        return getUserResultToKotlin(getUserPlain(argument.toJava()).await())
    }

    /**
     * @see [getUser].
     * @param argument Builder for [com.pulumi.aws.elasticache.kotlin.inputs.GetUserPlainArgs].
     * @return A collection of values returned by getUser.
     */
    public suspend fun getUser(argument: suspend GetUserPlainArgsBuilder.() -> Unit): GetUserResult {
        val builder = GetUserPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getUserResultToKotlin(getUserPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy