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

com.pulumi.aws.memorydb.kotlin.ParameterGroupArgs.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.memorydb.kotlin

import com.pulumi.aws.memorydb.ParameterGroupArgs.builder
import com.pulumi.aws.memorydb.kotlin.inputs.ParameterGroupParameterArgs
import com.pulumi.aws.memorydb.kotlin.inputs.ParameterGroupParameterArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides a MemoryDB Parameter Group.
 * More information about parameter groups can be found in the [MemoryDB User Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/parametergroups.html).
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.memorydb.ParameterGroup("example", {
 *     name: "my-parameter-group",
 *     family: "memorydb_redis6",
 *     parameters: [{
 *         name: "activedefrag",
 *         value: "yes",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.memorydb.ParameterGroup("example",
 *     name="my-parameter-group",
 *     family="memorydb_redis6",
 *     parameters=[{
 *         "name": "activedefrag",
 *         "value": "yes",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.MemoryDb.ParameterGroup("example", new()
 *     {
 *         Name = "my-parameter-group",
 *         Family = "memorydb_redis6",
 *         Parameters = new[]
 *         {
 *             new Aws.MemoryDb.Inputs.ParameterGroupParameterArgs
 *             {
 *                 Name = "activedefrag",
 *                 Value = "yes",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/memorydb"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := memorydb.NewParameterGroup(ctx, "example", &memorydb.ParameterGroupArgs{
 * 			Name:   pulumi.String("my-parameter-group"),
 * 			Family: pulumi.String("memorydb_redis6"),
 * 			Parameters: memorydb.ParameterGroupParameterArray{
 * 				&memorydb.ParameterGroupParameterArgs{
 * 					Name:  pulumi.String("activedefrag"),
 * 					Value: pulumi.String("yes"),
 * 				},
 * 			},
 * 		})
 * 		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.memorydb.ParameterGroup;
 * import com.pulumi.aws.memorydb.ParameterGroupArgs;
 * import com.pulumi.aws.memorydb.inputs.ParameterGroupParameterArgs;
 * 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) {
 *         var example = new ParameterGroup("example", ParameterGroupArgs.builder()
 *             .name("my-parameter-group")
 *             .family("memorydb_redis6")
 *             .parameters(ParameterGroupParameterArgs.builder()
 *                 .name("activedefrag")
 *                 .value("yes")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:memorydb:ParameterGroup
 *     properties:
 *       name: my-parameter-group
 *       family: memorydb_redis6
 *       parameters:
 *         - name: activedefrag
 *           value: yes
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import a parameter group using the `name`. For example:
 * ```sh
 * $ pulumi import aws:memorydb/parameterGroup:ParameterGroup example my-parameter-group
 * ```
 * @property description Description for the parameter group. Defaults to `"Managed by Pulumi"`.
 * @property family The engine version that the parameter group can be used with.
 * The following arguments are optional:
 * @property name Name of the parameter group. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
 * @property namePrefix Creates a unique name beginning with the specified prefix. Conflicts with `name`.
 * @property parameters Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
 * @property tags A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class ParameterGroupArgs(
    public val description: Output? = null,
    public val family: Output? = null,
    public val name: Output? = null,
    public val namePrefix: Output? = null,
    public val parameters: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.memorydb.ParameterGroupArgs =
        com.pulumi.aws.memorydb.ParameterGroupArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .family(family?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namePrefix(namePrefix?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ParameterGroupArgs].
 */
@PulumiTagMarker
public class ParameterGroupArgsBuilder internal constructor() {
    private var description: Output? = null

    private var family: Output? = null

    private var name: Output? = null

    private var namePrefix: Output? = null

    private var parameters: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Description for the parameter group. Defaults to `"Managed by Pulumi"`.
     */
    @JvmName("bjjqtprysblgkgsf")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The engine version that the parameter group can be used with.
     * The following arguments are optional:
     */
    @JvmName("rihawgxaecchekhd")
    public suspend fun family(`value`: Output) {
        this.family = value
    }

    /**
     * @param value Name of the parameter group. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
     */
    @JvmName("mojrriyssmqgphsm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Creates a unique name beginning with the specified prefix. Conflicts with `name`.
     */
    @JvmName("fgcqepgjpuhosasd")
    public suspend fun namePrefix(`value`: Output) {
        this.namePrefix = value
    }

    /**
     * @param value Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("yodrrgdhivjbdgkf")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    @JvmName("gnjwnraufmqpdhwv")
    public suspend fun parameters(vararg values: Output) {
        this.parameters = Output.all(values.asList())
    }

    /**
     * @param values Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("vyecvwpobrgbyxkc")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("nmeupalrmxuflvee")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Description for the parameter group. Defaults to `"Managed by Pulumi"`.
     */
    @JvmName("jrenemwlkijfwoia")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The engine version that the parameter group can be used with.
     * The following arguments are optional:
     */
    @JvmName("bbkffkdpejebpumj")
    public suspend fun family(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.family = mapped
    }

    /**
     * @param value Name of the parameter group. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
     */
    @JvmName("gyqwgajceixdnsjq")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Creates a unique name beginning with the specified prefix. Conflicts with `name`.
     */
    @JvmName("mtesvbsuaysxtfwg")
    public suspend fun namePrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namePrefix = mapped
    }

    /**
     * @param value Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("gtkaldwulrooaskk")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("iosaxlepkbqqdhme")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ParameterGroupParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("ewkntqvvyejahioj")
    public suspend fun parameters(vararg argument: suspend ParameterGroupParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ParameterGroupParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("ntaluqdcdynvkmdg")
    public suspend fun parameters(argument: suspend ParameterGroupParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ParameterGroupParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
     */
    @JvmName("swfagubivkfvoytt")
    public suspend fun parameters(vararg values: ParameterGroupParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("mceheacnrgjsccli")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("yvqpciydtssyctbs")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ParameterGroupArgs = ParameterGroupArgs(
        description = description,
        family = family,
        name = name,
        namePrefix = namePrefix,
        parameters = parameters,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy