JobScheduleArgs

data class JobScheduleArgs(val automationAccountName: Output<String>? = null, val jobScheduleId: Output<String>? = null, val parameters: Output<Map<String, String>>? = null, val resourceGroupName: Output<String>? = null, val runOn: Output<String>? = null, val runbook: Output<RunbookAssociationPropertyArgs>? = null, val schedule: Output<ScheduleAssociationPropertyArgs>? = null) : ConvertibleToJava<JobScheduleArgs>

Definition of the job schedule. Uses Azure REST API version 2023-11-01. In version 2.x of the Azure Native provider, it used API version 2022-08-08. Other available API versions: 2015-10-31, 2019-06-01, 2020-01-13-preview, 2022-08-08, 2023-05-15-preview, 2024-10-23. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native automation [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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

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}

Constructors

Link copied to clipboard
constructor(automationAccountName: Output<String>? = null, jobScheduleId: Output<String>? = null, parameters: Output<Map<String, String>>? = null, resourceGroupName: Output<String>? = null, runOn: Output<String>? = null, runbook: Output<RunbookAssociationPropertyArgs>? = null, schedule: Output<ScheduleAssociationPropertyArgs>? = null)

Properties

Link copied to clipboard
val automationAccountName: Output<String>? = null

The name of the automation account.

Link copied to clipboard
val jobScheduleId: Output<String>? = null

The job schedule name.

Link copied to clipboard
val parameters: Output<Map<String, String>>? = null

Gets or sets a list of job properties.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of an Azure Resource group.

Link copied to clipboard

Gets or sets the runbook.

Link copied to clipboard
val runOn: Output<String>? = null

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

Link copied to clipboard

Gets or sets the schedule.

Functions

Link copied to clipboard
open override fun toJava(): JobScheduleArgs