ScheduleArgs

data class ScheduleArgs(val automationAccountName: Output<String>? = null, val description: Output<String>? = null, val expiryTime: Output<String>? = null, val frequency: Output<String>? = null, val interval: Output<Int>? = null, val monthDays: Output<List<Int>>? = null, val monthlyOccurrence: Output<ScheduleMonthlyOccurrenceArgs>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val startTime: Output<String>? = null, val timezone: Output<String>? = null, val weekDays: Output<List<String>>? = null) : ConvertibleToJava<ScheduleArgs>

Manages a Automation Schedule.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "tfex-automation-account",
location: "West Europe",
});
const exampleAccount = new azure.automation.Account("example", {
name: "tfex-automation-account",
location: example.location,
resourceGroupName: example.name,
skuName: "Basic",
});
const exampleSchedule = new azure.automation.Schedule("example", {
name: "tfex-automation-schedule",
resourceGroupName: example.name,
automationAccountName: exampleAccount.name,
frequency: "Week",
interval: 1,
timezone: "Australia/Perth",
startTime: "2014-04-15T18:00:15+02:00",
description: "This is an example schedule",
weekDays: ["Friday"],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tfex-automation-account",
location="West Europe")
example_account = azure.automation.Account("example",
name="tfex-automation-account",
location=example.location,
resource_group_name=example.name,
sku_name="Basic")
example_schedule = azure.automation.Schedule("example",
name="tfex-automation-schedule",
resource_group_name=example.name,
automation_account_name=example_account.name,
frequency="Week",
interval=1,
timezone="Australia/Perth",
start_time="2014-04-15T18:00:15+02:00",
description="This is an example schedule",
week_days=["Friday"])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "tfex-automation-account",
Location = "West Europe",
});
var exampleAccount = new Azure.Automation.Account("example", new()
{
Name = "tfex-automation-account",
Location = example.Location,
ResourceGroupName = example.Name,
SkuName = "Basic",
});
var exampleSchedule = new Azure.Automation.Schedule("example", new()
{
Name = "tfex-automation-schedule",
ResourceGroupName = example.Name,
AutomationAccountName = exampleAccount.Name,
Frequency = "Week",
Interval = 1,
Timezone = "Australia/Perth",
StartTime = "2014-04-15T18:00:15+02:00",
Description = "This is an example schedule",
WeekDays = new[]
{
"Friday",
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("tfex-automation-account"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
Name: pulumi.String("tfex-automation-account"),
Location: example.Location,
ResourceGroupName: example.Name,
SkuName: pulumi.String("Basic"),
})
if err != nil {
return err
}
_, err = automation.NewSchedule(ctx, "example", &automation.ScheduleArgs{
Name: pulumi.String("tfex-automation-schedule"),
ResourceGroupName: example.Name,
AutomationAccountName: exampleAccount.Name,
Frequency: pulumi.String("Week"),
Interval: pulumi.Int(1),
Timezone: pulumi.String("Australia/Perth"),
StartTime: pulumi.String("2014-04-15T18:00:15+02:00"),
Description: pulumi.String("This is an example schedule"),
WeekDays: pulumi.StringArray{
pulumi.String("Friday"),
},
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.automation.Account;
import com.pulumi.azure.automation.AccountArgs;
import com.pulumi.azure.automation.Schedule;
import com.pulumi.azure.automation.ScheduleArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("tfex-automation-account")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("tfex-automation-account")
.location(example.location())
.resourceGroupName(example.name())
.skuName("Basic")
.build());
var exampleSchedule = new Schedule("exampleSchedule", ScheduleArgs.builder()
.name("tfex-automation-schedule")
.resourceGroupName(example.name())
.automationAccountName(exampleAccount.name())
.frequency("Week")
.interval(1)
.timezone("Australia/Perth")
.startTime("2014-04-15T18:00:15+02:00")
.description("This is an example schedule")
.weekDays("Friday")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tfex-automation-account
location: West Europe
exampleAccount:
type: azure:automation:Account
name: example
properties:
name: tfex-automation-account
location: ${example.location}
resourceGroupName: ${example.name}
skuName: Basic
exampleSchedule:
type: azure:automation:Schedule
name: example
properties:
name: tfex-automation-schedule
resourceGroupName: ${example.name}
automationAccountName: ${exampleAccount.name}
frequency: Week
interval: 1
timezone: Australia/Perth
startTime: 2014-04-15T18:00:15+02:00
description: This is an example schedule
weekDays:
- Friday

Import

Automation Schedule can be imported using the resource id, e.g.

$ pulumi import azure:automation/schedule:Schedule schedule1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/schedules/schedule1

Constructors

Link copied to clipboard
constructor(automationAccountName: Output<String>? = null, description: Output<String>? = null, expiryTime: Output<String>? = null, frequency: Output<String>? = null, interval: Output<Int>? = null, monthDays: Output<List<Int>>? = null, monthlyOccurrence: Output<ScheduleMonthlyOccurrenceArgs>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, startTime: Output<String>? = null, timezone: Output<String>? = null, weekDays: Output<List<String>>? = null)

Properties

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

The name of the automation account in which the Schedule is created. Changing this forces a new resource to be created.

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

A description for this Schedule.

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

The end time of the schedule.

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

The frequency of the schedule. - can be either OneTime, Day, Hour, Week, or Month.

Link copied to clipboard
val interval: Output<Int>? = null

The number of frequencys between runs. Only valid when frequency is Day, Hour, Week, or Month and defaults to 1.

Link copied to clipboard
val monthDays: Output<List<Int>>? = null

List of days of the month that the job should execute on. Must be between 1 and 31. -1 for last day of the month. Only valid when frequency is Month.

Link copied to clipboard

One monthly_occurrence blocks as defined below to specifies occurrences of days within a month. Only valid when frequency is Month. The monthly_occurrence block supports fields documented below.

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

Specifies the name of the Schedule. Changing this forces a new resource to be created.

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

The name of the resource group in which the Schedule is created. Changing this forces a new resource to be created.

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

Start time of the schedule. Must be at least five minutes in the future. Defaults to seven minutes in the future from the time the resource is created.

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

The timezone of the start time. Defaults to Etc/UTC. For possible values see: https://docs.microsoft.com/en-us/rest/api/maps/timezone/gettimezoneenumwindows

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

List of days of the week that the job should execute on. Only valid when frequency is Week. Possible values are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday.

Functions

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