VirtualMachineInner Class

public final class VirtualMachineInner
extends Resource

VirtualMachine represents the on-premises Network Cloud virtual machine.

Constructor Summary

Constructor Description
VirtualMachineInner()

Creates an instance of VirtualMachineInner class.

Method Summary

Modifier and Type Method and Description
String adminUsername()

Get the adminUsername property: The name of the administrator to which the ssh public keys will be added into the authorized keys.

String availabilityZone()

Get the availabilityZone property: The cluster availability zone containing this virtual machine.

String bareMetalMachineId()

Get the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine.

VirtualMachineBootMethod bootMethod()

Get the bootMethod property: Selects the boot method for the virtual machine.

NetworkAttachment cloudServicesNetworkAttachment()

Get the cloudServicesNetworkAttachment property: The cloud service network that provides platform-level services for the virtual machine.

String clusterId()

Get the clusterId property: The resource ID of the cluster the virtual machine is created for.

ExtendedLocation consoleExtendedLocation()

Get the consoleExtendedLocation property: The extended location to use for creation of a VM console resource.

long cpuCores()

Get the cpuCores property: The number of CPU cores in the virtual machine.

VirtualMachineDetailedStatus detailedStatus()

Get the detailedStatus property: The more detailed status of the virtual machine.

String detailedStatusMessage()

Get the detailedStatusMessage property: The descriptive message about the current detailed status.

String etag()

Get the etag property: Resource ETag.

ExtendedLocation extendedLocation()

Get the extendedLocation property: The extended location of the cluster associated with the resource.

static VirtualMachineInner fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

ManagedServiceIdentity identity()

Get the identity property: The identity for the resource.

VirtualMachineIsolateEmulatorThread isolateEmulatorThread()

Get the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided.

long memorySizeGB()

Get the memorySizeGB property: The memory size of the virtual machine.

String name()

Get the name property: The name of the resource.

List<NetworkAttachment> networkAttachments()

Get the networkAttachments property: The list of network attachments to the virtual machine.

String networkData()

Get the networkData property: Field Deprecated: The Base64 encoded cloud-init network data.

String networkDataContent()

Get the networkDataContent property: The Base64 encoded cloud-init network data.

List<VirtualMachinePlacementHint> placementHints()

Get the placementHints property: The scheduling hints for the virtual machine.

VirtualMachinePowerState powerState()

Get the powerState property: The power state of the virtual machine.

VirtualMachineProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the virtual machine.

List<SshPublicKey> sshPublicKeys()

Get the sshPublicKeys property: The list of ssh public keys.

StorageProfile storageProfile()

Get the storageProfile property: The storage profile that specifies size and other parameters about the disks related to the virtual machine.

SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

String userData()

Get the userData property: Field Deprecated: The Base64 encoded cloud-init user data.

String userDataContent()

Get the userDataContent property: The Base64 encoded cloud-init user data.

void validate()

Validates the instance.

VirtualMachineVirtioInterfaceType virtioInterface()

Get the virtioInterface property: Field Deprecated, use virtualizationModel instead.

VirtualMachineDeviceModelType vmDeviceModel()

Get the vmDeviceModel property: The type of the device model to use.

String vmImage()

Get the vmImage property: The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image.

ImageRepositoryCredentials vmImageRepositoryCredentials()

Get the vmImageRepositoryCredentials property: The credentials used to login to the image repository that has access to the specified image.

List<String> volumes()

Get the volumes property: The resource IDs of volumes that are attached to the virtual machine.

VirtualMachineInner withAdminUsername(String adminUsername)

Set the adminUsername property: The name of the administrator to which the ssh public keys will be added into the authorized keys.

VirtualMachineInner withBootMethod(VirtualMachineBootMethod bootMethod)

Set the bootMethod property: Selects the boot method for the virtual machine.

VirtualMachineInner withCloudServicesNetworkAttachment(NetworkAttachment cloudServicesNetworkAttachment)

Set the cloudServicesNetworkAttachment property: The cloud service network that provides platform-level services for the virtual machine.

VirtualMachineInner withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation)

Set the consoleExtendedLocation property: The extended location to use for creation of a VM console resource.

VirtualMachineInner withCpuCores(long cpuCores)

Set the cpuCores property: The number of CPU cores in the virtual machine.

VirtualMachineInner withExtendedLocation(ExtendedLocation extendedLocation)

Set the extendedLocation property: The extended location of the cluster associated with the resource.

VirtualMachineInner withIdentity(ManagedServiceIdentity identity)

Set the identity property: The identity for the resource.

VirtualMachineInner withIsolateEmulatorThread(VirtualMachineIsolateEmulatorThread isolateEmulatorThread)

Set the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided.

VirtualMachineInner withLocation(String location)
VirtualMachineInner withMemorySizeGB(long memorySizeGB)

