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:
- Automation
Account stringName - 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 stringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- Runbook
Type string - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- Description string
- A description for this credential.
- Draft
Run
Book Draft - A
draft
block as defined below. - Job
Schedules List<RunBook Job Schedule> One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- Log
Activity intTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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.
- Publish
Content RunLink Book Publish Content Link - One
publish_content_link
block as defined below. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Automation
Account stringName - 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 stringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- Runbook
Type string - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- Description string
- A description for this credential.
- Draft
Run
Book Draft Args - A
draft
block as defined below. - Job
Schedules []RunBook Job Schedule Args One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- Log
Activity intTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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.
- Publish
Content RunLink Book Publish Content Link Args - One
publish_content_link
block as defined below. - map[string]string
- A mapping of tags to assign to the resource.
- automation
Account StringName - The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- log
Progress Boolean - Progress log option.
- log
Verbose Boolean - Verbose log option.
- resource
Group StringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook
Type String - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- description String
- A description for this credential.
- draft
Run
Book Draft - A
draft
block as defined below. - job
Schedules List<RunBook Job Schedule> One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- log
Activity IntegerTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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.
- publish
Content RunLink Book Publish Content Link - One
publish_content_link
block as defined below. - Map<String,String>
- A mapping of tags to assign to the resource.
- automation
Account stringName - The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- log
Progress boolean - Progress log option.
- log
Verbose boolean - Verbose log option.
- resource
Group stringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook
Type string - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- description string
- A description for this credential.
- draft
Run
Book Draft - A
draft
block as defined below. - job
Schedules RunBook Job Schedule[] One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- log
Activity numberTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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.
- publish
Content RunLink Book Publish Content Link - One
publish_content_link
block 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
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- description str
- A description for this credential.
- draft
Run
Book Draft Args - A
draft
block as defined below. - job_
schedules Sequence[RunBook Job Schedule Args] One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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
0
for None,9
for Basic, and15
for 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_link
block as defined below. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- automation
Account StringName - The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.
- log
Progress Boolean - Progress log option.
- log
Verbose Boolean - Verbose log option.
- resource
Group StringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook
Type String - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- description String
- A description for this credential.
- draft Property Map
- A
draft
block as defined below. - job
Schedules List<Property Map> One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- log
Activity NumberTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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.
- publish
Content Property MapLink - One
publish_content_link
block 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) -> RunBook
func 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)
Resource lookup is not supported in YAML
- 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.
- Automation
Account 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_link
to be supplied even when specifying your owncontent
.- Description string
- A description for this credential.
- Draft
Run
Book Draft - A
draft
block as defined below. - Job
Schedules List<RunBook Job Schedule> One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- Log
Activity intTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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 string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- Publish
Content RunLink Book Publish Content Link - One
publish_content_link
block as defined below. - Resource
Group stringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- Runbook
Type string - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. Changing this forces a new resource to be created. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Automation
Account 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_link
to be supplied even when specifying your owncontent
.- Description string
- A description for this credential.
- Draft
Run
Book Draft Args - A
draft
block as defined below. - Job
Schedules []RunBook Job Schedule Args One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- Log
Activity intTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for 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 string
- 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_link
block as defined below. - Resource
Group stringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- Runbook
Type string - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. Changing this forces a new resource to be created. - map[string]string
- A mapping of tags to assign to the resource.
- automation
Account 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_link
to be supplied even when specifying your owncontent
.- description String
- A description for this credential.
- draft
Run
Book Draft - A
draft
block as defined below. - job
Schedules List<RunBook Job Schedule> One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- log
Activity IntegerTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for Detailed. Must turn on Verbose logging in order to see the tracing. - log
Progress Boolean - Progress log option.
- log
Verbose Boolean - Verbose log option.
- name String
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publish
Content RunLink Book Publish Content Link - One
publish_content_link
block as defined below. - resource
Group StringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook
Type String - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. Changing this forces a new resource to be created. - Map<String,String>
- A mapping of tags to assign to the resource.
- automation
Account 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_link
to be supplied even when specifying your owncontent
.- description string
- A description for this credential.
- draft
Run
Book Draft - A
draft
block as defined below. - job
Schedules RunBook Job Schedule[] One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- log
Activity numberTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for Detailed. Must turn on Verbose logging in order to see the tracing. - log
Progress boolean - Progress log option.
- log
Verbose boolean - Verbose log option.
- name string
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publish
Content RunLink Book Publish Content Link - One
publish_content_link
block as defined below. - resource
Group stringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook
Type string - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. 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_link
to be supplied even when specifying your owncontent
.- description str
- A description for this credential.
- draft
Run
Book Draft Args - A
draft
block as defined below. - job_
schedules Sequence[RunBook Job Schedule Args] One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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
0
for None,9
for Basic, and15
for 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_link
block 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
,Python2
orScript
. Changing this forces a new resource to be created. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- automation
Account 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_link
to be supplied even when specifying your owncontent
.- description String
- A description for this credential.
- draft Property Map
- A
draft
block as defined below. - job
Schedules List<Property Map> One or more
job_schedule
block as defined below.NOTE AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined
job_schedule
property 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.
- log
Activity NumberTrace Level - Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are
0
for None,9
for Basic, and15
for Detailed. Must turn on Verbose logging in order to see the tracing. - log
Progress Boolean - Progress log option.
- log
Verbose Boolean - Verbose log option.
- name String
- Specifies the name of the Runbook. Changing this forces a new resource to be created.
- publish
Content Property MapLink - One
publish_content_link
block as defined below. - resource
Group StringName - The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.
- runbook
Type String - The type of the runbook - can be either
Graph
,GraphPowerShell
,GraphPowerShellWorkflow
,PowerShellWorkflow
,PowerShell
,PowerShell72
,Python3
,Python2
orScript
. Changing this forces a new resource to be created. - Map<String>
- A mapping of tags to assign to the resource.
Supporting Types
RunBookDraft, RunBookDraftArgs
- Content
Link RunBook Draft Content Link - A
publish_content_link
block as defined above. - Creation
Time string - Edit
Mode boolEnabled - Whether the draft in edit mode.
- Last
Modified stringTime - Output
Types List<string> - Specifies the output types of the runbook.
- Parameters
List<Run
Book Draft Parameter> - A list of
parameters
block as defined below.
- Content
Link RunBook Draft Content Link - A
publish_content_link
block as defined above. - Creation
Time string - Edit
Mode boolEnabled - Whether the draft in edit mode.
- Last
Modified stringTime - Output
Types []string - Specifies the output types of the runbook.
- Parameters
[]Run
Book Draft Parameter - A list of
parameters
block as defined below.
- content
Link RunBook Draft Content Link - A
publish_content_link
block as defined above. - creation
Time String - edit
Mode BooleanEnabled - Whether the draft in edit mode.
- last
Modified StringTime - output
Types List<String> - Specifies the output types of the runbook.
- parameters
List<Run
Book Draft Parameter> - A list of
parameters
block as defined below.
- content
Link RunBook Draft Content Link - A
publish_content_link
block as defined above. - creation
Time string - edit
Mode booleanEnabled - Whether the draft in edit mode.
- last
Modified stringTime - output
Types string[] - Specifies the output types of the runbook.
- parameters
Run
Book Draft Parameter[] - A list of
parameters
block as defined below.
- content_
link RunBook Draft Content Link - A
publish_content_link
block 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[Run
Book Draft Parameter] - A list of
parameters
block as defined below.
- content
Link Property Map - A
publish_content_link
block as defined above. - creation
Time String - edit
Mode BooleanEnabled - Whether the draft in edit mode.
- last
Modified StringTime - output
Types List<String> - Specifies the output types of the runbook.
- parameters List<Property Map>
- A list of
parameters
block as defined below.
RunBookDraftContentLink, RunBookDraftContentLinkArgs
- Uri string
- The URI of the runbook content.
- Hash
Run
Book Draft Content Link Hash - A
hash
block as defined below. - Version string
- Specifies the version of the content
- Uri string
- The URI of the runbook content.
- Hash
Run
Book Draft Content Link Hash - A
hash
block as defined below. - Version string
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash
Run
Book Draft Content Link Hash - A
hash
block as defined below. - version String
- Specifies the version of the content
- uri string
- The URI of the runbook content.
- hash
Run
Book Draft Content Link Hash - A
hash
block as defined below. - version string
- Specifies the version of the content
- uri str
- The URI of the runbook content.
- hash
Run
Book Draft Content Link Hash - A
hash
block as defined below. - version str
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash Property Map
- A
hash
block 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.
- Default
Value 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.
- Default
Value 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.
- default
Value 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.
- default
Value 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.
- default
Value 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
- Schedule
Name string - The name of the Schedule.
- Job
Schedule 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.
- Run
On string - Name of a Hybrid Worker Group the Runbook will be executed on.
- Schedule
Name string - The name of the Schedule.
- Job
Schedule 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.
- Run
On string - Name of a Hybrid Worker Group the Runbook will be executed on.
- schedule
Name String - The name of the Schedule.
- job
Schedule 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.
- run
On String - Name of a Hybrid Worker Group the Runbook will be executed on.
- schedule
Name string - The name of the Schedule.
- job
Schedule 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.
- run
On 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.
- schedule
Name String - The name of the Schedule.
- job
Schedule 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.
- run
On String - Name of a Hybrid Worker Group the Runbook will be executed on.
RunBookPublishContentLink, RunBookPublishContentLinkArgs
- Uri string
- The URI of the runbook content.
- Hash
Run
Book Publish Content Link Hash - A
hash
block as defined below. - Version string
- Specifies the version of the content
- Uri string
- The URI of the runbook content.
- Hash
Run
Book Publish Content Link Hash - A
hash
block as defined below. - Version string
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash
Run
Book Publish Content Link Hash - A
hash
block as defined below. - version String
- Specifies the version of the content
- uri string
- The URI of the runbook content.
- hash
Run
Book Publish Content Link Hash - A
hash
block as defined below. - version string
- Specifies the version of the content
- uri str
- The URI of the runbook content.
- hash
Run
Book Publish Content Link Hash - A
hash
block as defined below. - version str
- Specifies the version of the content
- uri String
- The URI of the runbook content.
- hash Property Map
- A
hash
block 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
azurerm
Terraform Provider.