RunBookArgs

data class RunBookArgs(val automationAccountName: Output<String>? = null, val content: Output<String>? = null, val description: Output<String>? = null, val draft: Output<RunBookDraftArgs>? = null, val jobSchedules: Output<List<RunBookJobScheduleArgs>>? = null, val location: Output<String>? = null, val logActivityTraceLevel: Output<Int>? = null, val logProgress: Output<Boolean>? = null, val logVerbose: Output<Boolean>? = null, val name: Output<String>? = null, val publishContentLink: Output<RunBookPublishContentLinkArgs>? = null, val resourceGroupName: Output<String>? = null, val runbookType: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<RunBookArgs>

Manages a Automation Runbook.

Example Usage

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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("Basic")
.build());
var exampleRunBook = new RunBook("exampleRunBook", RunBookArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.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());
}
}

Custom Content

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.local.LocalFunctions;
import com.pulumi.local.inputs.GetFileArgs;
import com.pulumi.azure.automation.RunBook;
import com.pulumi.azure.automation.RunBookArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.skuName("Basic")
.build());
final var exampleFile = LocalFunctions.getFile(GetFileArgs.builder()
.filename(String.format("%s/example.ps1", path.module()))
.build());
var exampleRunBook = new RunBook("exampleRunBook", RunBookArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.automationAccountName(exampleAccount.name())
.logVerbose("true")
.logProgress("true")
.description("This is an example runbook")
.runbookType("PowerShell")
.content(exampleFile.applyValue(getFileResult -> getFileResult.content()))
.build());
}
}

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

Constructors

Link copied to clipboard
fun RunBookArgs(automationAccountName: Output<String>? = null, content: Output<String>? = null, description: Output<String>? = null, draft: Output<RunBookDraftArgs>? = null, jobSchedules: Output<List<RunBookJobScheduleArgs>>? = null, location: Output<String>? = null, logActivityTraceLevel: Output<Int>? = null, logProgress: Output<Boolean>? = null, logVerbose: Output<Boolean>? = null, name: Output<String>? = null, publishContentLink: Output<RunBookPublishContentLinkArgs>? = null, resourceGroupName: Output<String>? = null, runbookType: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Functions

Link copied to clipboard
open override fun toJava(): RunBookArgs

Properties

Link copied to clipboard
val automationAccountName: Output<String>? = null

The name of the automation account in which the Runbook is created. Changing this forces a new resource to be created.

Link copied to clipboard
val content: Output<String>? = null

The desired content of the runbook.

Link copied to clipboard
val description: Output<String>? = null

A description for this credential.

Link copied to clipboard
val draft: Output<RunBookDraftArgs>? = null

A draft block as defined below .

Link copied to clipboard
Link copied to clipboard
val location: Output<String>? = null

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Link copied to clipboard
val logActivityTraceLevel: Output<Int>? = null

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.

Link copied to clipboard
val logProgress: Output<Boolean>? = null

Progress log option.

Link copied to clipboard
val logVerbose: Output<Boolean>? = null

Verbose log option.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the Runbook. Changing this forces a new resource to be created.

Link copied to clipboard

The published runbook content link.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group in which the Runbook is created. Changing this forces a new resource to be created.

Link copied to clipboard
val runbookType: Output<String>? = null

The type of the runbook - can be either Graph, GraphPowerShell, GraphPowerShellWorkflow, PowerShellWorkflow, PowerShell, Python3, Python2 or Script. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.