Set the memorySizeGB property: The memory size of the virtual machine.

VirtualMachineInner withNetworkAttachments(List<NetworkAttachment> networkAttachments)

Set the networkAttachments property: The list of network attachments to the virtual machine.

VirtualMachineInner withNetworkData(String networkData)

Set the networkData property: Field Deprecated: The Base64 encoded cloud-init network data.

VirtualMachineInner withNetworkDataContent(String networkDataContent)

Set the networkDataContent property: The Base64 encoded cloud-init network data.

VirtualMachineInner withPlacementHints(List<VirtualMachinePlacementHint> placementHints)

Set the placementHints property: The scheduling hints for the virtual machine.

VirtualMachineInner withSshPublicKeys(List<SshPublicKey> sshPublicKeys)

Set the sshPublicKeys property: The list of ssh public keys.

VirtualMachineInner withStorageProfile(StorageProfile storageProfile)

Set the storageProfile property: The storage profile that specifies size and other parameters about the disks related to the virtual machine.

VirtualMachineInner withTags(Map<String,String> tags)
VirtualMachineInner withUserData(String userData)

Set the userData property: Field Deprecated: The Base64 encoded cloud-init user data.

VirtualMachineInner withUserDataContent(String userDataContent)

Set the userDataContent property: The Base64 encoded cloud-init user data.

VirtualMachineInner withVirtioInterface(VirtualMachineVirtioInterfaceType virtioInterface)

Set the virtioInterface property: Field Deprecated, use virtualizationModel instead.

VirtualMachineInner withVmDeviceModel(VirtualMachineDeviceModelType vmDeviceModel)

Set the vmDeviceModel property: The type of the device model to use.

VirtualMachineInner withVmImage(String vmImage)

Set the vmImage property: The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image.

VirtualMachineInner withVmImageRepositoryCredentials(ImageRepositoryCredentials vmImageRepositoryCredentials)

Set the vmImageRepositoryCredentials property: The credentials used to login to the image repository that has access to the specified image.

Methods inherited from ProxyResource

Methods inherited from Resource

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineInner

public VirtualMachineInner()

Creates an instance of VirtualMachineInner class.

Method Details

adminUsername

public String adminUsername()

Get the adminUsername property: The name of the administrator to which the ssh public keys will be added into the authorized keys.

Returns:

the adminUsername value.

availabilityZone

public String availabilityZone()

Get the availabilityZone property: The cluster availability zone containing this virtual machine.

Returns:

the availabilityZone value.

bareMetalMachineId

public String bareMetalMachineId()

Get the bareMetalMachineId property: The resource ID of the bare metal machine that hosts the virtual machine.

Returns:

the bareMetalMachineId value.

bootMethod

public VirtualMachineBootMethod bootMethod()

Get the bootMethod property: Selects the boot method for the virtual machine.

Returns:

the bootMethod value.

cloudServicesNetworkAttachment

public NetworkAttachment cloudServicesNetworkAttachment()

Get the cloudServicesNetworkAttachment property: The cloud service network that provides platform-level services for the virtual machine.

Returns:

the cloudServicesNetworkAttachment value.

clusterId

public String clusterId()

Get the clusterId property: The resource ID of the cluster the virtual machine is created for.

Returns:

the clusterId value.

consoleExtendedLocation

public ExtendedLocation consoleExtendedLocation()

Get the consoleExtendedLocation property: The extended location to use for creation of a VM console resource.

Returns:

the consoleExtendedLocation value.

cpuCores

public long cpuCores()

Get the cpuCores property: The number of CPU cores in the virtual machine.

Returns:

the cpuCores value.

detailedStatus

public VirtualMachineDetailedStatus detailedStatus()

Get the detailedStatus property: The more detailed status of the virtual machine.

Returns:

the detailedStatus value.

detailedStatusMessage

public String detailedStatusMessage()

Get the detailedStatusMessage property: The descriptive message about the current detailed status.

Returns:

the detailedStatusMessage value.

etag

public String etag()

Get the etag property: Resource ETag.

Returns:

the etag value.

extendedLocation

public ExtendedLocation extendedLocation()

Get the extendedLocation property: The extended location of the cluster associated with the resource.

Returns:

the extendedLocation value.

fromJson

public static VirtualMachineInner fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualMachineInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

VirtualMachineInner.id()

Returns:

the id value.

identity

public ManagedServiceIdentity identity()

Get the identity property: The identity for the resource.

Returns:

the identity value.

isolateEmulatorThread

public VirtualMachineIsolateEmulatorThread isolateEmulatorThread()

Get the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine.

Returns:

the isolateEmulatorThread value.

memorySizeGB

public long memorySizeGB()

Get the memorySizeGB property: The memory size of the virtual machine. Allocations are measured in gibibytes.

