VirtualMachineScaleSetVMInner Class

public final class VirtualMachineScaleSetVMInner
extends Resource

Describes a virtual machine scale set virtual machine.

Constructor Summary

Constructor Description
VirtualMachineScaleSetVMInner()

Creates an instance of VirtualMachineScaleSetVMInner class.

Method Summary

Modifier and Type Method and Description
AdditionalCapabilities additionalCapabilities()

Get the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine in the scale set.

SubResource availabilitySet()

Get the availabilitySet property: Specifies information about the availability set that the virtual machine should be assigned to.

DiagnosticsProfile diagnosticsProfile()

Get the diagnosticsProfile property: Specifies the boot diagnostic settings state.

String etag()

Get the etag property: Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates.

static VirtualMachineScaleSetVMInner fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineScaleSetVMInner from the JsonReader.

HardwareProfile hardwareProfile()

Get the hardwareProfile property: Specifies the hardware settings for the virtual machine.

String id()

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

VirtualMachineIdentity identity()

Get the identity property: The identity of the virtual machine, if configured.

String instanceId()

Get the instanceId property: The virtual machine instance ID.

VirtualMachineScaleSetVMInstanceViewInner instanceView()

Get the instanceView property: The virtual machine instance view.

Boolean latestModelApplied()

Get the latestModelApplied property: Specifies whether the latest model has been applied to the virtual machine.

String licenseType()

Get the licenseType property: Specifies that the image or disk that is being used was licensed on-premises.

String modelDefinitionApplied()

Get the modelDefinitionApplied property: Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.

String name()

Get the name property: The name of the resource.

NetworkProfile networkProfile()

Get the networkProfile property: Specifies the network interfaces of the virtual machine.

VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration()

Get the networkProfileConfiguration property: Specifies the network profile configuration of the virtual machine.

OSProfile osProfile()

Get the osProfile property: Specifies the operating system settings for the virtual machine.

Plan plan()

Get the plan property: Specifies information about the marketplace image used to create the virtual machine.

VirtualMachineScaleSetVMProtectionPolicy protectionPolicy()

Get the protectionPolicy property: Specifies the protection policy of the virtual machine.

String provisioningState()

Get the provisioningState property: The provisioning state, which only appears in the response.

List<VirtualMachineExtensionInner> resources()

Get the resources property: The virtual machine child extension resources.

SecurityProfile securityProfile()

Get the securityProfile property: Specifies the Security related profile settings for the virtual machine.

Sku sku()

Get the sku property: The virtual machine SKU.

StorageProfile storageProfile()

Get the storageProfile property: Specifies the storage settings for the virtual machine disks.

OffsetDateTime timeCreated()

Get the timeCreated property: Specifies the time at which the Virtual Machine resource was created.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

String userData()

Get the userData property: UserData for the VM, which must be base-64 encoded.

void validate()

Validates the instance.

String vmId()

Get the vmId property: Azure VM unique ID.

VirtualMachineScaleSetVMInner withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities)

Set the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine in the scale set.

VirtualMachineScaleSetVMInner withAvailabilitySet(SubResource availabilitySet)

Set the availabilitySet property: Specifies information about the availability set that the virtual machine should be assigned to.

VirtualMachineScaleSetVMInner withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile)

Set the diagnosticsProfile property: Specifies the boot diagnostic settings state.

VirtualMachineScaleSetVMInner withHardwareProfile(HardwareProfile hardwareProfile)

Set the hardwareProfile property: Specifies the hardware settings for the virtual machine.

VirtualMachineScaleSetVMInner withIdentity(VirtualMachineIdentity identity)

Set the identity property: The identity of the virtual machine, if configured.

VirtualMachineScaleSetVMInner withLicenseType(String licenseType)

Set the licenseType property: Specifies that the image or disk that is being used was licensed on-premises.

VirtualMachineScaleSetVMInner withLocation(String location)
VirtualMachineScaleSetVMInner withNetworkProfile(NetworkProfile networkProfile)

Set the networkProfile property: Specifies the network interfaces of the virtual machine.

VirtualMachineScaleSetVMInner withNetworkProfileConfiguration(VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration)

Set the networkProfileConfiguration property: Specifies the network profile configuration of the virtual machine.

VirtualMachineScaleSetVMInner withOsProfile(OSProfile osProfile)

Set the osProfile property: Specifies the operating system settings for the virtual machine.

