1. Packages
  2. Azure Classic
  3. API Docs
  4. automation
  5. getIntVariable

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.automation.getIntVariable

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Use this data source to access information about an existing Automation Int Variable.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.automation.getIntVariable({
        name: "tfex-example-var",
        resourceGroupName: "tfex-example-rg",
        automationAccountName: "tfex-example-account",
    });
    export const variableId = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.automation.get_int_variable(name="tfex-example-var",
        resource_group_name="tfex-example-rg",
        automation_account_name="tfex-example-account")
    pulumi.export("variableId", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := automation.LookupIntVariable(ctx, &automation.LookupIntVariableArgs{
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Automation.GetIntVariable.Invoke(new()
        {
            Name = "tfex-example-var",
            ResourceGroupName = "tfex-example-rg",
            AutomationAccountName = "tfex-example-account",
        });
    
        return new Dictionary<string, object?>
        {
            ["variableId"] = example.Apply(getIntVariableResult => getIntVariableResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.automation.AutomationFunctions;
    import com.pulumi.azure.automation.inputs.GetIntVariableArgs;
    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) {
            final var example = AutomationFunctions.getIntVariable(GetIntVariableArgs.builder()
                .name("tfex-example-var")
                .resourceGroupName("tfex-example-rg")
                .automationAccountName("tfex-example-account")
                .build());
    
            ctx.export("variableId", example.applyValue(getIntVariableResult -> getIntVariableResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:automation:getIntVariable
          Arguments:
            name: tfex-example-var
            resourceGroupName: tfex-example-rg
            automationAccountName: tfex-example-account
    outputs:
      variableId: ${example.id}
    

    Using getIntVariable

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getIntVariable(args: GetIntVariableArgs, opts?: InvokeOptions): Promise<GetIntVariableResult>
    function getIntVariableOutput(args: GetIntVariableOutputArgs, opts?: InvokeOptions): Output<GetIntVariableResult>
    def get_int_variable(automation_account_name: Optional[str] = None,
                         name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetIntVariableResult
    def get_int_variable_output(automation_account_name: Optional[pulumi.Input[str]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetIntVariableResult]
    func LookupIntVariable(ctx *Context, args *LookupIntVariableArgs, opts ...InvokeOption) (*LookupIntVariableResult, error)
    func LookupIntVariableOutput(ctx *Context, args *LookupIntVariableOutputArgs, opts ...InvokeOption) LookupIntVariableResultOutput

    > Note: This function is named LookupIntVariable in the Go SDK.

    public static class GetIntVariable 
    {
        public static Task<GetIntVariableResult> InvokeAsync(GetIntVariableArgs args, InvokeOptions? opts = null)
        public static Output<GetIntVariableResult> Invoke(GetIntVariableInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIntVariableResult> getIntVariable(GetIntVariableArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:automation/getIntVariable:getIntVariable
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AutomationAccountName string
    The name of the automation account in which the Automation Variable exists.
    Name string
    The name of the Automation Variable.
    ResourceGroupName string
    The Name of the Resource Group where the automation account exists.
    AutomationAccountName string
    The name of the automation account in which the Automation Variable exists.
    Name string
    The name of the Automation Variable.
    ResourceGroupName string
    The Name of the Resource Group where the automation account exists.
    automationAccountName String
    The name of the automation account in which the Automation Variable exists.
    name String
    The name of the Automation Variable.
    resourceGroupName String
    The Name of the Resource Group where the automation account exists.
    automationAccountName string
    The name of the automation account in which the Automation Variable exists.
    name string
    The name of the Automation Variable.
    resourceGroupName string
    The Name of the Resource Group where the automation account exists.
    automation_account_name str
    The name of the automation account in which the Automation Variable exists.
    name str
    The name of the Automation Variable.
    resource_group_name str
    The Name of the Resource Group where the automation account exists.
    automationAccountName String
    The name of the automation account in which the Automation Variable exists.
    name String
    The name of the Automation Variable.
    resourceGroupName String
    The Name of the Resource Group where the automation account exists.

    getIntVariable Result

    The following output properties are available:

    AutomationAccountName string
    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
    ResourceGroupName string
    Value int
    The value of the Automation Variable as a integer.
    AutomationAccountName string
    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
    ResourceGroupName string
    Value int
    The value of the Automation Variable as a integer.
    automationAccountName String
    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
    resourceGroupName String
    value Integer
    The value of the Automation Variable as a integer.
    automationAccountName string
    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
    resourceGroupName string
    value number
    The value of the Automation Variable as a integer.
    automation_account_name str
    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_name str
    value int
    The value of the Automation Variable as a integer.
    automationAccountName String
    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
    resourceGroupName String
    value Number
    The value of the Automation Variable as a integer.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi