1. Packages
  2. Azure Native
  3. API Docs
  4. devcenter
  5. Schedule
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.38.0 published on Monday, Apr 22, 2024 by Pulumi

azure-native.devcenter.Schedule

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.38.0 published on Monday, Apr 22, 2024 by Pulumi

    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.

    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 (
    	"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.

    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.AzureNative.DevCenter.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 | Pulumi.AzureNative.DevCenter.ScheduledType
    Supported type this scheduled task represents.
    ScheduleName string
    The name of the schedule that uniquely identifies it.
    State string | Pulumi.AzureNative.DevCenter.ScheduleEnableStatus
    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 | 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.
    ScheduleName string
    The name of the schedule that uniquely identifies it.
    State string | ScheduleEnableStatus
    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 | 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.
    scheduleName String
    The name of the schedule that uniquely identifies it.
    state String | ScheduleEnableStatus
    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 | 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.
    scheduleName string
    The name of the schedule that uniquely identifies it.
    state string | ScheduleEnableStatus
    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 | 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.
    schedule_name str
    The name of the schedule that uniquely identifies it.
    state str | ScheduleEnableStatus
    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.
    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.
    scheduleName 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
    ProvisioningState string
    The provisioning state of the resource.
    SystemData Pulumi.AzureNative.DevCenter.Outputs.SystemDataResponse
    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
    ProvisioningState string
    The provisioning state of the resource.
    SystemData SystemDataResponse
    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
    provisioningState String
    The provisioning state of the resource.
    systemData SystemDataResponse
    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
    provisioningState string
    The provisioning state of the resource.
    systemData SystemDataResponse
    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 SystemDataResponse
    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
    provisioningState String
    The provisioning state of the resource.
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.

    Supporting Types

    ScheduleEnableStatus, ScheduleEnableStatusArgs

    Enabled
    Enabled
    Disabled
    Disabled
    ScheduleEnableStatusEnabled
    Enabled
    ScheduleEnableStatusDisabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    Enabled
    Enabled
    Disabled
    Disabled
    ENABLED
    Enabled
    DISABLED
    Disabled
    "Enabled"
    Enabled
    "Disabled"
    Disabled

    ScheduledFrequency, ScheduledFrequencyArgs

    Daily
    Daily
    ScheduledFrequencyDaily
    Daily
    Daily
    Daily
    Daily
    Daily
    DAILY
    Daily
    "Daily"
    Daily

    ScheduledType, ScheduledTypeArgs

    StopDevBox
    StopDevBox
    ScheduledTypeStopDevBox
    StopDevBox
    StopDevBox
    StopDevBox
    StopDevBox
    StopDevBox
    STOP_DEV_BOX
    StopDevBox
    "StopDevBox"
    StopDevBox

    SystemDataResponse, SystemDataResponseArgs

    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.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    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
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.38.0 published on Monday, Apr 22, 2024 by Pulumi