We recommend using Azure Native.
Azure v6.28.0 published on Friday, Oct 3, 2025 by Pulumi
azure.automation.getRunbook
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.id());
}
}
variables:
example:
fn::invoke:
function: azure:automation:getRunbook
arguments:
name: existing-runbook
resourceGroupName: existing
automationAccountName: existing-automation
outputs:
id: ${example.id}
API Providers
This data source uses the following Azure API Providers:
Microsoft.Automation
- 2023-11-01
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)
public static Output<GetRunbookResult> getRunbook(GetRunbookArgs args, InvokeOptions options)
fn::invoke:
function: azure:automation/getRunbook:getRunbook
arguments:
# arguments dictionary
The following arguments are supported:
- Automation
Account stringName - The name of the Automation Account the runbook belongs to.
- Name string
- The name of the Automation Runbook.
- Resource
Group stringName - The name of the Resource Group where the Automation exists.
- Automation
Account stringName - The name of the Automation Account the runbook belongs to.
- Name string
- The name of the Automation Runbook.
- Resource
Group stringName - The name of the Resource Group where the Automation exists.
- automation
Account StringName - The name of the Automation Account the runbook belongs to.
- name String
- The name of the Automation Runbook.
- resource
Group StringName - The name of the Resource Group where the Automation exists.
- automation
Account stringName - The name of the Automation Account the runbook belongs to.
- name string
- The name of the Automation Runbook.
- resource
Group stringName - The name of the Resource Group where the Automation exists.
- automation_
account_ strname - The name of the Automation Account the runbook belongs to.
- name str
- The name of the Automation Runbook.
- resource_
group_ strname - The name of the Resource Group where the Automation exists.
- automation
Account StringName - The name of the Automation Account the runbook belongs to.
- name String
- The name of the Automation Runbook.
- resource
Group StringName - The name of the Resource Group where the Automation exists.
getRunbook Result
The following output properties are available:
- Automation
Account stringName - 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.
- Log
Activity intTrace Level - 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 string
- Resource
Group stringName - Runbook
Type string - The type of Runbook.
- Dictionary<string, string>
- A mapping of tags assigned to the Runbook.
- Automation
Account stringName - 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.
- Log
Activity intTrace Level - 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 string
- Resource
Group stringName - Runbook
Type string - The type of Runbook.
- map[string]string
- A mapping of tags assigned to the Runbook.
- automation
Account StringName - 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.
- log
Activity IntegerTrace Level - The activity-level tracing of the Runbook.
- log
Progress Boolean - The Progress log option of the Runbook.
- log
Verbose Boolean - The Verbose log option of the Runbook.
- name String
- resource
Group StringName - runbook
Type String - The type of Runbook.
- Map<String,String>
- A mapping of tags assigned to the Runbook.
- automation
Account stringName - 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.
- log
Activity numberTrace Level - The activity-level tracing of the Runbook.
- log
Progress boolean - The Progress log option of the Runbook.
- log
Verbose boolean - The Verbose log option of the Runbook.
- name string
- resource
Group stringName - runbook
Type string - The type of Runbook.
- {[key: string]: string}
- A mapping of tags assigned to the Runbook.
- automation_
account_ strname - 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_ inttrace_ level - 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_ strname - runbook_
type str - The type of Runbook.
- Mapping[str, str]
- A mapping of tags assigned to the Runbook.
- automation
Account StringName - 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.
- log
Activity NumberTrace Level - The activity-level tracing of the Runbook.
- log
Progress Boolean - The Progress log option of the Runbook.
- log
Verbose Boolean - The Verbose log option of the Runbook.
- name String
- resource
Group StringName - runbook
Type String - The type of Runbook.
- 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.