SecretArgs

data class SecretArgs(val labName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val userName: Output<String>? = null, val value: Output<String>? = null) : ConvertibleToJava<SecretArgs>

A secret. Uses Azure REST API version 2018-09-15. In version 2.x of the Azure Native provider, it used API version 2018-09-15.

Example Usage

Secrets_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var secret = new AzureNative.DevTestLab.Secret("secret", new()
{
LabName = "{labName}",
Name = "{secretName}",
ResourceGroupName = "resourceGroupName",
UserName = "{userName}",
Value = "{secret}",
});
});
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewSecret(ctx, "secret", &devtestlab.SecretArgs{
LabName: pulumi.String("{labName}"),
Name: pulumi.String("{secretName}"),
ResourceGroupName: pulumi.String("resourceGroupName"),
UserName: pulumi.String("{userName}"),
Value: pulumi.String("{secret}"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.devtestlab.Secret;
import com.pulumi.azurenative.devtestlab.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 secret = new Secret("secret", SecretArgs.builder()
.labName("{labName}")
.name("{secretName}")
.resourceGroupName("resourceGroupName")
.userName("{userName}")
.value("{secret}")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:devtestlab:Secret {secretName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/users/{userName}/secrets/{name}

Constructors

Link copied to clipboard
constructor(labName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, userName: Output<String>? = null, value: Output<String>? = null)

Properties

Link copied to clipboard
val labName: Output<String>? = null

The name of the lab.

Link copied to clipboard
val location: Output<String>? = null

The location of the resource.

Link copied to clipboard
val name: Output<String>? = null

The name of the secret.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

The tags of the resource.

Link copied to clipboard
val userName: Output<String>? = null

The name of the user profile.

Link copied to clipboard
val value: Output<String>? = null

The value of the secret for secret creation.

Functions

Link copied to clipboard
open override fun toJava(): SecretArgs