summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHentioe <me@bluerain.io>2020-10-28 11:29:20 +0800
committerHentioe <me@bluerain.io>2020-10-28 11:29:20 +0800
commit1b6a56b61e7900006c6285e625e8e6c9cfc21f14 (patch)
tree3aff15838aeeb31f94d58380f4ab0abdc8a9c3df
parentOptimize DSL (diff)
Add start/restart virtual machines APIs
-rw-r--r--lib/azure_ex.ex10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/azure_ex.ex b/lib/azure_ex.ex
index d8fa55d..a752828 100644
--- a/lib/azure_ex.ex
+++ b/lib/azure_ex.ex
@@ -20,4 +20,14 @@ defmodule AzureEx do
"PowerOffVirtualMachines",
"POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff?api-version=2020-06-01"
)
+
+ defendpoint(
+ "StartVirtualMachines",
+ "POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start?api-version=2020-06-01"
+ )
+
+ defendpoint(
+ "RestartVirtualMachines",
+ "POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart?api-version=2020-06-01"
+ )
end