![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.random.kotlin.RandomBytesArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.random.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.random.RandomBytesArgs.builder
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* The resource `random.RandomBytes` generates random bytes that are intended to be used as a secret, or key. Use this in preference to `random.RandomId` when the output is considered sensitive, and should not be displayed in the CLI.
* ## Example Usage
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.random.RandomBytes;
* import com.pulumi.random.RandomBytesArgs;
* import com.pulumi.azure.keyvault.Secret;
* import com.pulumi.azure.keyvault.SecretArgs;
* 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 jwtSecretRandomBytes = new RandomBytes("jwtSecretRandomBytes", RandomBytesArgs.builder()
* .length(64)
* .build());
* var jwtSecretSecret = new Secret("jwtSecretSecret", SecretArgs.builder()
* .keyVaultId("some-azure-key-vault-id")
* .value(jwtSecretRandomBytes.base64())
* .build());
* }
* }
* ```
* ## Import
* Random bytes can be imported by specifying the value as base64 string.
* ```sh
* $ pulumi import random:index/randomBytes:RandomBytes basic "8/fu3q+2DcgSJ19i0jZ5Cw=="
* ```
* @property keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
* @property length The number of bytes requested. The minimum value for length is 1.
*/
public data class RandomBytesArgs(
public val keepers: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy