Class LabVirtualMachineCreationParameter
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.LabVirtualMachineCreationParameter
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LabVirtualMachineCreationParameter>
public final class LabVirtualMachineCreationParameter
extends Object
implements com.azure.json.JsonSerializable<LabVirtualMachineCreationParameter>
Properties for creating a virtual machine.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of LabVirtualMachineCreationParameter class. -
Method Summary
Modifier and TypeMethodDescriptionGet the allowClaim property: Indicates whether another user can take ownership of the virtual machine.Get the artifacts property: The artifacts to be installed on the virtual machine.Get the bulkCreationParameters property: The number of virtual machine instances to create.Get the createdDate property: The creation date of the virtual machine.Get the customImageId property: The custom image identifier of the virtual machine.Get the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation.Get the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public IP address.Get the environmentId property: The resource ID of the environment that contains this virtual machine, if any.Get the expirationDate property: The expiration date for VM.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of LabVirtualMachineCreationParameter from the JsonReader.Get the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine.Get the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for authentication.Get the labSubnetName property: The lab subnet name of the virtual machine.Get the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine.location()
Get the location property: The location of the new virtual machine or environment.name()
Get the name property: The name of the virtual machine or environment.Get the networkInterface property: The network interface properties.notes()
Get the notes property: The notes of the virtual machine.Get the ownerObjectId property: The object identifier of the owner of the virtual machine.Get the ownerUserPrincipalName property: The user principal name of the virtual machine owner.password()
Get the password property: The password of the virtual machine administrator.planId()
Get the planId property: The id of the plan associated with the virtual machine image.Get the scheduleParameters property: Virtual Machine schedules to be created.size()
Get the size property: The size of the virtual machine.sshKey()
Get the sshKey property: The SSH key of the virtual machine administrator.Get the storageType property: Storage type to use for virtual machine (i.e.tags()
Get the tags property: The tags of the resource.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) username()
Get the username property: The user name of the virtual machine.void
validate()
Validates the instance.withAllowClaim
(Boolean allowClaim) Set the allowClaim property: Indicates whether another user can take ownership of the virtual machine.withArtifacts
(List<ArtifactInstallProperties> artifacts) Set the artifacts property: The artifacts to be installed on the virtual machine.withBulkCreationParameters
(BulkCreationParameters bulkCreationParameters) Set the bulkCreationParameters property: The number of virtual machine instances to create.withCreatedDate
(OffsetDateTime createdDate) Set the createdDate property: The creation date of the virtual machine.withCustomImageId
(String customImageId) Set the customImageId property: The custom image identifier of the virtual machine.withDataDiskParameters
(List<DataDiskProperties> dataDiskParameters) Set the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation.withDisallowPublicIpAddress
(Boolean disallowPublicIpAddress) Set the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public IP address.withEnvironmentId
(String environmentId) Set the environmentId property: The resource ID of the environment that contains this virtual machine, if any.withExpirationDate
(OffsetDateTime expirationDate) Set the expirationDate property: The expiration date for VM.withGalleryImageReference
(GalleryImageReference galleryImageReference) Set the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine.withIsAuthenticationWithSshKey
(Boolean isAuthenticationWithSshKey) Set the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for authentication.withLabSubnetName
(String labSubnetName) Set the labSubnetName property: The lab subnet name of the virtual machine.withLabVirtualNetworkId
(String labVirtualNetworkId) Set the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine.withLocation
(String location) Set the location property: The location of the new virtual machine or environment.Set the name property: The name of the virtual machine or environment.withNetworkInterface
(NetworkInterfaceProperties networkInterface) Set the networkInterface property: The network interface properties.Set the notes property: The notes of the virtual machine.withOwnerObjectId
(String ownerObjectId) Set the ownerObjectId property: The object identifier of the owner of the virtual machine.withOwnerUserPrincipalName
(String ownerUserPrincipalName) Set the ownerUserPrincipalName property: The user principal name of the virtual machine owner.withPassword
(String password) Set the password property: The password of the virtual machine administrator.withPlanId
(String planId) Set the planId property: The id of the plan associated with the virtual machine image.withScheduleParameters
(List<ScheduleCreationParameter> scheduleParameters) Set the scheduleParameters property: Virtual Machine schedules to be created.Set the size property: The size of the virtual machine.withSshKey
(String sshKey) Set the sshKey property: The SSH key of the virtual machine administrator.withStorageType
(String storageType) Set the storageType property: Storage type to use for virtual machine (i.e.Set the tags property: The tags of the resource.withUsername
(String username) Set the username property: The user name of the virtual machine.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
LabVirtualMachineCreationParameter
public LabVirtualMachineCreationParameter()Creates an instance of LabVirtualMachineCreationParameter class.
-
-
Method Details
-
name
Get the name property: The name of the virtual machine or environment.- Returns:
- the name value.
-
withName
Set the name property: The name of the virtual machine or environment.- Parameters:
name
- the name value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
location
Get the location property: The location of the new virtual machine or environment.- Returns:
- the location value.
-
withLocation
Set the location property: The location of the new virtual machine or environment.- Parameters:
location
- the location value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
tags
Get the tags property: The tags of the resource.- Returns:
- the tags value.
-
withTags
Set the tags property: The tags of the resource.- Parameters:
tags
- the tags value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
bulkCreationParameters
Get the bulkCreationParameters property: The number of virtual machine instances to create.- Returns:
- the bulkCreationParameters value.
-
withBulkCreationParameters
public LabVirtualMachineCreationParameter withBulkCreationParameters(BulkCreationParameters bulkCreationParameters) Set the bulkCreationParameters property: The number of virtual machine instances to create.- Parameters:
bulkCreationParameters
- the bulkCreationParameters value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
notes
Get the notes property: The notes of the virtual machine.- Returns:
- the notes value.
-
withNotes
Set the notes property: The notes of the virtual machine.- Parameters:
notes
- the notes value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
ownerObjectId
Get the ownerObjectId property: The object identifier of the owner of the virtual machine.- Returns:
- the ownerObjectId value.
-
withOwnerObjectId
Set the ownerObjectId property: The object identifier of the owner of the virtual machine.- Parameters:
ownerObjectId
- the ownerObjectId value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
ownerUserPrincipalName
Get the ownerUserPrincipalName property: The user principal name of the virtual machine owner.- Returns:
- the ownerUserPrincipalName value.
-
withOwnerUserPrincipalName
Set the ownerUserPrincipalName property: The user principal name of the virtual machine owner.- Parameters:
ownerUserPrincipalName
- the ownerUserPrincipalName value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
createdDate
Get the createdDate property: The creation date of the virtual machine.- Returns:
- the createdDate value.
-
withCreatedDate
Set the createdDate property: The creation date of the virtual machine.- Parameters:
createdDate
- the createdDate value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
customImageId
Get the customImageId property: The custom image identifier of the virtual machine.- Returns:
- the customImageId value.
-
withCustomImageId
Set the customImageId property: The custom image identifier of the virtual machine.- Parameters:
customImageId
- the customImageId value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
size
Get the size property: The size of the virtual machine.- Returns:
- the size value.
-
withSize
Set the size property: The size of the virtual machine.- Parameters:
size
- the size value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
username
Get the username property: The user name of the virtual machine.- Returns:
- the username value.
-
withUsername
Set the username property: The user name of the virtual machine.- Parameters:
username
- the username value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
password
Get the password property: The password of the virtual machine administrator.- Returns:
- the password value.
-
withPassword
Set the password property: The password of the virtual machine administrator.- Parameters:
password
- the password value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
sshKey
Get the sshKey property: The SSH key of the virtual machine administrator.- Returns:
- the sshKey value.
-
withSshKey
Set the sshKey property: The SSH key of the virtual machine administrator.- Parameters:
sshKey
- the sshKey value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
isAuthenticationWithSshKey
Get the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for authentication.- Returns:
- the isAuthenticationWithSshKey value.
-
withIsAuthenticationWithSshKey
public LabVirtualMachineCreationParameter withIsAuthenticationWithSshKey(Boolean isAuthenticationWithSshKey) Set the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for authentication.- Parameters:
isAuthenticationWithSshKey
- the isAuthenticationWithSshKey value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
labSubnetName
Get the labSubnetName property: The lab subnet name of the virtual machine.- Returns:
- the labSubnetName value.
-
withLabSubnetName
Set the labSubnetName property: The lab subnet name of the virtual machine.- Parameters:
labSubnetName
- the labSubnetName value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
labVirtualNetworkId
Get the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine.- Returns:
- the labVirtualNetworkId value.
-
withLabVirtualNetworkId
Set the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine.- Parameters:
labVirtualNetworkId
- the labVirtualNetworkId value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
disallowPublicIpAddress
Get the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public IP address.- Returns:
- the disallowPublicIpAddress value.
-
withDisallowPublicIpAddress
public LabVirtualMachineCreationParameter withDisallowPublicIpAddress(Boolean disallowPublicIpAddress) Set the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public IP address.- Parameters:
disallowPublicIpAddress
- the disallowPublicIpAddress value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
artifacts
Get the artifacts property: The artifacts to be installed on the virtual machine.- Returns:
- the artifacts value.
-
withArtifacts
Set the artifacts property: The artifacts to be installed on the virtual machine.- Parameters:
artifacts
- the artifacts value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
galleryImageReference
Get the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine.- Returns:
- the galleryImageReference value.
-
withGalleryImageReference
public LabVirtualMachineCreationParameter withGalleryImageReference(GalleryImageReference galleryImageReference) Set the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine.- Parameters:
galleryImageReference
- the galleryImageReference value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
planId
Get the planId property: The id of the plan associated with the virtual machine image.- Returns:
- the planId value.
-
withPlanId
Set the planId property: The id of the plan associated with the virtual machine image.- Parameters:
planId
- the planId value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
networkInterface
Get the networkInterface property: The network interface properties.- Returns:
- the networkInterface value.
-
withNetworkInterface
public LabVirtualMachineCreationParameter withNetworkInterface(NetworkInterfaceProperties networkInterface) Set the networkInterface property: The network interface properties.- Parameters:
networkInterface
- the networkInterface value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
expirationDate
Get the expirationDate property: The expiration date for VM.- Returns:
- the expirationDate value.
-
withExpirationDate
Set the expirationDate property: The expiration date for VM.- Parameters:
expirationDate
- the expirationDate value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
allowClaim
Get the allowClaim property: Indicates whether another user can take ownership of the virtual machine.- Returns:
- the allowClaim value.
-
withAllowClaim
Set the allowClaim property: Indicates whether another user can take ownership of the virtual machine.- Parameters:
allowClaim
- the allowClaim value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
storageType
Get the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium).- Returns:
- the storageType value.
-
withStorageType
Set the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium).- Parameters:
storageType
- the storageType value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
environmentId
Get the environmentId property: The resource ID of the environment that contains this virtual machine, if any.- Returns:
- the environmentId value.
-
withEnvironmentId
Set the environmentId property: The resource ID of the environment that contains this virtual machine, if any.- Parameters:
environmentId
- the environmentId value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
dataDiskParameters
Get the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation.- Returns:
- the dataDiskParameters value.
-
withDataDiskParameters
public LabVirtualMachineCreationParameter withDataDiskParameters(List<DataDiskProperties> dataDiskParameters) Set the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation.- Parameters:
dataDiskParameters
- the dataDiskParameters value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
scheduleParameters
Get the scheduleParameters property: Virtual Machine schedules to be created.- Returns:
- the scheduleParameters value.
-
withScheduleParameters
public LabVirtualMachineCreationParameter withScheduleParameters(List<ScheduleCreationParameter> scheduleParameters) Set the scheduleParameters property: Virtual Machine schedules to be created.- Parameters:
scheduleParameters
- the scheduleParameters value to set.- Returns:
- the LabVirtualMachineCreationParameter object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<LabVirtualMachineCreationParameter>
- Throws:
IOException
-
fromJson
public static LabVirtualMachineCreationParameter fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of LabVirtualMachineCreationParameter from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of LabVirtualMachineCreationParameter if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the LabVirtualMachineCreationParameter.
-