PageRenderTime 66ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/sdk/compute/mgmt/src/main/java/com/azure/management/compute/VirtualMachineScaleSetOSProfile.java

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 299 lines | 70 code | 23 blank | 206 comment | 0 complexity | 1da1085d04c85797f1d62ecf908d0bc5 MD5 | raw file
Possible License(s): MIT
  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. // Code generated by Microsoft (R) AutoRest Code Generator.
  4. package com.azure.management.compute;
  5. import com.azure.core.annotation.Fluent;
  6. import com.fasterxml.jackson.annotation.JsonProperty;
  7. import java.util.List;
  8. /** The VirtualMachineScaleSetOSProfile model. */
  9. @Fluent
  10. public final class VirtualMachineScaleSetOSProfile {
  11. /*
  12. * Specifies the computer name prefix for all of the virtual machines in
  13. * the scale set. Computer name prefixes must be 1 to 15 characters long.
  14. */
  15. @JsonProperty(value = "computerNamePrefix")
  16. private String computerNamePrefix;
  17. /*
  18. * Specifies the name of the administrator account. <br><br> **Windows-only
  19. * restriction:** Cannot end in "." <br><br> **Disallowed values:**
  20. * "administrator", "admin", "user", "user1", "test", "user2", "test1",
  21. * "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2",
  22. * "aspnet", "backup", "console", "david", "guest", "john", "owner",
  23. * "root", "server", "sql", "support", "support_388945a0", "sys", "test2",
  24. * "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1
  25. * character <br><br> **Max-length (Linux):** 64 characters <br><br>
  26. * **Max-length (Windows):** 20 characters <br><br><li> For root access to
  27. * the Linux VM, see [Using root privileges on Linux virtual machines in
  28. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li>
  29. * For a list of built-in system users on Linux that should not be used in
  30. * this field, see [Selecting User Names for Linux on
  31. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  32. */
  33. @JsonProperty(value = "adminUsername")
  34. private String adminUsername;
  35. /*
  36. * Specifies the password of the administrator account. <br><br>
  37. * **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length
  38. * (Linux):** 6 characters <br><br> **Max-length (Windows):** 123
  39. * characters <br><br> **Max-length (Linux):** 72 characters <br><br>
  40. * **Complexity requirements:** 3 out of 4 conditions below need to be
  41. * fulfilled <br> Has lower characters <br>Has upper characters <br> Has a
  42. * digit <br> Has a special character (Regex match [\W_]) <br><br>
  43. * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123",
  44. * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
  45. * "iloveyou!" <br><br> For resetting the password, see [How to reset the
  46. * Remote Desktop service or its login password in a Windows
  47. * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
  48. * <br><br> For resetting root password, see [Manage users, SSH, and check
  49. * or repair disks on Azure Linux VMs using the VMAccess
  50. * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
  51. */
  52. @JsonProperty(value = "adminPassword")
  53. private String adminPassword;
  54. /*
  55. * Specifies a base-64 encoded string of custom data. The base-64 encoded
  56. * string is decoded to a binary array that is saved as a file on the
  57. * Virtual Machine. The maximum length of the binary array is 65535 bytes.
  58. * <br><br> For using cloud-init for your VM, see [Using cloud-init to
  59. * customize a Linux VM during
  60. * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  61. */
  62. @JsonProperty(value = "customData")
  63. private String customData;
  64. /*
  65. * Specifies Windows operating system settings on the virtual machine.
  66. */
  67. @JsonProperty(value = "windowsConfiguration")
  68. private WindowsConfiguration windowsConfiguration;
  69. /*
  70. * Specifies the Linux operating system settings on the virtual machine.
  71. * <br><br>For a list of supported Linux distributions, see [Linux on
  72. * Azure-Endorsed
  73. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  74. * <br><br> For running non-endorsed distributions, see [Information for
  75. * Non-Endorsed
  76. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  77. */
  78. @JsonProperty(value = "linuxConfiguration")
  79. private LinuxConfiguration linuxConfiguration;
  80. /*
  81. * Specifies set of certificates that should be installed onto the virtual
  82. * machines in the scale set.
  83. */
  84. @JsonProperty(value = "secrets")
  85. private List<VaultSecretGroup> secrets;
  86. /**
  87. * Get the computerNamePrefix property: Specifies the computer name prefix for all of the virtual machines in the
  88. * scale set. Computer name prefixes must be 1 to 15 characters long.
  89. *
  90. * @return the computerNamePrefix value.
  91. */
  92. public String computerNamePrefix() {
  93. return this.computerNamePrefix;
  94. }
  95. /**
  96. * Set the computerNamePrefix property: Specifies the computer name prefix for all of the virtual machines in the
  97. * scale set. Computer name prefixes must be 1 to 15 characters long.
  98. *
  99. * @param computerNamePrefix the computerNamePrefix value to set.
  100. * @return the VirtualMachineScaleSetOSProfile object itself.
  101. */
  102. public VirtualMachineScaleSetOSProfile withComputerNamePrefix(String computerNamePrefix) {
  103. this.computerNamePrefix = computerNamePrefix;
  104. return this;
  105. }
  106. /**
  107. * Get the adminUsername property: Specifies the name of the administrator account. &lt;br&gt;&lt;br&gt;
  108. * **Windows-only restriction:** Cannot end in "." &lt;br&gt;&lt;br&gt; **Disallowed values:** "administrator",
  109. * "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
  110. * "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support",
  111. * "support_388945a0", "sys", "test2", "test3", "user4", "user5". &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 1
  112. * character &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 64 characters &lt;br&gt;&lt;br&gt; **Max-length
  113. * (Windows):** 20 characters &lt;br&gt;&lt;br&gt;&lt;li&gt; For root access to the Linux VM, see [Using root
  114. * privileges on Linux virtual machines in
  115. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)&lt;br&gt;&lt;li&gt;
  116. * For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for
  117. * Linux on
  118. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  119. *
  120. * @return the adminUsername value.
  121. */
  122. public String adminUsername() {
  123. return this.adminUsername;
  124. }
  125. /**
  126. * Set the adminUsername property: Specifies the name of the administrator account. &lt;br&gt;&lt;br&gt;
  127. * **Windows-only restriction:** Cannot end in "." &lt;br&gt;&lt;br&gt; **Disallowed values:** "administrator",
  128. * "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
  129. * "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support",
  130. * "support_388945a0", "sys", "test2", "test3", "user4", "user5". &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 1
  131. * character &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 64 characters &lt;br&gt;&lt;br&gt; **Max-length
  132. * (Windows):** 20 characters &lt;br&gt;&lt;br&gt;&lt;li&gt; For root access to the Linux VM, see [Using root
  133. * privileges on Linux virtual machines in
  134. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)&lt;br&gt;&lt;li&gt;
  135. * For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for
  136. * Linux on
  137. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  138. *
  139. * @param adminUsername the adminUsername value to set.
  140. * @return the VirtualMachineScaleSetOSProfile object itself.
  141. */
  142. public VirtualMachineScaleSetOSProfile withAdminUsername(String adminUsername) {
  143. this.adminUsername = adminUsername;
  144. return this;
  145. }
  146. /**
  147. * Get the adminPassword property: Specifies the password of the administrator account. &lt;br&gt;&lt;br&gt;
  148. * **Minimum-length (Windows):** 8 characters &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 6 characters
  149. * &lt;br&gt;&lt;br&gt; **Max-length (Windows):** 123 characters &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 72
  150. * characters &lt;br&gt;&lt;br&gt; **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
  151. * &lt;br&gt; Has lower characters &lt;br&gt;Has upper characters &lt;br&gt; Has a digit &lt;br&gt; Has a special
  152. * character (Regex match [\W_]) &lt;br&gt;&lt;br&gt; **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd",
  153. * "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" &lt;br&gt;&lt;br&gt;
  154. * For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows
  155. * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
  156. * &lt;br&gt;&lt;br&gt; For resetting root password, see [Manage users, SSH, and check or repair disks on Azure
  157. * Linux VMs using the VMAccess
  158. * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password).
  159. *
  160. * @return the adminPassword value.
  161. */
  162. public String adminPassword() {
  163. return this.adminPassword;
  164. }
  165. /**
  166. * Set the adminPassword property: Specifies the password of the administrator account. &lt;br&gt;&lt;br&gt;
  167. * **Minimum-length (Windows):** 8 characters &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 6 characters
  168. * &lt;br&gt;&lt;br&gt; **Max-length (Windows):** 123 characters &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 72
  169. * characters &lt;br&gt;&lt;br&gt; **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
  170. * &lt;br&gt; Has lower characters &lt;br&gt;Has upper characters &lt;br&gt; Has a digit &lt;br&gt; Has a special
  171. * character (Regex match [\W_]) &lt;br&gt;&lt;br&gt; **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd",
  172. * "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" &lt;br&gt;&lt;br&gt;
  173. * For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows
  174. * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
  175. * &lt;br&gt;&lt;br&gt; For resetting root password, see [Manage users, SSH, and check or repair disks on Azure
  176. * Linux VMs using the VMAccess
  177. * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password).
  178. *
  179. * @param adminPassword the adminPassword value to set.
  180. * @return the VirtualMachineScaleSetOSProfile object itself.
  181. */
  182. public VirtualMachineScaleSetOSProfile withAdminPassword(String adminPassword) {
  183. this.adminPassword = adminPassword;
  184. return this;
  185. }
  186. /**
  187. * Get the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is
  188. * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array
  189. * is 65535 bytes. &lt;br&gt;&lt;br&gt; For using cloud-init for your VM, see [Using cloud-init to customize a Linux
  190. * VM during
  191. * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  192. *
  193. * @return the customData value.
  194. */
  195. public String customData() {
  196. return this.customData;
  197. }
  198. /**
  199. * Set the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is
  200. * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array
  201. * is 65535 bytes. &lt;br&gt;&lt;br&gt; For using cloud-init for your VM, see [Using cloud-init to customize a Linux
  202. * VM during
  203. * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  204. *
  205. * @param customData the customData value to set.
  206. * @return the VirtualMachineScaleSetOSProfile object itself.
  207. */
  208. public VirtualMachineScaleSetOSProfile withCustomData(String customData) {
  209. this.customData = customData;
  210. return this;
  211. }
  212. /**
  213. * Get the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine.
  214. *
  215. * @return the windowsConfiguration value.
  216. */
  217. public WindowsConfiguration windowsConfiguration() {
  218. return this.windowsConfiguration;
  219. }
  220. /**
  221. * Set the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine.
  222. *
  223. * @param windowsConfiguration the windowsConfiguration value to set.
  224. * @return the VirtualMachineScaleSetOSProfile object itself.
  225. */
  226. public VirtualMachineScaleSetOSProfile withWindowsConfiguration(WindowsConfiguration windowsConfiguration) {
  227. this.windowsConfiguration = windowsConfiguration;
  228. return this;
  229. }
  230. /**
  231. * Get the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine.
  232. * &lt;br&gt;&lt;br&gt;For a list of supported Linux distributions, see [Linux on Azure-Endorsed
  233. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  234. * &lt;br&gt;&lt;br&gt; For running non-endorsed distributions, see [Information for Non-Endorsed
  235. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  236. *
  237. * @return the linuxConfiguration value.
  238. */
  239. public LinuxConfiguration linuxConfiguration() {
  240. return this.linuxConfiguration;
  241. }
  242. /**
  243. * Set the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine.
  244. * &lt;br&gt;&lt;br&gt;For a list of supported Linux distributions, see [Linux on Azure-Endorsed
  245. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  246. * &lt;br&gt;&lt;br&gt; For running non-endorsed distributions, see [Information for Non-Endorsed
  247. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  248. *
  249. * @param linuxConfiguration the linuxConfiguration value to set.
  250. * @return the VirtualMachineScaleSetOSProfile object itself.
  251. */
  252. public VirtualMachineScaleSetOSProfile withLinuxConfiguration(LinuxConfiguration linuxConfiguration) {
  253. this.linuxConfiguration = linuxConfiguration;
  254. return this;
  255. }
  256. /**
  257. * Get the secrets property: Specifies set of certificates that should be installed onto the virtual machines in the
  258. * scale set.
  259. *
  260. * @return the secrets value.
  261. */
  262. public List<VaultSecretGroup> secrets() {
  263. return this.secrets;
  264. }
  265. /**
  266. * Set the secrets property: Specifies set of certificates that should be installed onto the virtual machines in the
  267. * scale set.
  268. *
  269. * @param secrets the secrets value to set.
  270. * @return the VirtualMachineScaleSetOSProfile object itself.
  271. */
  272. public VirtualMachineScaleSetOSProfile withSecrets(List<VaultSecretGroup> secrets) {
  273. this.secrets = secrets;
  274. return this;
  275. }
  276. }