Share via


VirtualMachineProfile Class

  • java.lang.Object
    • com.azure.resourcemanager.labservices.models.VirtualMachineProfile

Implements

public final class VirtualMachineProfile
implements JsonSerializable<VirtualMachineProfile>

The base virtual machine configuration for a lab.

Constructor Summary

Constructor Description
VirtualMachineProfile()

Creates an instance of VirtualMachineProfile class.

Method Summary

Modifier and Type Method and Description
VirtualMachineAdditionalCapabilities additionalCapabilities()

Get the additionalCapabilities property: Additional VM capabilities.

Credentials adminUser()

Get the adminUser property: Credentials for the admin user on the VM.

CreateOption createOption()

Get the createOption property: Indicates what lab virtual machines are created from.

static VirtualMachineProfile fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineProfile from the JsonReader.

ImageReference imageReference()

Get the imageReference property: The image configuration for lab virtual machines.

Credentials nonAdminUser()

Get the nonAdminUser property: Credentials for the non-admin user on the VM, if one exists.

OsType osType()

Get the osType property: The OS type of the image.

Sku sku()

Get the sku property: The SKU for the lab.

JsonWriter toJson(JsonWriter jsonWriter)
Duration usageQuota()

Get the usageQuota property: The initial quota alloted to each lab user.

EnableState useSharedPassword()

Get the useSharedPassword property: Enabling this option will use the same password for all user VMs.

void validate()

Validates the instance.

VirtualMachineProfile withAdditionalCapabilities(VirtualMachineAdditionalCapabilities additionalCapabilities)

Set the additionalCapabilities property: Additional VM capabilities.

VirtualMachineProfile withAdminUser(Credentials adminUser)

Set the adminUser property: Credentials for the admin user on the VM.

VirtualMachineProfile withCreateOption(CreateOption createOption)

Set the createOption property: Indicates what lab virtual machines are created from.

VirtualMachineProfile withImageReference(ImageReference imageReference)

Set the imageReference property: The image configuration for lab virtual machines.

VirtualMachineProfile withNonAdminUser(Credentials nonAdminUser)

Set the nonAdminUser property: Credentials for the non-admin user on the VM, if one exists.

VirtualMachineProfile withSku(Sku sku)

Set the sku property: The SKU for the lab.

VirtualMachineProfile withUsageQuota(Duration usageQuota)

Set the usageQuota property: The initial quota alloted to each lab user.

VirtualMachineProfile withUseSharedPassword(EnableState useSharedPassword)

Set the useSharedPassword property: Enabling this option will use the same password for all user VMs.

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineProfile

public VirtualMachineProfile()

Creates an instance of VirtualMachineProfile class.

Method Details

additionalCapabilities

public VirtualMachineAdditionalCapabilities additionalCapabilities()

Get the additionalCapabilities property: Additional VM capabilities.

Returns:

the additionalCapabilities value.

adminUser

public Credentials adminUser()

Get the adminUser property: Credentials for the admin user on the VM.

Returns:

the adminUser value.

createOption

public CreateOption createOption()

Get the createOption property: Indicates what lab virtual machines are created from.

Returns:

the createOption value.

fromJson

public static VirtualMachineProfile fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

imageReference

public ImageReference imageReference()

Get the imageReference property: The image configuration for lab virtual machines.

Returns:

the imageReference value.

nonAdminUser

public Credentials nonAdminUser()

Get the nonAdminUser property: Credentials for the non-admin user on the VM, if one exists.

Returns:

the nonAdminUser value.

osType

public OsType osType()

Get the osType property: The OS type of the image.

Returns:

the osType value.

sku

public Sku sku()

Get the sku property: The SKU for the lab. Defines the type of virtual machines used in the lab.

Returns:

the sku value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

usageQuota

public Duration usageQuota()

Get the usageQuota property: The initial quota alloted to each lab user. Must be a time span between 0 and 9999 hours.

Returns:

the usageQuota value.

useSharedPassword

public EnableState useSharedPassword()

Get the useSharedPassword property: Enabling this option will use the same password for all user VMs.

Returns:

the useSharedPassword value.

validate

public void validate()

Validates the instance.

withAdditionalCapabilities

public VirtualMachineProfile withAdditionalCapabilities(VirtualMachineAdditionalCapabilities additionalCapabilities)

Set the additionalCapabilities property: Additional VM capabilities.

Parameters:

additionalCapabilities - the additionalCapabilities value to set.

Returns:

the VirtualMachineProfile object itself.

withAdminUser

public VirtualMachineProfile withAdminUser(Credentials adminUser)

Set the adminUser property: Credentials for the admin user on the VM.

Parameters:

adminUser - the adminUser value to set.

Returns:

the VirtualMachineProfile object itself.

withCreateOption

public VirtualMachineProfile withCreateOption(CreateOption createOption)

Set the createOption property: Indicates what lab virtual machines are created from.

Parameters:

createOption - the createOption value to set.

Returns:

the VirtualMachineProfile object itself.

withImageReference

public VirtualMachineProfile withImageReference(ImageReference imageReference)

Set the imageReference property: The image configuration for lab virtual machines.

Parameters:

imageReference - the imageReference value to set.

Returns:

the VirtualMachineProfile object itself.

withNonAdminUser

public VirtualMachineProfile withNonAdminUser(Credentials nonAdminUser)

Set the nonAdminUser property: Credentials for the non-admin user on the VM, if one exists.

Parameters:

nonAdminUser - the nonAdminUser value to set.

Returns:

the VirtualMachineProfile object itself.

withSku

public VirtualMachineProfile withSku(Sku sku)

Set the sku property: The SKU for the lab. Defines the type of virtual machines used in the lab.

Parameters:

sku - the sku value to set.

Returns:

the VirtualMachineProfile object itself.

withUsageQuota

public VirtualMachineProfile withUsageQuota(Duration usageQuota)

Set the usageQuota property: The initial quota alloted to each lab user. Must be a time span between 0 and 9999 hours.

Parameters:

usageQuota - the usageQuota value to set.

Returns:

the VirtualMachineProfile object itself.

withUseSharedPassword

public VirtualMachineProfile withUseSharedPassword(EnableState useSharedPassword)

Set the useSharedPassword property: Enabling this option will use the same password for all user VMs.

Parameters:

useSharedPassword - the useSharedPassword value to set.

Returns:

the VirtualMachineProfile object itself.

Applies to