azure-native.automation.JobSchedule

Explore with Pulumi AI

Definition of the job schedule. API Version: 2019-06-01.

Example Usage

Create a job schedule

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var jobSchedule = new AzureNative.Automation.JobSchedule("jobSchedule", new()
    {
        AutomationAccountName = "ContoseAutomationAccount",
        JobScheduleId = "0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc",
        Parameters = 
        {
            { "jobscheduletag01", "jobschedulevalue01" },
            { "jobscheduletag02", "jobschedulevalue02" },
        },
        ResourceGroupName = "rg",
        Runbook = new AzureNative.Automation.Inputs.RunbookAssociationPropertyArgs
        {
            Name = "TestRunbook",
        },
        Schedule = new AzureNative.Automation.Inputs.ScheduleAssociationPropertyArgs
        {
            Name = "ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2",
        },
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := automation.NewJobSchedule(ctx, "jobSchedule", &automation.JobScheduleArgs{
			AutomationAccountName: pulumi.String("ContoseAutomationAccount"),
			JobScheduleId:         pulumi.String("0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc"),
			Parameters: pulumi.StringMap{
				"jobscheduletag01": pulumi.String("jobschedulevalue01"),
				"jobscheduletag02": pulumi.String("jobschedulevalue02"),
			},
			ResourceGroupName: pulumi.String("rg"),
			Runbook: &automation.RunbookAssociationPropertyArgs{
				Name: pulumi.String("TestRunbook"),
			},
			Schedule: &automation.ScheduleAssociationPropertyArgs{
				Name: pulumi.String("ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"),
			},
		})
		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.azurenative.automation.JobSchedule;
import com.pulumi.azurenative.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 jobSchedule = new JobSchedule("jobSchedule", JobScheduleArgs.builder()        
            .automationAccountName("ContoseAutomationAccount")
            .jobScheduleId("0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc")
            .parameters(Map.ofEntries(
                Map.entry("jobscheduletag01", "jobschedulevalue01"),
                Map.entry("jobscheduletag02", "jobschedulevalue02")
            ))
            .resourceGroupName("rg")
            .runbook(Map.of("name", "TestRunbook"))
            .schedule(Map.of("name", "ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2"))
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

job_schedule = azure_native.automation.JobSchedule("jobSchedule",
    automation_account_name="ContoseAutomationAccount",
    job_schedule_id="0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc",
    parameters={
        "jobscheduletag01": "jobschedulevalue01",
        "jobscheduletag02": "jobschedulevalue02",
    },
    resource_group_name="rg",
    runbook=azure_native.automation.RunbookAssociationPropertyArgs(
        name="TestRunbook",
    ),
    schedule=azure_native.automation.ScheduleAssociationPropertyArgs(
        name="ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const jobSchedule = new azure_native.automation.JobSchedule("jobSchedule", {
    automationAccountName: "ContoseAutomationAccount",
    jobScheduleId: "0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc",
    parameters: {
        jobscheduletag01: "jobschedulevalue01",
        jobscheduletag02: "jobschedulevalue02",
    },
    resourceGroupName: "rg",
    runbook: {
        name: "TestRunbook",
    },
    schedule: {
        name: "ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2",
    },
});
resources:
  jobSchedule:
    type: azure-native:automation:JobSchedule
    properties:
      automationAccountName: ContoseAutomationAccount
      jobScheduleId: 0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc
      parameters:
        jobscheduletag01: jobschedulevalue01
        jobscheduletag02: jobschedulevalue02
      resourceGroupName: rg
      runbook:
        name: TestRunbook
      schedule:
        name: ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2

Create JobSchedule Resource

new JobSchedule(name: string, args: JobScheduleArgs, opts?: CustomResourceOptions);
@overload
def JobSchedule(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                automation_account_name: Optional[str] = None,
                job_schedule_id: Optional[str] = None,
                parameters: Optional[Mapping[str, str]] = None,
                resource_group_name: Optional[str] = None,
                run_on: Optional[str] = None,
                runbook: Optional[RunbookAssociationPropertyArgs] = None,
                schedule: Optional[ScheduleAssociationPropertyArgs] = None)
@overload
def JobSchedule(resource_name: str,
                args: JobScheduleArgs,
                opts: Optional[ResourceOptions] = None)
func NewJobSchedule(ctx *Context, name string, args JobScheduleArgs, opts ...ResourceOption) (*JobSchedule, error)
public JobSchedule(string name, JobScheduleArgs args, CustomResourceOptions? opts = null)
public JobSchedule(String name, JobScheduleArgs args)
public JobSchedule(String name, JobScheduleArgs args, CustomResourceOptions options)
type: azure-native:automation:JobSchedule
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args JobScheduleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control 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.
name String
The unique name of the resource.
args JobScheduleArgs
The arguments to resource properties.
options 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 Architecture and Concepts docs.

Inputs

The JobSchedule resource accepts the following input properties:

AutomationAccountName string

The name of the automation account.

ResourceGroupName string

Name of an Azure Resource group.

Runbook Pulumi.AzureNative.Automation.Inputs.RunbookAssociationPropertyArgs

Gets or sets the runbook.

Schedule Pulumi.AzureNative.Automation.Inputs.ScheduleAssociationPropertyArgs

Gets or sets the schedule.

JobScheduleId string

The job schedule name.

Parameters Dictionary<string, string>

Gets or sets a list of job properties.

RunOn string

Gets or sets the hybrid worker group that the scheduled job should run on.

AutomationAccountName string

The name of the automation account.

ResourceGroupName string

Name of an Azure Resource group.

Runbook RunbookAssociationPropertyArgs

Gets or sets the runbook.

Schedule ScheduleAssociationPropertyArgs

Gets or sets the schedule.

JobScheduleId string

The job schedule name.

Parameters map[string]string

Gets or sets a list of job properties.

RunOn string

Gets or sets the hybrid worker group that the scheduled job should run on.

automationAccountName String

The name of the automation account.

resourceGroupName String

Name of an Azure Resource group.

runbook RunbookAssociationPropertyArgs

Gets or sets the runbook.

schedule ScheduleAssociationPropertyArgs

Gets or sets the schedule.

jobScheduleId String

The job schedule name.

parameters Map<String,String>

Gets or sets a list of job properties.

runOn String

Gets or sets the hybrid worker group that the scheduled job should run on.

automationAccountName string

The name of the automation account.

resourceGroupName string

Name of an Azure Resource group.

runbook RunbookAssociationPropertyArgs

Gets or sets the runbook.

schedule ScheduleAssociationPropertyArgs

Gets or sets the schedule.

jobScheduleId string

The job schedule name.

parameters {[key: string]: string}

Gets or sets a list of job properties.

runOn string

Gets or sets the hybrid worker group that the scheduled job should run on.

automation_account_name str

The name of the automation account.

resource_group_name str

Name of an Azure Resource group.

runbook RunbookAssociationPropertyArgs

Gets or sets the runbook.

schedule ScheduleAssociationPropertyArgs

Gets or sets the schedule.

job_schedule_id str

The job schedule name.

parameters Mapping[str, str]

Gets or sets a list of job properties.

run_on str

Gets or sets the hybrid worker group that the scheduled job should run on.

automationAccountName String

The name of the automation account.

resourceGroupName String

Name of an Azure Resource group.

runbook Property Map

Gets or sets the runbook.

schedule Property Map

Gets or sets the schedule.

jobScheduleId String

The job schedule name.

parameters Map<String>

Gets or sets a list of job properties.

runOn String

Gets or sets the hybrid worker group that the scheduled job should run on.

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.

Name string

Gets the name of the variable.

Type string

Resource type

Id string

The provider-assigned unique ID for this managed resource.

Name string

Gets the name of the variable.

Type string

Resource type

id String

The provider-assigned unique ID for this managed resource.

name String

Gets the name of the variable.

type String

Resource type

id string

The provider-assigned unique ID for this managed resource.

name string

Gets the name of the variable.

type string

Resource type

id str

The provider-assigned unique ID for this managed resource.

name str

Gets the name of the variable.

type str

Resource type

id String

The provider-assigned unique ID for this managed resource.

name String

Gets the name of the variable.

type String

Resource type

Supporting Types

RunbookAssociationProperty

Name string

Gets or sets the name of the runbook.

Name string

Gets or sets the name of the runbook.

name String

Gets or sets the name of the runbook.

name string

Gets or sets the name of the runbook.

name str

Gets or sets the name of the runbook.

name String

Gets or sets the name of the runbook.

RunbookAssociationPropertyResponse

Name string

Gets or sets the name of the runbook.

Name string

Gets or sets the name of the runbook.

name String

Gets or sets the name of the runbook.

name string

Gets or sets the name of the runbook.

name str

Gets or sets the name of the runbook.

name String

Gets or sets the name of the runbook.

ScheduleAssociationProperty

Name string

Gets or sets the name of the Schedule.

Name string

Gets or sets the name of the Schedule.

name String

Gets or sets the name of the Schedule.

name string

Gets or sets the name of the Schedule.

name str

Gets or sets the name of the Schedule.

name String

Gets or sets the name of the Schedule.

ScheduleAssociationPropertyResponse

Name string

Gets or sets the name of the Schedule.

Name string

Gets or sets the name of the Schedule.

name String

Gets or sets the name of the Schedule.

name string

Gets or sets the name of the Schedule.

name str

Gets or sets the name of the Schedule.

name String

Gets or sets the name of the Schedule.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:automation:JobSchedule myresource1 /subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/ContoseAutomationAccount/jobSchedules/0fa462ba-3aa2-4138-83ca-9ebc3bc55cdc 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0