• /
  • EnglishEspañolFrançais日本語한국어Português
  • 로그인지금 시작하기

Restart an Azure virtual machine

The Azure Virtual Machine (VM) actions let you manage the lifecycle of your Azure VM directly from your workflows.

Restart a virtual machine

This action restarts an Azure VM using the Azure Compute VM - Restart REST API.

Input field

Optionality

Type

Description

clientId

Required

String

An Azure Service Principal clientID. Must be passed as a secret. See how to register an Azure app.

clientSecret

Required

String

An Azure Service Principal clientSecret. Must be passed as a secret. 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>. For more information, see the Azure Compute VM - Restart - REST API.

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.