PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

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

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