Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for
license information.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.compute;
import com.microsoft.azure.PagedList;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.apigeneration.Method;
import com.microsoft.azure.management.compute.implementation.VirtualMachineScaleSetVMInner;
import com.microsoft.azure.management.network.VirtualMachineScaleSetNetworkInterface;
import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource;
import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import rx.Completable;
import rx.Observable;
import java.util.List;
import java.util.Map;
An immutable client-side representation of a virtual machine instance in an Azure virtual machine scale set.
/**
* An immutable client-side representation of a virtual machine instance in an Azure virtual machine scale set.
*/
@Fluent
public interface VirtualMachineScaleSetVM extends
Resource,
ChildResource<VirtualMachineScaleSet>,
Refreshable<VirtualMachineScaleSetVM>,
Updatable<VirtualMachineScaleSetVM.Update>,
HasInner<VirtualMachineScaleSetVMInner> {
Returns: the instance ID assigned to this virtual machine instance
/**
* @return the instance ID assigned to this virtual machine instance
*/
String instanceId();
Returns: the SKU of the virtual machine instance, this will be SKU used while creating the parent
virtual machine scale set
/**
* @return the SKU of the virtual machine instance, this will be SKU used while creating the parent
* virtual machine scale set
*/
Sku sku();
Returns: virtual machine instance size
/**
* @return virtual machine instance size
*/
VirtualMachineSizeTypes size();
Returns: true if the latest scale set model changes are applied to the virtual machine instance
/**
* @return true if the latest scale set model changes are applied to the virtual machine instance
*/
boolean isLatestScaleSetUpdateApplied();
Returns: true if the operating system of the virtual machine instance is based on platform image
/**
* @return true if the operating system of the virtual machine instance is based on platform image
*/
boolean isOSBasedOnPlatformImage();
Returns: true if the operating system of the virtual machine instance is based on custom image
/**
* @return true if the operating system of the virtual machine instance is based on custom image
*/
boolean isOSBasedOnCustomImage();
Returns: true if the operating system of the virtual machine instance is based on stored image
/**
* @return true if the operating system of the virtual machine instance is based on stored image
*/
boolean isOSBasedOnStoredImage();
Returns: reference to the platform image that the virtual machine instance operating system is based on,
null will be returned if the operating system is based on custom image
/**
* @return reference to the platform image that the virtual machine instance operating system is based on,
* null will be returned if the operating system is based on custom image
*/
ImageReference platformImageReference();
Returns: the platform image that the virtual machine instance operating system is based on, null be
returned otherwise
/**
* @return the platform image that the virtual machine instance operating system is based on, null be
* returned otherwise
*/
VirtualMachineImage getOSPlatformImage();
Returns: the custom image that the virtual machine instance operating system is based on, null be
returned otherwise
/**
* @return the custom image that the virtual machine instance operating system is based on, null be
* returned otherwise
*/
VirtualMachineCustomImage getOSCustomImage();
Returns: VHD URI of the custom image that the virtual machine instance operating system is based on,
null will be returned if the operating system is based on platform image
/**
* @return VHD URI of the custom image that the virtual machine instance operating system is based on,
* null will be returned if the operating system is based on platform image
*/
String storedImageUnmanagedVhdUri();
Returns: the name of the operating system disk
/**
* @return the name of the operating system disk
*/
String osDiskName();
Returns: VHD URI to the operating system disk
/**
* @return VHD URI to the operating system disk
*/
String osUnmanagedDiskVhdUri();
Returns: resource ID of the managed disk backing OS disk
/**
* @return resource ID of the managed disk backing OS disk
*/
String osDiskId();
Returns: the unmanaged data disks associated with this virtual machine instance, indexed by LUN
/**
* @return the unmanaged data disks associated with this virtual machine instance, indexed by LUN
*/
Map<Integer, VirtualMachineUnmanagedDataDisk> unmanagedDataDisks();
Returns: the managed data disks associated with this virtual machine instance, indexed by LUN
/**
* @return the managed data disks associated with this virtual machine instance, indexed by LUN
*/
Map<Integer, VirtualMachineDataDisk> dataDisks();
Returns: the caching type of the operating system disk
/**
* @return the caching type of the operating system disk
*/
CachingTypes osDiskCachingType();
Returns: the size of the operating system disk
/**
* @return the size of the operating system disk
*/
int osDiskSizeInGB();
Returns: the virtual machine instance computer name with the VM scale set prefix.
/**
* @return the virtual machine instance computer name with the VM scale set prefix.
*/
String computerName();
Returns: the name of the admin user
/**
* @return the name of the admin user
*/
String administratorUserName();
Returns: the operating system type
/**
* @return the operating system type
*/
OperatingSystemTypes osType();
Returns: true if this is a Linux virtual machine and password based login is enabled, false otherwise
/**
* @return true if this is a Linux virtual machine and password based login is enabled, false otherwise
*/
boolean isLinuxPasswordAuthenticationEnabled();
Returns: true if this is a Windows virtual machine and VM agent is provisioned, false otherwise
/**
* @return true if this is a Windows virtual machine and VM agent is provisioned, false otherwise
*/
boolean isWindowsVMAgentProvisioned();
Returns: true if this is a Windows virtual machine and automatic update is turned on, false otherwise
/**
* @return true if this is a Windows virtual machine and automatic update is turned on, false otherwise
*/
boolean isWindowsAutoUpdateEnabled();
Returns: the time zone of the Windows virtual machine
/**
* @return the time zone of the Windows virtual machine
*/
String windowsTimeZone();
Returns: true if the boot diagnostic is enabled, false otherwise
/**
* @return true if the boot diagnostic is enabled, false otherwise
*/
boolean bootDiagnosticEnabled();
Returns: the URI to the storage account storing boot diagnostics log
/**
* @return the URI to the storage account storing boot diagnostics log
*/
String bootDiagnosticStorageAccountUri();
Returns: the resource ID of the availability set that this virtual machine instance belongs to
/**
* @return the resource ID of the availability set that this virtual machine instance belongs to
*/
String availabilitySetId();
Returns: the list of resource ID of network interface associated with the virtual machine instance
/**
* @return the list of resource ID of network interface associated with the virtual machine instance
*/
List<String> networkInterfaceIds();
Returns: resource ID of primary network interface associated with virtual machine instance
/**
* @return resource ID of primary network interface associated with virtual machine instance
*/
String primaryNetworkInterfaceId();
Returns: the extensions associated with the virtual machine instance, indexed by name
/**
* @return the extensions associated with the virtual machine instance, indexed by name
*/
Map<String, VirtualMachineScaleSetVMInstanceExtension> extensions();
Returns: the storage profile of the virtual machine instance
/**
* @return the storage profile of the virtual machine instance
*/
StorageProfile storageProfile();
Returns: the operating system profile of an virtual machine instance
/**
* @return the operating system profile of an virtual machine instance
*/
OSProfile osProfile();
Returns: the diagnostics profile of the virtual machine instance
/**
* @return the diagnostics profile of the virtual machine instance
*/
DiagnosticsProfile diagnosticsProfile();
Returns: true if managed disk is used for the virtual machine's disks (os, data)
/**
* @return true if managed disk is used for the virtual machine's disks (os, data)
*/
boolean isManagedDiskEnabled();
Updates the version of the installed operating system in the virtual machine instance.
/**
* Updates the version of the installed operating system in the virtual machine instance.
*/
void reimage();
Updates the version of the installed operating system in the virtual machine instance.
Returns: a representation of the deferred computation of this call
/**
* Updates the version of the installed operating system in the virtual machine instance.
*
* @return a representation of the deferred computation of this call
*/
@Method
Completable reimageAsync();
Shuts down the virtual machine instance and releases the associated compute resources.
/**
* Shuts down the virtual machine instance and releases the associated compute resources.
*/
void deallocate();
Shuts down the virtual machine instance and releases the associated compute resources.
Returns: a representation of the deferred computation of this call
/**
* Shuts down the virtual machine instance and releases the associated compute resources.
*
* @return a representation of the deferred computation of this call
*/
@Method
Completable deallocateAsync();
Stops the virtual machine instance.
/**
* Stops the virtual machine instance.
*/
void powerOff();
Stops the virtual machine instance.
Returns: a representation of the deferred computation of this call
/**
* Stops the virtual machine instance.
*
* @return a representation of the deferred computation of this call
*/
@Method
Completable powerOffAsync();
Starts the virtual machine instance.
/**
* Starts the virtual machine instance.
*/
void start();
Starts the virtual machine instance.
Returns: a representation of the deferred computation of this call
/**
* Starts the virtual machine instance.
*
* @return a representation of the deferred computation of this call
*/
@Method
Completable startAsync();
Restarts the virtual machine instance.
/**
* Restarts the virtual machine instance.
*/
void restart();
Restarts the virtual machine instance.
Returns: a representation of the deferred computation of this call
/**
* Restarts the virtual machine instance.
*
* @return a representation of the deferred computation of this call
*/
@Method
Completable restartAsync();
Deletes the virtual machine instance.
/**
* Deletes the virtual machine instance.
*/
void delete();
Deletes the virtual machine instance.
Returns: a representation of the deferred computation of this call
/**
* Deletes the virtual machine instance.
*
* @return a representation of the deferred computation of this call
*/
@Method
Completable deleteAsync();
Gets the instance view of the virtual machine instance.
To get the latest instance view use refreshInstanceView()
.
Returns: the instance view
/**
* Gets the instance view of the virtual machine instance.
* <p>
* To get the latest instance view use <code>refreshInstanceView()</code>.
*
* @return the instance view
*/
VirtualMachineInstanceView instanceView();
Refreshes the instance view.
Returns: the instance view
/**
* Refreshes the instance view.
*
* @return the instance view
*/
@Method
VirtualMachineInstanceView refreshInstanceView();
Refreshes the instance view.
Returns: an observable that emits the instance view of the virtual machine instance.
/**
* Refreshes the instance view.
*
* @return an observable that emits the instance view of the virtual machine instance.
*/
@Method
Observable<VirtualMachineInstanceView> refreshInstanceViewAsync();
Returns: the power state of the virtual machine instance
/**
* @return the power state of the virtual machine instance
*/
PowerState powerState();
Gets a network interface associated with this virtual machine instance.
Params: - name – the name of the network interface
Returns: the network interface
/**
* Gets a network interface associated with this virtual machine instance.
*
* @param name the name of the network interface
* @return the network interface
*/
VirtualMachineScaleSetNetworkInterface getNetworkInterface(String name);
Returns: the network interfaces associated with this virtual machine instance.
/**
* @return the network interfaces associated with this virtual machine instance.
*/
PagedList<VirtualMachineScaleSetNetworkInterface> listNetworkInterfaces();
Returns: Get 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.
/**
* @return Get 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 modelDefinitionApplied();
Returns: The specific protection policy for the vm.
/**
* @return The specific protection policy for the vm.
*/
VirtualMachineScaleSetVMProtectionPolicy protectionPolicy();
Returns: The network profile config for the vm.
/**
* @return The network profile config for the vm.
*/
VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration();
The template for an update operation, containing all the settings that can be modified.
/**
* The template for an update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<VirtualMachineScaleSetVM> {
Attaches an existing data disk to this VMSS virtual machine.
Params: - dataDisk – data disk, need to be in DiskState.UNATTACHED state
- lun – the disk LUN, cannot conflict with existing LUNs
- cachingTypes – the caching type
Returns: the next stage of the update
/**
* Attaches an existing data disk to this VMSS virtual machine.
*
* @param dataDisk data disk, need to be in DiskState.UNATTACHED state
* @param lun the disk LUN, cannot conflict with existing LUNs
* @param cachingTypes the caching type
* @return the next stage of the update
*/
Update withExistingDataDisk(Disk dataDisk, int lun, CachingTypes cachingTypes);
Attaches an existing data disk to this VMSS virtual machine.
Params: - dataDisk – data disk, need to be in DiskState.UNATTACHED state
- lun – the disk LUN, cannot conflict with existing LUNs
- cachingTypes – the caching type
- storageAccountTypes – the storage account type
Returns: the next stage of the update
/**
* Attaches an existing data disk to this VMSS virtual machine.
*
* @param dataDisk data disk, need to be in DiskState.UNATTACHED state
* @param lun the disk LUN, cannot conflict with existing LUNs
* @param cachingTypes the caching type
* @param storageAccountTypes the storage account type
* @return the next stage of the update
*/
Update withExistingDataDisk(Disk dataDisk, int lun, CachingTypes cachingTypes, StorageAccountTypes storageAccountTypes);
Detaches an existing data disk from this VMSS virtual machine.
Params: - lun – the disk LUN
Returns: the next stage of the update
/**
* Detaches an existing data disk from this VMSS virtual machine.
*
* @param lun the disk LUN
* @return the next stage of the update
*/
Update withoutDataDisk(int lun);
}
}