JobScheduleArgs

data class JobScheduleArgs(val automationAccountName: Output<String>? = null, val jobScheduleId: Output<String>? = null, val parameters: Output<Map<String, String>>? = null, val resourceGroupName: Output<String>? = null, val runOn: Output<String>? = null, val runbookName: Output<String>? = null, val scheduleName: Output<String>? = null) : ConvertibleToJava<JobScheduleArgs>

Links an Automation Runbook and Schedule.

NOTE AzureRM provides this stand-alone azure.automation.JobSchedule and an inlined job_schedule property in azurerm_runbook to manage the job schedules. You can only make use of one of these methods to manage a job schedule.

Example Usage

This is an example of just the Job Schedule.

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.automation.JobSchedule("example", {
resourceGroupName: "tf-rgr-automation",
automationAccountName: "tf-automation-account",
scheduleName: "hour",
runbookName: "Get-VirtualMachine",
parameters: {
resourcegroup: "tf-rgr-vm",
vmname: "TF-VM-01",
},
});
import pulumi
import pulumi_azure as azure
example = azure.automation.JobSchedule("example",
resource_group_name="tf-rgr-automation",
automation_account_name="tf-automation-account",
schedule_name="hour",
runbook_name="Get-VirtualMachine",
parameters={
"resourcegroup": "tf-rgr-vm",
"vmname": "TF-VM-01",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Automation.JobSchedule("example", new()
{
ResourceGroupName = "tf-rgr-automation",
AutomationAccountName = "tf-automation-account",
ScheduleName = "hour",
RunbookName = "Get-VirtualMachine",
Parameters =
{
{ "resourcegroup", "tf-rgr-vm" },
{ "vmname", "TF-VM-01" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := automation.NewJobSchedule(ctx, "example", &automation.JobScheduleArgs{
ResourceGroupName: pulumi.String("tf-rgr-automation"),
AutomationAccountName: pulumi.String("tf-automation-account"),
ScheduleName: pulumi.String("hour"),
RunbookName: pulumi.String("Get-VirtualMachine"),
Parameters: pulumi.StringMap{
"resourcegroup": pulumi.String("tf-rgr-vm"),
"vmname": pulumi.String("TF-VM-01"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.automation.JobSchedule;
import com.pulumi.azure.automation.JobScheduleArgs;
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 JobSchedule("example", JobScheduleArgs.builder()
.resourceGroupName("tf-rgr-automation")
.automationAccountName("tf-automation-account")
.scheduleName("hour")
.runbookName("Get-VirtualMachine")
.parameters(Map.ofEntries(
Map.entry("resourcegroup", "tf-rgr-vm"),
Map.entry("vmname", "TF-VM-01")
))
.build());
}
}
resources:
example:
type: azure:automation:JobSchedule
properties:
resourceGroupName: tf-rgr-automation
automationAccountName: tf-automation-account
scheduleName: hour
runbookName: Get-VirtualMachine
parameters:
resourcegroup: tf-rgr-vm
vmname: TF-VM-01

Import

Automation Job Schedules can be imported using the resource id, e.g.

$ pulumi import azure:automation/jobSchedule:JobSchedule example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/schedules/schedule1|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/runbooks/runbook1"

Constructors

Link copied to clipboard
constructor(automationAccountName: Output<String>? = null, jobScheduleId: Output<String>? = null, parameters: Output<Map<String, String>>? = null, resourceGroupName: Output<String>? = null, runOn: Output<String>? = null, runbookName: Output<String>? = null, scheduleName: Output<String>? = null)

Properties

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

The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.

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

The UUID identifying the Automation Job Schedule.

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

A map of key/value pairs corresponding to the arguments that can be passed to the Runbook. Changing this forces a new resource to be created.

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

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

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

The name of a Runbook to link to a Schedule. It needs to be in the same Automation Account as the Schedule and Job Schedule. Changing this forces a new resource to be created.

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

Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.

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

The name of the Schedule. Changing this forces a new resource to be created.

Functions

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