Interface LabVirtualMachine
public interface LabVirtualMachine
An immutable client-side representation of LabVirtualMachine.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The entirety of the LabVirtualMachine definition.static interface
The LabVirtualMachine definition stages.static interface
The template for LabVirtualMachine update.static interface
The LabVirtualMachine update stages. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataDisk
(DataDiskProperties dataDiskProperties) Attach a new or existing data disk to virtual machine.void
addDataDisk
(DataDiskProperties dataDiskProperties, com.azure.core.util.Context context) Attach a new or existing data disk to virtual machine.Gets the allowClaim property: Indicates whether another user can take ownership of the virtual machine.Gets the applicableSchedule property: The applicable schedule for the virtual machine.void
applyArtifacts
(ApplyArtifactsRequest applyArtifactsRequest) Apply artifacts to virtual machine.void
applyArtifacts
(ApplyArtifactsRequest applyArtifactsRequest, com.azure.core.util.Context context) Apply artifacts to virtual machine.Gets the artifactDeploymentStatus property: The artifact deployment status for the virtual machine.Gets the artifacts property: The artifacts to be installed on the virtual machine.void
claim()
Take ownership of an existing virtual machine This operation can take a while to complete.void
claim
(com.azure.core.util.Context context) Take ownership of an existing virtual machine This operation can take a while to complete.Gets the computeId property: The resource identifier (Microsoft.Compute) of the virtual machine.Gets the computeVm property: The compute virtual machine properties.Gets the createdByUser property: The email address of creator of the virtual machine.Gets the createdByUserId property: The object identifier of the creator of the virtual machine.Gets the createdDate property: The creation date of the virtual machine.Gets the customImageId property: The custom image identifier of the virtual machine.Gets the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation.void
detachDataDisk
(DetachDataDiskProperties detachDataDiskProperties) Detach the specified disk from the virtual machine.void
detachDataDisk
(DetachDataDiskProperties detachDataDiskProperties, com.azure.core.util.Context context) Detach the specified disk from the virtual machine.Gets the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public IP address.Gets the environmentId property: The resource ID of the environment that contains this virtual machine, if any.Gets the expirationDate property: The expiration date for VM.fqdn()
Gets the fqdn property: The fully-qualified domain name of the virtual machine.Gets the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine.Gets a string that represents the contents of the RDP file for the virtual machine.com.azure.core.http.rest.Response<RdpConnection>
getRdpFileContentsWithResponse
(com.azure.core.util.Context context) Gets a string that represents the contents of the RDP file for the virtual machine.id()
Gets the id property: Fully qualified resource Id for the resource.Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachineInner object.Gets the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for authentication.Gets the labSubnetName property: The lab subnet name of the virtual machine.Gets the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine.Gets the lastKnownPowerState property: Last known compute power state captured in DTL.Lists the applicable start/stop schedules, if any.com.azure.core.http.rest.Response<ApplicableSchedule>
listApplicableSchedulesWithResponse
(com.azure.core.util.Context context) Lists the applicable start/stop schedules, if any.location()
Gets the location property: The geo-location where the resource lives.name()
Gets the name property: The name of the resource.Gets the networkInterface property: The network interface properties.notes()
Gets the notes property: The notes of the virtual machine.osType()
Gets the osType property: The OS type of the virtual machine.Gets the ownerObjectId property: The object identifier of the owner of the virtual machine.Gets the ownerUserPrincipalName property: The user principal name of the virtual machine owner.password()
Gets the password property: The password of the virtual machine administrator.planId()
Gets the planId property: The id of the plan associated with the virtual machine image.Gets the provisioningState property: The provisioning status of the resource.void
redeploy()
Redeploy a virtual machine This operation can take a while to complete.void
redeploy
(com.azure.core.util.Context context) Redeploy a virtual machine This operation can take a while to complete.refresh()
Refreshes the resource to sync with Azure.refresh
(com.azure.core.util.Context context) Refreshes the resource to sync with Azure.com.azure.core.management.Region
region()
Gets the region of the resource.Gets the name of the resource region.void
resize
(ResizeLabVirtualMachineProperties resizeLabVirtualMachineProperties) Resize Virtual Machine.void
resize
(ResizeLabVirtualMachineProperties resizeLabVirtualMachineProperties, com.azure.core.util.Context context) Resize Virtual Machine.Gets the name of the resource group.void
restart()
Restart a virtual machine.void
restart
(com.azure.core.util.Context context) Restart a virtual machine.Gets the scheduleParameters property: Virtual Machine schedules to be created.size()
Gets the size property: The size of the virtual machine.sshKey()
Gets the sshKey property: The SSH key of the virtual machine administrator.void
start()
Start a virtual machine.void
start
(com.azure.core.util.Context context) Start a virtual machine.void
stop()
Stop a virtual machine This operation can take a while to complete.void
stop
(com.azure.core.util.Context context) Stop a virtual machine This operation can take a while to complete.Gets the storageType property: Storage type to use for virtual machine (i.e.tags()
Gets the tags property: Resource tags.void
Transfers all data disks attached to the virtual machine to be owned by the current user.void
transferDisks
(com.azure.core.util.Context context) Transfers all data disks attached to the virtual machine to be owned by the current user.type()
Gets the type property: The type of the resource.void
unClaim()
Release ownership of an existing virtual machine This operation can take a while to complete.void
unClaim
(com.azure.core.util.Context context) Release ownership of an existing virtual machine This operation can take a while to complete.Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).update()
Begins update for the LabVirtualMachine resource.username()
Gets the username property: The user name of the virtual machine.Gets the virtualMachineCreationSource property: Tells source of creation of lab virtual machine.
-
Method Details
-
id
String id()Gets the id property: Fully qualified resource Id for the resource.- Returns:
- the id value.
-
name
String name()Gets the name property: The name of the resource.- Returns:
- the name value.
-
type
String type()Gets the type property: The type of the resource.- Returns:
- the type value.
-
location
String location()Gets the location property: The geo-location where the resource lives.- Returns:
- the location value.
-
tags
Gets the tags property: Resource tags.- Returns:
- the tags value.
-
notes
String notes()Gets the notes property: The notes of the virtual machine.- Returns:
- the notes value.
-
ownerObjectId
String ownerObjectId()Gets the ownerObjectId property: The object identifier of the owner of the virtual machine.- Returns:
- the ownerObjectId value.
-
ownerUserPrincipalName
String ownerUserPrincipalName()Gets the ownerUserPrincipalName property: The user principal name of the virtual machine owner.- Returns:
- the ownerUserPrincipalName value.
-
createdByUserId
String createdByUserId()Gets the createdByUserId property: The object identifier of the creator of the virtual machine.- Returns:
- the createdByUserId value.
-
createdByUser
String createdByUser()Gets the createdByUser property: The email address of creator of the virtual machine.- Returns:
- the createdByUser value.
-
createdDate
OffsetDateTime createdDate()Gets the createdDate property: The creation date of the virtual machine.- Returns:
- the createdDate value.
-
computeId
String computeId()Gets the computeId property: The resource identifier (Microsoft.Compute) of the virtual machine.- Returns:
- the computeId value.
-
customImageId
String customImageId()Gets the customImageId property: The custom image identifier of the virtual machine.- Returns:
- the customImageId value.
-
osType
String osType()Gets the osType property: The OS type of the virtual machine.- Returns:
- the osType value.
-
size
String size()Gets the size property: The size of the virtual machine.- Returns:
- the size value.
-
username
String username()Gets the username property: The user name of the virtual machine.- Returns:
- the username value.
-
password
String password()Gets the password property: The password of the virtual machine administrator.- Returns:
- the password value.
-
sshKey
String sshKey()Gets the sshKey property: The SSH key of the virtual machine administrator.- Returns:
- the sshKey value.
-
isAuthenticationWithSshKey
Boolean isAuthenticationWithSshKey()Gets the isAuthenticationWithSshKey property: Indicates whether this virtual machine uses an SSH key for authentication.- Returns:
- the isAuthenticationWithSshKey value.
-
fqdn
String fqdn()Gets the fqdn property: The fully-qualified domain name of the virtual machine.- Returns:
- the fqdn value.
-
labSubnetName
String labSubnetName()Gets the labSubnetName property: The lab subnet name of the virtual machine.- Returns:
- the labSubnetName value.
-
labVirtualNetworkId
String labVirtualNetworkId()Gets the labVirtualNetworkId property: The lab virtual network identifier of the virtual machine.- Returns:
- the labVirtualNetworkId value.
-
disallowPublicIpAddress
Boolean disallowPublicIpAddress()Gets the disallowPublicIpAddress property: Indicates whether the virtual machine is to be created without a public IP address.- Returns:
- the disallowPublicIpAddress value.
-
artifacts
List<ArtifactInstallProperties> artifacts()Gets the artifacts property: The artifacts to be installed on the virtual machine.- Returns:
- the artifacts value.
-
artifactDeploymentStatus
ArtifactDeploymentStatusProperties artifactDeploymentStatus()Gets the artifactDeploymentStatus property: The artifact deployment status for the virtual machine.- Returns:
- the artifactDeploymentStatus value.
-
galleryImageReference
GalleryImageReference galleryImageReference()Gets the galleryImageReference property: The Microsoft Azure Marketplace image reference of the virtual machine.- Returns:
- the galleryImageReference value.
-
planId
String planId()Gets the planId property: The id of the plan associated with the virtual machine image.- Returns:
- the planId value.
-
computeVm
ComputeVmProperties computeVm()Gets the computeVm property: The compute virtual machine properties.- Returns:
- the computeVm value.
-
networkInterface
NetworkInterfaceProperties networkInterface()Gets the networkInterface property: The network interface properties.- Returns:
- the networkInterface value.
-
applicableSchedule
ApplicableSchedule applicableSchedule()Gets the applicableSchedule property: The applicable schedule for the virtual machine.- Returns:
- the applicableSchedule value.
-
expirationDate
OffsetDateTime expirationDate()Gets the expirationDate property: The expiration date for VM.- Returns:
- the expirationDate value.
-
allowClaim
Boolean allowClaim()Gets the allowClaim property: Indicates whether another user can take ownership of the virtual machine.- Returns:
- the allowClaim value.
-
storageType
String storageType()Gets the storageType property: Storage type to use for virtual machine (i.e. Standard, Premium).- Returns:
- the storageType value.
-
virtualMachineCreationSource
VirtualMachineCreationSource virtualMachineCreationSource()Gets the virtualMachineCreationSource property: Tells source of creation of lab virtual machine. Output property only.- Returns:
- the virtualMachineCreationSource value.
-
environmentId
String environmentId()Gets the environmentId property: The resource ID of the environment that contains this virtual machine, if any.- Returns:
- the environmentId value.
-
dataDiskParameters
List<DataDiskProperties> dataDiskParameters()Gets the dataDiskParameters property: New or existing data disks to attach to the virtual machine after creation.- Returns:
- the dataDiskParameters value.
-
scheduleParameters
List<ScheduleCreationParameter> scheduleParameters()Gets the scheduleParameters property: Virtual Machine schedules to be created.- Returns:
- the scheduleParameters value.
-
lastKnownPowerState
String lastKnownPowerState()Gets the lastKnownPowerState property: Last known compute power state captured in DTL.- Returns:
- the lastKnownPowerState value.
-
provisioningState
String provisioningState()Gets the provisioningState property: The provisioning status of the resource.- Returns:
- the provisioningState value.
-
uniqueIdentifier
String uniqueIdentifier()Gets the uniqueIdentifier property: The unique immutable identifier of a resource (Guid).- Returns:
- the uniqueIdentifier value.
-
region
com.azure.core.management.Region region()Gets the region of the resource.- Returns:
- the region of the resource.
-
regionName
String regionName()Gets the name of the resource region.- Returns:
- the name of the resource region.
-
resourceGroupName
String resourceGroupName()Gets the name of the resource group.- Returns:
- the name of the resource group.
-
innerModel
LabVirtualMachineInner innerModel()Gets the inner com.azure.resourcemanager.devtestlabs.fluent.models.LabVirtualMachineInner object.- Returns:
- the inner object.
-
update
LabVirtualMachine.Update update()Begins update for the LabVirtualMachine resource.- Returns:
- the stage of resource update.
-
refresh
LabVirtualMachine refresh()Refreshes the resource to sync with Azure.- Returns:
- the refreshed resource.
-
refresh
Refreshes the resource to sync with Azure.- Parameters:
context
- The context to associate with this operation.- Returns:
- the refreshed resource.
-
addDataDisk
Attach a new or existing data disk to virtual machine. This operation can take a while to complete.- Parameters:
dataDiskProperties
- Request body for adding a new or existing data disk to a virtual machine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
addDataDisk
Attach a new or existing data disk to virtual machine. This operation can take a while to complete.- Parameters:
dataDiskProperties
- Request body for adding a new or existing data disk to a virtual machine.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
applyArtifacts
Apply artifacts to virtual machine. This operation can take a while to complete.- Parameters:
applyArtifactsRequest
- Request body for applying artifacts to a virtual machine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
applyArtifacts
void applyArtifacts(ApplyArtifactsRequest applyArtifactsRequest, com.azure.core.util.Context context) Apply artifacts to virtual machine. This operation can take a while to complete.- Parameters:
applyArtifactsRequest
- Request body for applying artifacts to a virtual machine.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
claim
void claim()Take ownership of an existing virtual machine This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
claim
void claim(com.azure.core.util.Context context) Take ownership of an existing virtual machine This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
detachDataDisk
Detach the specified disk from the virtual machine. This operation can take a while to complete.- Parameters:
detachDataDiskProperties
- Request body for detaching data disk from a virtual machine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
detachDataDisk
void detachDataDisk(DetachDataDiskProperties detachDataDiskProperties, com.azure.core.util.Context context) Detach the specified disk from the virtual machine. This operation can take a while to complete.- Parameters:
detachDataDiskProperties
- Request body for detaching data disk from a virtual machine.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getRdpFileContentsWithResponse
com.azure.core.http.rest.Response<RdpConnection> getRdpFileContentsWithResponse(com.azure.core.util.Context context) Gets a string that represents the contents of the RDP file for the virtual machine.- Parameters:
context
- The context to associate with this operation.- Returns:
- a string that represents the contents of the RDP file for the virtual machine along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getRdpFileContents
RdpConnection getRdpFileContents()Gets a string that represents the contents of the RDP file for the virtual machine.- Returns:
- a string that represents the contents of the RDP file for the virtual machine.
- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listApplicableSchedulesWithResponse
com.azure.core.http.rest.Response<ApplicableSchedule> listApplicableSchedulesWithResponse(com.azure.core.util.Context context) Lists the applicable start/stop schedules, if any.- Parameters:
context
- The context to associate with this operation.- Returns:
- schedules applicable to a virtual machine along with
Response
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
listApplicableSchedules
ApplicableSchedule listApplicableSchedules()Lists the applicable start/stop schedules, if any.- Returns:
- schedules applicable to a virtual machine.
- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
redeploy
void redeploy()Redeploy a virtual machine This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
redeploy
void redeploy(com.azure.core.util.Context context) Redeploy a virtual machine This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
resize
Resize Virtual Machine. This operation can take a while to complete.- Parameters:
resizeLabVirtualMachineProperties
- Request body for resizing a virtual machine.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
resize
void resize(ResizeLabVirtualMachineProperties resizeLabVirtualMachineProperties, com.azure.core.util.Context context) Resize Virtual Machine. This operation can take a while to complete.- Parameters:
resizeLabVirtualMachineProperties
- Request body for resizing a virtual machine.context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restart
void restart()Restart a virtual machine. This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
restart
void restart(com.azure.core.util.Context context) Restart a virtual machine. This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
start
void start()Start a virtual machine. This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
start
void start(com.azure.core.util.Context context) Start a virtual machine. This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stop
void stop()Stop a virtual machine This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
stop
void stop(com.azure.core.util.Context context) Stop a virtual machine This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
transferDisks
void transferDisks()Transfers all data disks attached to the virtual machine to be owned by the current user. This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
transferDisks
void transferDisks(com.azure.core.util.Context context) Transfers all data disks attached to the virtual machine to be owned by the current user. This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
unClaim
void unClaim()Release ownership of an existing virtual machine This operation can take a while to complete.- Throws:
com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
unClaim
void unClaim(com.azure.core.util.Context context) Release ownership of an existing virtual machine This operation can take a while to complete.- Parameters:
context
- The context to associate with this operation.- Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-