azure-native.devcenter.Schedule
Explore with Pulumi AI
Represents a Schedule to execute a task. Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2022-09-01-preview.
Other available API versions: 2023-08-01-preview, 2023-10-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-07-01-preview, 2024-08-01-preview.
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/v2"
"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
})
}
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.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 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 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)
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,
});
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
new Schedule(name: string, args: ScheduleArgs, opts?: CustomResourceOptions);
@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,
schedule_name: Optional[str] = None,
state: Optional[Union[str, ScheduleEnableStatus]] = None,
top: Optional[int] = None)
func NewSchedule(ctx *Context, name string, args ScheduleArgs, opts ...ResourceOption) (*Schedule, error)
public Schedule(string name, ScheduleArgs args, CustomResourceOptions? opts = null)
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.
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",
ScheduleName = "string",
State = "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"),
ScheduleName: pulumi.String("string"),
State: pulumi.String("string"),
Top: pulumi.Int(0),
})
var azure_nativeScheduleResource = new Schedule("azure-nativeScheduleResource", ScheduleArgs.builder()
.frequency("string")
.poolName("string")
.projectName("string")
.resourceGroupName("string")
.time("string")
.timeZone("string")
.type("string")
.scheduleName("string")
.state("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",
schedule_name="string",
state="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",
scheduleName: "string",
state: "string",
top: 0,
});
type: azure-native:devcenter:Schedule
properties:
frequency: string
poolName: string
projectName: string
resourceGroupName: string
scheduleName: string
state: 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.
Inputs
The Schedule resource accepts the following input properties:
- Frequency
string | Pulumi.
Azure Native. Dev Center. Scheduled Frequency - The frequency of this scheduled task.
- Pool
Name string - Name of the pool.
- Project
Name string - The name of the project.
- Resource
Group stringName - 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 | Pulumi.
Azure Native. Dev Center. Scheduled Type - Supported type this scheduled task represents.
- Schedule
Name string - The name of the schedule that uniquely identifies it.
- State
string | Pulumi.
Azure Native. Dev Center. Schedule Enable Status - Indicates whether or not this scheduled task is enabled.
- Top int
- The maximum number of resources to return from the operation. Example: '$top=10'.
- Frequency
string | Scheduled
Frequency - The frequency of this scheduled task.
- Pool
Name string - Name of the pool.
- Project
Name string - The name of the project.
- Resource
Group stringName - 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 | Scheduled
Type - Supported type this scheduled task represents.
- Schedule
Name string - The name of the schedule that uniquely identifies it.
- State
string | Schedule
Enable Status - Indicates whether or not this scheduled task is enabled.
- Top int
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
String | Scheduled
Frequency - The frequency of this scheduled task.
- pool
Name String - Name of the pool.
- project
Name String - The name of the project.
- resource
Group StringName - 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 | Scheduled
Type - Supported type this scheduled task represents.
- schedule
Name String - The name of the schedule that uniquely identifies it.
- state
String | Schedule
Enable Status - Indicates whether or not this scheduled task is enabled.
- top Integer
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
string | Scheduled
Frequency - The frequency of this scheduled task.
- pool
Name string - Name of the pool.
- project
Name string - The name of the project.
- resource
Group stringName - 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 | Scheduled
Type - Supported type this scheduled task represents.
- schedule
Name string - The name of the schedule that uniquely identifies it.
- state
string | Schedule
Enable Status - Indicates whether or not this scheduled task is enabled.
- top number
- The maximum number of resources to return from the operation. Example: '$top=10'.
- frequency
str | Scheduled
Frequency - The frequency of this scheduled task.
- pool_
name str - Name of the pool.
- project_
name str - The name of the project.
- resource_
group_ strname - 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 | Scheduled
Type - Supported type this scheduled task represents.
- schedule_
name str - The name of the schedule that uniquely identifies it.
- state
str | Schedule
Enable Status - Indicates whether or not this scheduled task is enabled.
- 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 StringName - 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 | "Stop
Dev Box" - Supported type this scheduled task represents.
- 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.
- 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:
- 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 Pulumi.Azure Native. Dev Center. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- 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 SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- 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 SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- 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 SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- provisioning_
state str - The provisioning state of the resource.
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- 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 Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
Supporting Types
ScheduleEnableStatus, ScheduleEnableStatusArgs
- Enabled
- Enabled
- Disabled
- Disabled
- Schedule
Enable Status Enabled - Enabled
- Schedule
Enable Status Disabled - Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- Enabled
- Enabled
- Disabled
- Disabled
- ENABLED
- Enabled
- DISABLED
- Disabled
- "Enabled"
- Enabled
- "Disabled"
- Disabled
ScheduledFrequency, ScheduledFrequencyArgs
- Daily
- Daily
- Scheduled
Frequency Daily - Daily
- Daily
- Daily
- Daily
- Daily
- DAILY
- Daily
- "Daily"
- Daily
ScheduledType, ScheduledTypeArgs
- Stop
Dev Box - StopDevBox
- Scheduled
Type Stop Dev Box - StopDevBox
- Stop
Dev Box - StopDevBox
- Stop
Dev Box - StopDevBox
- STOP_DEV_BOX
- StopDevBox
- "Stop
Dev Box" - StopDevBox
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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