JobSchedule

Links an Automation Runbook and Schedule.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Azure.Automation.JobSchedule("example", new Azure.Automation.JobScheduleArgs
        {
            AutomationAccountName = "tf-automation-account",
            Parameters = 
            {
                { "resourcegroup", "tf-rgr-vm" },
                { "vmname", "TF-VM-01" },
            },
            ResourceGroupName = "tf-rgr-automation",
            RunbookName = "Get-VirtualMachine",
            ScheduleName = "hour",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/automation"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err = automation.NewJobSchedule(ctx, "example", &automation.JobScheduleArgs{
            AutomationAccountName: pulumi.String("tf-automation-account"),
            Parameters: pulumi.Map{
                "resourcegroup": pulumi.String("tf-rgr-vm"),
                "vmname":        pulumi.String("TF-VM-01"),
            },
            ResourceGroupName: pulumi.String("tf-rgr-automation"),
            RunbookName:       pulumi.String("Get-VirtualMachine"),
            ScheduleName:      pulumi.String("hour"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.automation.JobSchedule("example",
    automation_account_name="tf-automation-account",
    parameters={
        "resourcegroup": "tf-rgr-vm",
        "vmname": "TF-VM-01",
    },
    resource_group_name="tf-rgr-automation",
    runbook_name="Get-VirtualMachine",
    schedule_name="hour")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.automation.JobSchedule("example", {
    automationAccountName: "tf-automation-account",
    parameters: {
        resourcegroup: "tf-rgr-vm",
        vmname: "TF-VM-01",
    },
    resourceGroupName: "tf-rgr-automation",
    runbookName: "Get-VirtualMachine",
    scheduleName: "hour",
});

Create a JobSchedule Resource

def JobSchedule(resource_name, opts=None, automation_account_name=None, job_schedule_id=None, parameters=None, resource_group_name=None, run_on=None, runbook_name=None, schedule_name=None, __props__=None);
func NewJobSchedule(ctx *Context, name string, args JobScheduleArgs, opts ...ResourceOption) (*JobSchedule, error)
public JobSchedule(string name, JobScheduleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args JobScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args JobScheduleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args JobScheduleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

JobSchedule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The JobSchedule resource accepts the following input properties:

AutomationAccountName string

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

ResourceGroupName string

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

RunbookName string

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.

ScheduleName string
JobScheduleId string

The UUID identifying the Automation Job Schedule.

Parameters Dictionary<string, string>

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.

RunOn string

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

AutomationAccountName string

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

ResourceGroupName string

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

RunbookName string

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.

ScheduleName string
JobScheduleId string

The UUID identifying the Automation Job Schedule.

Parameters map[string]string

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.

RunOn string

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

automationAccountName string

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

resourceGroupName string

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

runbookName string

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.

scheduleName string
jobScheduleId string

The UUID identifying the Automation Job Schedule.

parameters {[key: string]: string}

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.

runOn string

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

automation_account_name str

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

resource_group_name str

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

runbook_name str

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.

schedule_name str
job_schedule_id str

The UUID identifying the Automation Job Schedule.

parameters Dict[str, str]

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.

run_on str

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

Outputs

All input properties are implicitly available as output properties. Additionally, the JobSchedule 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing JobSchedule Resource

Get an existing JobSchedule 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?: JobScheduleState, opts?: CustomResourceOptions): JobSchedule
static get(resource_name, id, opts=None, automation_account_name=None, job_schedule_id=None, parameters=None, resource_group_name=None, run_on=None, runbook_name=None, schedule_name=None, __props__=None);
func GetJobSchedule(ctx *Context, name string, id IDInput, state *JobScheduleState, opts ...ResourceOption) (*JobSchedule, error)
public static JobSchedule Get(string name, Input<string> id, JobScheduleState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AutomationAccountName string

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

JobScheduleId string

The UUID identifying the Automation Job Schedule.

Parameters Dictionary<string, string>

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.

ResourceGroupName string

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

RunOn string

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

RunbookName string

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.

ScheduleName string
AutomationAccountName string

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

JobScheduleId string

The UUID identifying the Automation Job Schedule.

Parameters map[string]string

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.

ResourceGroupName string

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

RunOn string

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

RunbookName string

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.

ScheduleName string
automationAccountName string

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

jobScheduleId string

The UUID identifying the Automation Job Schedule.

parameters {[key: string]: string}

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.

resourceGroupName string

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

runOn string

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

runbookName string

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.

scheduleName string
automation_account_name str

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

job_schedule_id str

The UUID identifying the Automation Job Schedule.

parameters Dict[str, str]

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.

resource_group_name str

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

run_on str

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

runbook_name str

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.

schedule_name str

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.