azure-native.automation.Variable
Explore with Pulumi AI
Definition of the variable. Azure REST API version: 2022-08-08. Prior API version in Azure Native 1.x: 2019-06-01.
Other available API versions: 2023-05-15-preview, 2023-11-01.
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/v2"
"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 pulumi
import pulumi_azure_native as azure_native
variable = azure_native.automation.Variable("variable",
automation_account_name="sampleAccount9",
description="my description",
is_encrypted=False,
name="sampleVariable",
resource_group_name="rg",
value="\"ComputerName.domain.com\"",
variable_name="sampleVariable")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const variable = new azure_native.automation.Variable("variable", {
automationAccountName: "sampleAccount9",
description: "my description",
isEncrypted: false,
name: "sampleVariable",
resourceGroupName: "rg",
value: "\"ComputerName.domain.com\"",
variableName: "sampleVariable",
});
resources:
variable:
type: azure-native:automation:Variable
properties:
automationAccountName: sampleAccount9
description: my description
isEncrypted: false
name: sampleVariable
resourceGroupName: rg
value: '"ComputerName.domain.com"'
variableName: sampleVariable
Create Variable Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Variable(name: string, args: VariableArgs, opts?: CustomResourceOptions);
@overload
def Variable(resource_name: str,
args: VariableArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Variable(resource_name: str,
opts: Optional[ResourceOptions] = None,
automation_account_name: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
description: Optional[str] = None,
is_encrypted: Optional[bool] = None,
value: Optional[str] = None,
variable_name: Optional[str] = None)
func NewVariable(ctx *Context, name string, args VariableArgs, opts ...ResourceOption) (*Variable, error)
public Variable(string name, VariableArgs args, CustomResourceOptions? opts = null)
public Variable(String name, VariableArgs args)
public Variable(String name, VariableArgs args, CustomResourceOptions options)
type: azure-native:automation:Variable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VariableArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VariableArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VariableArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VariableArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var azure_nativeVariableResource = new AzureNative.Automation.Variable("azure-nativeVariableResource", new()
{
AutomationAccountName = "string",
Name = "string",
ResourceGroupName = "string",
Description = "string",
IsEncrypted = false,
Value = "string",
VariableName = "string",
});
example, err := automation.NewVariable(ctx, "azure-nativeVariableResource", &automation.VariableArgs{
AutomationAccountName: pulumi.String("string"),
Name: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Description: pulumi.String("string"),
IsEncrypted: pulumi.Bool(false),
Value: pulumi.String("string"),
VariableName: pulumi.String("string"),
})
var azure_nativeVariableResource = new Variable("azure-nativeVariableResource", VariableArgs.builder()
.automationAccountName("string")
.name("string")
.resourceGroupName("string")
.description("string")
.isEncrypted(false)
.value("string")
.variableName("string")
.build());
azure_native_variable_resource = azure_native.automation.Variable("azure-nativeVariableResource",
automation_account_name="string",
name="string",
resource_group_name="string",
description="string",
is_encrypted=False,
value="string",
variable_name="string")
const azure_nativeVariableResource = new azure_native.automation.Variable("azure-nativeVariableResource", {
automationAccountName: "string",
name: "string",
resourceGroupName: "string",
description: "string",
isEncrypted: false,
value: "string",
variableName: "string",
});
type: azure-native:automation:Variable
properties:
automationAccountName: string
description: string
isEncrypted: false
name: string
resourceGroupName: string
value: string
variableName: string
Variable Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Variable resource accepts the following input properties:
- Automation
Account stringName - The name of the automation account.
- Name string
- Gets or sets the name of the variable.
- Resource
Group stringName - Name of an Azure Resource group.
- Description string
- Gets or sets the description of the variable.
- Is
Encrypted bool - Gets or sets the encrypted flag of the variable.
- Value string
- Gets or sets the value of the variable.
- Variable
Name string - The variable name.
- Automation
Account stringName - The name of the automation account.
- Name string
- Gets or sets the name of the variable.
- Resource
Group stringName - Name of an Azure Resource group.
- Description string
- Gets or sets the description of the variable.
- Is
Encrypted bool - Gets or sets the encrypted flag of the variable.
- Value string
- Gets or sets the value of the variable.
- Variable
Name string - The variable name.
- automation
Account StringName - The name of the automation account.
- name String
- Gets or sets the name of the variable.
- resource
Group StringName - Name of an Azure Resource group.
- description String
- Gets or sets the description of the variable.
- is
Encrypted Boolean - Gets or sets the encrypted flag of the variable.
- value String
- Gets or sets the value of the variable.
- variable
Name String - The variable name.
- automation
Account stringName - The name of the automation account.
- name string
- Gets or sets the name of the variable.
- resource
Group stringName - Name of an Azure Resource group.
- description string
- Gets or sets the description of the variable.
- is
Encrypted boolean - Gets or sets the encrypted flag of the variable.
- value string
- Gets or sets the value of the variable.
- variable
Name string - The variable name.
- automation_
account_ strname - The name of the automation account.
- name str
- Gets or sets the name of the variable.
- resource_
group_ strname - Name of an Azure Resource group.
- description str
- Gets or sets the description of the variable.
- is_
encrypted bool - Gets or sets the encrypted flag of the variable.
- value str
- Gets or sets the value of the variable.
- variable_
name str - The variable name.
- automation
Account StringName - The name of the automation account.
- name String
- Gets or sets the name of the variable.
- resource
Group StringName - Name of an Azure Resource group.
- description String
- Gets or sets the description of the variable.
- is
Encrypted Boolean - Gets or sets the encrypted flag of the variable.
- value String
- Gets or sets the value of the variable.
- variable
Name String - The variable name.
Outputs
All input properties are implicitly available as output properties. Additionally, the Variable resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Type string
- The type of the resource.
- Creation
Time string - Gets or sets the creation time.
- Last
Modified stringTime - Gets or sets the last modified time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Type string
- The type of the resource.
- Creation
Time string - Gets or sets the creation time.
- Last
Modified stringTime - Gets or sets the last modified time.
- id String
- The provider-assigned unique ID for this managed resource.
- type String
- The type of the resource.
- creation
Time String - Gets or sets the creation time.
- last
Modified StringTime - Gets or sets the last modified time.
- id string
- The provider-assigned unique ID for this managed resource.
- type string
- The type of the resource.
- creation
Time string - Gets or sets the creation time.
- last
Modified stringTime - Gets or sets the last modified time.
- id str
- The provider-assigned unique ID for this managed resource.
- type str
- The type of the resource.
- creation_
time str - Gets or sets the creation time.
- last_
modified_ strtime - Gets or sets the last modified time.
- id String
- The provider-assigned unique ID for this managed resource.
- type String
- The type of the resource.
- creation
Time String - Gets or sets the creation time.
- last
Modified StringTime - Gets or sets the last modified time.
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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0