azure-native.automation.JobSchedule
Explore with Pulumi AI
Definition of the job schedule. Azure REST API version: 2022-08-08. Prior API version in Azure Native 1.x: 2019-06-01.
Other available API versions: 2023-05-15-preview, 2023-11-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/v2"
"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 com.pulumi.azurenative.automation.inputs.RunbookAssociationPropertyArgs;
import com.pulumi.azurenative.automation.inputs.ScheduleAssociationPropertyArgs;
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(RunbookAssociationPropertyArgs.builder()
.name("TestRunbook")
.build())
.schedule(ScheduleAssociationPropertyArgs.builder()
.name("ScheduleNameGoesHere332204b5-debe-4348-a5c7-6357457189f2")
.build())
.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 = new AzureNative.Automation.Inputs.RunbookAssociationPropertyArgs
{
Name = "string",
},
Schedule = new AzureNative.Automation.Inputs.ScheduleAssociationPropertyArgs
{
Name = "string",
},
JobScheduleId = "string",
Parameters =
{
{ "string", "string" },
},
RunOn = "string",
});
example, err := automation.NewJobSchedule(ctx, "jobScheduleResource", &automation.JobScheduleArgs{
AutomationAccountName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Runbook: &automation.RunbookAssociationPropertyArgs{
Name: pulumi.String("string"),
},
Schedule: &automation.ScheduleAssociationPropertyArgs{
Name: pulumi.String("string"),
},
JobScheduleId: pulumi.String("string"),
Parameters: pulumi.StringMap{
"string": pulumi.String("string"),
},
RunOn: pulumi.String("string"),
})
var jobScheduleResource = new JobSchedule("jobScheduleResource", JobScheduleArgs.builder()
.automationAccountName("string")
.resourceGroupName("string")
.runbook(RunbookAssociationPropertyArgs.builder()
.name("string")
.build())
.schedule(ScheduleAssociationPropertyArgs.builder()
.name("string")
.build())
.jobScheduleId("string")
.parameters(Map.of("string", "string"))
.runOn("string")
.build());
job_schedule_resource = azure_native.automation.JobSchedule("jobScheduleResource",
automation_account_name="string",
resource_group_name="string",
runbook=azure_native.automation.RunbookAssociationPropertyArgs(
name="string",
),
schedule=azure_native.automation.ScheduleAssociationPropertyArgs(
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:
- Automation
Account stringName - The name of the automation account.
- Resource
Group stringName - Name of an Azure Resource group.
- Runbook
Pulumi.
Azure Native. Automation. Inputs. Runbook Association Property - Gets or sets the runbook.
- Schedule
Pulumi.
Azure Native. Automation. Inputs. Schedule Association Property - Gets or sets the schedule.
- Job
Schedule stringId - The job schedule name.
- Parameters Dictionary<string, string>
- Gets or sets a list of job properties.
- Run
On string - Gets or sets the hybrid worker group that the scheduled job should run on.
- Automation
Account stringName - The name of the automation account.
- Resource
Group stringName - Name of an Azure Resource group.
- Runbook
Runbook
Association Property Args - Gets or sets the runbook.
- Schedule
Schedule
Association Property Args - Gets or sets the schedule.
- Job
Schedule stringId - The job schedule name.
- Parameters map[string]string
- Gets or sets a list of job properties.
- Run
On string - Gets or sets the hybrid worker group that the scheduled job should run on.
- automation
Account StringName - The name of the automation account.
- resource
Group StringName - Name of an Azure Resource group.
- runbook
Runbook
Association Property - Gets or sets the runbook.
- schedule
Schedule
Association Property - Gets or sets the schedule.
- job
Schedule StringId - The job schedule name.
- parameters Map<String,String>
- Gets or sets a list of job properties.
- run
On String - Gets or sets the hybrid worker group that the scheduled job should run on.
- automation
Account stringName - The name of the automation account.
- resource
Group stringName - Name of an Azure Resource group.
- runbook
Runbook
Association Property - Gets or sets the runbook.
- schedule
Schedule
Association Property - Gets or sets the schedule.
- job
Schedule stringId - The job schedule name.
- parameters {[key: string]: string}
- Gets or sets a list of job properties.
- run
On string - Gets or sets the hybrid worker group that the scheduled job should run on.
- automation_
account_ strname - The name of the automation account.
- resource_
group_ strname - Name of an Azure Resource group.
- runbook
Runbook
Association Property Args - Gets or sets the runbook.
- schedule
Schedule
Association Property Args - Gets or sets the schedule.
- job_
schedule_ strid - 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.
- automation
Account StringName - The name of the automation account.
- resource
Group StringName - Name of an Azure Resource group.
- runbook Property Map
- Gets or sets the runbook.
- schedule Property Map
- Gets or sets the schedule.
- job
Schedule StringId - The job schedule name.
- parameters Map<String>
- Gets or sets a list of job properties.
- run
On 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:
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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0