We recommend using Azure Native.
azure.devtest.GlobalVMShutdownSchedule
Explore with Pulumi AI
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
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",
},
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="sample-rg",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="sample-vnet",
address_spaces=["10.0.0.0/16"],
location=example.location,
resource_group_name=example.name)
example_subnet = azure.network.Subnet("example",
name="sample-subnet",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"])
example_network_interface = azure.network.NetworkInterface("example",
name="sample-nic",
location=example.location,
resource_group_name=example.name,
ip_configurations=[{
"name": "testconfiguration1",
"subnet_id": example_subnet.id,
"private_ip_address_allocation": "Dynamic",
}])
example_linux_virtual_machine = azure.compute.LinuxVirtualMachine("example",
name="SampleVM",
location=example.location,
resource_group_name=example.name,
network_interface_ids=[example_network_interface.id],
size="Standard_B2s",
source_image_reference={
"publisher": "Canonical",
"offer": "0001-com-ubuntu-server-jammy",
"sku": "22_04-lts",
"version": "latest",
},
os_disk={
"name": "myosdisk-example",
"caching": "ReadWrite",
"storage_account_type": "Standard_LRS",
},
admin_username="testadmin",
admin_password="Password1234!",
disable_password_authentication=False)
example_global_vm_shutdown_schedule = azure.devtest.GlobalVMShutdownSchedule("example",
virtual_machine_id=example_linux_virtual_machine.id,
location=example.location,
enabled=True,
daily_recurrence_time="1100",
timezone="Pacific Standard Time",
notification_settings={
"enabled": True,
"time_in_minutes": 60,
"webhook_url": "https://sample-webhook-url.example.com",
})
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"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("sample-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("sample-vnet"),
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("sample-subnet"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "example", &network.NetworkInterfaceArgs{
Name: pulumi.String("sample-nic"),
Location: example.Location,
ResourceGroupName: example.Name,
IpConfigurations: network.NetworkInterfaceIpConfigurationArray{
&network.NetworkInterfaceIpConfigurationArgs{
Name: pulumi.String("testconfiguration1"),
SubnetId: exampleSubnet.ID(),
PrivateIpAddressAllocation: pulumi.String("Dynamic"),
},
},
})
if err != nil {
return err
}
exampleLinuxVirtualMachine, err := compute.NewLinuxVirtualMachine(ctx, "example", &compute.LinuxVirtualMachineArgs{
Name: pulumi.String("SampleVM"),
Location: example.Location,
ResourceGroupName: example.Name,
NetworkInterfaceIds: pulumi.StringArray{
exampleNetworkInterface.ID(),
},
Size: pulumi.String("Standard_B2s"),
SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
Publisher: pulumi.String("Canonical"),
Offer: pulumi.String("0001-com-ubuntu-server-jammy"),
Sku: pulumi.String("22_04-lts"),
Version: pulumi.String("latest"),
},
OsDisk: &compute.LinuxVirtualMachineOsDiskArgs{
Name: pulumi.String("myosdisk-example"),
Caching: pulumi.String("ReadWrite"),
StorageAccountType: pulumi.String("Standard_LRS"),
},
AdminUsername: pulumi.String("testadmin"),
AdminPassword: pulumi.String("Password1234!"),
DisablePasswordAuthentication: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = devtest.NewGlobalVMShutdownSchedule(ctx, "example", &devtest.GlobalVMShutdownScheduleArgs{
VirtualMachineId: exampleLinuxVirtualMachine.ID(),
Location: example.Location,
Enabled: pulumi.Bool(true),
DailyRecurrenceTime: pulumi.String("1100"),
Timezone: pulumi.String("Pacific Standard Time"),
NotificationSettings: &devtest.GlobalVMShutdownScheduleNotificationSettingsArgs{
Enabled: pulumi.Bool(true),
TimeInMinutes: pulumi.Int(60),
WebhookUrl: pulumi.String("https://sample-webhook-url.example.com"),
},
})
if err != nil {
return err
}
return nil
})
}
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 = "sample-rg",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "sample-vnet",
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "sample-subnet",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleNetworkInterface = new Azure.Network.NetworkInterface("example", new()
{
Name = "sample-nic",
Location = example.Location,
ResourceGroupName = example.Name,
IpConfigurations = new[]
{
new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
{
Name = "testconfiguration1",
SubnetId = exampleSubnet.Id,
PrivateIpAddressAllocation = "Dynamic",
},
},
});
var exampleLinuxVirtualMachine = new Azure.Compute.LinuxVirtualMachine("example", new()
{
Name = "SampleVM",
Location = example.Location,
ResourceGroupName = example.Name,
NetworkInterfaceIds = new[]
{
exampleNetworkInterface.Id,
},
Size = "Standard_B2s",
SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineSourceImageReferenceArgs
{
Publisher = "Canonical",
Offer = "0001-com-ubuntu-server-jammy",
Sku = "22_04-lts",
Version = "latest",
},
OsDisk = new Azure.Compute.Inputs.LinuxVirtualMachineOsDiskArgs
{
Name = "myosdisk-example",
Caching = "ReadWrite",
StorageAccountType = "Standard_LRS",
},
AdminUsername = "testadmin",
AdminPassword = "Password1234!",
DisablePasswordAuthentication = false,
});
var exampleGlobalVMShutdownSchedule = new Azure.DevTest.GlobalVMShutdownSchedule("example", new()
{
VirtualMachineId = exampleLinuxVirtualMachine.Id,
Location = example.Location,
Enabled = true,
DailyRecurrenceTime = "1100",
Timezone = "Pacific Standard Time",
NotificationSettings = new Azure.DevTest.Inputs.GlobalVMShutdownScheduleNotificationSettingsArgs
{
Enabled = true,
TimeInMinutes = 60,
WebhookUrl = "https://sample-webhook-url.example.com",
},
});
});
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.network.NetworkInterface;
import com.pulumi.azure.network.NetworkInterfaceArgs;
import com.pulumi.azure.network.inputs.NetworkInterfaceIpConfigurationArgs;
import com.pulumi.azure.compute.LinuxVirtualMachine;
import com.pulumi.azure.compute.LinuxVirtualMachineArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineSourceImageReferenceArgs;
import com.pulumi.azure.compute.inputs.LinuxVirtualMachineOsDiskArgs;
import com.pulumi.azure.devtest.GlobalVMShutdownSchedule;
import com.pulumi.azure.devtest.GlobalVMShutdownScheduleArgs;
import com.pulumi.azure.devtest.inputs.GlobalVMShutdownScheduleNotificationSettingsArgs;
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("sample-rg")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("sample-vnet")
.addressSpaces("10.0.0.0/16")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("sample-subnet")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
.name("sample-nic")
.location(example.location())
.resourceGroupName(example.name())
.ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
.name("testconfiguration1")
.subnetId(exampleSubnet.id())
.privateIpAddressAllocation("Dynamic")
.build())
.build());
var exampleLinuxVirtualMachine = new LinuxVirtualMachine("exampleLinuxVirtualMachine", LinuxVirtualMachineArgs.builder()
.name("SampleVM")
.location(example.location())
.resourceGroupName(example.name())
.networkInterfaceIds(exampleNetworkInterface.id())
.size("Standard_B2s")
.sourceImageReference(LinuxVirtualMachineSourceImageReferenceArgs.builder()
.publisher("Canonical")
.offer("0001-com-ubuntu-server-jammy")
.sku("22_04-lts")
.version("latest")
.build())
.osDisk(LinuxVirtualMachineOsDiskArgs.builder()
.name("myosdisk-example")
.caching("ReadWrite")
.storageAccountType("Standard_LRS")
.build())
.adminUsername("testadmin")
.adminPassword("Password1234!")
.disablePasswordAuthentication(false)
.build());
var exampleGlobalVMShutdownSchedule = new GlobalVMShutdownSchedule("exampleGlobalVMShutdownSchedule", GlobalVMShutdownScheduleArgs.builder()
.virtualMachineId(exampleLinuxVirtualMachine.id())
.location(example.location())
.enabled(true)
.dailyRecurrenceTime("1100")
.timezone("Pacific Standard Time")
.notificationSettings(GlobalVMShutdownScheduleNotificationSettingsArgs.builder()
.enabled(true)
.timeInMinutes("60")
.webhookUrl("https://sample-webhook-url.example.com")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: sample-rg
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: sample-vnet
addressSpaces:
- 10.0.0.0/16
location: ${example.location}
resourceGroupName: ${example.name}
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: sample-subnet
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleNetworkInterface:
type: azure:network:NetworkInterface
name: example
properties:
name: sample-nic
location: ${example.location}
resourceGroupName: ${example.name}
ipConfigurations:
- name: testconfiguration1
subnetId: ${exampleSubnet.id}
privateIpAddressAllocation: Dynamic
exampleLinuxVirtualMachine:
type: azure:compute:LinuxVirtualMachine
name: example
properties:
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
exampleGlobalVMShutdownSchedule:
type: azure:devtest:GlobalVMShutdownSchedule
name: example
properties:
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
Create GlobalVMShutdownSchedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GlobalVMShutdownSchedule(name: string, args: GlobalVMShutdownScheduleArgs, opts?: CustomResourceOptions);
@overload
def GlobalVMShutdownSchedule(resource_name: str,
args: GlobalVMShutdownScheduleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GlobalVMShutdownSchedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
daily_recurrence_time: Optional[str] = None,
notification_settings: Optional[GlobalVMShutdownScheduleNotificationSettingsArgs] = None,
timezone: Optional[str] = None,
virtual_machine_id: Optional[str] = None,
enabled: Optional[bool] = None,
location: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewGlobalVMShutdownSchedule(ctx *Context, name string, args GlobalVMShutdownScheduleArgs, opts ...ResourceOption) (*GlobalVMShutdownSchedule, error)
public GlobalVMShutdownSchedule(string name, GlobalVMShutdownScheduleArgs args, CustomResourceOptions? opts = null)
public GlobalVMShutdownSchedule(String name, GlobalVMShutdownScheduleArgs args)
public GlobalVMShutdownSchedule(String name, GlobalVMShutdownScheduleArgs args, CustomResourceOptions options)
type: azure:devtest:GlobalVMShutdownSchedule
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 GlobalVMShutdownScheduleArgs
- 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 GlobalVMShutdownScheduleArgs
- 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 GlobalVMShutdownScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GlobalVMShutdownScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GlobalVMShutdownScheduleArgs
- 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 globalVMShutdownScheduleResource = new Azure.DevTest.GlobalVMShutdownSchedule("globalVMShutdownScheduleResource", new()
{
DailyRecurrenceTime = "string",
NotificationSettings = new Azure.DevTest.Inputs.GlobalVMShutdownScheduleNotificationSettingsArgs
{
Enabled = false,
Email = "string",
TimeInMinutes = 0,
WebhookUrl = "string",
},
Timezone = "string",
VirtualMachineId = "string",
Enabled = false,
Location = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := devtest.NewGlobalVMShutdownSchedule(ctx, "globalVMShutdownScheduleResource", &devtest.GlobalVMShutdownScheduleArgs{
DailyRecurrenceTime: pulumi.String("string"),
NotificationSettings: &devtest.GlobalVMShutdownScheduleNotificationSettingsArgs{
Enabled: pulumi.Bool(false),
Email: pulumi.String("string"),
TimeInMinutes: pulumi.Int(0),
WebhookUrl: pulumi.String("string"),
},
Timezone: pulumi.String("string"),
VirtualMachineId: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Location: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var globalVMShutdownScheduleResource = new GlobalVMShutdownSchedule("globalVMShutdownScheduleResource", GlobalVMShutdownScheduleArgs.builder()
.dailyRecurrenceTime("string")
.notificationSettings(GlobalVMShutdownScheduleNotificationSettingsArgs.builder()
.enabled(false)
.email("string")
.timeInMinutes(0)
.webhookUrl("string")
.build())
.timezone("string")
.virtualMachineId("string")
.enabled(false)
.location("string")
.tags(Map.of("string", "string"))
.build());
global_vm_shutdown_schedule_resource = azure.devtest.GlobalVMShutdownSchedule("globalVMShutdownScheduleResource",
daily_recurrence_time="string",
notification_settings={
"enabled": False,
"email": "string",
"timeInMinutes": 0,
"webhookUrl": "string",
},
timezone="string",
virtual_machine_id="string",
enabled=False,
location="string",
tags={
"string": "string",
})
const globalVMShutdownScheduleResource = new azure.devtest.GlobalVMShutdownSchedule("globalVMShutdownScheduleResource", {
dailyRecurrenceTime: "string",
notificationSettings: {
enabled: false,
email: "string",
timeInMinutes: 0,
webhookUrl: "string",
},
timezone: "string",
virtualMachineId: "string",
enabled: false,
location: "string",
tags: {
string: "string",
},
});
type: azure:devtest:GlobalVMShutdownSchedule
properties:
dailyRecurrenceTime: string
enabled: false
location: string
notificationSettings:
email: string
enabled: false
timeInMinutes: 0
webhookUrl: string
tags:
string: string
timezone: string
virtualMachineId: string
GlobalVMShutdownSchedule 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 GlobalVMShutdownSchedule resource accepts the following input properties:
- Daily
Recurrence stringTime - 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.)
- Notification
Settings GlobalVMShutdown Schedule Notification Settings - The notification setting of a schedule. A
notification_settings
block as defined below. - Timezone string
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- Virtual
Machine stringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- Enabled bool
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - Location string
- The location where the schedule is created. Changing this forces a new resource to be created.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Daily
Recurrence stringTime - 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.)
- Notification
Settings GlobalVMShutdown Schedule Notification Settings Args - The notification setting of a schedule. A
notification_settings
block as defined below. - Timezone string
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- Virtual
Machine stringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- Enabled bool
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - Location string
- The location where the schedule is created. Changing this forces a new resource to be created.
- map[string]string
- A mapping of tags to assign to the resource.
- daily
Recurrence StringTime - 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.)
- notification
Settings GlobalVMShutdown Schedule Notification Settings - The notification setting of a schedule. A
notification_settings
block as defined below. - timezone String
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual
Machine StringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- enabled Boolean
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location String
- The location where the schedule is created. Changing this forces a new resource to be created.
- Map<String,String>
- A mapping of tags to assign to the resource.
- daily
Recurrence stringTime - 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.)
- notification
Settings GlobalVMShutdown Schedule Notification Settings - The notification setting of a schedule. A
notification_settings
block as defined below. - timezone string
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual
Machine stringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- enabled boolean
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location string
- The location where the schedule is created. Changing this forces a new resource to be created.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- daily_
recurrence_ strtime - 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.)
- notification_
settings GlobalVMShutdown Schedule Notification Settings Args - The notification setting of a schedule. A
notification_settings
block as defined below. - timezone str
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual_
machine_ strid - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- enabled bool
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location str
- The location where the schedule is created. Changing this forces a new resource to be created.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- daily
Recurrence StringTime - 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.)
- notification
Settings Property Map - The notification setting of a schedule. A
notification_settings
block as defined below. - timezone String
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual
Machine StringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- enabled Boolean
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location String
- The location where the schedule is created. Changing this forces a new resource to be created.
- Map<String>
- A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the GlobalVMShutdownSchedule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GlobalVMShutdownSchedule Resource
Get an existing GlobalVMShutdownSchedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: GlobalVMShutdownScheduleState, opts?: CustomResourceOptions): GlobalVMShutdownSchedule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
daily_recurrence_time: Optional[str] = None,
enabled: Optional[bool] = None,
location: Optional[str] = None,
notification_settings: Optional[GlobalVMShutdownScheduleNotificationSettingsArgs] = None,
tags: Optional[Mapping[str, str]] = None,
timezone: Optional[str] = None,
virtual_machine_id: Optional[str] = None) -> GlobalVMShutdownSchedule
func GetGlobalVMShutdownSchedule(ctx *Context, name string, id IDInput, state *GlobalVMShutdownScheduleState, opts ...ResourceOption) (*GlobalVMShutdownSchedule, error)
public static GlobalVMShutdownSchedule Get(string name, Input<string> id, GlobalVMShutdownScheduleState? state, CustomResourceOptions? opts = null)
public static GlobalVMShutdownSchedule get(String name, Output<String> id, GlobalVMShutdownScheduleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Daily
Recurrence stringTime - 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.)
- Enabled bool
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - Location string
- The location where the schedule is created. Changing this forces a new resource to be created.
- Notification
Settings GlobalVMShutdown Schedule Notification Settings - The notification setting of a schedule. A
notification_settings
block as defined below. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Timezone string
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- Virtual
Machine stringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- Daily
Recurrence stringTime - 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.)
- Enabled bool
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - Location string
- The location where the schedule is created. Changing this forces a new resource to be created.
- Notification
Settings GlobalVMShutdown Schedule Notification Settings Args - The notification setting of a schedule. A
notification_settings
block as defined below. - map[string]string
- A mapping of tags to assign to the resource.
- Timezone string
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- Virtual
Machine stringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- daily
Recurrence StringTime - 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.)
- enabled Boolean
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location String
- The location where the schedule is created. Changing this forces a new resource to be created.
- notification
Settings GlobalVMShutdown Schedule Notification Settings - The notification setting of a schedule. A
notification_settings
block as defined below. - Map<String,String>
- A mapping of tags to assign to the resource.
- timezone String
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual
Machine StringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- daily
Recurrence stringTime - 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.)
- enabled boolean
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location string
- The location where the schedule is created. Changing this forces a new resource to be created.
- notification
Settings GlobalVMShutdown Schedule Notification Settings - The notification setting of a schedule. A
notification_settings
block as defined below. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- timezone string
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual
Machine stringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- daily_
recurrence_ strtime - 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.)
- enabled bool
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location str
- The location where the schedule is created. Changing this forces a new resource to be created.
- notification_
settings GlobalVMShutdown Schedule Notification Settings Args - The notification setting of a schedule. A
notification_settings
block as defined below. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- timezone str
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual_
machine_ strid - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
- daily
Recurrence StringTime - 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.)
- enabled Boolean
- Whether to enable the schedule. Possible values are
true
andfalse
. Defaults totrue
. - location String
- The location where the schedule is created. Changing this forces a new resource to be created.
- notification
Settings Property Map - The notification setting of a schedule. A
notification_settings
block as defined below. - Map<String>
- A mapping of tags to assign to the resource.
- timezone String
- The time zone ID (e.g. Pacific Standard time). Refer to this guide for a full list of accepted time zone names.
- virtual
Machine StringId - The resource ID of the target ARM-based Virtual Machine. Changing this forces a new resource to be created.
Supporting Types
GlobalVMShutdownScheduleNotificationSettings, GlobalVMShutdownScheduleNotificationSettingsArgs
- Enabled bool
- Whether to enable pre-shutdown notifications. Possible values are
true
andfalse
. - Email string
- E-mail address to which the notification will be sent.
- Time
In intMinutes - Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to
30
. - Webhook
Url string - The webhook URL to which the notification will be sent.
- Enabled bool
- Whether to enable pre-shutdown notifications. Possible values are
true
andfalse
. - Email string
- E-mail address to which the notification will be sent.
- Time
In intMinutes - Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to
30
. - Webhook
Url string - The webhook URL to which the notification will be sent.
- enabled Boolean
- Whether to enable pre-shutdown notifications. Possible values are
true
andfalse
. - email String
- E-mail address to which the notification will be sent.
- time
In IntegerMinutes - Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to
30
. - webhook
Url String - The webhook URL to which the notification will be sent.
- enabled boolean
- Whether to enable pre-shutdown notifications. Possible values are
true
andfalse
. - email string
- E-mail address to which the notification will be sent.
- time
In numberMinutes - Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to
30
. - webhook
Url string - The webhook URL to which the notification will be sent.
- enabled bool
- Whether to enable pre-shutdown notifications. Possible values are
true
andfalse
. - email str
- E-mail address to which the notification will be sent.
- time_
in_ intminutes - Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to
30
. - webhook_
url str - The webhook URL to which the notification will be sent.
- enabled Boolean
- Whether to enable pre-shutdown notifications. Possible values are
true
andfalse
. - email String
- E-mail address to which the notification will be sent.
- time
In NumberMinutes - Time in minutes between 15 and 120 before a shutdown event at which a notification will be sent. Defaults to
30
. - webhook
Url String - The webhook URL to which the notification will be sent.
Import
An existing Dev Test Global Shutdown Schedule can be imported using the resource id
, e.g.
$ 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-<VM Name>
where <VM Name>
is replaced by the name of the target Virtual Machine
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.