Share via


VirtualMachineResourceSettings Class

public final class VirtualMachineResourceSettings
extends ResourceSettings

Gets or sets the virtual machine resource settings.

Constructor Summary

Constructor Description
VirtualMachineResourceSettings()

Creates an instance of VirtualMachineResourceSettings class.

Method Summary

Modifier and Type Method and Description
static VirtualMachineResourceSettings fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineResourceSettings from the JsonReader.

String resourceType()

Get the resourceType property: The resource type.

Map<String,String> tags()

Get the tags property: Gets or sets the Resource tags.

String targetAvailabilitySetId()

Get the targetAvailabilitySetId property: Gets or sets the target availability set id for virtual machines not in an availability set at source.

TargetAvailabilityZone targetAvailabilityZone()

Get the targetAvailabilityZone property: Gets or sets the target availability zone.

String targetVmSize()

Get the targetVmSize property: Gets or sets the target virtual machine size.

JsonWriter toJson(JsonWriter jsonWriter)
List<String> userManagedIdentities()

Get the userManagedIdentities property: Gets or sets user-managed identities.

void validate()

Validates the instance.

VirtualMachineResourceSettings withTags(Map<String,String> tags)

Set the tags property: Gets or sets the Resource tags.

VirtualMachineResourceSettings withTargetAvailabilitySetId(String targetAvailabilitySetId)

Set the targetAvailabilitySetId property: Gets or sets the target availability set id for virtual machines not in an availability set at source.

VirtualMachineResourceSettings withTargetAvailabilityZone(TargetAvailabilityZone targetAvailabilityZone)

Set the targetAvailabilityZone property: Gets or sets the target availability zone.

VirtualMachineResourceSettings withTargetResourceGroupName(String targetResourceGroupName)

Set the targetResourceGroupName property: Gets or sets the target resource group name.

VirtualMachineResourceSettings withTargetResourceName(String targetResourceName)

Set the targetResourceName property: Gets or sets the target Resource name.

VirtualMachineResourceSettings withTargetVmSize(String targetVmSize)

Set the targetVmSize property: Gets or sets the target virtual machine size.

VirtualMachineResourceSettings withUserManagedIdentities(List<String> userManagedIdentities)

Set the userManagedIdentities property: Gets or sets user-managed identities.

Methods inherited from ResourceSettings

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineResourceSettings

public VirtualMachineResourceSettings()

Creates an instance of VirtualMachineResourceSettings class.

Method Details

fromJson

public static VirtualMachineResourceSettings fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineResourceSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

resourceType

public String resourceType()

Get the resourceType property: The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

Overrides:

VirtualMachineResourceSettings.resourceType()

Returns:

the resourceType value.

tags

public Map<String,String> tags()

Get the tags property: Gets or sets the Resource tags.

Returns:

the tags value.

targetAvailabilitySetId

public String targetAvailabilitySetId()

Get the targetAvailabilitySetId property: Gets or sets the target availability set id for virtual machines not in an availability set at source.

Returns:

the targetAvailabilitySetId value.

targetAvailabilityZone

public TargetAvailabilityZone targetAvailabilityZone()

Get the targetAvailabilityZone property: Gets or sets the target availability zone.

Returns:

the targetAvailabilityZone value.

targetVmSize

public String targetVmSize()

Get the targetVmSize property: Gets or sets the target virtual machine size.

Returns:

the targetVmSize value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

VirtualMachineResourceSettings.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

userManagedIdentities

public List<String> userManagedIdentities()

Get the userManagedIdentities property: Gets or sets user-managed identities.

Returns:

the userManagedIdentities value.

validate

public void validate()

Validates the instance.

Overrides:

VirtualMachineResourceSettings.validate()

withTags

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

Set the tags property: Gets or sets the Resource tags.

Parameters:

tags - the tags value to set.

Returns:

the VirtualMachineResourceSettings object itself.

withTargetAvailabilitySetId

public VirtualMachineResourceSettings withTargetAvailabilitySetId(String targetAvailabilitySetId)

Set the targetAvailabilitySetId property: Gets or sets the target availability set id for virtual machines not in an availability set at source.

Parameters:

targetAvailabilitySetId - the targetAvailabilitySetId value to set.

Returns:

the VirtualMachineResourceSettings object itself.

withTargetAvailabilityZone

public VirtualMachineResourceSettings withTargetAvailabilityZone(TargetAvailabilityZone targetAvailabilityZone)

Set the targetAvailabilityZone property: Gets or sets the target availability zone.

Parameters:

targetAvailabilityZone - the targetAvailabilityZone value to set.

Returns:

the VirtualMachineResourceSettings object itself.

withTargetResourceGroupName

public VirtualMachineResourceSettings withTargetResourceGroupName(String targetResourceGroupName)

Set the targetResourceGroupName property: Gets or sets the target resource group name.

Overrides:

VirtualMachineResourceSettings.withTargetResourceGroupName(String targetResourceGroupName)

Parameters:

targetResourceGroupName

withTargetResourceName

public VirtualMachineResourceSettings withTargetResourceName(String targetResourceName)

Set the targetResourceName property: Gets or sets the target Resource name.

Overrides:

VirtualMachineResourceSettings.withTargetResourceName(String targetResourceName)

Parameters:

targetResourceName

withTargetVmSize

public VirtualMachineResourceSettings withTargetVmSize(String targetVmSize)

Set the targetVmSize property: Gets or sets the target virtual machine size.

Parameters:

targetVmSize - the targetVmSize value to set.

Returns:

the VirtualMachineResourceSettings object itself.

withUserManagedIdentities

public VirtualMachineResourceSettings withUserManagedIdentities(List<String> userManagedIdentities)

Set the userManagedIdentities property: Gets or sets user-managed identities.

Parameters:

userManagedIdentities - the userManagedIdentities value to set.

Returns:

the VirtualMachineResourceSettings object itself.

Applies to