The Azure virtual machine actions let you manage the lifecycle of your Azure virtual machines directly from your workflows.
Restart a virtual machine
This action restarts an Azure virtual machine using the Azure Compute Virtual Machines - Restart REST API.
Input field | Optionality | Type | Description |
|---|---|---|---|
clientId | Required | String | Must be passed as a secret. An Azure Service Principal clientID. See how to register an Azure app. |
clientSecret | Required | String | Must be passed as a secret. An Azure Service Principal clientSecret. See how to register an Azure app. |
tenantId | Required | String | The Azure tenant identifier, can be passed as a secret. |
subscriptionId | Required | String | The Azure subscription identifier. For example, |
resourceGroupName | Required | String | The name of the resource group that contains the virtual machine. For example, |
vmName | Required | String | The name of the virtual machine to restart. For example, |
selectors | Optional | List | A list of selectors used to extract specific values from the response. For example, |
Output field | Type | Description |
|---|---|---|
success | Boolean |
|
errorMessage | String | Failure reason as message. |
response | Object |
|
name: azure-restart-vm
steps: - name: azure_vm_restart_1 type: action action: azure.vm.restart version: 1 inputs: clientId: ${{ :secrets:my-client-id }} clientSecret: ${{ :secrets:my-client-secret }} tenantId: ${{ :secrets:my-tenant-id }} subscriptionId: "12345678-1234-1234-1234-123456789abc" resourceGroupName: "my-demo-rg" vmName: "my-demo-vm" selectors: - name: statusCode expression: ".response.status_code"