VirtualMachineScaleSetVMInner withPlan(Plan plan)

Set the plan property: Specifies information about the marketplace image used to create the virtual machine.

VirtualMachineScaleSetVMInner withProtectionPolicy(VirtualMachineScaleSetVMProtectionPolicy protectionPolicy)

Set the protectionPolicy property: Specifies the protection policy of the virtual machine.

VirtualMachineScaleSetVMInner withSecurityProfile(SecurityProfile securityProfile)

Set the securityProfile property: Specifies the Security related profile settings for the virtual machine.

VirtualMachineScaleSetVMInner withStorageProfile(StorageProfile storageProfile)

Set the storageProfile property: Specifies the storage settings for the virtual machine disks.

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

Set the userData property: UserData for the VM, which must be base-64 encoded.

List<String> zones()

Get the zones property: The virtual machine zones.

Methods inherited from ProxyResource

Methods inherited from Resource

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineScaleSetVMInner

public VirtualMachineScaleSetVMInner()

Creates an instance of VirtualMachineScaleSetVMInner class.

Method Details

additionalCapabilities

public AdditionalCapabilities additionalCapabilities()

Get the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.

Returns:

the additionalCapabilities value.

availabilitySet

public SubResource availabilitySet()

Get the availabilitySet property: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

Returns:

the availabilitySet value.

diagnosticsProfile

public DiagnosticsProfile diagnosticsProfile()

Get the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.

Returns:

the diagnosticsProfile value.

etag

public String etag()

Get the etag property: Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates.

Returns:

the etag value.

fromJson

public static VirtualMachineScaleSetVMInner fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineScaleSetVMInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualMachineScaleSetVMInner 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.

hardwareProfile

public HardwareProfile hardwareProfile()

Get the hardwareProfile property: Specifies the hardware settings for the virtual machine.

Returns:

the hardwareProfile value.

id

public String id()

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

Overrides:

VirtualMachineScaleSetVMInner.id()

Returns:

the id value.

identity

public VirtualMachineIdentity identity()

Get the identity property: The identity of the virtual machine, if configured.

Returns:

the identity value.

instanceId

public String instanceId()

Get the instanceId property: The virtual machine instance ID.

Returns:

the instanceId value.

instanceView

public VirtualMachineScaleSetVMInstanceViewInner instanceView()

Get the instanceView property: The virtual machine instance view.

Returns:

the instanceView value.

latestModelApplied

public Boolean latestModelApplied()

Get the latestModelApplied property: Specifies whether the latest model has been applied to the virtual machine.

Returns:

the latestModelApplied value.

licenseType

public String licenseType()

Get the licenseType property: Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15.

Returns:

the licenseType value.

modelDefinitionApplied

public String modelDefinitionApplied()

Get the modelDefinitionApplied property: Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.

Returns:

the modelDefinitionApplied value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

VirtualMachineScaleSetVMInner.name()

Returns:

the name value.

networkProfile

public NetworkProfile networkProfile()

Get the networkProfile property: Specifies the network interfaces of the virtual machine.

Returns:

the networkProfile value.

networkProfileConfiguration

public VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration()

Get the networkProfileConfiguration property: Specifies the network profile configuration of the virtual machine.

Returns:

the networkProfileConfiguration value.

osProfile

public OSProfile osProfile()

Get the osProfile property: Specifies the operating system settings for the virtual machine.

Returns:

the osProfile value.

plan

public Plan plan()

Get the plan property: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.

Returns:

the plan value.

protectionPolicy

public VirtualMachineScaleSetVMProtectionPolicy protectionPolicy()

Get the protectionPolicy property: Specifies the protection policy of the virtual machine.

Returns:

the protectionPolicy value.

provisioningState

public String provisioningState()

Get the provisioningState property: The provisioning state, which only appears in the response.

Returns:

the provisioningState value.

resources

public List resources()

Get the resources property: The virtual machine child extension resources.

Returns:

the resources value.

securityProfile

public SecurityProfile securityProfile()

Get the securityProfile property: Specifies the Security related profile settings for the virtual machine.

Returns:

the securityProfile value.

sku

public Sku sku()

Get the sku property: The virtual machine SKU.

Returns:

the sku value.

storageProfile

public StorageProfile storageProfile()

Get the storageProfile property: Specifies the storage settings for the virtual machine disks.

Returns:

the storageProfile value.

timeCreated

public OffsetDateTime timeCreated()

