summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHentioe <me@bluerain.io>2020-11-26 16:03:13 +0800
committerHentioe <me@bluerain.io>2020-11-26 16:03:13 +0800
commitb8d1477c565465db8077f916ba5a5beaf01ca8d3 (patch)
tree60d19ec2b56e1ac58525d09978087f284229633b
parentAdd ssh related APIs (diff)
Added models for creating virtual machines
-rw-r--r--lib/azure_ex/model/virtual_machines/create_or_update.ex29
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/azure_ex/model/virtual_machines/create_or_update.ex b/lib/azure_ex/model/virtual_machines/create_or_update.ex
index e719c0d..937300b 100644
--- a/lib/azure_ex/model/virtual_machines/create_or_update.ex
+++ b/lib/azure_ex/model/virtual_machines/create_or_update.ex
@@ -3,7 +3,14 @@ defmodule AzureEx.Model.VirtualMachines.CreateOrUpdate do
use TypedStruct
- alias __MODULE__.{Properties, NetworkInterfaceReference, StorageProfile}
+ alias __MODULE__.{
+ Properties,
+ NetworkInterfaceReference,
+ StorageProfile,
+ LinuxConfiguration,
+ SshConfiguration,
+ SshPublicKey
+ }
typedstruct module: HardwareProfile do
@derive Jason.Encoder
@@ -38,12 +45,32 @@ defmodule AzureEx.Model.VirtualMachines.CreateOrUpdate do
field :networkInterfaces, [NetworkInterfaceReference.t()]
end
+ typedstruct module: SshPublicKey do
+ @derive Jason.Encoder
+
+ field :path, String.t()
+ field :keyData, String.t()
+ end
+
+ typedstruct module: SshConfiguration do
+ @derive Jason.Encoder
+
+ field :publicKeys, [SshPublicKey.t()]
+ end
+
+ typedstruct module: LinuxConfiguration do
+ @derive Jason.Encoder
+
+ field :ssh, SshConfiguration.t()
+ end
+
typedstruct module: OSProfile do
@derive Jason.Encoder
field :adminPassword, String.t()
field :adminUsername, String.t()
field :computerName, String.t()
+ field :linuxConfiguration, LinuxConfiguration.t()
end
typedstruct module: Properties do