Azure Classic v5.43.0, May 6 23
Azure Classic v5.43.0, May 6 23
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("exampleVirtualNetwork", new()
{
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleSubnet = new Azure.Network.Subnet("exampleSubnet", new()
{
ResourceGroupName = exampleResourceGroup.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleNetworkInterface = new Azure.Network.NetworkInterface("exampleNetworkInterface", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
IpConfigurations = new[]
{
new Azure.Network.Inputs.NetworkInterfaceIpConfigurationArgs
{
Name = "testconfiguration1",
SubnetId = exampleSubnet.Id,
PrivateIpAddressAllocation = "Dynamic",
},
},
});
var exampleLinuxVirtualMachine = new Azure.Compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", new()
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
NetworkInterfaceIds = new[]
{
exampleNetworkInterface.Id,
},
Size = "Standard_B2s",
SourceImageReference = new Azure.Compute.Inputs.LinuxVirtualMachineSourceImageReferenceArgs
{
Publisher = "Canonical",
Offer = "UbuntuServer",
Sku = "16.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("exampleGlobalVMShutdownSchedule", new()
{
VirtualMachineId = exampleLinuxVirtualMachine.Id,
Location = exampleResourceGroup.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 main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/devtest"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &network.VirtualNetworkArgs{
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "exampleSubnet", &network.SubnetArgs{
ResourceGroupName: exampleResourceGroup.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
exampleNetworkInterface, err := network.NewNetworkInterface(ctx, "exampleNetworkInterface", &network.NetworkInterfaceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.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, "exampleLinuxVirtualMachine", &compute.LinuxVirtualMachineArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
NetworkInterfaceIds: pulumi.StringArray{
exampleNetworkInterface.ID(),
},
Size: pulumi.String("Standard_B2s"),
SourceImageReference: &compute.LinuxVirtualMachineSourceImageReferenceArgs{
Publisher: pulumi.String("Canonical"),
Offer: pulumi.String("UbuntuServer"),
Sku: pulumi.String("16.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, "exampleGlobalVMShutdownSchedule", &devtest.GlobalVMShutdownScheduleArgs{
VirtualMachineId: exampleLinuxVirtualMachine.ID(),
Location: exampleResourceGroup.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
})
}
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.addressSpaces("10.0.0.0/16")
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleNetworkInterface = new NetworkInterface("exampleNetworkInterface", NetworkInterfaceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.ipConfigurations(NetworkInterfaceIpConfigurationArgs.builder()
.name("testconfiguration1")
.subnetId(exampleSubnet.id())
.privateIpAddressAllocation("Dynamic")
.build())
.build());
var exampleLinuxVirtualMachine = new LinuxVirtualMachine("exampleLinuxVirtualMachine", LinuxVirtualMachineArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.networkInterfaceIds(exampleNetworkInterface.id())
.size("Standard_B2s")
.sourceImageReference(LinuxVirtualMachineSourceImageReferenceArgs.builder()
.publisher("Canonical")
.offer("UbuntuServer")
.sku("16.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(exampleResourceGroup.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());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("exampleVirtualNetwork",
address_spaces=["10.0.0.0/16"],
location=example_resource_group.location,
resource_group_name=example_resource_group.name)
example_subnet = azure.network.Subnet("exampleSubnet",
resource_group_name=example_resource_group.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10.0.2.0/24"])
example_network_interface = azure.network.NetworkInterface("exampleNetworkInterface",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
ip_configurations=[azure.network.NetworkInterfaceIpConfigurationArgs(
name="testconfiguration1",
subnet_id=example_subnet.id,
private_ip_address_allocation="Dynamic",
)])
example_linux_virtual_machine = azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
network_interface_ids=[example_network_interface.id],
size="Standard_B2s",
source_image_reference=azure.compute.LinuxVirtualMachineSourceImageReferenceArgs(
publisher="Canonical",
offer="UbuntuServer",
sku="16.04-LTS",
version="latest",
),
os_disk=azure.compute.LinuxVirtualMachineOsDiskArgs(
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("exampleGlobalVMShutdownSchedule",
virtual_machine_id=example_linux_virtual_machine.id,
location=example_resource_group.location,
enabled=True,
daily_recurrence_time="1100",
timezone="Pacific Standard Time",
notification_settings=azure.devtest.GlobalVMShutdownScheduleNotificationSettingsArgs(
enabled=True,
time_in_minutes=60,
webhook_url="https://sample-webhook-url.example.com",
))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("exampleVirtualNetwork", {
addressSpaces: ["10.0.0.0/16"],
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
});
const exampleSubnet = new azure.network.Subnet("exampleSubnet", {
resourceGroupName: exampleResourceGroup.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10.0.2.0/24"],
});
const exampleNetworkInterface = new azure.network.NetworkInterface("exampleNetworkInterface", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
ipConfigurations: [{
name: "testconfiguration1",
subnetId: exampleSubnet.id,
privateIpAddressAllocation: "Dynamic",
}],
});
const exampleLinuxVirtualMachine = new azure.compute.LinuxVirtualMachine("exampleLinuxVirtualMachine", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
networkInterfaceIds: [exampleNetworkInterface.id],
size: "Standard_B2s",
sourceImageReference: {
publisher: "Canonical",
offer: "UbuntuServer",
sku: "16.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("exampleGlobalVMShutdownSchedule", {
virtualMachineId: exampleLinuxVirtualMachine.id,
location: exampleResourceGroup.location,
enabled: true,
dailyRecurrenceTime: "1100",
timezone: "Pacific Standard Time",
notificationSettings: {
enabled: true,
timeInMinutes: 60,
webhookUrl: "https://sample-webhook-url.example.com",
},
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
properties:
addressSpaces:
- 10.0.0.0/16
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
exampleSubnet:
type: azure:network:Subnet
properties:
resourceGroupName: ${exampleResourceGroup.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleNetworkInterface:
type: azure:network:NetworkInterface
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
ipConfigurations:
- name: testconfiguration1
subnetId: ${exampleSubnet.id}
privateIpAddressAllocation: Dynamic
exampleLinuxVirtualMachine:
type: azure:compute:LinuxVirtualMachine
properties:
location: ${exampleResourceGroup.location}
resourceGroupName: ${exampleResourceGroup.name}
networkInterfaceIds:
- ${exampleNetworkInterface.id}
size: Standard_B2s
sourceImageReference:
publisher: Canonical
offer: UbuntuServer
sku: 16.04-LTS
version: latest
osDisk:
name: myosdisk-example
caching: ReadWrite
storageAccountType: Standard_LRS
adminUsername: testadmin
adminPassword: Password1234!
disablePasswordAuthentication: false
exampleGlobalVMShutdownSchedule:
type: azure:devtest:GlobalVMShutdownSchedule
properties:
virtualMachineId: ${exampleLinuxVirtualMachine.id}
location: ${exampleResourceGroup.location}
enabled: true
dailyRecurrenceTime: '1100'
timezone: Pacific Standard Time
notificationSettings:
enabled: true
timeInMinutes: '60'
webhookUrl: https://sample-webhook-url.example.com
Create GlobalVMShutdownSchedule Resource
new GlobalVMShutdownSchedule(name: string, args: GlobalVMShutdownScheduleArgs, opts?: CustomResourceOptions);
@overload
def GlobalVMShutdownSchedule(resource_name: 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)
@overload
def GlobalVMShutdownSchedule(resource_name: str,
args: GlobalVMShutdownScheduleArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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 Args The notification setting of a schedule. A
notification_settings
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
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 Args The notification setting of a schedule. A
notification_settings
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 Args The notification setting of a schedule. A
notification_settings
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
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
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 Args The notification setting of a schedule. A
notification_settings
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
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 Args The notification setting of a schedule. A
notification_settings
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 Args The notification setting of a schedule. A
notification_settings
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
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
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
- 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
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.