VirtualMachineScaleSets Interface

Implements

public interface VirtualMachineScaleSets
extends SupportsListing<VirtualMachineScaleSet>, SupportsListingByResourceGroup<VirtualMachineScaleSet>, SupportsGettingByResourceGroup<VirtualMachineScaleSet>, SupportsGettingById<VirtualMachineScaleSet>, SupportsCreating<Blank>, SupportsDeletingById, SupportsDeletingByResourceGroup, SupportsBatchCreation<VirtualMachineScaleSet>, SupportsBatchDeletion, HasManager<ComputeManager>

Entry point to virtual machine scale set management API.

Method Summary

Modifier and Type Method and Description
abstract void deallocate(String groupName, String name)

Shuts down the virtual machines in the scale set and releases the compute resources.

abstract Mono<Void> deallocateAsync(String groupName, String name)

Shuts down the virtual machines in the scale set and releases the compute resources asynchronously.

abstract void deleteById(String id, boolean forceDeletion)

Force delete a resource from Azure, identifying it by its resource ID.

abstract Mono<Void> deleteByIdAsync(String id, boolean forceDeletion)

Asynchronously force delete a resource from Azure, identifying it by its resource ID.

abstract void deleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion)

Force delete a resource from Azure, identifying it by its name and its resource group.

abstract Mono<Void> deleteByResourceGroupAsync(String resourceGroupName, String name, boolean forceDeletion)

Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.

abstract void deleteInstances(String groupName, String scaleSetName, Collection<String> instanceIds, boolean forceDeletion)

Delete virtual machine instances.

abstract Mono<Void> deleteInstancesAsync(String groupName, String scaleSetName, Collection<String> instanceIds, boolean forceDeletion)

Delete virtual machine instances.

abstract void powerOff(String groupName, String name)

Powers off (stops) the virtual machines in the scale set.

abstract Mono<Void> powerOffAsync(String groupName, String name)

Powers off (stops) the virtual machines in the scale set asynchronously.

abstract void reimage(String groupName, String name)

Re-images (updates the version of the installed operating system) the virtual machines in the scale set.

abstract Mono<Void> reimageAsync(String groupName, String name)

Re-images (updates the version of the installed operating system) the virtual machines in the scale set asynchronously.

abstract void restart(String groupName, String name)

Restarts the virtual machines in the scale set.

abstract Mono<Void> restartAsync(String groupName, String name)

Restarts the virtual machines in the scale set asynchronously.

abstract RunCommandResult runCommandInVMInstance(String groupName, String scaleSetName, String vmId, RunCommandInput inputCommand)

Run commands in a virtual machine instance in a scale set.

abstract Mono<RunCommandResult> runCommandVMInstanceAsync(String groupName, String scaleSetName, String vmId, RunCommandInput inputCommand)

Run commands in a virtual machine instance in a scale set asynchronously.

abstract RunCommandResult runPowerShellScriptInVMInstance(String groupName, String scaleSetName, String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)

Run PowerShell script in a virtual machine instance in a scale set.

abstract Mono<RunCommandResult> runPowerShellScriptInVMInstanceAsync(String groupName, String scaleSetName, String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)

Run PowerShell in a virtual machine instance in a scale set asynchronously.

abstract RunCommandResult runShellScriptInVMInstance(String groupName, String scaleSetName, String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)

Run shell script in a virtual machine instance in a scale set.

abstract Mono<RunCommandResult> runShellScriptInVMInstanceAsync(String groupName, String scaleSetName, String vmId, List<String> scriptLines, List<RunCommandInputParameter> scriptParameters)

Run shell script in a virtual machine instance in a scale set asynchronously.

abstract void start(String groupName, String name)

Starts the virtual machines in the scale set.

abstract Mono<Void> startAsync(String groupName, String name)

Starts the virtual machines in the scale set asynchronously.

Method Details

deallocate

public abstract void deallocate(String groupName, String name)

Shuts down the virtual machines in the scale set and releases the compute resources.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Throws:

ManagementException - thrown for an invalid response from the service.

IOException

- thrown for an invalid response from the service.

InterruptedException

- thrown for an invalid response from the service.

deallocateAsync

public abstract Mono deallocateAsync(String groupName, String name)

Shuts down the virtual machines in the scale set and releases the compute resources asynchronously.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Returns:

a representation of the deferred computation of this call

deleteById

public abstract void deleteById(String id, boolean forceDeletion)

Force delete a resource from Azure, identifying it by its resource ID.

Parameters:

id - the resource ID of the resource to delete
forceDeletion - force delete without graceful shutdown

deleteByIdAsync

public abstract Mono deleteByIdAsync(String id, boolean forceDeletion)

Asynchronously force delete a resource from Azure, identifying it by its resource ID.

Parameters:

id - the resource ID of the resource to delete
forceDeletion - force delete without graceful shutdown

Returns:

a representation of the deferred computation of this call

deleteByResourceGroup

public abstract void deleteByResourceGroup(String resourceGroupName, String name, boolean forceDeletion)

Force delete a resource from Azure, identifying it by its name and its resource group.

Parameters:

resourceGroupName - the resource group the resource is part of
name - the name of the resource
forceDeletion - force delete without graceful shutdown

deleteByResourceGroupAsync

