diff --git a/templates/cosmos-send-query-result.json b/templates/cosmos-send-query-result.json
index 6642f9a..03b8397 100644
--- a/templates/cosmos-send-query-result.json
+++ b/templates/cosmos-send-query-result.json
@@ -79,7 +79,7 @@
}
},
"TimeZone": {
- "defaultValue": "Pacific Standard Time",
+ "defaultValue": "UTC",
"allowedValues": [
"Dateline Standard Time",
"UTC-11",
diff --git a/templates/power-off-vm.json b/templates/power-off-vm.json
deleted file mode 100644
index ff1ea63..0000000
--- a/templates/power-off-vm.json
+++ /dev/null
@@ -1,381 +0,0 @@
-{
- "id": "PowerOff_VM",
- "description": "Stop VM at a scheduled time of the day",
- "title": "Power off Virtual Machine",
- "iconType": "ScheduledTask",
- "data": {
- "definition": {
- "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
- "actions": {
- "Condition_VM_State_Check": {
- "actions": {
- "Condition_2": {
- "actions": {
- "Send_an_email_(V2)_2": {
- "inputs": {
- "body": {
- "Body": "
SUCCESS
\n
\nStatus: @{body('Get_virtual_machine')?['properties']?['provisioningState']}
",
- "Subject": "Your automation task sucessfully stopped virtual machine @{body('Get_virtual_machine')?['name']}",
- "To": "@parameters('EmailID')"
- },
- "host": {
- "connection": {
- "name": "@parameters('$connections')['office365']['connectionId']"
- }
- },
- "method": "post",
- "path": "/v2/Mail"
- },
- "runAfter": {},
- "type": "ApiConnection"
- }
- },
- "else": {
- "actions": {
- "Send_an_email_(V2)": {
- "inputs": {
- "body": {
- "Body": "FAILED
\n
\nStatus: @{body('Get_virtual_machine')?['properties']?['provisioningState']}
",
- "Subject": "Your automation task failed to stop virtual machine @{body('Get_virtual_machine')?['name']}",
- "To": "@parameters('EmailID')"
- },
- "host": {
- "connection": {
- "name": "@parameters('$connections')['office365']['connectionId']"
- }
- },
- "method": "post",
- "path": "/v2/Mail"
- },
- "runAfter": {},
- "type": "ApiConnection"
- }
- }
- },
- "expression": {
- "and": [
- {
- "equals": [
- "@body('Get_virtual_machine')?['properties']?['provisioningState']",
- "Succeeded"
- ]
- }
- ]
- },
- "runAfter": {},
- "type": "If"
- }
- },
- "expression": {
- "and": [
- {
- "equals": [
- "@parameters('Notify')",
- true
- ]
- }
- ]
- },
- "runAfter": {
- "Get_virtual_machine": [
- "Succeeded"
- ]
- },
- "type": "If"
- },
- "Get_virtual_machine": {
- "inputs": {
- "host": {
- "connection": {
- "name": "@parameters('$connections')['azurevm']['connectionId']"
- }
- },
- "method": "get",
- "path": "/subscriptions/@{encodeURIComponent(parameters('SubscriptionId'))}/resourcegroups/@{encodeURIComponent(parameters('ResourceGroup'))}/providers/Microsoft.Compute/virtualMachines/@{encodeURIComponent(parameters('ResourceVM'))}",
- "queries": {
- "api-version": "2019-12-01"
- }
- },
- "runAfter": {
- "Power_off_virtual_machine": [
- "Succeeded",
- "Failed"
- ]
- },
- "type": "ApiConnection"
- },
- "Power_off_virtual_machine": {
- "inputs": {
- "host": {
- "connection": {
- "name": "@parameters('$connections')['azurevm']['connectionId']"
- }
- },
- "method": "post",
- "path": "/subscriptions/@{encodeURIComponent(parameters('SubscriptionId'))}/resourcegroups/@{encodeURIComponent(parameters('ResourceGroup'))}/providers/Microsoft.Compute/virtualMachines/@{encodeURIComponent(parameters('ResourceVM'))}/powerOff",
- "queries": {
- "api-version": "2019-12-01"
- }
- },
- "runAfter": {},
- "type": "ApiConnection"
- }
- },
- "contentVersion": "1.0.0.0",
- "outputs": {},
- "parameters": {
- "$connections": {
- "defaultValue": {},
- "type": "Object"
- },
- "ResourceGroup": {
- "type": "String",
- "metadata": {
- "sourceParameter": "resourceGroup",
- "isLinkedResource": true
- }
- },
- "ResourceVM": {
- "type": "String",
- "metadata": {
- "sourceParameter": "name",
- "isLinkedResource": true
- }
- },
- "SubscriptionId": {
- "type": "String",
- "metadata": {
- "isLinkedResource": true,
- "sourceParameter": "subscriptionId"
- }
- },
- "StopTime": {
- "type": "String",
- "metadata": {
- "displayName": "Stop Time",
- "required": true,
- "format": "timeFormat",
- "description": "Select start time to Power On Virtual Machine"
- }
- },
- "TimeZone": {
- "defaultValue": "Pacific Standard Time",
- "allowedValues": [
- "Dateline Standard Time",
- "UTC-11",
- "Aleutian Standard Time",
- "Hawaiian Standard Time",
- "Marquesas Standard Time",
- "Alaskan Standard Time",
- "UTC-09",
- "Pacific Standard Time (Mexico)",
- "UTC-08",
- "Pacific Standard Time",
- "US Mountain Standard Time",
- "Mountain Standard Time (Mexico)",
- "Mountain Standard Time",
- "Central America Standard Time",
- "Central Standard Time",
- "Easter Island Standard Time",
- "Central Standard Time (Mexico)",
- "Canada Central Standard Time",
- "SA Pacific Standard Time",
- "Eastern Standard Time (Mexico)",
- "Eastern Standard Time",
- "Haiti Standard Time",
- "Cuba Standard Time",
- "US Eastern Standard Time",
- "Paraguay Standard Time",
- "Atlantic Standard Time",
- "Venezuela Standard Time",
- "Central Brazilian Standard Time",
- "SA Western Standard Time",
- "Pacific SA Standard Time",
- "Turks And Caicos Standard Time",
- "Newfoundland Standard Time",
- "Tocantins Standard Time",
- "E. South America Standard Time",
- "SA Eastern Standard Time",
- "Argentina Standard Time",
- "Greenland Standard Time",
- "Montevideo Standard Time",
- "Saint Pierre Standard Time",
- "Bahia Standard Time",
- "UTC-02",
- "Mid-Atlantic Standard Time",
- "Azores Standard Time",
- "Cape Verde Standard Time",
- "UTC",
- "Morocco Standard Time",
- "GMT Standard Time",
- "Greenwich Standard Time",
- "W. Europe Standard Time",
- "Central Europe Standard Time",
- "Romance Standard Time",
- "Central European Standard Time",
- "W. Central Africa Standard Time",
- "Namibia Standard Time",
- "Jordan Standard Time",
- "GTB Standard Time",
- "Middle East Standard Time",
- "Egypt Standard Time",
- "E. Europe Standard Time",
- "Syria Standard Time",
- "West Bank Standard Time",
- "South Africa Standard Time",
- "FLE Standard Time",
- "Turkey Standard Time",
- "Israel Standard Time",
- "Kaliningrad Standard Time",
- "Libya Standard Time",
- "Arabic Standard Time",
- "Arab Standard Time",
- "Belarus Standard Time",
- "Russian Standard Time",
- "E. Africa Standard Time",
- "Iran Standard Time",
- "Arabian Standard Time",
- "Astrakhan Standard Time",
- "Azerbaijan Standard Time",
- "Russia Time Zone 3",
- "Mauritius Standard Time",
- "Georgian Standard Time",
- "Caucasus Standard Time",
- "Afghanistan Standard Time",
- "West Asia Standard Time",
- "Ekaterinburg Standard Time",
- "Pakistan Standard Time",
- "India Standard Time",
- "Sri Lanka Standard Time",
- "Nepal Standard Time",
- "Central Asia Standard Time",
- "Bangladesh Standard Time",
- "N. Central Asia Standard Time",
- "Myanmar Standard Time",
- "SE Asia Standard Time",
- "Altai Standard Time",
- "W. Mongolia Standard Time",
- "North Asia Standard Time",
- "Tomsk Standard Time",
- "China Standard Time",
- "North Asia East Standard Time",
- "Singapore Standard Time",
- "W. Australia Standard Time",
- "Taipei Standard Time",
- "Ulaanbaatar Standard Time",
- "North Korea Standard Time",
- "Aus Central W. Standard Time",
- "Transbaikal Standard Time",
- "Tokyo Standard Time",
- "Korea Standard Time",
- "Yakutsk Standard Time",
- "Cen. Australia Standard Time",
- "AUS Central Standard Time",
- "E. Australia Standard Time",
- "AUS Eastern Standard Time",
- "West Pacific Standard Time",
- "Tasmania Standard Time",
- "Vladivostok Standard Time",
- "Lord Howe Standard Time",
- "Bougainville Standard Time",
- "Russia Time Zone 10",
- "Magadan Standard Time",
- "Norfolk Standard Time",
- "Sakhalin Standard Time",
- "Central Pacific Standard Time",
- "Russia Time Zone 11",
- "New Zealand Standard Time",
- "UTC+12",
- "Fiji Standard Time",
- "Kamchatka Standard Time",
- "Chatham Islands Standard Time",
- "Tonga Standard Time",
- "Samoa Standard Time",
- "Line Islands Standard Time"
- ],
- "type": "String",
- "metadata": {
- "displayName": "Timezone",
- "placeholder": "Start VM at this specific time zone",
- "description": "Select time zone for task schedule",
- "required": true
- }
- },
- "Interval": {
- "defaultValue": 1,
- "type": "Int",
- "metadata": {
- "displayName": "Interval",
- "description": "Time interval for recurrence",
- "required": true,
- "format": "number"
- }
- },
- "Frequency": {
- "defaultValue": "Day",
- "allowedValues": [
- "Month",
- "Week",
- "Day",
- "Hour",
- "Minute",
- "Seconds"
- ],
- "type": "String",
- "metadata": {
- "displayName": "Frequency",
- "placeholder": "How often does schedule run",
- "description": "How often should schedule run. i.e. Weekly",
- "required": true
- }
- },
- "Notify": {
- "type": "bool",
- "metadata": {
- "displayName": "Notify Me",
- "description": "Notify me about task status",
- "format": "notifier",
- "required": false
- }
- },
- "EmailID": {
- "defaultValue": "user@microsoft.com",
- "type": "String",
- "metadata": {
- "displayName": "Enter email",
- "description": "Notification to be sent to email",
- "required": false
- }
- }
- },
- "triggers": {
- "Recurrence": {
- "recurrence": {
- "frequency": "@parameters('Frequency')",
- "interval": "@parameters('Interval')",
- "startTime": "@formatDateTime(parameters('stopTime'), 'yyyy-MM-ddTHH:mm:ssZ')",
- "timeZone": "@parameters('TimeZone')"
- },
- "type": "Recurrence"
- }
- }
- },
- "parameters": {
- "$connections": {
- "value": {
- "azurevm": {
- "connectionId": "",
- "connectionName": "",
- "id": "/subscriptions/0b854b36-e5d4-4fe3-b757-dffec372e58f/providers/Microsoft.Web/locations/eastus/managedApis/azurevm"
- },
- "office365": {
- "connectionId": "",
- "connectionName": "",
- "id": "/subscriptions/0b854b36-e5d4-4fe3-b757-dffec372e58f/providers/Microsoft.Web/locations/westeurope/managedApis/office365"
- }
- }
- }
- }
- },
- "supportedResources": ["Microsoft.Compute/virtualMachines"]
-}
diff --git a/templates/poweroff-vm-new.json b/templates/poweroff-vm-new.json
index 2c8e317..b42187f 100644
--- a/templates/poweroff-vm-new.json
+++ b/templates/poweroff-vm-new.json
@@ -140,7 +140,7 @@
}
},
"TimeZone": {
- "defaultValue": "Pacific Standard Time",
+ "defaultValue": "UTC",
"allowedValues": [
"Dateline Standard Time",
"UTC-11",
diff --git a/templates/start-vm-new.json b/templates/start-vm-new.json
index d88b0f8..633edc1 100644
--- a/templates/start-vm-new.json
+++ b/templates/start-vm-new.json
@@ -140,7 +140,7 @@
}
},
"TimeZone": {
- "defaultValue": "Pacific Standard Time",
+ "defaultValue": "UTC",
"allowedValues": [
"Dateline Standard Time",
"UTC-11",
diff --git a/templates/start-vm.json b/templates/start-vm.json
deleted file mode 100644
index faefde0..0000000
--- a/templates/start-vm.json
+++ /dev/null
@@ -1,381 +0,0 @@
-{
- "id": "Start_VM",
- "description": "Start VM at a scheduled time of the day",
- "title": "Start Virtual Machine",
- "iconType": "ScheduledTask",
- "data": {
- "definition": {
- "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
- "actions": {
- "Condition_VM_State_Check": {
- "actions": {
- "Condition_2": {
- "actions": {
- "Send_an_email_(V2)_2": {
- "inputs": {
- "body": {
- "Body": "SUCCESS
\n
\nStatus: @{body('Get_virtual_machine')?['properties']?['provisioningState']}
",
- "Subject": "Your automation task successfully started virtual machine @{body('Get_virtual_machine')?['name']}",
- "To": "@parameters('EmailID')"
- },
- "host": {
- "connection": {
- "name": "@parameters('$connections')['office365']['connectionId']"
- }
- },
- "method": "post",
- "path": "/v2/Mail"
- },
- "runAfter": {},
- "type": "ApiConnection"
- }
- },
- "else": {
- "actions": {
- "Send_an_email_(V2)": {
- "inputs": {
- "body": {
- "Body": "FAILED
\n
\nStatus: @{body('Get_virtual_machine')?['properties']?['provisioningState']}
",
- "Subject": "Your automation task failed to start virtual machine @{body('Get_virtual_machine')?['name']}",
- "To": "@parameters('EmailID')"
- },
- "host": {
- "connection": {
- "name": "@parameters('$connections')['office365']['connectionId']"
- }
- },
- "method": "post",
- "path": "/v2/Mail"
- },
- "runAfter": {},
- "type": "ApiConnection"
- }
- }
- },
- "expression": {
- "and": [
- {
- "equals": [
- "@body('Get_virtual_machine')?['properties']?['provisioningState']",
- "Succeeded"
- ]
- }
- ]
- },
- "runAfter": {},
- "type": "If"
- }
- },
- "expression": {
- "and": [
- {
- "equals": [
- "@parameters('Notify')",
- true
- ]
- }
- ]
- },
- "runAfter": {
- "Get_virtual_machine": [
- "Succeeded"
- ]
- },
- "type": "If"
- },
- "Get_virtual_machine": {
- "inputs": {
- "host": {
- "connection": {
- "name": "@parameters('$connections')['azurevm']['connectionId']"
- }
- },
- "method": "get",
- "path": "/subscriptions/@{encodeURIComponent(parameters('SubscriptionId'))}/resourcegroups/@{encodeURIComponent(parameters('ResourceGroup'))}/providers/Microsoft.Compute/virtualMachines/@{encodeURIComponent(parameters('ResourceVM'))}",
- "queries": {
- "api-version": "2019-12-01"
- }
- },
- "runAfter": {
- "Start_virtual_machine": [
- "Succeeded",
- "Failed"
- ]
- },
- "type": "ApiConnection"
- },
- "Start_virtual_machine": {
- "inputs": {
- "host": {
- "connection": {
- "name": "@parameters('$connections')['azurevm']['connectionId']"
- }
- },
- "method": "post",
- "path": "/subscriptions/@{encodeURIComponent(parameters('SubscriptionId'))}/resourcegroups/@{encodeURIComponent(parameters('ResourceGroup'))}/providers/Microsoft.Compute/virtualMachines/@{encodeURIComponent(parameters('ResourceVM'))}/start",
- "queries": {
- "api-version": "2019-12-01"
- }
- },
- "runAfter": {},
- "type": "ApiConnection"
- }
- },
- "contentVersion": "1.0.0.0",
- "outputs": {},
- "parameters": {
- "$connections": {
- "defaultValue": {},
- "type": "Object"
- },
- "ResourceGroup": {
- "type": "String",
- "metadata": {
- "sourceParameter": "resourceGroup",
- "isLinkedResource": true
- }
- },
- "ResourceVM": {
- "type": "String",
- "metadata": {
- "sourceParameter": "name",
- "isLinkedResource": true
- }
- },
- "SubscriptionId": {
- "type": "String",
- "metadata": {
- "isLinkedResource": true,
- "sourceParameter": "subscriptionId"
- }
- },
- "StartTime": {
- "type": "String",
- "metadata": {
- "required": true,
- "displayName": "Start Time",
- "format": "timeFormat",
- "description": "Select start time to Power On Virtual Machine"
- }
- },
- "TimeZone": {
- "defaultValue": "Pacific Standard Time",
- "allowedValues": [
- "Dateline Standard Time",
- "UTC-11",
- "Aleutian Standard Time",
- "Hawaiian Standard Time",
- "Marquesas Standard Time",
- "Alaskan Standard Time",
- "UTC-09",
- "Pacific Standard Time (Mexico)",
- "UTC-08",
- "Pacific Standard Time",
- "US Mountain Standard Time",
- "Mountain Standard Time (Mexico)",
- "Mountain Standard Time",
- "Central America Standard Time",
- "Central Standard Time",
- "Easter Island Standard Time",
- "Central Standard Time (Mexico)",
- "Canada Central Standard Time",
- "SA Pacific Standard Time",
- "Eastern Standard Time (Mexico)",
- "Eastern Standard Time",
- "Haiti Standard Time",
- "Cuba Standard Time",
- "US Eastern Standard Time",
- "Paraguay Standard Time",
- "Atlantic Standard Time",
- "Venezuela Standard Time",
- "Central Brazilian Standard Time",
- "SA Western Standard Time",
- "Pacific SA Standard Time",
- "Turks And Caicos Standard Time",
- "Newfoundland Standard Time",
- "Tocantins Standard Time",
- "E. South America Standard Time",
- "SA Eastern Standard Time",
- "Argentina Standard Time",
- "Greenland Standard Time",
- "Montevideo Standard Time",
- "Saint Pierre Standard Time",
- "Bahia Standard Time",
- "UTC-02",
- "Mid-Atlantic Standard Time",
- "Azores Standard Time",
- "Cape Verde Standard Time",
- "UTC",
- "Morocco Standard Time",
- "GMT Standard Time",
- "Greenwich Standard Time",
- "W. Europe Standard Time",
- "Central Europe Standard Time",
- "Romance Standard Time",
- "Central European Standard Time",
- "W. Central Africa Standard Time",
- "Namibia Standard Time",
- "Jordan Standard Time",
- "GTB Standard Time",
- "Middle East Standard Time",
- "Egypt Standard Time",
- "E. Europe Standard Time",
- "Syria Standard Time",
- "West Bank Standard Time",
- "South Africa Standard Time",
- "FLE Standard Time",
- "Turkey Standard Time",
- "Israel Standard Time",
- "Kaliningrad Standard Time",
- "Libya Standard Time",
- "Arabic Standard Time",
- "Arab Standard Time",
- "Belarus Standard Time",
- "Russian Standard Time",
- "E. Africa Standard Time",
- "Iran Standard Time",
- "Arabian Standard Time",
- "Astrakhan Standard Time",
- "Azerbaijan Standard Time",
- "Russia Time Zone 3",
- "Mauritius Standard Time",
- "Georgian Standard Time",
- "Caucasus Standard Time",
- "Afghanistan Standard Time",
- "West Asia Standard Time",
- "Ekaterinburg Standard Time",
- "Pakistan Standard Time",
- "India Standard Time",
- "Sri Lanka Standard Time",
- "Nepal Standard Time",
- "Central Asia Standard Time",
- "Bangladesh Standard Time",
- "N. Central Asia Standard Time",
- "Myanmar Standard Time",
- "SE Asia Standard Time",
- "Altai Standard Time",
- "W. Mongolia Standard Time",
- "North Asia Standard Time",
- "Tomsk Standard Time",
- "China Standard Time",
- "North Asia East Standard Time",
- "Singapore Standard Time",
- "W. Australia Standard Time",
- "Taipei Standard Time",
- "Ulaanbaatar Standard Time",
- "North Korea Standard Time",
- "Aus Central W. Standard Time",
- "Transbaikal Standard Time",
- "Tokyo Standard Time",
- "Korea Standard Time",
- "Yakutsk Standard Time",
- "Cen. Australia Standard Time",
- "AUS Central Standard Time",
- "E. Australia Standard Time",
- "AUS Eastern Standard Time",
- "West Pacific Standard Time",
- "Tasmania Standard Time",
- "Vladivostok Standard Time",
- "Lord Howe Standard Time",
- "Bougainville Standard Time",
- "Russia Time Zone 10",
- "Magadan Standard Time",
- "Norfolk Standard Time",
- "Sakhalin Standard Time",
- "Central Pacific Standard Time",
- "Russia Time Zone 11",
- "New Zealand Standard Time",
- "UTC+12",
- "Fiji Standard Time",
- "Kamchatka Standard Time",
- "Chatham Islands Standard Time",
- "Tonga Standard Time",
- "Samoa Standard Time",
- "Line Islands Standard Time"
- ],
- "type": "String",
- "metadata": {
- "displayName": "Timezone",
- "placeholder": "Start VM at this specific time zone",
- "description": "Select time zone for task schedule",
- "required": true
- }
- },
- "Interval": {
- "defaultValue": 1,
- "type": "Int",
- "metadata": {
- "displayName": "Interval",
- "description": "Time Interval for recurring",
- "required": true,
- "format": "number"
- }
- },
- "Frequency": {
- "defaultValue": "Day",
- "allowedValues": [
- "Month",
- "Week",
- "Day",
- "Hour",
- "Minute",
- "Seconds"
- ],
- "type": "String",
- "metadata": {
- "displayName": "Frequency",
- "placeholder": "How often does schedule run",
- "description": "How often should schedule run. i.e. Weekly",
- "required": true
- }
- },
- "Notify": {
- "type": "bool",
- "metadata": {
- "displayName": "Notify Me",
- "description": "Notify me about task status",
- "format": "notifier",
- "required": false
- }
- },
- "EmailID": {
- "defaultValue": "",
- "type": "String",
- "metadata": {
- "displayName": "Enter email",
- "description": "Notification to be sent to email",
- "required": false
- }
- }
- },
- "triggers": {
- "Recurrence": {
- "recurrence": {
- "frequency": "@parameters('Frequency')",
- "interval": "@parameters('Interval')",
- "startTime": "@formatDateTime(string(parameters('StartTime')), 'yyyy-MM-ddTHH:mm:ssZ')",
- "timeZone": "@parameters('TimeZone')"
- },
- "type": "Recurrence"
- }
- }
- },
- "parameters": {
- "$connections": {
- "value": {
- "azurevm": {
- "connectionId": "",
- "connectionName": "",
- "id": "/subscriptions/0b854b36-e5d4-4fe3-b757-dffec372e58f/providers/Microsoft.Web/locations/eastus/managedApis/azurevm"
- },
- "office365": {
- "connectionId": "",
- "connectionName": "",
- "id": "/subscriptions/0b854b36-e5d4-4fe3-b757-dffec372e58f/providers/Microsoft.Web/locations/westeurope/managedApis/office365"
- }
- }
- }
- }
- },
- "supportedResources": ["Microsoft.Compute/virtualMachines"]
-}