com.pulumi.aws.memorydb.kotlin.ParameterGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.memorydb.kotlin
import com.pulumi.aws.memorydb.kotlin.outputs.ParameterGroupParameter
import com.pulumi.aws.memorydb.kotlin.outputs.ParameterGroupParameter.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [ParameterGroup].
*/
@PulumiTagMarker
public class ParameterGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: ParameterGroupArgs = ParameterGroupArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ParameterGroupArgsBuilder.() -> Unit) {
val builder = ParameterGroupArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): ParameterGroup {
val builtJavaResource = com.pulumi.aws.memorydb.ParameterGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ParameterGroup(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class ParameterGroup internal constructor(
override val javaResource: com.pulumi.aws.memorydb.ParameterGroup,
) : KotlinCustomResource(javaResource, ParameterGroupMapper) {
/**
* The ARN of the parameter group.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Description for the parameter group.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The engine version that the parameter group can be used with.
* The following arguments are optional:
*/
public val family: Output
get() = javaResource.family().applyValue({ args0 -> args0 })
/**
* Name of the parameter group. If omitted, the provider will assign a random, unique name. Conflicts with `name_prefix`.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Creates a unique name beginning with the specified prefix. Conflicts with `name`.
*/
public val namePrefix: Output
get() = javaResource.namePrefix().applyValue({ args0 -> args0 })
/**
* Set of MemoryDB parameters to apply. Any parameters not specified will fall back to their family defaults. Detailed below.
*/
public val parameters: Output>?
get() = javaResource.parameters().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
/**
* 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 val tags: Output