GetStringVariable
Use this data source to access information about an existing Automation String Variable.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Automation.GetStringVariable.InvokeAsync(new Azure.Automation.GetStringVariableArgs
{
Name = "tfex-example-var",
ResourceGroupName = "tfex-example-rg",
AutomationAccountName = "tfex-example-account",
}));
this.VariableId = example.Apply(example => example.Id);
}
[Output("variableId")]
public Output<string> VariableId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/automation"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := automation.LookupStringVariable(ctx, &automation.LookupStringVariableArgs{
Name: "tfex-example-var",
ResourceGroupName: "tfex-example-rg",
AutomationAccountName: "tfex-example-account",
}, nil)
if err != nil {
return err
}
ctx.Export("variableId", example.Id)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.automation.get_string_variable(name="tfex-example-var",
resource_group_name="tfex-example-rg",
automation_account_name="tfex-example-account")
pulumi.export("variableId", example.id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.automation.getStringVariable({
name: "tfex-example-var",
resourceGroupName: "tfex-example-rg",
automationAccountName: "tfex-example-account",
});
export const variableId = example.then(example => example.id);Using GetStringVariable
function getStringVariable(args: GetStringVariableArgs, opts?: InvokeOptions): Promise<GetStringVariableResult>function get_string_variable(automation_account_name=None, name=None, resource_group_name=None, opts=None)func LookupStringVariable(ctx *Context, args *LookupStringVariableArgs, opts ...InvokeOption) (*LookupStringVariableResult, error)Note: This function is named
LookupStringVariablein the Go SDK.
public static class GetStringVariable {
public static Task<GetStringVariableResult> InvokeAsync(GetStringVariableArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Automation
Account stringName The name of the automation account in which the Automation Variable exists.
- Name string
The name of the Automation Variable.
- Resource
Group stringName The Name of the Resource Group where the automation account exists.
- Automation
Account stringName The name of the automation account in which the Automation Variable exists.
- Name string
The name of the Automation Variable.
- Resource
Group stringName The Name of the Resource Group where the automation account exists.
- automation
Account stringName The name of the automation account in which the Automation Variable exists.
- name string
The name of the Automation Variable.
- resource
Group stringName The Name of the Resource Group where the automation account exists.
- automation_
account_ strname The name of the automation account in which the Automation Variable exists.
- name str
The name of the Automation Variable.
- resource_
group_ strname The Name of the Resource Group where the automation account exists.
GetStringVariable Result
The following output properties are available:
- Automation
Account stringName - Description string
The description of the Automation Variable.
- Encrypted bool
Specifies if the Automation Variable is encrypted. Defaults to
false.- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Resource
Group stringName - Value string
The value of the Automation Variable as a
string.
- Automation
Account stringName - Description string
The description of the Automation Variable.
- Encrypted bool
Specifies if the Automation Variable is encrypted. Defaults to
false.- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Resource
Group stringName - Value string
The value of the Automation Variable as a
string.
- automation
Account stringName - description string
The description of the Automation Variable.
- encrypted boolean
Specifies if the Automation Variable is encrypted. Defaults to
false.- id string
The provider-assigned unique ID for this managed resource.
- name string
- resource
Group stringName - value string
The value of the Automation Variable as a
string.
- automation_
account_ strname - description str
The description of the Automation Variable.
- encrypted bool
Specifies if the Automation Variable is encrypted. Defaults to
false.- id str
The provider-assigned unique ID for this managed resource.
- name str
- resource_
group_ strname - value str
The value of the Automation Variable as a
string.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.