Returns:

the memorySizeGB value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

VirtualMachineInner.name()

Returns:

the name value.

networkAttachments

public List<NetworkAttachment> networkAttachments()

Get the networkAttachments property: The list of network attachments to the virtual machine.

Returns:

the networkAttachments value.

networkData

public String networkData()

Get the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in preference to this property.

Returns:

the networkData value.

networkDataContent

public String networkDataContent()

Get the networkDataContent property: The Base64 encoded cloud-init network data.

Returns:

the networkDataContent value.

placementHints

public List<VirtualMachinePlacementHint> placementHints()

Get the placementHints property: The scheduling hints for the virtual machine.

Returns:

the placementHints value.

powerState

public VirtualMachinePowerState powerState()

Get the powerState property: The power state of the virtual machine.

Returns:

the powerState value.

provisioningState

public VirtualMachineProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the virtual machine.

Returns:

the provisioningState value.

sshPublicKeys

public List<SshPublicKey> sshPublicKeys()

Get the sshPublicKeys property: The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init ssh_authorized_keys mechanism for the adminUsername.

Returns:

the sshPublicKeys value.

storageProfile

public StorageProfile storageProfile()

Get the storageProfile property: The storage profile that specifies size and other parameters about the disks related to the virtual machine.

Returns:

the storageProfile value.

systemData

public SystemData systemData()

Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

VirtualMachineInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

VirtualMachineInner.type()

Returns:

the type value.

userData

public String userData()

Get the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in preference to this property.

Returns:

the userData value.

userDataContent

public String userDataContent()

Get the userDataContent property: The Base64 encoded cloud-init user data.

Returns:

the userDataContent value.

validate

public void validate()

Validates the instance.

virtioInterface

public VirtualMachineVirtioInterfaceType virtioInterface()

Get the virtioInterface property: Field Deprecated, use virtualizationModel instead. The type of the virtio interface.

Returns:

the virtioInterface value.

vmDeviceModel

public VirtualMachineDeviceModelType vmDeviceModel()

Get the vmDeviceModel property: The type of the device model to use.

Returns:

the vmDeviceModel value.

vmImage

public String vmImage()

Get the vmImage property: The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image.

Returns:

the vmImage value.

vmImageRepositoryCredentials

public ImageRepositoryCredentials vmImageRepositoryCredentials()

Get the vmImageRepositoryCredentials property: The credentials used to login to the image repository that has access to the specified image.

Returns:

the vmImageRepositoryCredentials value.

volumes

public List<String> volumes()

Get the volumes property: The resource IDs of volumes that are attached to the virtual machine.

Returns:

the volumes value.

withAdminUsername

public VirtualMachineInner withAdminUsername(String adminUsername)

Set the adminUsername property: The name of the administrator to which the ssh public keys will be added into the authorized keys.

Parameters:

adminUsername - the adminUsername value to set.

Returns:

the VirtualMachineInner object itself.

withBootMethod

public VirtualMachineInner withBootMethod(VirtualMachineBootMethod bootMethod)

Set the bootMethod property: Selects the boot method for the virtual machine.

Parameters:

bootMethod - the bootMethod value to set.

Returns:

the VirtualMachineInner object itself.

withCloudServicesNetworkAttachment

public VirtualMachineInner withCloudServicesNetworkAttachment(NetworkAttachment cloudServicesNetworkAttachment)

Set the cloudServicesNetworkAttachment property: The cloud service network that provides platform-level services for the virtual machine.

Parameters:

cloudServicesNetworkAttachment - the cloudServicesNetworkAttachment value to set.

Returns:

the VirtualMachineInner object itself.

withConsoleExtendedLocation

public VirtualMachineInner withConsoleExtendedLocation(ExtendedLocation consoleExtendedLocation)

Set the consoleExtendedLocation property: The extended location to use for creation of a VM console resource.

Parameters:

consoleExtendedLocation - the consoleExtendedLocation value to set.

Returns:

the VirtualMachineInner object itself.

withCpuCores

public VirtualMachineInner withCpuCores(long cpuCores)

Set the cpuCores property: The number of CPU cores in the virtual machine.

Parameters:

cpuCores - the cpuCores value to set.

Returns:

the VirtualMachineInner object itself.

withExtendedLocation

public VirtualMachineInner withExtendedLocation(ExtendedLocation extendedLocation)

Set the extendedLocation property: The extended location of the cluster associated with the resource.

Parameters:

extendedLocation - the extendedLocation value to set.

Returns:

the VirtualMachineInner object itself.

withIdentity

public VirtualMachineInner withIdentity(ManagedServiceIdentity identity)

Set the identity property: The identity for the resource.

Parameters:

identity - the identity value to set.

Returns:

the VirtualMachineInner object itself.

withIsolateEmulatorThread

