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

com.pulumi.vault.transit.kotlin.SecretCacheConfigArgs.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.transit.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.vault.transit.SecretCacheConfigArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Configure the cache for the Transit Secret Backend in Vault.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as vault from "@pulumi/vault";
 * const transit = new vault.Mount("transit", {
 *     path: "transit",
 *     type: "transit",
 *     description: "Example description",
 *     defaultLeaseTtlSeconds: 3600,
 *     maxLeaseTtlSeconds: 86400,
 * });
 * const cfg = new vault.transit.SecretCacheConfig("cfg", {
 *     backend: transit.path,
 *     size: 500,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_vault as vault
 * transit = vault.Mount("transit",
 *     path="transit",
 *     type="transit",
 *     description="Example description",
 *     default_lease_ttl_seconds=3600,
 *     max_lease_ttl_seconds=86400)
 * cfg = vault.transit.SecretCacheConfig("cfg",
 *     backend=transit.path,
 *     size=500)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Vault = Pulumi.Vault;
 * return await Deployment.RunAsync(() =>
 * {
 *     var transit = new Vault.Mount("transit", new()
 *     {
 *         Path = "transit",
 *         Type = "transit",
 *         Description = "Example description",
 *         DefaultLeaseTtlSeconds = 3600,
 *         MaxLeaseTtlSeconds = 86400,
 *     });
 *     var cfg = new Vault.Transit.SecretCacheConfig("cfg", new()
 *     {
 *         Backend = transit.Path,
 *         Size = 500,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
 * 	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/transit"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		transit, err := vault.NewMount(ctx, "transit", &vault.MountArgs{
 * 			Path:                   pulumi.String("transit"),
 * 			Type:                   pulumi.String("transit"),
 * 			Description:            pulumi.String("Example description"),
 * 			DefaultLeaseTtlSeconds: pulumi.Int(3600),
 * 			MaxLeaseTtlSeconds:     pulumi.Int(86400),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = transit.NewSecretCacheConfig(ctx, "cfg", &transit.SecretCacheConfigArgs{
 * 			Backend: transit.Path,
 * 			Size:    pulumi.Int(500),
 * 		})
 * 		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.transit.SecretCacheConfig;
 * import com.pulumi.vault.transit.SecretCacheConfigArgs;
 * 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 transit = new Mount("transit", MountArgs.builder()
 *             .path("transit")
 *             .type("transit")
 *             .description("Example description")
 *             .defaultLeaseTtlSeconds(3600)
 *             .maxLeaseTtlSeconds(86400)
 *             .build());
 *         var cfg = new SecretCacheConfig("cfg", SecretCacheConfigArgs.builder()
 *             .backend(transit.path())
 *             .size(500)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   transit:
 *     type: vault:Mount
 *     properties:
 *       path: transit
 *       type: transit
 *       description: Example description
 *       defaultLeaseTtlSeconds: 3600
 *       maxLeaseTtlSeconds: 86400
 *   cfg:
 *     type: vault:transit:SecretCacheConfig
 *     properties:
 *       backend: ${transit.path}
 *       size: 500
 * ```
 * 
 * @property backend The path the transit secret backend is mounted at, with no leading or trailing `/`s.
 * @property namespace 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*.
 * @property size The number of cache entries. 0 means unlimited.
 */
public data class SecretCacheConfigArgs(
    public val backend: Output? = null,
    public val namespace: Output? = null,
    public val size: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.vault.transit.SecretCacheConfigArgs =
        com.pulumi.vault.transit.SecretCacheConfigArgs.builder()
            .backend(backend?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 }))
            .size(size?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SecretCacheConfigArgs].
 */
@PulumiTagMarker
public class SecretCacheConfigArgsBuilder internal constructor() {
    private var backend: Output? = null

    private var namespace: Output? = null

    private var size: Output? = null

    /**
     * @param value The path the transit secret backend is mounted at, with no leading or trailing `/`s.
     */
    @JvmName("jbvidumiskmikgov")
    public suspend fun backend(`value`: Output) {
        this.backend = value
    }

    /**
     * @param value 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*.
     */
    @JvmName("ucuoiimswaphkrei")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The number of cache entries. 0 means unlimited.
     */
    @JvmName("wdkcikihdakbwtxr")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

    /**
     * @param value The path the transit secret backend is mounted at, with no leading or trailing `/`s.
     */
    @JvmName("alcuvhacywwgtmbx")
    public suspend fun backend(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backend = mapped
    }

    /**
     * @param value 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*.
     */
    @JvmName("luxopupuwmxjilxj")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value The number of cache entries. 0 means unlimited.
     */
    @JvmName("yuloatlygcqxryuf")
    public suspend fun size(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.size = mapped
    }

    internal fun build(): SecretCacheConfigArgs = SecretCacheConfigArgs(
        backend = backend,
        namespace = namespace,
        size = size,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy