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

com.pulumi.vault.transform.kotlin.Alphabet.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.4.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.vault.transform.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.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [Alphabet].
 */
@PulumiTagMarker
public class AlphabetResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: AlphabetArgs = AlphabetArgs()

    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 AlphabetArgsBuilder.() -> Unit) {
        val builder = AlphabetArgsBuilder()
        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(): Alphabet {
        val builtJavaResource = com.pulumi.vault.transform.Alphabet(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Alphabet(builtJavaResource)
    }
}

/**
 * This resource supports the "/transform/alphabet/{name}" Vault endpoint.
 * It queries an existing alphabet by the given name.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const mountTransform = new vault.Mount("mount_transform", {
 *     path: "transform",
 *     type: "transform",
 * });
 * const test = new vault.transform.Alphabet("test", {
 *     path: mountTransform.path,
 *     name: "numerics",
 *     alphabet: "0123456789",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * mount_transform = vault.Mount("mount_transform",
 *     path="transform",
 *     type="transform")
 * test = vault.transform.Alphabet("test",
 *     path=mount_transform.path,
 *     name="numerics",
 *     alphabet="0123456789")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var mountTransform = new Vault.Mount("mount_transform", new()
 *     {
 *         Path = "transform",
 *         Type = "transform",
 *     });
 *     var test = new Vault.Transform.Alphabet("test", new()
 *     {
 *         Path = mountTransform.Path,
 *         Name = "numerics",
 *         AlphabetSet = "0123456789",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/transform"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		mountTransform, err := vault.NewMount(ctx, "mount_transform", &vault.MountArgs{
 * 			Path: pulumi.String("transform"),
 * 			Type: pulumi.String("transform"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = transform.NewAlphabet(ctx, "test", &transform.AlphabetArgs{
 * 			Path:     mountTransform.Path,
 * 			Name:     pulumi.String("numerics"),
 * 			Alphabet: pulumi.String("0123456789"),
 * 		})
 * 		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.vault.Mount;
 * import com.pulumi.vault.MountArgs;
 * import com.pulumi.vault.transform.Alphabet;
 * import com.pulumi.vault.transform.AlphabetArgs;
 * 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 mountTransform = new Mount("mountTransform", MountArgs.builder()
 *             .path("transform")
 *             .type("transform")
 *             .build());
 *         var test = new Alphabet("test", AlphabetArgs.builder()
 *             .path(mountTransform.path())
 *             .name("numerics")
 *             .alphabet("0123456789")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   mountTransform:
 *     type: vault:Mount
 *     name: mount_transform
 *     properties:
 *       path: transform
 *       type: transform
 *   test:
 *     type: vault:transform:Alphabet
 *     properties:
 *       path: ${mountTransform.path}
 *       name: numerics
 *       alphabet: '0123456789'
 * ```
 * 
 */
public class Alphabet internal constructor(
    override val javaResource: com.pulumi.vault.transform.Alphabet,
) : KotlinCustomResource(javaResource, AlphabetMapper) {
    /**
     * A string of characters that contains the alphabet set.
     */
    public val alphabet: Output?
        get() = javaResource.alphabet().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name of the alphabet.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The namespace to provision the resource in.
     * The value should not contain leading or trailing forward slashes.
     * The `namespace` is always relative to the provider's configured [namespace](https://www.terraform.io/docs/providers/vault/index.html#namespace).
     * *Available only for Vault Enterprise*.
     */
    public val namespace: Output?
        get() = javaResource.namespace().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Path to where the back-end is mounted within Vault.
     */
    public val path: Output
        get() = javaResource.path().applyValue({ args0 -> args0 })
}

public object AlphabetMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.vault.transform.Alphabet::class == javaResource::class

    override fun map(javaResource: Resource): Alphabet = Alphabet(
        javaResource as
            com.pulumi.vault.transform.Alphabet,
    )
}

/**
 * @see [Alphabet].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Alphabet].
 */
public suspend fun alphabet(name: String, block: suspend AlphabetResourceBuilder.() -> Unit): Alphabet {
    val builder = AlphabetResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Alphabet].
 * @param name The _unique_ name of the resulting resource.
 */
public fun alphabet(name: String): Alphabet {
    val builder = AlphabetResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy