summaryrefslogtreecommitdiff
path: root/lib/azure_ex.ex
diff options
context:
space:
mode:
authorHentioe <me@bluerain.io>2020-10-28 09:18:24 +0800
committerHentioe <me@bluerain.io>2020-10-28 09:18:24 +0800
commit00b3806ee6f8aa85910fa4e640c895a1c70f6569 (patch)
tree32a9fa7828d4f32e2bd6f9b8882854a043be006a /lib/azure_ex.ex
parentAdd helper functions (diff)
Simplify the calling process
Diffstat (limited to 'lib/azure_ex.ex')
-rw-r--r--lib/azure_ex.ex22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/azure_ex.ex b/lib/azure_ex.ex
index 36dea15..7dce3c9 100644
--- a/lib/azure_ex.ex
+++ b/lib/azure_ex.ex
@@ -3,16 +3,18 @@ defmodule AzureEx do
Documentation for `AzureEx`.
"""
- @doc """
- Hello world.
+ require AzureEx.DSL
+ import AzureEx.DSL
- ## Examples
+ defendpoint(
+ "ListAllVirtualMachines",
+ "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines",
+ {:get, "2020-06-01"}
+ )
- iex> AzureEx.hello()
- :world
-
- """
- def hello do
- :world
- end
+ defendpoint(
+ "GetNetworkInterface",
+ "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}",
+ {:get, "2020-06-01"}
+ )
end