• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Restart an Azure virtual machine

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, "12345678-1234-1234-1234-123456789abc".

resourceGroupName

Required

String

The name of the resource group that contains the virtual machine. For example, "my-demo-rg".

vmName

Required

String

The name of the virtual machine to restart. For example, "my-demo-vm".

selectors

Optional

List

A list of selectors used to extract specific values from the response. For example, [{"name": "statusCode", "expression": ".response.status_code"}].

Output field

Type

Description

success

Boolean

success: true | false

errorMessage

String

Failure reason as message.

response

Object

<azure api body response>, see the Virtual Machine restart - REST API (Azure Compute) for more information

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"
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.