All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.memorydb.kotlin.Acl.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.memorydb.kotlin
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 [Acl].
*/
@PulumiTagMarker
public class AclResourceBuilder internal constructor() {
public var name: String? = null
public var args: AclArgs = AclArgs()
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 AclArgsBuilder.() -> Unit) {
val builder = AclArgsBuilder()
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(): Acl {
val builtJavaResource = com.pulumi.aws.memorydb.Acl(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Acl(builtJavaResource)
}
}
/**
* Provides a MemoryDB ACL.
* More information about users and ACL-s can be found in the [MemoryDB User Guide](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.memorydb.Acl("example", {
* name: "my-acl",
* userNames: [
* "my-user-1",
* "my-user-2",
* ],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.memorydb.Acl("example",
* name="my-acl",
* user_names=[
* "my-user-1",
* "my-user-2",
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.MemoryDb.Acl("example", new()
* {
* Name = "my-acl",
* UserNames = new[]
* {
* "my-user-1",
* "my-user-2",
* },
* });
* });
* ```
* ```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.NewAcl(ctx, "example", &memorydb.AclArgs{
* Name: pulumi.String("my-acl"),
* UserNames: pulumi.StringArray{
* pulumi.String("my-user-1"),
* pulumi.String("my-user-2"),
* },
* })
* 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.Acl;
* import com.pulumi.aws.memorydb.AclArgs;
* 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 Acl("example", AclArgs.builder()
* .name("my-acl")
* .userNames(
* "my-user-1",
* "my-user-2")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:memorydb:Acl
* properties:
* name: my-acl
* userNames:
* - my-user-1
* - my-user-2
* ```
*
* ## Import
* Using `pulumi import`, import an ACL using the `name`. For example:
* ```sh
* $ pulumi import aws:memorydb/acl:Acl example my-acl
* ```
*/
public class Acl internal constructor(
override val javaResource: com.pulumi.aws.memorydb.Acl,
) : KotlinCustomResource(javaResource, AclMapper) {
/**
* The ARN of the ACL.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The minimum engine version supported by the ACL.
*/
public val minimumEngineVersion: Output
get() = javaResource.minimumEngineVersion().applyValue({ args0 -> args0 })
/**
* Name of the ACL. 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 })
/**
* 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>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
/**
* A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*/
@Deprecated(
message = """
Please use `tags` instead.
""",
)
public val tagsAll: Output>
get() = javaResource.tagsAll().applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
})
/**
* Set of MemoryDB user names to be included in this ACL.
*/
public val userNames: Output>?
get() = javaResource.userNames().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
}
public object AclMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.memorydb.Acl::class == javaResource::class
override fun map(javaResource: Resource): Acl = Acl(javaResource as com.pulumi.aws.memorydb.Acl)
}
/**
* @see [Acl].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Acl].
*/
public suspend fun acl(name: String, block: suspend AclResourceBuilder.() -> Unit): Acl {
val builder = AclResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Acl].
* @param name The _unique_ name of the resulting resource.
*/
public fun acl(name: String): Acl {
val builder = AclResourceBuilder()
builder.name(name)
return builder.build()
}