import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Automation Runbook. * * ## Example Usage * * ```typescript * 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 * * Automation Runbooks can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:automation/runBook:RunBook Get-AzureVMTutorial /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/Get-AzureVMTutorial * ``` */ export declare class RunBook extends pulumi.CustomResource { /** * Get an existing RunBook resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: RunBookState, opts?: pulumi.CustomResourceOptions): RunBook; /** * Returns true if the given object is an instance of RunBook. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is RunBook; /** * The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created. */ readonly automationAccountName: pulumi.Output; /** * The desired content of the runbook. * * > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`. */ readonly content: pulumi.Output; /** * A description for the runbook. */ readonly description: pulumi.Output; /** * A `draft` block as defined below. */ readonly draft: pulumi.Output; /** * One or more `jobSchedule` block as defined below. * * > **Note:** AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources. */ readonly jobSchedules: pulumi.Output; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing. */ readonly logActivityTraceLevel: pulumi.Output; /** * Progress log option. */ readonly logProgress: pulumi.Output; /** * Verbose log option. */ readonly logVerbose: pulumi.Output; /** * Specifies the name of the Runbook. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * One `publishContentLink` block as defined below. */ readonly publishContentLink: pulumi.Output; /** * The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created. */ readonly runbookType: pulumi.Output; /** * The runtime environment name for the runbook. * * > **Note:** The `runbookType` must be set to a value that supports runtime environments, such as `PowerShell` or `Python`. */ readonly runtimeEnvironmentName: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Create a RunBook resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: RunBookArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RunBook resources. */ export interface RunBookState { /** * The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created. */ automationAccountName?: pulumi.Input; /** * The desired content of the runbook. * * > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`. */ content?: pulumi.Input; /** * A description for the runbook. */ description?: pulumi.Input; /** * A `draft` block as defined below. */ draft?: pulumi.Input; /** * One or more `jobSchedule` block as defined below. * * > **Note:** AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources. */ jobSchedules?: pulumi.Input[]>; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing. */ logActivityTraceLevel?: pulumi.Input; /** * Progress log option. */ logProgress?: pulumi.Input; /** * Verbose log option. */ logVerbose?: pulumi.Input; /** * Specifies the name of the Runbook. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One `publishContentLink` block as defined below. */ publishContentLink?: pulumi.Input; /** * The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created. */ runbookType?: pulumi.Input; /** * The runtime environment name for the runbook. * * > **Note:** The `runbookType` must be set to a value that supports runtime environments, such as `PowerShell` or `Python`. */ runtimeEnvironmentName?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; } /** * The set of arguments for constructing a RunBook resource. */ export interface RunBookArgs { /** * The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created. */ automationAccountName: pulumi.Input; /** * The desired content of the runbook. * * > **Note:** The Azure API requires a `publishContentLink` to be supplied even when specifying your own `content`. */ content?: pulumi.Input; /** * A description for the runbook. */ description?: pulumi.Input; /** * A `draft` block as defined below. */ draft?: pulumi.Input; /** * One or more `jobSchedule` block as defined below. * * > **Note:** AzureRM provides a stand-alone azure.automation.JobSchedule and this inlined `jobSchedule` property to manage the job schedules. At this time you should choose one of them to manage the job schedule resources. */ jobSchedules?: pulumi.Input[]>; /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the activity-level tracing options of the runbook, available only for Graphical runbooks. Possible values are `0` for None, `9` for Basic, and `15` for Detailed. Must turn on Verbose logging in order to see the tracing. */ logActivityTraceLevel?: pulumi.Input; /** * Progress log option. */ logProgress: pulumi.Input; /** * Verbose log option. */ logVerbose: pulumi.Input; /** * Specifies the name of the Runbook. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One `publishContentLink` block as defined below. */ publishContentLink?: pulumi.Input; /** * The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The type of the runbook - can be either `Graph`, `GraphPowerShell`, `GraphPowerShellWorkflow`, `PowerShellWorkflow`, `PowerShell`, `PowerShell72`, `Python`, `Python3`, `Python2` or `Script`. Changing this forces a new resource to be created. */ runbookType: pulumi.Input; /** * The runtime environment name for the runbook. * * > **Note:** The `runbookType` must be set to a value that supports runtime environments, such as `PowerShell` or `Python`. */ runtimeEnvironmentName?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; }