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

We recommend using Azure Native.

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

azure.automation.getRunbook

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 Runbook.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.automation.getRunbook({
        name: "existing-runbook",
        resourceGroupName: "existing",
        automationAccountName: "existing-automation",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.automation.get_runbook(name="existing-runbook",
        resource_group_name="existing",
        automation_account_name="existing-automation")
    pulumi.export("id", 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.GetRunbook(ctx, &automation.GetRunbookArgs{
    			Name:                  "existing-runbook",
    			ResourceGroupName:     "existing",
    			AutomationAccountName: "existing-automation",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", 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.GetRunbook.Invoke(new()
        {
            Name = "existing-runbook",
            ResourceGroupName = "existing",
            AutomationAccountName = "existing-automation",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getRunbookResult => getRunbookResult.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.GetRunbookArgs;
    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.getRunbook(GetRunbookArgs.builder()
                .name("existing-runbook")
                .resourceGroupName("existing")
                .automationAccountName("existing-automation")
                .build());
    
            ctx.export("id", example.applyValue(getRunbookResult -> getRunbookResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:automation:getRunbook
          Arguments:
            name: existing-runbook
            resourceGroupName: existing
            automationAccountName: existing-automation
    outputs:
      id: ${example.id}
    

    Using getRunbook

    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 getRunbook(args: GetRunbookArgs, opts?: InvokeOptions): Promise<GetRunbookResult>
    function getRunbookOutput(args: GetRunbookOutputArgs, opts?: InvokeOptions): Output<GetRunbookResult>
    def get_runbook(automation_account_name: Optional[str] = None,
                    name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetRunbookResult
    def get_runbook_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[GetRunbookResult]
    func GetRunbook(ctx *Context, args *GetRunbookArgs, opts ...InvokeOption) (*GetRunbookResult, error)
    func GetRunbookOutput(ctx *Context, args *GetRunbookOutputArgs, opts ...InvokeOption) GetRunbookResultOutput

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

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

    The following arguments are supported:

    AutomationAccountName string
    The name of the Automation Account the runbook belongs to.
    Name string
    The name of the Automation Runbook.
    ResourceGroupName string
    The name of the Resource Group where the Automation exists.
    AutomationAccountName string
    The name of the Automation Account the runbook belongs to.
    Name string
    The name of the Automation Runbook.
    ResourceGroupName string
    The name of the Resource Group where the Automation exists.
    automationAccountName String
    The name of the Automation Account the runbook belongs to.
    name String
    The name of the Automation Runbook.
    resourceGroupName String
    The name of the Resource Group where the Automation exists.
    automationAccountName string
    The name of the Automation Account the runbook belongs to.
    name string
    The name of the Automation Runbook.
    resourceGroupName string
    The name of the Resource Group where the Automation exists.
    automation_account_name str
    The name of the Automation Account the runbook belongs to.
    name str
    The name of the Automation Runbook.
    resource_group_name str
    The name of the Resource Group where the Automation exists.
    automationAccountName String
    The name of the Automation Account the runbook belongs to.
    name String
    The name of the Automation Runbook.
    resourceGroupName String
    The name of the Resource Group where the Automation exists.

    getRunbook Result

    The following output properties are available:

    AutomationAccountName string
    Content string
    The content of the Runbook.
    Description string
    The description of the Runbook.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the Runbook exists.
    LogActivityTraceLevel int
    The activity-level tracing of the Runbook.
    LogProgress bool
    The Progress log option of the Runbook.
    LogVerbose bool
    The Verbose log option of the Runbook.
    Name string
    ResourceGroupName string
    RunbookType string
    The type of Runbook.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Runbook.
    AutomationAccountName string
    Content string
    The content of the Runbook.
    Description string
    The description of the Runbook.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Azure Region where the Runbook exists.
    LogActivityTraceLevel int
    The activity-level tracing of the Runbook.
    LogProgress bool
    The Progress log option of the Runbook.
    LogVerbose bool
    The Verbose log option of the Runbook.
    Name string
    ResourceGroupName string
    RunbookType string
    The type of Runbook.
    Tags map[string]string
    A mapping of tags assigned to the Runbook.
    automationAccountName String
    content String
    The content of the Runbook.
    description String
    The description of the Runbook.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the Runbook exists.
    logActivityTraceLevel Integer
    The activity-level tracing of the Runbook.
    logProgress Boolean
    The Progress log option of the Runbook.
    logVerbose Boolean
    The Verbose log option of the Runbook.
    name String
    resourceGroupName String
    runbookType String
    The type of Runbook.
    tags Map<String,String>
    A mapping of tags assigned to the Runbook.
    automationAccountName string
    content string
    The content of the Runbook.
    description string
    The description of the Runbook.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Azure Region where the Runbook exists.
    logActivityTraceLevel number
    The activity-level tracing of the Runbook.
    logProgress boolean
    The Progress log option of the Runbook.
    logVerbose boolean
    The Verbose log option of the Runbook.
    name string
    resourceGroupName string
    runbookType string
    The type of Runbook.
    tags {[key: string]: string}
    A mapping of tags assigned to the Runbook.
    automation_account_name str
    content str
    The content of the Runbook.
    description str
    The description of the Runbook.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Azure Region where the Runbook exists.
    log_activity_trace_level int
    The activity-level tracing of the Runbook.
    log_progress bool
    The Progress log option of the Runbook.
    log_verbose bool
    The Verbose log option of the Runbook.
    name str
    resource_group_name str
    runbook_type str
    The type of Runbook.
    tags Mapping[str, str]
    A mapping of tags assigned to the Runbook.
    automationAccountName String
    content String
    The content of the Runbook.
    description String
    The description of the Runbook.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Azure Region where the Runbook exists.
    logActivityTraceLevel Number
    The activity-level tracing of the Runbook.
    logProgress Boolean
    The Progress log option of the Runbook.
    logVerbose Boolean
    The Verbose log option of the Runbook.
    name String
    resourceGroupName String
    runbookType String
    The type of Runbook.
    tags Map<String>
    A mapping of tags assigned to the Runbook.

    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