The operation to reapply a virtual machine's state.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply?api-version=2022-08-01
URI Parameters
Name
In
Required
Type
Description
resourceGroupName
path
True
string
The name of the resource group.
subscriptionId
path
True
string
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
POST https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/ResourceGroup/providers/Microsoft.Compute/virtualMachines/VMName/reapply?api-version=2022-08-01
import com.azure.core.util.Context;
/** Samples for VirtualMachines Reapply. */
public final class Main {
/*
* x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2022-08-01/examples/virtualMachineExamples/VirtualMachine_Reapply.json
*/
/**
* Sample code: Reapply the state of a virtual machine.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void reapplyTheStateOfAVirtualMachine(com.azure.resourcemanager.AzureResourceManager azure) {
azure
.virtualMachines()
.manager()
.serviceClient()
.getVirtualMachines()
.reapply("ResourceGroup", "VMName", Context.NONE);
}
}