We recommend using Azure Native.
azure.automation.RunBook
Explore with Pulumi AI
Manages a Automation Runbook.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleAccount = new azure.automation.Account("example", {
    name: "account1",
    location: example.location,
    resourceGroupName: example.name,
    skuName: "Basic",
});
const exampleRunBook = new azure.automation.RunBook("example", {
    name: "Get-AzureVMTutorial",
    location: example.location,
    resourceGroupName: example.name,
    automationAccountName: exampleAccount.name,
    logVerbose: true,
    logProgress: true,
    description: "This is an example runbook",
    runbookType: "PowerShellWorkflow",
    publishContentLink: {
        uri: "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
    },
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_account = azure.automation.Account("example",
    name="account1",
    location=example.location,
    resource_group_name=example.name,
    sku_name="Basic")
example_run_book = azure.automation.RunBook("example",
    name="Get-AzureVMTutorial",
    location=example.location,
    resource_group_name=example.name,
    automation_account_name=example_account.name,
    log_verbose=True,
    log_progress=True,
    description="This is an example runbook",
    runbook_type="PowerShellWorkflow",
    publish_content_link={
        "uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
    })
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
			Name:              pulumi.String("account1"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			SkuName:           pulumi.String("Basic"),
		})
		if err != nil {
			return err
		}
		_, err = automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
			Name:                  pulumi.String("Get-AzureVMTutorial"),
			Location:              example.Location,
			ResourceGroupName:     example.Name,
			AutomationAccountName: exampleAccount.Name,
			LogVerbose:            pulumi.Bool(true),
			LogProgress:           pulumi.Bool(true),
			Description:           pulumi.String("This is an example runbook"),
			RunbookType:           pulumi.String("PowerShellWorkflow"),
			PublishContentLink: &automation.RunBookPublishContentLinkArgs{
				Uri: pulumi.String("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });
    var exampleAccount = new Azure.Automation.Account("example", new()
    {
        Name = "account1",
        Location = example.Location,
        ResourceGroupName = example.Name,
        SkuName = "Basic",
    });
    var exampleRunBook = new Azure.Automation.RunBook("example", new()
    {
        Name = "Get-AzureVMTutorial",
        Location = example.Location,
        ResourceGroupName = example.Name,
        AutomationAccountName = exampleAccount.Name,
        LogVerbose = true,
        LogProgress = true,
        Description = "This is an example runbook",
        RunbookType = "PowerShellWorkflow",
        PublishContentLink = new Azure.Automation.Inputs.RunBookPublishContentLinkArgs
        {
            Uri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.automation.Account;
import com.pulumi.azure.automation.AccountArgs;
import com.pulumi.azure.automation.RunBook;
import com.pulumi.azure.automation.RunBookArgs;
import com.pulumi.azure.automation.inputs.RunBookPublishContentLinkArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());
        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("account1")
            .location(example.location())
            .resourceGroupName(example.name())
            .skuName("Basic")
            .build());
        var exampleRunBook = new RunBook("exampleRunBook", RunBookArgs.builder()
            .name("Get-AzureVMTutorial")
            .location(example.location())
            .resourceGroupName(example.name())
            .automationAccountName(exampleAccount.name())
            .logVerbose("true")
            .logProgress("true")
            .description("This is an example runbook")
            .runbookType("PowerShellWorkflow")
            .publishContentLink(RunBookPublishContentLinkArgs.builder()
                .uri("https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1")
                .build())
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleAccount:
    type: azure:automation:Account
    name: example
    properties:
      name: account1
      location: ${example.location}
      resourceGroupName: ${example.name}
      skuName: Basic
  exampleRunBook:
    type: azure:automation:RunBook
    name: example
    properties:
      name: Get-AzureVMTutorial
      location: ${example.location}
      resourceGroupName: ${example.name}
      automationAccountName: ${exampleAccount.name}
      logVerbose: 'true'
      logProgress: 'true'
      description: This is an example runbook
      runbookType: PowerShellWorkflow
      publishContentLink:
        uri: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/c4935ffb69246a6058eb24f54640f53f69d3ac9f/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1
Create RunBook Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RunBook(name: string, args: RunBookArgs, opts?: CustomResourceOptions);@overload
def RunBook(resource_name: str,
            args: RunBookArgs,
            opts: Optional[ResourceOptions] = None)
@overload
def RunBook(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            automation_account_name: Optional[str] = None,
            runbook_type: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            log_verbose: Optional[bool] = None,
            log_progress: Optional[bool] = None,
            log_activity_trace_level: Optional[int] = None,
            location: Optional[str] = None,
            job_schedules: Optional[Sequence[RunBookJobScheduleArgs]] = None,
            draft: Optional[RunBookDraftArgs] = None,
            name: Optional[str] = None,
            publish_content_link: Optional[RunBookPublishContentLinkArgs] = None,
            description: Optional[str] = None,
            content: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None)func NewRunBook(ctx *Context, name string, args RunBookArgs, opts ...ResourceOption) (*RunBook, error)public RunBook(string name, RunBookArgs args, CustomResourceOptions? opts = null)
public RunBook(String name, RunBookArgs args)
public RunBook(String name, RunBookArgs args, CustomResourceOptions options)
type: azure:automation:RunBook
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 RunBookArgs
- 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 RunBookArgs
- 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 RunBookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RunBookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RunBookArgs
- 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 runBookResource = new Azure.Automation.RunBook("runBookResource", new()
{
    AutomationAccountName = "string",
    RunbookType = "string",
    ResourceGroupName = "string",
    LogVerbose = false,
    LogProgress = false,
    LogActivityTraceLevel = 0,
    Location = "string",
    JobSchedules = new[]
    {
        new Azure.Automation.Inputs.RunBookJobScheduleArgs
        {
            ScheduleName = "string",
            JobScheduleId = "string",
            Parameters = 
            {
                { "string", "string" },
            },
            RunOn = "string",
        },
    },
    Draft = new Azure.Automation.Inputs.RunBookDraftArgs
    {
        ContentLink = new Azure.Automation.Inputs.RunBookDraftContentLinkArgs
        {
            Uri = "string",
            Hash = new Azure.Automation.Inputs.RunBookDraftContentLinkHashArgs
            {
                Algorithm = "string",
                Value = "string",
            },
            Version = "string",
        },
        CreationTime = "string",
        EditModeEnabled = false,
        LastModifiedTime = "string",
        OutputTypes = new[]
        {
            "string",
        },
        Parameters = new[]
        {
            new Azure.Automation.Inputs.RunBookDraftParameterArgs
            {
                Key = "string",
                Type = "string",
                DefaultValue = "string",
                Mandatory = false,
                Position = 0,
            },
        },
    },
    Name = "string",
    PublishContentLink = new Azure.Automation.Inputs.RunBookPublishContentLinkArgs
    {
        Uri = "string",
        Hash = new Azure.Automation.Inputs.RunBookPublishContentLinkHashArgs
        {
            Algorithm = "string",
            Value = "string",
        },
        Version = "string",
    },
    Description = "string",
    Content = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := automation.NewRunBook(ctx, "runBookResource", &automation.RunBookArgs{
	AutomationAccountName: pulumi.String("string"),
	RunbookType:           pulumi.String("string"),
	ResourceGroupName:     pulumi.String("string"),
	LogVerbose:            pulumi.Bool(false),
	LogProgress:           pulumi.Bool(false),
	LogActivityTraceLevel: pulumi.Int(0),
	Location:              pulumi.String("string"),
	JobSchedules: automation.RunBookJobScheduleArray{
		&automation.RunBookJobScheduleArgs{
			ScheduleName:  pulumi.String("string"),
			JobScheduleId: pulumi.String("string"),
			Parameters: pulumi.StringMap{
				"string": pulumi.String("string"),
			},
			RunOn: pulumi.String("string"),
		},
	},
	Draft: &automation.RunBookDraftArgs{
		ContentLink: &automation.RunBookDraftContentLinkArgs{
			Uri: pulumi.String("string"),
			Hash: &automation.RunBookDraftContentLinkHashArgs{
				Algorithm: pulumi.String("string"),
				Value:     pulumi.String("string"),
			},
			Version: pulumi.String("string"),
		},
		CreationTime:     pulumi.String("string"),
		EditModeEnabled:  pulumi.Bool(false),
		LastModifiedTime: pulumi.String("string"),
		OutputTypes: pulumi.StringArray{
			pulumi.String("string"),
		},
		Parameters: automation.RunBookDraftParameterArray{
			&automation.RunBookDraftParameterArgs{
				Key:          pulumi.String("string"),
				Type:         pulumi.String("string"),
				DefaultValue: pulumi.String("string"),
				Mandatory:    pulumi.Bool(false),
				Position:     pulumi.Int(0),
			},
		},
	},
	Name: pulumi.String("string"),
	PublishContentLink: &automation.RunBookPublishContentLinkArgs{
		Uri: pulumi.String("string"),
		Hash: &automation.RunBookPublishContentLinkHashArgs{
			Algorithm: pulumi.String("string"),
			Value:     pulumi.String("string"),
		},
		Version: pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Content:     pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var runBookResource = new RunBook("runBookResource", RunBookArgs.builder()
    .automationAccountName("string")
    .runbookType("string")
    .resourceGroupName("string")
    .logVerbose(false)
    .logProgress(false)
    .logActivityTraceLevel(0)
    .location("string")
    .jobSchedules(RunBookJobScheduleArgs.builder()
        .scheduleName("string")
        .jobScheduleId("string")
        .parameters(Map.of("string", "string"))
        .runOn("string")
        .build())
    .draft(RunBookDraftArgs.builder()
        .contentLink(RunBookDraftContentLinkArgs.builder()
            .uri("string")
            .hash(RunBookDraftContentLinkHashArgs.builder()
                .algorithm("string")
                .value("string")
                .build())
            .version("string")
            .build())
        .creationTime("string")
        .editModeEnabled(false)
        .lastModifiedTime("string")
        .outputTypes("string")
        .parameters(RunBookDraftParameterArgs.builder()
            .key("string")
            .type("string")
            .defaultValue("string")
            .mandatory(false)
            .position(0)
            .build())
        .build())
    .name("string")
    .publishContentLink(RunBookPublishContentLinkArgs.builder()
        .uri("string")
        .hash(RunBookPublishContentLinkHashArgs.builder()
            .algorithm("string")
            .value("string")
            .build())
        .version("string")
        .build())
    .description("string")
    .content("string")
    .tags(Map.of("string", "string"))
    .build());
run_book_resource = azure.automation.RunBook("runBookResource",
    automation_account_name="string",
    runbook_type="string",
    resource_group_name="string",
    log_verbose=False,
    log_progress=False,
    log_activity_trace_level=0,
    location="string",
    job_schedules=[{
        "schedule_name": "string",
        "job_schedule_id": "string",
        "parameters": {
            "string": "string",
        },
        "run_on": "string",
    }],
    draft={
        "content_link": {
            "uri": "string",
            "hash": {
                "algorithm": "string",
                "value": "string",
            },
            "version": "string",
        },
        "creation_time": "string",
        "edit_mode_enabled": False,
        "last_modified_time": "string",
        "output_types": ["string"],
        "parameters": [{
            "key": "string",
            "type": "string",
            "default_value": "string",
            "mandatory": False,
            "position": 0,
        }],
    },
    name="string",
    publish_content_link={
        "uri": "string",
        "hash": {
            "algorithm": "string",
            "value": "string",
        },
        "version": "string",
    },
    description="string",
    content="string",
    tags={
        "string": "string",
    })
const runBookResource = new azure.automation.RunBook("runBookResource", {
    automationAccountName: "string",
    runbookType: "string",
    resourceGroupName: "string",
    logVerbose: false,
    logProgress: false,
    logActivityTraceLevel: 0,
    location: "string",
    jobSchedules: [{
        scheduleName: "string",
        jobScheduleId: "string",
        parameters: {
            string: "string",
        },
        runOn: "string",
    }],
    draft: {
        contentLink: {
            uri: "string",
            hash: {
                algorithm: "string",
                value: "string",
            },
            version: "string",
        },
        creationTime: "string",
        editModeEnabled: false,
        lastModifiedTime: "string",
        outputTypes: ["string"],
        parameters: [{
            key: "string",
            type: "string",
            defaultValue: "string",
            mandatory: false,
            position: 0,
        }],
    },
    name: "string",
    publishContentLink: {
        uri: "string",
        hash: {
            algorithm: "string",
            value: "string",
        },
        version: "string",
    },
    description: "string",
    content: "string",
    tags: {
        string: "string",
    },
});
type: azure:automation:RunBook
properties:
    automationAccountName: string
    content: string
    description: string
    draft:
        contentLink:
            hash:
                algorithm: string
                value: string
            uri: string
            version: string
        creationTime: string
        editModeEnabled: false
        lastModifiedTime: string
        outputTypes:
            - string
        parameters:
            - defaultValue: string
              key: string
              mandatory: false
              position: 0
              type: string
    jobSchedules:
        - jobScheduleId: string
          parameters:
            string: string
          runOn: string
          scheduleName: string
    location: string
    logActivityTraceLevel: 0
    logProgress: false
    logVerbose: false
    name: string
    publishContentLink:
        hash:
            algorithm: string
            value: string
        uri: string
        version: string
    resourceGroupName: string
    runbookType: string
    tags:
        string: string
RunBook 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 RunBook resource accepts the following input properties:
- AutomationAccount stringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- LogProgress bool
- Progress log option.
- LogVerbose bool
- Verbose log option.
- ResourceGroup stringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- RunbookType string
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- Content string
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- Description string
- A description for this credential.
- Draft
RunBook Draft 
- A draftblock as defined below.
- JobSchedules List<RunBook Job Schedule> 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- LogActivity intTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- Name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- PublishContent RunLink Book Publish Content Link 
- One publish_content_linkblock as defined below.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- AutomationAccount stringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- LogProgress bool
- Progress log option.
- LogVerbose bool
- Verbose log option.
- ResourceGroup stringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- RunbookType string
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- Content string
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- Description string
- A description for this credential.
- Draft
RunBook Draft Args 
- A draftblock as defined below.
- JobSchedules []RunBook Job Schedule Args 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- LogActivity intTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- Name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- PublishContent RunLink Book Publish Content Link Args 
- One publish_content_linkblock as defined below.
- map[string]string
- A mapping of tags to assign to the resource.
- automationAccount StringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- logProgress Boolean
- Progress log option.
- logVerbose Boolean
- Verbose log option.
- resourceGroup StringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbookType String
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- content String
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description String
- A description for this credential.
- draft
RunBook Draft 
- A draftblock as defined below.
- jobSchedules List<RunBook Job Schedule> 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- logActivity IntegerTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- name String
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publishContent RunLink Book Publish Content Link 
- One publish_content_linkblock as defined below.
- Map<String,String>
- A mapping of tags to assign to the resource.
- automationAccount stringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- logProgress boolean
- Progress log option.
- logVerbose boolean
- Verbose log option.
- resourceGroup stringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbookType string
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- content string
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description string
- A description for this credential.
- draft
RunBook Draft 
- A draftblock as defined below.
- jobSchedules RunBook Job Schedule[] 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- logActivity numberTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publishContent RunLink Book Publish Content Link 
- One publish_content_linkblock as defined below.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- automation_account_ strname 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- log_progress bool
- Progress log option.
- log_verbose bool
- Verbose log option.
- resource_group_ strname 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook_type str
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- content str
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description str
- A description for this credential.
- draft
RunBook Draft Args 
- A draftblock as defined below.
- job_schedules Sequence[RunBook Job Schedule Args] 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- log_activity_ inttrace_ level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- name str
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publish_content_ Runlink Book Publish Content Link Args 
- One publish_content_linkblock as defined below.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- automationAccount StringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- logProgress Boolean
- Progress log option.
- logVerbose Boolean
- Verbose log option.
- resourceGroup StringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbookType String
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- content String
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description String
- A description for this credential.
- draft Property Map
- A draftblock as defined below.
- jobSchedules List<Property Map>
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- logActivity NumberTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- name String
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publishContent Property MapLink 
- One publish_content_linkblock as defined below.
- Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the RunBook resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing RunBook Resource
Get an existing RunBook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RunBookState, opts?: CustomResourceOptions): RunBook@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        automation_account_name: Optional[str] = None,
        content: Optional[str] = None,
        description: Optional[str] = None,
        draft: Optional[RunBookDraftArgs] = None,
        job_schedules: Optional[Sequence[RunBookJobScheduleArgs]] = None,
        location: Optional[str] = None,
        log_activity_trace_level: Optional[int] = None,
        log_progress: Optional[bool] = None,
        log_verbose: Optional[bool] = None,
        name: Optional[str] = None,
        publish_content_link: Optional[RunBookPublishContentLinkArgs] = None,
        resource_group_name: Optional[str] = None,
        runbook_type: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> RunBookfunc GetRunBook(ctx *Context, name string, id IDInput, state *RunBookState, opts ...ResourceOption) (*RunBook, error)public static RunBook Get(string name, Input<string> id, RunBookState? state, CustomResourceOptions? opts = null)public static RunBook get(String name, Output<String> id, RunBookState state, CustomResourceOptions options)resources:  _:    type: azure:automation:RunBook    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AutomationAccount stringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- Content string
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- Description string
- A description for this credential.
- Draft
RunBook Draft 
- A draftblock as defined below.
- JobSchedules List<RunBook Job Schedule> 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- LogActivity intTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- LogProgress bool
- Progress log option.
- LogVerbose bool
- Verbose log option.
- Name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- PublishContent RunLink Book Publish Content Link 
- One publish_content_linkblock as defined below.
- ResourceGroup stringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- RunbookType string
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- AutomationAccount stringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- Content string
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- Description string
- A description for this credential.
- Draft
RunBook Draft Args 
- A draftblock as defined below.
- JobSchedules []RunBook Job Schedule Args 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- Location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- LogActivity intTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- LogProgress bool
- Progress log option.
- LogVerbose bool
- Verbose log option.
- Name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- PublishContent RunLink Book Publish Content Link Args 
- One publish_content_linkblock as defined below.
- ResourceGroup stringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- RunbookType string
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- automationAccount StringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- content String
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description String
- A description for this credential.
- draft
RunBook Draft 
- A draftblock as defined below.
- jobSchedules List<RunBook Job Schedule> 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- logActivity IntegerTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- logProgress Boolean
- Progress log option.
- logVerbose Boolean
- Verbose log option.
- name String
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publishContent RunLink Book Publish Content Link 
- One publish_content_linkblock as defined below.
- resourceGroup StringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbookType String
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- automationAccount stringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- content string
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description string
- A description for this credential.
- draft
RunBook Draft 
- A draftblock as defined below.
- jobSchedules RunBook Job Schedule[] 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location string
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- logActivity numberTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- logProgress boolean
- Progress log option.
- logVerbose boolean
- Verbose log option.
- name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publishContent RunLink Book Publish Content Link 
- One publish_content_linkblock as defined below.
- resourceGroup stringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbookType string
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- automation_account_ strname 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- content str
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description str
- A description for this credential.
- draft
RunBook Draft Args 
- A draftblock as defined below.
- job_schedules Sequence[RunBook Job Schedule Args] 
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location str
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- log_activity_ inttrace_ level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- log_progress bool
- Progress log option.
- log_verbose bool
- Verbose log option.
- name str
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publish_content_ Runlink Book Publish Content Link Args 
- One publish_content_linkblock as defined below.
- resource_group_ strname 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook_type str
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- automationAccount StringName 
- The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- content String
- The desired content of the runbook. - NOTE The Azure API requires a - publish_content_linkto be supplied even when specifying your own- content.
- description String
- A description for this credential.
- draft Property Map
- A draftblock as defined below.
- jobSchedules List<Property Map>
- One or more - job_scheduleblock as defined below.- NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined - job_scheduleproperty to manage the job schedules. At this time you should choose one of them to manage the job schedule resources.
- location String
- Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
- logActivity NumberTrace Level 
- Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are 0for None,9for Basic, and15for Detailed. Must turn on Verbose logging in order to see the tracing.
- logProgress Boolean
- Progress log option.
- logVerbose Boolean
- Verbose log option.
- name String
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publishContent Property MapLink 
- One publish_content_linkblock as defined below.
- resourceGroup StringName 
- The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbookType String
- The type of the runbook - can be either Graph,GraphPowerShell,GraphPowerShellWorkflow,PowerShellWorkflow,PowerShell,PowerShell72,Python3,Python2orScript. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
Supporting Types
RunBookDraft, RunBookDraftArgs      
- ContentLink RunBook Draft Content Link 
- A publish_content_linkblock as defined above.
- CreationTime string
- EditMode boolEnabled 
- Whether the draft in edit mode.
- LastModified stringTime 
- OutputTypes List<string>
- Specifies the output types of the runbook.
- Parameters
List<RunBook Draft Parameter> 
- A list of parametersblock as defined below.
- ContentLink RunBook Draft Content Link 
- A publish_content_linkblock as defined above.
- CreationTime string
- EditMode boolEnabled 
- Whether the draft in edit mode.
- LastModified stringTime 
- OutputTypes []string
- Specifies the output types of the runbook.
- Parameters
[]RunBook Draft Parameter 
- A list of parametersblock as defined below.
- contentLink RunBook Draft Content Link 
- A publish_content_linkblock as defined above.
- creationTime String
- editMode BooleanEnabled 
- Whether the draft in edit mode.
- lastModified StringTime 
- outputTypes List<String>
- Specifies the output types of the runbook.
- parameters
List<RunBook Draft Parameter> 
- A list of parametersblock as defined below.
- contentLink RunBook Draft Content Link 
- A publish_content_linkblock as defined above.
- creationTime string
- editMode booleanEnabled 
- Whether the draft in edit mode.
- lastModified stringTime 
- outputTypes string[]
- Specifies the output types of the runbook.
- parameters
RunBook Draft Parameter[] 
- A list of parametersblock as defined below.
- content_link RunBook Draft Content Link 
- A publish_content_linkblock as defined above.
- creation_time str
- edit_mode_ boolenabled 
- Whether the draft in edit mode.
- last_modified_ strtime 
- output_types Sequence[str]
- Specifies the output types of the runbook.
- parameters
Sequence[RunBook Draft Parameter] 
- A list of parametersblock as defined below.
- contentLink Property Map
- A publish_content_linkblock as defined above.
- creationTime String
- editMode BooleanEnabled 
- Whether the draft in edit mode.
- lastModified StringTime 
- outputTypes List<String>
- Specifies the output types of the runbook.
- parameters List<Property Map>
- A list of parametersblock as defined below.
RunBookDraftContentLink, RunBookDraftContentLinkArgs          
- Uri string
- The URI of the runbook content.
- Hash
RunBook Draft Content Link Hash 
- A hashblock as defined below.
- Version string
- Specifies the version of the content
- Uri string
- The URI of the runbook content.
- Hash
RunBook Draft Content Link Hash 
- A hashblock as defined below.
- Version string
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash
RunBook Draft Content Link Hash 
- A hashblock as defined below.
- version String
- Specifies the version of the content
- uri string
- The URI of the runbook content.
- hash
RunBook Draft Content Link Hash 
- A hashblock as defined below.
- version string
- Specifies the version of the content
- uri str
- The URI of the runbook content.
- hash
RunBook Draft Content Link Hash 
- A hashblock as defined below.
- version str
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash Property Map
- A hashblock as defined below.
- version String
- Specifies the version of the content
RunBookDraftContentLinkHash, RunBookDraftContentLinkHashArgs            
RunBookDraftParameter, RunBookDraftParameterArgs        
- Key string
- The name of the parameter.
- Type string
- Specifies the type of this parameter.
- DefaultValue string
- Specifies the default value of the parameter.
- Mandatory bool
- Whether this parameter is mandatory.
- Position int
- Specifies the position of the parameter.
- Key string
- The name of the parameter.
- Type string
- Specifies the type of this parameter.
- DefaultValue string
- Specifies the default value of the parameter.
- Mandatory bool
- Whether this parameter is mandatory.
- Position int
- Specifies the position of the parameter.
- key String
- The name of the parameter.
- type String
- Specifies the type of this parameter.
- defaultValue String
- Specifies the default value of the parameter.
- mandatory Boolean
- Whether this parameter is mandatory.
- position Integer
- Specifies the position of the parameter.
- key string
- The name of the parameter.
- type string
- Specifies the type of this parameter.
- defaultValue string
- Specifies the default value of the parameter.
- mandatory boolean
- Whether this parameter is mandatory.
- position number
- Specifies the position of the parameter.
- key str
- The name of the parameter.
- type str
- Specifies the type of this parameter.
- default_value str
- Specifies the default value of the parameter.
- mandatory bool
- Whether this parameter is mandatory.
- position int
- Specifies the position of the parameter.
- key String
- The name of the parameter.
- type String
- Specifies the type of this parameter.
- defaultValue String
- Specifies the default value of the parameter.
- mandatory Boolean
- Whether this parameter is mandatory.
- position Number
- Specifies the position of the parameter.
RunBookJobSchedule, RunBookJobScheduleArgs        
- ScheduleName string
- The name of the Schedule.
- JobSchedule stringId 
- The UUID of automation runbook job schedule ID.
- Parameters Dictionary<string, string>
- A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. - NOTE: The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. 
- RunOn string
- Name of a Hybrid Worker Group the Runbook will be executed on.
- ScheduleName string
- The name of the Schedule.
- JobSchedule stringId 
- The UUID of automation runbook job schedule ID.
- Parameters map[string]string
- A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. - NOTE: The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. 
- RunOn string
- Name of a Hybrid Worker Group the Runbook will be executed on.
- scheduleName String
- The name of the Schedule.
- jobSchedule StringId 
- The UUID of automation runbook job schedule ID.
- parameters Map<String,String>
- A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. - NOTE: The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. 
- runOn String
- Name of a Hybrid Worker Group the Runbook will be executed on.
- scheduleName string
- The name of the Schedule.
- jobSchedule stringId 
- The UUID of automation runbook job schedule ID.
- parameters {[key: string]: string}
- A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. - NOTE: The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. 
- runOn string
- Name of a Hybrid Worker Group the Runbook will be executed on.
- schedule_name str
- The name of the Schedule.
- job_schedule_ strid 
- The UUID of automation runbook job schedule ID.
- parameters Mapping[str, str]
- A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. - NOTE: The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. 
- run_on str
- Name of a Hybrid Worker Group the Runbook will be executed on.
- scheduleName String
- The name of the Schedule.
- jobSchedule StringId 
- The UUID of automation runbook job schedule ID.
- parameters Map<String>
- A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. - NOTE: The parameter keys/names must strictly be in lowercase, even if this is not the case in the runbook. This is due to a limitation in Azure Automation where the parameter names are normalized. The values specified don't have this limitation. 
- runOn String
- Name of a Hybrid Worker Group the Runbook will be executed on.
RunBookPublishContentLink, RunBookPublishContentLinkArgs          
- Uri string
- The URI of the runbook content.
- Hash
RunBook Publish Content Link Hash 
- A hashblock as defined below.
- Version string
- Specifies the version of the content
- Uri string
- The URI of the runbook content.
- Hash
RunBook Publish Content Link Hash 
- A hashblock as defined below.
- Version string
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash
RunBook Publish Content Link Hash 
- A hashblock as defined below.
- version String
- Specifies the version of the content
- uri string
- The URI of the runbook content.
- hash
RunBook Publish Content Link Hash 
- A hashblock as defined below.
- version string
- Specifies the version of the content
- uri str
- The URI of the runbook content.
- hash
RunBook Publish Content Link Hash 
- A hashblock as defined below.
- version str
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash Property Map
- A hashblock as defined below.
- version String
- Specifies the version of the content
RunBookPublishContentLinkHash, RunBookPublishContentLinkHashArgs            
Import
Automation Runbooks can be imported using the resource id, e.g.
$ pulumi import azure:automation/runBook:RunBook Get-AzureVMTutorial /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/Get-AzureVMTutorial
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.