import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages automated shutdown schedules for Azure VMs that are not within an Azure DevTest Lab. While this is part of the DevTest Labs service in Azure, * this resource applies only to standard VMs, not DevTest Lab VMs. To manage automated shutdown schedules for DevTest Lab VMs, reference the * `azure.devtest.Schedule` resource * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "sample-rg", * location: "West Europe", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "sample-vnet", * addressSpaces: ["10.0.0.0/16"], * location: example.location, * resourceGroupName: example.name, * }); * const exampleSubnet = new azure.network.Subnet("example", { * name: "sample-subnet", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.0.2.0/24"], * }); * const exampleNetworkInterface = new azure.network.NetworkInterface("example", { * name: "sample-nic", * location: example.location, * resourceGroupName: example.name, * ipConfigurations: [{ * name: "testconfiguration1", * subnetId: exampleSubnet.id, * privateIpAddressAllocation: "Dynamic", * }], * }); * const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("example", { * name: "SampleVM", * location: example.location, * resourceGroupName: example.name, * networkInterfaceIds: [exampleNetworkInterface.id], * size: "Standard_B2s", * sourceImageReference: { * publisher: "Canonical", * offer: "0001-com-ubuntu-server-jammy", * sku: "22_04-lts", * version: "latest", * }, * osDisk: { * name: "myosdisk-example", * caching: "ReadWrite", * storageAccountType: "Standard_LRS", * }, * adminUsername: "testadmin", * adminPassword: "Password1234!", * disablePasswordAuthentication: false, * }); * const exampleGlobalVMShutdownSchedule = new azure.devtest.GlobalVMShutdownSchedule("example", { * virtualMachineId: exampleLinuxVirtualMachine.id, * location: example.location, * enabled: true, * dailyRecurrenceTime: "1100", * timezone: "Pacific Standard Time", * notificationSettings: { * enabled: true, * timeInMinutes: 60, * webhookUrl: "https://sample-webhook-url.example.com", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.DevTestLab` - 2018-09-15 * * ## Import * * An existing Dev Test Global Shutdown Schedule can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:devtest/globalVMShutdownSchedule:GlobalVMShutdownSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.DevTestLab/schedules/shutdown-computevm-SampleVM * ``` * * The name of the resource within the `resource id` will always follow the format `shutdown-computevm-` where `` is replaced by the name of the target Virtual Machine */ export declare class GlobalVMShutdownSchedule extends pulumi.CustomResource { /** * Get an existing GlobalVMShutdownSchedule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: GlobalVMShutdownScheduleState, opts?: pulumi.CustomResourceOptions): GlobalVMShutdownSchedule; /** * Returns true if the given object is an instance of GlobalVMShutdownSchedule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is GlobalVMShutdownSchedule; /** * The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.) */ readonly dailyRecurrenceTime: pulumi.Output; /** * Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`. */ readonly enabled: pulumi.Output; /** * The location where the schedule is created. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * The notification setting of a schedule. A `notificationSettings` block as defined below. */ readonly notificationSettings: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). */ readonly timezone: pulumi.Output; /** * The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created. */ readonly virtualMachineId: pulumi.Output; /** * Create a GlobalVMShutdownSchedule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: GlobalVMShutdownScheduleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GlobalVMShutdownSchedule resources. */ export interface GlobalVMShutdownScheduleState { /** * The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.) */ dailyRecurrenceTime?: pulumi.Input; /** * Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`. */ enabled?: pulumi.Input; /** * The location where the schedule is created. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The notification setting of a schedule. A `notificationSettings` block as defined below. */ notificationSettings?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). */ timezone?: pulumi.Input; /** * The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created. */ virtualMachineId?: pulumi.Input; } /** * The set of arguments for constructing a GlobalVMShutdownSchedule resource. */ export interface GlobalVMShutdownScheduleArgs { /** * The time each day when the schedule takes effect. Must match the format HHmm where HH is 00-23 and mm is 00-59 (e.g. 0930, 2300, etc.) */ dailyRecurrenceTime: pulumi.Input; /** * Whether to enable the schedule. Possible values are `true` and `false`. Defaults to `true`. */ enabled?: pulumi.Input; /** * The location where the schedule is created. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * The notification setting of a schedule. A `notificationSettings` block as defined below. */ notificationSettings: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The time zone ID (e.g. Pacific Standard time). Refer to this guide for a [full list of accepted time zone names](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). */ timezone: pulumi.Input; /** * The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created. */ virtualMachineId: pulumi.Input; }