1. Packages
  2. Azure Native v1
  3. API Docs
  4. automation
  5. JobSchedule
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.automation.JobSchedule

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

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

    Example Usage

    Create a job schedule

    using System.Collections.Generic;
    using System.Linq;
    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/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

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new JobSchedule(name: string, args: JobScheduleArgs, opts?: CustomResourceOptions);
    @overload
    def JobSchedule(resource_name: str,
                    args: JobScheduleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def JobSchedule(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    automation_account_name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    runbook: Optional[RunbookAssociationPropertyArgs] = None,
                    schedule: Optional[ScheduleAssociationPropertyArgs] = None,
                    job_schedule_id: Optional[str] = None,
                    parameters: Optional[Mapping[str, str]] = None,
                    run_on: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var jobScheduleResource = new AzureNative.Automation.JobSchedule("jobScheduleResource", new()
    {
        AutomationAccountName = "string",
        ResourceGroupName = "string",
        Runbook = 
        {
            { "name", "string" },
        },
        Schedule = 
        {
            { "name", "string" },
        },
        JobScheduleId = "string",
        Parameters = 
        {
            { "string", "string" },
        },
        RunOn = "string",
    });
    
    example, err := automation.NewJobSchedule(ctx, "jobScheduleResource", &automation.JobScheduleArgs{
    	AutomationAccountName: "string",
    	ResourceGroupName:     "string",
    	Runbook: map[string]interface{}{
    		"name": "string",
    	},
    	Schedule: map[string]interface{}{
    		"name": "string",
    	},
    	JobScheduleId: "string",
    	Parameters: map[string]interface{}{
    		"string": "string",
    	},
    	RunOn: "string",
    })
    
    var jobScheduleResource = new JobSchedule("jobScheduleResource", JobScheduleArgs.builder()
        .automationAccountName("string")
        .resourceGroupName("string")
        .runbook(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .schedule(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .jobScheduleId("string")
        .parameters(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .runOn("string")
        .build());
    
    job_schedule_resource = azure_native.automation.JobSchedule("jobScheduleResource",
        automation_account_name=string,
        resource_group_name=string,
        runbook={
            name: string,
        },
        schedule={
            name: string,
        },
        job_schedule_id=string,
        parameters={
            string: string,
        },
        run_on=string)
    
    const jobScheduleResource = new azure_native.automation.JobSchedule("jobScheduleResource", {
        automationAccountName: "string",
        resourceGroupName: "string",
        runbook: {
            name: "string",
        },
        schedule: {
            name: "string",
        },
        jobScheduleId: "string",
        parameters: {
            string: "string",
        },
        runOn: "string",
    });
    
    type: azure-native:automation:JobSchedule
    properties:
        automationAccountName: string
        jobScheduleId: string
        parameters:
            string: string
        resourceGroupName: string
        runOn: string
        runbook:
            name: string
        schedule:
            name: string
    

    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.RunbookAssociationProperty
    Gets or sets the runbook.
    Schedule Pulumi.AzureNative.Automation.Inputs.ScheduleAssociationProperty
    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 RunbookAssociationProperty
    Gets or sets the runbook.
    schedule ScheduleAssociationProperty
    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 RunbookAssociationProperty
    Gets or sets the runbook.
    schedule ScheduleAssociationProperty
    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, RunbookAssociationPropertyArgs

    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, RunbookAssociationPropertyResponseArgs

    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, ScheduleAssociationPropertyArgs

    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, ScheduleAssociationPropertyResponseArgs

    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 
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi