Represents a Schedule to execute a task.
Uses Azure REST API version 2024-02-01. In version 2.x of the Azure Native provider, it used API version 2023-04-01.
Other available API versions: 2023-04-01, 2023-08-01-preview, 2023-10-01-preview, 2024-05-01-preview, 2024-06-01-preview, 2024-07-01-preview, 2024-08-01-preview, 2024-10-01-preview, 2025-02-01, 2025-04-01-preview, 2025-07-01-preview, 2025-10-01-preview, 2026-01-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native devcenter [ApiVersion]. See the version guide for details.
Example Usage
Schedules_CreateDailyShutdownPoolSchedule
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var schedule = new AzureNative.DevCenter.Schedule("schedule", new()
{
Frequency = AzureNative.DevCenter.ScheduledFrequency.Daily,
PoolName = "DevPool",
ProjectName = "DevProject",
ResourceGroupName = "rg1",
ScheduleName = "autoShutdown",
State = AzureNative.DevCenter.ScheduleEnableStatus.Enabled,
Time = "17:30",
TimeZone = "America/Los_Angeles",
Type = AzureNative.DevCenter.ScheduledType.StopDevBox,
});
});
package main
import (
devcenter "github.com/pulumi/pulumi-azure-native-sdk/devcenter/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devcenter.NewSchedule(ctx, "schedule", &devcenter.ScheduleArgs{
Frequency: pulumi.String(devcenter.ScheduledFrequencyDaily),
PoolName: pulumi.String("DevPool"),
ProjectName: pulumi.String("DevProject"),
ResourceGroupName: pulumi.String("rg1"),
ScheduleName: pulumi.String("autoShutdown"),
State: pulumi.String(devcenter.ScheduleEnableStatusEnabled),
Time: pulumi.String("17:30"),
TimeZone: pulumi.String("America/Los_Angeles"),
Type: pulumi.String(devcenter.ScheduledTypeStopDevBox),
})
if err != nil {
return err
}
return nil
})
}
terraform {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_devcenter_schedule" "schedule" {
lifecycle {
create_before_destroy = true
}
frequency = "Daily"
pool_name = "DevPool"
project_name = "DevProject"
resource_group_name = "rg1"
schedule_name = "autoShutdown"
state = "Enabled"
time = "17:30"
time_zone = "America/Los_Angeles"
type = "StopDevBox"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.devcenter.Schedule;
import com.pulumi.azurenative.devcenter.ScheduleArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 schedule = new Schedule("schedule", ScheduleArgs.builder()
.frequency("Daily")
.poolName("DevPool")
.projectName("DevProject")
.resourceGroupName("rg1")
.scheduleName("autoShutdown")
.state("Enabled")
.time("17:30")
.timeZone("America/Los_Angeles")
.type("StopDevBox")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const schedule = new azure_native.devcenter.Schedule("schedule", {
frequency: azure_native.devcenter.ScheduledFrequency.Daily,
poolName: "DevPool",
projectName: "DevProject",
resourceGroupName: "rg1",
scheduleName: "autoShutdown",
state: azure_native.devcenter.ScheduleEnableStatus.Enabled,
time: "17:30",
timeZone: "America/Los_Angeles",
type: azure_native.devcenter.ScheduledType.StopDevBox,
});
import pulumi
import pulumi_azure_native as azure_native
schedule = azure_native.devcenter.Schedule("schedule",
frequency=azure_native.devcenter.ScheduledFrequency.DAILY,
pool_name="DevPool",
project_name="DevProject",
resource_group_name="rg1",
schedule_name="autoShutdown",
state=azure_native.devcenter.ScheduleEnableStatus.ENABLED,
time="17:30",
time_zone="America/Los_Angeles",
type=azure_native.devcenter.ScheduledType.STOP_DEV_BOX)
resources:
schedule:
type: azure-native:devcenter:Schedule
properties:
frequency: Daily
poolName: DevPool
projectName: DevProject
resourceGroupName: rg1
scheduleName: autoShutdown
state: Enabled
time: 17:30
timeZone: America/Los_Angeles
type: StopDevBox
Create Schedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
@overload
def Schedule(resource_name: str,
args: ScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Schedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
frequency: Optional[Union[str, ScheduledFrequency]] = None,
pool_name: Optional[str] = None,
project_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
time: Optional[str] = None,
time_zone: Optional[str] = None,
type: Optional[Union[str, ScheduledType]] = None,
location: Optional[str] = None,
schedule_name: Optional[str] = None,
state: Optional[Union[str, ScheduleEnableStatus]] = None,
tags: Optional[Mapping[str, str]] = None,
top: Optional[int] = None)
public Schedule(String name, ScheduleArgs args)
public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
type: azure-native:devcenter:Schedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_devcenter_schedule" "name" {
# resource properties
}
Parameters
- name
string
- The unique name of the resource.
- args
ScheduleArgs
- 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
ScheduleArgs
- 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
ScheduleArgs
- The arguments to resource properties.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resource.
- args
ScheduleArgs
- The arguments to resource properties.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resource.
- args
ScheduleArgs
- 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 azure_nativeScheduleResource = new AzureNative.DevCenter.Schedule("azure-nativeScheduleResource", new()
{
Frequency = "string",
PoolName = "string",
ProjectName = "string",
ResourceGroupName = "string",
Time = "string",
TimeZone = "string",
Type = "string",
Location = "string",
ScheduleName = "string",
State = "string",
Tags =
{
{ "string", "string" },
},
Top = 0,
});
example, err := devcenter.NewSchedule(ctx, "azure-nativeScheduleResource", &devcenter.ScheduleArgs{
Frequency: pulumi.String("string"),
PoolName: pulumi.String("string"),
ProjectName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Time: pulumi.String("string"),
TimeZone: pulumi.String("string"),
Type: pulumi.String("string"),
Location: pulumi.String("string"),
ScheduleName: pulumi.String("string"),
State: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Top: pulumi.Int(0),
})
resource "azure-native_devcenter_schedule" "azure-nativeScheduleResource" {
lifecycle {
create_before_destroy = true
}
frequency = "string"
pool_name = "string"
project_name = "string"
resource_group_name = "string"
time = "string"
time_zone = "string"
type = "string"
location = "string"
schedule_name = "string"
state = "string"
tags = {
"string" = "string"
}
top = 0
}
var azure_nativeScheduleResource = new com.pulumi.azurenative.devcenter.Schedule("azure-nativeScheduleResource", com.pulumi.azurenative.devcenter.ScheduleArgs.builder()
.frequency("string")
.poolName("string")
.projectName("string")
.resourceGroupName("string")
.time("string")
.timeZone("string")
.type("string")
.location("string")
.scheduleName("string")
.state("string")
.tags(Map.of("string", "string"))
.top(0)
.build());
azure_native_schedule_resource = azure_native.devcenter.Schedule("azure-nativeScheduleResource",
frequency="string",
pool_name="string",
project_name="string",
resource_group_name="string",
time="string",
time_zone="string",
type="string",
location="string",
schedule_name="string",
state="string",
tags={
"string": "string",
},
top=0)
const azure_nativeScheduleResource = new azure_native.devcenter.Schedule("azure-nativeScheduleResource", {
frequency: "string",
poolName: "string",
projectName: "string",
resourceGroupName: "string",
time: "string",
timeZone: "string",
type: "string",
location: "string",
scheduleName: "string",
state: "string",
tags: {
string: "string",
},
top: 0,
});
type: azure-native:devcenter:Schedule
properties:
frequency: string
location: string
poolName: string
projectName: string
resourceGroupName: string
scheduleName: string
state: string
tags:
string: string
time: string
timeZone: string
top: 0
type: string
Schedule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Schedule resource accepts the following input properties:
- Frequency
string | ScheduledFrequency
- The frequency of this scheduled task.
- PoolName
string
- Name of the pool.
- ProjectName
string
- The name of the project.
- ResourceGroupName
string
- The name of the resource group. The name is case insensitive.
- Time
string
- The target time to trigger the action. The format is HH:MM.
- TimeZone
string
- The IANA timezone id at which the schedule should execute.
- Type
string | ScheduledType
- Supported type this scheduled task represents.
- Location
string
- The geo-location where the resource lives
- ScheduleName
string
- The name of the schedule that uniquely identifies it.
- State
string | ScheduleEnableStatus
- Indicates whether or not this scheduled task is enabled.
- Tags
map[string]string
- Resource tags.
- Top
int
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
string | "Daily"
- The frequency of this scheduled task.
- pool_name
string
- Name of the pool.
- project_name
string
- The name of the project.
- resource_group_name
string
- The name of the resource group. The name is case insensitive.
- time
string
- The target time to trigger the action. The format is HH:MM.
- time_zone
string
- The IANA timezone id at which the schedule should execute.
- type
string | "StopDevBox"
- Supported type this scheduled task represents.
- location
string
- The geo-location where the resource lives
- schedule_name
string
- The name of the schedule that uniquely identifies it.
- state
string | "Enabled" | "Disabled"
- Indicates whether or not this scheduled task is enabled.
- tags
map(string)
- Resource tags.
- top
number
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
String | ScheduledFrequency
- The frequency of this scheduled task.
- poolName
String
- Name of the pool.
- projectName
String
- The name of the project.
- resourceGroupName
String
- The name of the resource group. The name is case insensitive.
- time
String
- The target time to trigger the action. The format is HH:MM.
- timeZone
String
- The IANA timezone id at which the schedule should execute.
- type
String | ScheduledType
- Supported type this scheduled task represents.
- location
String
- The geo-location where the resource lives
- scheduleName
String
- The name of the schedule that uniquely identifies it.
- state
String | ScheduleEnableStatus
- Indicates whether or not this scheduled task is enabled.
- tags
Map<String,String>
- Resource tags.
- top
Integer
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
string | ScheduledFrequency
- The frequency of this scheduled task.
- poolName
string
- Name of the pool.
- projectName
string
- The name of the project.
- resourceGroupName
string
- The name of the resource group. The name is case insensitive.
- time
string
- The target time to trigger the action. The format is HH:MM.
- timeZone
string
- The IANA timezone id at which the schedule should execute.
- type
string | ScheduledType
- Supported type this scheduled task represents.
- location
string
- The geo-location where the resource lives
- scheduleName
string
- The name of the schedule that uniquely identifies it.
- state
string | ScheduleEnableStatus
- Indicates whether or not this scheduled task is enabled.
- tags
{[key: string]: string}
- Resource tags.
- top
number
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
str | ScheduledFrequency
- The frequency of this scheduled task.
- pool_name
str
- Name of the pool.
- project_name
str
- The name of the project.
- resource_group_name
str
- The name of the resource group. The name is case insensitive.
- time
str
- The target time to trigger the action. The format is HH:MM.
- time_zone
str
- The IANA timezone id at which the schedule should execute.
- type
str | ScheduledType
- Supported type this scheduled task represents.
- location
str
- The geo-location where the resource lives
- schedule_name
str
- The name of the schedule that uniquely identifies it.
- state
str | ScheduleEnableStatus
- Indicates whether or not this scheduled task is enabled.
- tags
Mapping[str, str]
- Resource tags.
- top
int
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
String | "Daily"
- The frequency of this scheduled task.
- poolName
String
- Name of the pool.
- projectName
String
- The name of the project.
- resourceGroupName
String
- The name of the resource group. The name is case insensitive.
- time
String
- The target time to trigger the action. The format is HH:MM.
- timeZone
String
- The IANA timezone id at which the schedule should execute.
- type
String | "StopDevBox"
- Supported type this scheduled task represents.
- location
String
- The geo-location where the resource lives
- scheduleName
String
- The name of the schedule that uniquely identifies it.
- state
String | "Enabled" | "Disabled"
- Indicates whether or not this scheduled task is enabled.
- tags
Map<String>
- Resource tags.
- top
Number
- The maximum number of resources to return from the operation. Example: '$top=10'.
Outputs
All input properties are implicitly available as output properties. Additionally, the Schedule resource produces the following output properties:
- AzureApiVersion
string
- The Azure API version of the resource.
- Id
string
- The provider-assigned unique ID for this managed resource.
- Name
string
- The name of the resource
- ProvisioningState
string
- The provisioning state of the resource.
- SystemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- azure_api_version
string
- The Azure API version of the resource.
- id
string
- The provider-assigned unique ID for this managed resource.
- name
string
- The name of the resource
- provisioning_state
string
- The provisioning state of the resource.
- system_data
object
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- azureApiVersion
String
- The Azure API version of the resource.
- id
String
- The provider-assigned unique ID for this managed resource.
- name
String
- The name of the resource
- provisioningState
String
- The provisioning state of the resource.
- systemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- azureApiVersion
string
- The Azure API version of the resource.
- id
string
- The provider-assigned unique ID for this managed resource.
- name
string
- The name of the resource
- provisioningState
string
- The provisioning state of the resource.
- systemData
SystemDataResponse
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
- azureApiVersion
String
- The Azure API version of the resource.
- id
String
- The provider-assigned unique ID for this managed resource.
- name
String
- The name of the resource
- provisioningState
String
- The provisioning state of the resource.
- systemData
Property Map
- Azure Resource Manager metadata containing createdBy and modifiedBy information.
Look up Existing Schedule Resource
Get an existing Schedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static Schedule get(String name, Output<String> id, CustomResourceOptions options)
resources: existingSchedule: type: azure-native:devcenter:Schedule get: id: ${id}
import {
to = azure-native_devcenter_schedule.example
id = "${id}"
}
- name
string
- The unique name of the resulting resource.
- id
Input<ID>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
str
- The unique name of the resulting resource.
- id
str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id
IDInput
- The unique provider ID of the resource to look up.
- state
ScheduleState
- Pass nil. This resource has no state arguments.
- opts
ResourceOption
- Bag of options to control resource's behavior.
- name
string
- The unique name of the resulting resource.
- id
Input<string>
- The unique provider ID of the resource to look up.
- opts
CustomResourceOptions
- Bag of options to control resource's behavior.
- name
String
- The unique name of the resulting resource.
- id
Output<String>
- The unique provider ID of the resource to look up.
- options
CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
ScheduleEnableStatus
Indicates whether or not this scheduled task is enabled.
| Name | Value |
|---|
| Enabled | Enabled |
| Disabled | Disabled |
| Name | Value |
|---|
| ScheduleEnableStatusEnabled | Enabled |
| ScheduleEnableStatusDisabled | Disabled |
| Name | Value |
|---|
| Enabled | Enabled |
| Disabled | Disabled |
| Name | Value |
|---|
| Enabled | Enabled |
| Disabled | Disabled |
| Name | Value |
|---|
| ENABLED | Enabled |
| DISABLED | Disabled |
ScheduledFrequency
The frequency of this scheduled task.
| Name | Value |
|---|
| ScheduledFrequencyDaily | Daily |
ScheduledType
Supported type this scheduled task represents.
| Name | Value |
|---|
| StopDevBox | StopDevBox |
| Name | Value |
|---|
| ScheduledTypeStopDevBox | StopDevBox |
| Name | Value |
|---|
| StopDevBox | StopDevBox |
| Name | Value |
|---|
| StopDevBox | StopDevBox |
| Name | Value |
|---|
| STOP_DEV_BOX | StopDevBox |
SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- CreatedAt
string
- The timestamp of resource creation (UTC).
- CreatedBy
string
- The identity that created the resource.
- CreatedByType
string
- The type of identity that created the resource.
- LastModifiedAt
string
- The timestamp of resource last modification (UTC)
- LastModifiedBy
string
- The identity that last modified the resource.
- LastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
- createdAt
string
- The timestamp of resource creation (UTC).
- createdBy
string
- The identity that created the resource.
- createdByType
string
- The type of identity that created the resource.
- lastModifiedAt
string
- The timestamp of resource last modification (UTC)
- lastModifiedBy
string
- The identity that last modified the resource.
- lastModifiedByType
string
- The type of identity that last modified the resource.
- createdAt
String
- The timestamp of resource creation (UTC).
- createdBy
String
- The identity that created the resource.
- createdByType
String
- The type of identity that created the resource.
- lastModifiedAt
String
- The timestamp of resource last modification (UTC)
- lastModifiedBy
String
- The identity that last modified the resource.
- lastModifiedByType
String
- The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:devcenter:Schedule autoShutdown /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0