VariableArgs

data class VariableArgs(val automationAccountName: Output<String>? = null, val description: Output<String>? = null, val isEncrypted: Output<Boolean>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val value: Output<String>? = null, val variableName: Output<String>? = null) : ConvertibleToJava<VariableArgs>

Definition of the variable. Uses Azure REST API version 2023-11-01. In version 2.x of the Azure Native provider, it used API version 2022-08-08. Other available API versions: 2015-10-31, 2019-06-01, 2020-01-13-preview, 2022-08-08, 2023-05-15-preview, 2024-10-23. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native automation [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create or update a variable

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var variable = new AzureNative.Automation.Variable("variable", new()
{
AutomationAccountName = "sampleAccount9",
Description = "my description",
IsEncrypted = false,
Name = "sampleVariable",
ResourceGroupName = "rg",
Value = "\"ComputerName.domain.com\"",
VariableName = "sampleVariable",
});
});
package main
import (
automation "github.com/pulumi/pulumi-azure-native-sdk/automation/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := automation.NewVariable(ctx, "variable", &automation.VariableArgs{
AutomationAccountName: pulumi.String("sampleAccount9"),
Description: pulumi.String("my description"),
IsEncrypted: pulumi.Bool(false),
Name: pulumi.String("sampleVariable"),
ResourceGroupName: pulumi.String("rg"),
Value: pulumi.String("\"ComputerName.domain.com\""),
VariableName: pulumi.String("sampleVariable"),
})
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.automation.Variable;
import com.pulumi.azurenative.automation.VariableArgs;
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 variable = new Variable("variable", VariableArgs.builder()
.automationAccountName("sampleAccount9")
.description("my description")
.isEncrypted(false)
.name("sampleVariable")
.resourceGroupName("rg")
.value("\"ComputerName.domain.com\"")
.variableName("sampleVariable")
.build());
}
}

Import

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

$ pulumi import azure-native:automation:Variable sampleVariable /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName}

Constructors

Link copied to clipboard
constructor(automationAccountName: Output<String>? = null, description: Output<String>? = null, isEncrypted: Output<Boolean>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, value: Output<String>? = null, variableName: Output<String>? = null)

Properties

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

The name of the automation account.

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

Gets or sets the description of the variable.

Link copied to clipboard
val isEncrypted: Output<Boolean>? = null

Gets or sets the encrypted flag of the variable.

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

Gets or sets the name of the variable.

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

Name of an Azure Resource group.

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

Gets or sets the value of the variable.

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

The variable name.

Functions

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