public VirtualMachineInner withIsolateEmulatorThread(VirtualMachineIsolateEmulatorThread isolateEmulatorThread)

Set the isolateEmulatorThread property: Field Deprecated, the value will be ignored if provided. The indicator of whether one of the specified CPU cores is isolated to run the emulator thread for this virtual machine.

Parameters:

isolateEmulatorThread - the isolateEmulatorThread value to set.

Returns:

the VirtualMachineInner object itself.

withLocation

public VirtualMachineInner withLocation(String location)

Overrides:

VirtualMachineInner.withLocation(String location)

Parameters:

location

withMemorySizeGB

public VirtualMachineInner withMemorySizeGB(long memorySizeGB)

Set the memorySizeGB property: The memory size of the virtual machine. Allocations are measured in gibibytes.

Parameters:

memorySizeGB - the memorySizeGB value to set.

Returns:

the VirtualMachineInner object itself.

withNetworkAttachments

public VirtualMachineInner withNetworkAttachments(List<NetworkAttachment> networkAttachments)

Set the networkAttachments property: The list of network attachments to the virtual machine.

Parameters:

networkAttachments - the networkAttachments value to set.

Returns:

the VirtualMachineInner object itself.

withNetworkData

public VirtualMachineInner withNetworkData(String networkData)

Set the networkData property: Field Deprecated: The Base64 encoded cloud-init network data. The networkDataContent property will be used in preference to this property.

Parameters:

networkData - the networkData value to set.

Returns:

the VirtualMachineInner object itself.

withNetworkDataContent

public VirtualMachineInner withNetworkDataContent(String networkDataContent)

Set the networkDataContent property: The Base64 encoded cloud-init network data.

Parameters:

networkDataContent - the networkDataContent value to set.

Returns:

the VirtualMachineInner object itself.

withPlacementHints

public VirtualMachineInner withPlacementHints(List<VirtualMachinePlacementHint> placementHints)

Set the placementHints property: The scheduling hints for the virtual machine.

Parameters:

placementHints - the placementHints value to set.

Returns:

the VirtualMachineInner object itself.

withSshPublicKeys

public VirtualMachineInner withSshPublicKeys(List<SshPublicKey> sshPublicKeys)

Set the sshPublicKeys property: The list of ssh public keys. Each key will be added to the virtual machine using the cloud-init ssh_authorized_keys mechanism for the adminUsername.

Parameters:

sshPublicKeys - the sshPublicKeys value to set.

Returns:

the VirtualMachineInner object itself.

withStorageProfile

public VirtualMachineInner withStorageProfile(StorageProfile storageProfile)

Set the storageProfile property: The storage profile that specifies size and other parameters about the disks related to the virtual machine.

Parameters:

storageProfile - the storageProfile value to set.

Returns:

the VirtualMachineInner object itself.

withTags

public VirtualMachineInner withTags(Map<String,String> tags)

Overrides:

VirtualMachineInner.withTags(Map<String,String> tags)

Parameters:

tags

withUserData

public VirtualMachineInner withUserData(String userData)

Set the userData property: Field Deprecated: The Base64 encoded cloud-init user data. The userDataContent property will be used in preference to this property.

Parameters:

userData - the userData value to set.

Returns:

the VirtualMachineInner object itself.

withUserDataContent

public VirtualMachineInner withUserDataContent(String userDataContent)

Set the userDataContent property: The Base64 encoded cloud-init user data.

Parameters:

userDataContent - the userDataContent value to set.

Returns:

the VirtualMachineInner object itself.

withVirtioInterface

public VirtualMachineInner withVirtioInterface(VirtualMachineVirtioInterfaceType virtioInterface)

Set the virtioInterface property: Field Deprecated, use virtualizationModel instead. The type of the virtio interface.

Parameters:

virtioInterface - the virtioInterface value to set.

Returns:

the VirtualMachineInner object itself.

withVmDeviceModel

public VirtualMachineInner withVmDeviceModel(VirtualMachineDeviceModelType vmDeviceModel)

Set the vmDeviceModel property: The type of the device model to use.

Parameters:

vmDeviceModel - the vmDeviceModel value to set.

Returns:

the VirtualMachineInner object itself.

withVmImage

public VirtualMachineInner withVmImage(String vmImage)

Set the vmImage property: The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image.

Parameters:

vmImage - the vmImage value to set.

Returns:

the VirtualMachineInner object itself.

withVmImageRepositoryCredentials

public VirtualMachineInner withVmImageRepositoryCredentials(ImageRepositoryCredentials vmImageRepositoryCredentials)

Set the vmImageRepositoryCredentials property: The credentials used to login to the image repository that has access to the specified image.

Parameters:

vmImageRepositoryCredentials - the vmImageRepositoryCredentials value to set.

Returns:

the VirtualMachineInner object itself.

Applies to