PageRenderTime 50ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

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

http://github.com/WindowsAzure/azure-sdk-for-java
Java | 368 lines | 88 code | 29 blank | 251 comment | 0 complexity | a757479c889e53cfc71c0a60b004d754 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 OSProfile model. */
  9. @Fluent
  10. public final class OSProfile {
  11. /*
  12. * Specifies the host OS name of the virtual machine. <br><br> This name
  13. * cannot be updated after the VM is created. <br><br> **Max-length
  14. * (Windows):** 15 characters <br><br> **Max-length (Linux):** 64
  15. * characters. <br><br> For naming conventions and restrictions see [Azure
  16. * infrastructure services implementation
  17. * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
  18. */
  19. @JsonProperty(value = "computerName")
  20. private String computerName;
  21. /*
  22. * Specifies the name of the administrator account. <br><br> **Windows-only
  23. * restriction:** Cannot end in "." <br><br> **Disallowed values:**
  24. * "administrator", "admin", "user", "user1", "test", "user2", "test1",
  25. * "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2",
  26. * "aspnet", "backup", "console", "david", "guest", "john", "owner",
  27. * "root", "server", "sql", "support", "support_388945a0", "sys", "test2",
  28. * "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1
  29. * character <br><br> **Max-length (Linux):** 64 characters <br><br>
  30. * **Max-length (Windows):** 20 characters <br><br><li> For root access to
  31. * the Linux VM, see [Using root privileges on Linux virtual machines in
  32. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)<br><li>
  33. * For a list of built-in system users on Linux that should not be used in
  34. * this field, see [Selecting User Names for Linux on
  35. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  36. */
  37. @JsonProperty(value = "adminUsername")
  38. private String adminUsername;
  39. /*
  40. * Specifies the password of the administrator account. <br><br>
  41. * **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length
  42. * (Linux):** 6 characters <br><br> **Max-length (Windows):** 123
  43. * characters <br><br> **Max-length (Linux):** 72 characters <br><br>
  44. * **Complexity requirements:** 3 out of 4 conditions below need to be
  45. * fulfilled <br> Has lower characters <br>Has upper characters <br> Has a
  46. * digit <br> Has a special character (Regex match [\W_]) <br><br>
  47. * **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123",
  48. * "Pa$$word", "pass@word1", "Password!", "Password1", "Password22",
  49. * "iloveyou!" <br><br> For resetting the password, see [How to reset the
  50. * Remote Desktop service or its login password in a Windows
  51. * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
  52. * <br><br> For resetting root password, see [Manage users, SSH, and check
  53. * or repair disks on Azure Linux VMs using the VMAccess
  54. * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password)
  55. */
  56. @JsonProperty(value = "adminPassword")
  57. private String adminPassword;
  58. /*
  59. * Specifies a base-64 encoded string of custom data. The base-64 encoded
  60. * string is decoded to a binary array that is saved as a file on the
  61. * Virtual Machine. The maximum length of the binary array is 65535 bytes.
  62. * <br><br> For using cloud-init for your VM, see [Using cloud-init to
  63. * customize a Linux VM during
  64. * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  65. */
  66. @JsonProperty(value = "customData")
  67. private String customData;
  68. /*
  69. * Specifies Windows operating system settings on the virtual machine.
  70. */
  71. @JsonProperty(value = "windowsConfiguration")
  72. private WindowsConfiguration windowsConfiguration;
  73. /*
  74. * Specifies the Linux operating system settings on the virtual machine.
  75. * <br><br>For a list of supported Linux distributions, see [Linux on
  76. * Azure-Endorsed
  77. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  78. * <br><br> For running non-endorsed distributions, see [Information for
  79. * Non-Endorsed
  80. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  81. */
  82. @JsonProperty(value = "linuxConfiguration")
  83. private LinuxConfiguration linuxConfiguration;
  84. /*
  85. * Specifies set of certificates that should be installed onto the virtual
  86. * machine.
  87. */
  88. @JsonProperty(value = "secrets")
  89. private List<VaultSecretGroup> secrets;
  90. /*
  91. * Specifies whether extension operations should be allowed on the virtual
  92. * machine. <br><br>This may only be set to False when no extensions are
  93. * present on the virtual machine.
  94. */
  95. @JsonProperty(value = "allowExtensionOperations")
  96. private Boolean allowExtensionOperations;
  97. /*
  98. * Specifies whether the guest provision signal is required from the
  99. * virtual machine.
  100. */
  101. @JsonProperty(value = "requireGuestProvisionSignal")
  102. private Boolean requireGuestProvisionSignal;
  103. /**
  104. * Get the computerName property: Specifies the host OS name of the virtual machine. &lt;br&gt;&lt;br&gt; This name
  105. * cannot be updated after the VM is created. &lt;br&gt;&lt;br&gt; **Max-length (Windows):** 15 characters
  106. * &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 64 characters. &lt;br&gt;&lt;br&gt; For naming conventions and
  107. * restrictions see [Azure infrastructure services implementation
  108. * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
  109. *
  110. * @return the computerName value.
  111. */
  112. public String computerName() {
  113. return this.computerName;
  114. }
  115. /**
  116. * Set the computerName property: Specifies the host OS name of the virtual machine. &lt;br&gt;&lt;br&gt; This name
  117. * cannot be updated after the VM is created. &lt;br&gt;&lt;br&gt; **Max-length (Windows):** 15 characters
  118. * &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 64 characters. &lt;br&gt;&lt;br&gt; For naming conventions and
  119. * restrictions see [Azure infrastructure services implementation
  120. * guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).
  121. *
  122. * @param computerName the computerName value to set.
  123. * @return the OSProfile object itself.
  124. */
  125. public OSProfile withComputerName(String computerName) {
  126. this.computerName = computerName;
  127. return this;
  128. }
  129. /**
  130. * Get the adminUsername property: Specifies the name of the administrator account. &lt;br&gt;&lt;br&gt;
  131. * **Windows-only restriction:** Cannot end in "." &lt;br&gt;&lt;br&gt; **Disallowed values:** "administrator",
  132. * "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
  133. * "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support",
  134. * "support_388945a0", "sys", "test2", "test3", "user4", "user5". &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 1
  135. * character &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 64 characters &lt;br&gt;&lt;br&gt; **Max-length
  136. * (Windows):** 20 characters &lt;br&gt;&lt;br&gt;&lt;li&gt; For root access to the Linux VM, see [Using root
  137. * privileges on Linux virtual machines in
  138. * 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;
  139. * For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for
  140. * Linux on
  141. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  142. *
  143. * @return the adminUsername value.
  144. */
  145. public String adminUsername() {
  146. return this.adminUsername;
  147. }
  148. /**
  149. * Set the adminUsername property: Specifies the name of the administrator account. &lt;br&gt;&lt;br&gt;
  150. * **Windows-only restriction:** Cannot end in "." &lt;br&gt;&lt;br&gt; **Disallowed values:** "administrator",
  151. * "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm",
  152. * "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support",
  153. * "support_388945a0", "sys", "test2", "test3", "user4", "user5". &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 1
  154. * character &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 64 characters &lt;br&gt;&lt;br&gt; **Max-length
  155. * (Windows):** 20 characters &lt;br&gt;&lt;br&gt;&lt;li&gt; For root access to the Linux VM, see [Using root
  156. * privileges on Linux virtual machines in
  157. * 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;
  158. * For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for
  159. * Linux on
  160. * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  161. *
  162. * @param adminUsername the adminUsername value to set.
  163. * @return the OSProfile object itself.
  164. */
  165. public OSProfile withAdminUsername(String adminUsername) {
  166. this.adminUsername = adminUsername;
  167. return this;
  168. }
  169. /**
  170. * Get the adminPassword property: Specifies the password of the administrator account. &lt;br&gt;&lt;br&gt;
  171. * **Minimum-length (Windows):** 8 characters &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 6 characters
  172. * &lt;br&gt;&lt;br&gt; **Max-length (Windows):** 123 characters &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 72
  173. * characters &lt;br&gt;&lt;br&gt; **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
  174. * &lt;br&gt; Has lower characters &lt;br&gt;Has upper characters &lt;br&gt; Has a digit &lt;br&gt; Has a special
  175. * character (Regex match [\W_]) &lt;br&gt;&lt;br&gt; **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd",
  176. * "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" &lt;br&gt;&lt;br&gt;
  177. * For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows
  178. * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
  179. * &lt;br&gt;&lt;br&gt; For resetting root password, see [Manage users, SSH, and check or repair disks on Azure
  180. * Linux VMs using the VMAccess
  181. * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password).
  182. *
  183. * @return the adminPassword value.
  184. */
  185. public String adminPassword() {
  186. return this.adminPassword;
  187. }
  188. /**
  189. * Set the adminPassword property: Specifies the password of the administrator account. &lt;br&gt;&lt;br&gt;
  190. * **Minimum-length (Windows):** 8 characters &lt;br&gt;&lt;br&gt; **Minimum-length (Linux):** 6 characters
  191. * &lt;br&gt;&lt;br&gt; **Max-length (Windows):** 123 characters &lt;br&gt;&lt;br&gt; **Max-length (Linux):** 72
  192. * characters &lt;br&gt;&lt;br&gt; **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
  193. * &lt;br&gt; Has lower characters &lt;br&gt;Has upper characters &lt;br&gt; Has a digit &lt;br&gt; Has a special
  194. * character (Regex match [\W_]) &lt;br&gt;&lt;br&gt; **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd",
  195. * "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" &lt;br&gt;&lt;br&gt;
  196. * For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows
  197. * VM](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-reset-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
  198. * &lt;br&gt;&lt;br&gt; For resetting root password, see [Manage users, SSH, and check or repair disks on Azure
  199. * Linux VMs using the VMAccess
  200. * Extension](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-vmaccess-extension?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#reset-root-password).
  201. *
  202. * @param adminPassword the adminPassword value to set.
  203. * @return the OSProfile object itself.
  204. */
  205. public OSProfile withAdminPassword(String adminPassword) {
  206. this.adminPassword = adminPassword;
  207. return this;
  208. }
  209. /**
  210. * Get the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is
  211. * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array
  212. * is 65535 bytes. &lt;br&gt;&lt;br&gt; For using cloud-init for your VM, see [Using cloud-init to customize a Linux
  213. * VM during
  214. * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  215. *
  216. * @return the customData value.
  217. */
  218. public String customData() {
  219. return this.customData;
  220. }
  221. /**
  222. * Set the customData property: Specifies a base-64 encoded string of custom data. The base-64 encoded string is
  223. * decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array
  224. * is 65535 bytes. &lt;br&gt;&lt;br&gt; For using cloud-init for your VM, see [Using cloud-init to customize a Linux
  225. * VM during
  226. * creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  227. *
  228. * @param customData the customData value to set.
  229. * @return the OSProfile object itself.
  230. */
  231. public OSProfile withCustomData(String customData) {
  232. this.customData = customData;
  233. return this;
  234. }
  235. /**
  236. * Get the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine.
  237. *
  238. * @return the windowsConfiguration value.
  239. */
  240. public WindowsConfiguration windowsConfiguration() {
  241. return this.windowsConfiguration;
  242. }
  243. /**
  244. * Set the windowsConfiguration property: Specifies Windows operating system settings on the virtual machine.
  245. *
  246. * @param windowsConfiguration the windowsConfiguration value to set.
  247. * @return the OSProfile object itself.
  248. */
  249. public OSProfile withWindowsConfiguration(WindowsConfiguration windowsConfiguration) {
  250. this.windowsConfiguration = windowsConfiguration;
  251. return this;
  252. }
  253. /**
  254. * Get the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine.
  255. * &lt;br&gt;&lt;br&gt;For a list of supported Linux distributions, see [Linux on Azure-Endorsed
  256. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  257. * &lt;br&gt;&lt;br&gt; For running non-endorsed distributions, see [Information for Non-Endorsed
  258. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  259. *
  260. * @return the linuxConfiguration value.
  261. */
  262. public LinuxConfiguration linuxConfiguration() {
  263. return this.linuxConfiguration;
  264. }
  265. /**
  266. * Set the linuxConfiguration property: Specifies the Linux operating system settings on the virtual machine.
  267. * &lt;br&gt;&lt;br&gt;For a list of supported Linux distributions, see [Linux on Azure-Endorsed
  268. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  269. * &lt;br&gt;&lt;br&gt; For running non-endorsed distributions, see [Information for Non-Endorsed
  270. * Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
  271. *
  272. * @param linuxConfiguration the linuxConfiguration value to set.
  273. * @return the OSProfile object itself.
  274. */
  275. public OSProfile withLinuxConfiguration(LinuxConfiguration linuxConfiguration) {
  276. this.linuxConfiguration = linuxConfiguration;
  277. return this;
  278. }
  279. /**
  280. * Get the secrets property: Specifies set of certificates that should be installed onto the virtual machine.
  281. *
  282. * @return the secrets value.
  283. */
  284. public List<VaultSecretGroup> secrets() {
  285. return this.secrets;
  286. }
  287. /**
  288. * Set the secrets property: Specifies set of certificates that should be installed onto the virtual machine.
  289. *
  290. * @param secrets the secrets value to set.
  291. * @return the OSProfile object itself.
  292. */
  293. public OSProfile withSecrets(List<VaultSecretGroup> secrets) {
  294. this.secrets = secrets;
  295. return this;
  296. }
  297. /**
  298. * Get the allowExtensionOperations property: Specifies whether extension operations should be allowed on the
  299. * virtual machine. &lt;br&gt;&lt;br&gt;This may only be set to False when no extensions are present on the virtual
  300. * machine.
  301. *
  302. * @return the allowExtensionOperations value.
  303. */
  304. public Boolean allowExtensionOperations() {
  305. return this.allowExtensionOperations;
  306. }
  307. /**
  308. * Set the allowExtensionOperations property: Specifies whether extension operations should be allowed on the
  309. * virtual machine. &lt;br&gt;&lt;br&gt;This may only be set to False when no extensions are present on the virtual
  310. * machine.
  311. *
  312. * @param allowExtensionOperations the allowExtensionOperations value to set.
  313. * @return the OSProfile object itself.
  314. */
  315. public OSProfile withAllowExtensionOperations(Boolean allowExtensionOperations) {
  316. this.allowExtensionOperations = allowExtensionOperations;
  317. return this;
  318. }
  319. /**
  320. * Get the requireGuestProvisionSignal property: Specifies whether the guest provision signal is required from the
  321. * virtual machine.
  322. *
  323. * @return the requireGuestProvisionSignal value.
  324. */
  325. public Boolean requireGuestProvisionSignal() {
  326. return this.requireGuestProvisionSignal;
  327. }
  328. /**
  329. * Set the requireGuestProvisionSignal property: Specifies whether the guest provision signal is required from the
  330. * virtual machine.
  331. *
  332. * @param requireGuestProvisionSignal the requireGuestProvisionSignal value to set.
  333. * @return the OSProfile object itself.
  334. */
  335. public OSProfile withRequireGuestProvisionSignal(Boolean requireGuestProvisionSignal) {
  336. this.requireGuestProvisionSignal = requireGuestProvisionSignal;
  337. return this;
  338. }
  339. }