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
new JobSchedule(name: string, args: JobScheduleArgs, opts?: CustomResourceOptions);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:
- Automation
Account stringName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
- Runbook
Name 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.
- Schedule
Name string - Job
Schedule stringId 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.
- Run
On string Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
- Automation
Account stringName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
- Runbook
Name 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.
- Schedule
Name string - Job
Schedule stringId 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.
- Run
On string Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
- automation
Account stringName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
- runbook
Name 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.
- schedule
Name string - job
Schedule stringId 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.
- run
On string Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
- automation_
account_ strname The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- resource_
group_ strname 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_ strid 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:
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): JobSchedulestatic 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:
- Automation
Account stringName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- Job
Schedule stringId 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.
- Resource
Group stringName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
- Run
On string Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
- Runbook
Name 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.
- Schedule
Name string
- Automation
Account stringName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- Job
Schedule stringId 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.
- Resource
Group stringName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
- Run
On string Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
- Runbook
Name 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.
- Schedule
Name string
- automation
Account stringName The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- job
Schedule stringId 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.
- resource
Group stringName The name of the resource group in which the Job Schedule is created. Changing this forces a new resource to be created.
- run
On string Name of a Hybrid Worker Group the Runbook will be executed on. Changing this forces a new resource to be created.
- runbook
Name 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.
- schedule
Name string
- automation_
account_ strname The name of the Automation Account in which the Job Schedule is created. Changing this forces a new resource to be created.
- job_
schedule_ strid 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_ strname 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
azurermTerraform Provider.