Get the timeCreated property: Specifies the time at which the Virtual Machine resource was created.

Returns:

the timeCreated value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

VirtualMachineScaleSetVMInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

VirtualMachineScaleSetVMInner.type()

Returns:

the type value.

userData

public String userData()

Get the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.

Returns:

the userData value.

validate

public void validate()

Validates the instance.

vmId

public String vmId()

Get the vmId property: Azure VM unique ID.

Returns:

the vmId value.

withAdditionalCapabilities

public VirtualMachineScaleSetVMInner withAdditionalCapabilities(AdditionalCapabilities additionalCapabilities)

Set the additionalCapabilities property: Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.

Parameters:

additionalCapabilities - the additionalCapabilities value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withAvailabilitySet

public VirtualMachineScaleSetVMInner withAvailabilitySet(SubResource availabilitySet)

Set the availabilitySet property: Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.

Parameters:

availabilitySet - the availabilitySet value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withDiagnosticsProfile

public VirtualMachineScaleSetVMInner withDiagnosticsProfile(DiagnosticsProfile diagnosticsProfile)

Set the diagnosticsProfile property: Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.

Parameters:

diagnosticsProfile - the diagnosticsProfile value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withHardwareProfile

public VirtualMachineScaleSetVMInner withHardwareProfile(HardwareProfile hardwareProfile)

Set the hardwareProfile property: Specifies the hardware settings for the virtual machine.

Parameters:

hardwareProfile - the hardwareProfile value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withIdentity

public VirtualMachineScaleSetVMInner withIdentity(VirtualMachineIdentity identity)

Set the identity property: The identity of the virtual machine, if configured.

Parameters:

identity - the identity value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withLicenseType

public VirtualMachineScaleSetVMInner withLicenseType(String licenseType)

Set the licenseType property: Specifies that the image or disk that is being used was licensed on-premises.

Possible values for Windows Server operating system are:

Windows_Client

Windows_Server

Possible values for Linux Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS (for SUSE)

For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

Minimum api-version: 2015-06-15.

Parameters:

licenseType - the licenseType value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withLocation

public VirtualMachineScaleSetVMInner withLocation(String location)

Overrides:

VirtualMachineScaleSetVMInner.withLocation(String location)

Parameters:

location

withNetworkProfile

public VirtualMachineScaleSetVMInner withNetworkProfile(NetworkProfile networkProfile)

Set the networkProfile property: Specifies the network interfaces of the virtual machine.

Parameters:

networkProfile - the networkProfile value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withNetworkProfileConfiguration

public VirtualMachineScaleSetVMInner withNetworkProfileConfiguration(VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration)

Set the networkProfileConfiguration property: Specifies the network profile configuration of the virtual machine.

Parameters:

networkProfileConfiguration - the networkProfileConfiguration value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withOsProfile

public VirtualMachineScaleSetVMInner withOsProfile(OSProfile osProfile)

Set the osProfile property: Specifies the operating system settings for the virtual machine.

Parameters:

osProfile - the osProfile value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withPlan

public VirtualMachineScaleSetVMInner withPlan(Plan plan)

Set the plan property: Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.

Parameters:

plan - the plan value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withProtectionPolicy

public VirtualMachineScaleSetVMInner withProtectionPolicy(VirtualMachineScaleSetVMProtectionPolicy protectionPolicy)

Set the protectionPolicy property: Specifies the protection policy of the virtual machine.

Parameters:

protectionPolicy - the protectionPolicy value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withSecurityProfile

public VirtualMachineScaleSetVMInner withSecurityProfile(SecurityProfile securityProfile)

Set the securityProfile property: Specifies the Security related profile settings for the virtual machine.

Parameters:

securityProfile - the securityProfile value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withStorageProfile

public VirtualMachineScaleSetVMInner withStorageProfile(StorageProfile storageProfile)

Set the storageProfile property: Specifies the storage settings for the virtual machine disks.

Parameters:

storageProfile - the storageProfile value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

withTags

public VirtualMachineScaleSetVMInner withTags(Map tags)

Overrides:

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

Parameters:

tags

withUserData

public VirtualMachineScaleSetVMInner withUserData(String userData)

Set the userData property: UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.

Parameters:

userData - the userData value to set.

Returns:

the VirtualMachineScaleSetVMInner object itself.

zones

public List zones()

Get the zones property: The virtual machine zones.

Returns:

the zones value.

Applies to