public abstract Mono deleteByResourceGroupAsync(String resourceGroupName, String name, boolean forceDeletion)

Asynchronously force delete a resource from Azure, identifying it by its name and its resource group.

Parameters:

resourceGroupName - the resource group the resource is part of
name - the name of the resource
forceDeletion - force delete without graceful shutdown

Returns:

a representation of the deferred computation of this call

deleteInstances

public abstract void deleteInstances(String groupName, String scaleSetName, Collection instanceIds, boolean forceDeletion)

Delete virtual machine instances.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
instanceIds - instance IDs
forceDeletion - force delete without graceful shutdown

deleteInstancesAsync

public abstract Mono deleteInstancesAsync(String groupName, String scaleSetName, Collection instanceIds, boolean forceDeletion)

Delete virtual machine instances.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
instanceIds - instance IDs
forceDeletion - force delete without graceful shutdown

Returns:

a representation of the deferred computation of this call

powerOff

public abstract void powerOff(String groupName, String name)

Powers off (stops) the virtual machines in the scale set.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Throws:

ManagementException - thrown for an invalid response from the service.

IOException

- thrown for an invalid response from the service.

InterruptedException

- thrown for an invalid response from the service.

powerOffAsync

public abstract Mono powerOffAsync(String groupName, String name)

Powers off (stops) the virtual machines in the scale set asynchronously.

Parameters:

groupName - the name of the resource group the virtual machine in the scale set is in
name - the name of the virtual machine scale set

Returns:

a representation of the deferred computation of this call

reimage

public abstract void reimage(String groupName, String name)

Re-images (updates the version of the installed operating system) the virtual machines in the scale set.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Throws:

ManagementException - thrown for an invalid response from the service.

IOException

- thrown for an invalid response from the service.

InterruptedException

- thrown for an invalid response from the service.

reimageAsync

public abstract Mono reimageAsync(String groupName, String name)

Re-images (updates the version of the installed operating system) the virtual machines in the scale set asynchronously.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Returns:

a representation of the deferred computation of this call

restart

public abstract void restart(String groupName, String name)

Restarts the virtual machines in the scale set.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Throws:

ManagementException - thrown for an invalid response from the service.

IOException

- thrown for an invalid response from the service.

InterruptedException

- thrown for an invalid response from the service.

restartAsync

public abstract Mono restartAsync(String groupName, String name)

Restarts the virtual machines in the scale set asynchronously.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the virtual machine scale set name

Returns:

a representation of the deferred computation of this call

runCommandInVMInstance

public abstract RunCommandResult runCommandInVMInstance(String groupName, String scaleSetName, String vmId, RunCommandInput inputCommand)

Run commands in a virtual machine instance in a scale set.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
vmId - the virtual machine instance id
inputCommand - command input

Returns:

result of execution

runCommandVMInstanceAsync

public abstract Mono runCommandVMInstanceAsync(String groupName, String scaleSetName, String vmId, RunCommandInput inputCommand)

Run commands in a virtual machine instance in a scale set asynchronously.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
vmId - the virtual machine instance id
inputCommand - command input

Returns:

handle to the asynchronous execution

runPowerShellScriptInVMInstance

public abstract RunCommandResult runPowerShellScriptInVMInstance(String groupName, String scaleSetName, String vmId, List scriptLines, List scriptParameters)

Run PowerShell script in a virtual machine instance in a scale set.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
vmId - the virtual machine instance id
scriptLines - PowerShell script lines
scriptParameters - script parameters

Returns:

result of PowerShell script execution

runPowerShellScriptInVMInstanceAsync

public abstract Mono runPowerShellScriptInVMInstanceAsync(String groupName, String scaleSetName, String vmId, List scriptLines, List scriptParameters)

Run PowerShell in a virtual machine instance in a scale set asynchronously.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
vmId - the virtual machine instance id
scriptLines - PowerShell script lines
scriptParameters - script parameters

Returns:

handle to the asynchronous execution

runShellScriptInVMInstance

public abstract RunCommandResult runShellScriptInVMInstance(String groupName, String scaleSetName, String vmId, List scriptLines, List scriptParameters)

Run shell script in a virtual machine instance in a scale set.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
vmId - the virtual machine instance id
scriptLines - shell script lines
scriptParameters - script parameters

Returns:

result of shell script execution

runShellScriptInVMInstanceAsync

public abstract Mono runShellScriptInVMInstanceAsync(String groupName, String scaleSetName, String vmId, List scriptLines, List scriptParameters)

Run shell script in a virtual machine instance in a scale set asynchronously.

Parameters:

groupName - the resource group name
scaleSetName - the virtual machine scale set name
vmId - the virtual machine instance id
scriptLines - shell script lines
scriptParameters - script parameters

Returns:

handle to the asynchronous execution

start

public abstract void start(String groupName, String name)

Starts the virtual machines in the scale set.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Throws:

ManagementException - thrown for an invalid response from the service.

IOException

- thrown for an invalid response from the service.

InterruptedException

- thrown for an invalid response from the service.

startAsync

public abstract Mono startAsync(String groupName, String name)

Starts the virtual machines in the scale set asynchronously.

Parameters:

groupName - the name of the resource group the virtual machine scale set is in
name - the name of the virtual machine scale set

Returns:

a representation of the deferred computation of this call

Applies to