Share via


Scheduled Actions - Virtual Machines Execute Start

VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart?api-version=2025-05-01

URI Parameters

Name In Required Type Description
locationparameter
path True

string

minLength: 1

The location name.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
correlationid True

string

CorrelationId item

executionParameters True

ExecutionParameters

The execution parameters for the request

resources True

Resources

The resources for the request

Responses

Name Type Description
200 OK

StartResourceOperationResponse

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen - generated by [MaximumSet] rule
ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen - generated by [MinimumSet] rule

ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen - generated by [MaximumSet] rule

Sample request

POST https://management.azure.com/subscriptions/0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F/providers/Microsoft.ComputeSchedule/locations/rbebii/virtualMachinesExecuteStart?api-version=2025-05-01

{
  "executionParameters": {
    "optimizationPreference": "Cost",
    "retryPolicy": {
      "retryCount": 25,
      "retryWindowInMinutes": 4
    }
  },
  "resources": {
    "ids": [
      "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3"
    ]
  },
  "correlationid": "vwpcrwowcfgjuwnxzvvdma"
}

Sample response

{
  "type": "lcikdomhndewkiqpf",
  "location": "hhioerbsucdqayxk",
  "results": [
    {
      "resourceId": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3",
      "errorCode": "ynukyltendgmn",
      "errorDetails": "tifeuh",
      "operation": {
        "operationId": "vppyaxq",
        "resourceId": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3",
        "opType": "Unknown",
        "subscriptionId": "vofvsus",
        "deadline": "2025-04-15T19:47:03.591Z",
        "deadlineType": "Unknown",
        "state": "Unknown",
        "timezone": "nwugsooykqggcokphgdj",
        "timeZone": "qkxnxnumvfqmsmpyccv",
        "resourceOperationError": {
          "errorCode": "fagfsojftlff",
          "errorDetails": "rtihrkjasrjkllqccuysjrg"
        },
        "completedAt": "2025-04-15T19:47:03.591Z",
        "retryPolicy": {
          "retryCount": 25,
          "retryWindowInMinutes": 4
        }
      }
    }
  ],
  "description": "gzgowsi"
}

ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen - generated by [MinimumSet] rule

Sample request

POST https://management.azure.com/subscriptions/0505D8E4-D41A-48FB-9CA5-4AF8D93BE75F/providers/Microsoft.ComputeSchedule/locations/k/virtualMachinesExecuteStart?api-version=2025-05-01

{
  "executionParameters": {},
  "resources": {
    "ids": [
      "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3"
    ]
  },
  "correlationid": "vwpcrwowcfgjuwnxzvvdma"
}

Sample response

{
  "type": "lcikdomhndewkiqpf",
  "location": "hhioerbsucdqayxk",
  "description": "gzgowsi"
}

Definitions

Name Description
DeadlineType

The types of deadlines supported by ScheduledActions

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExecuteStartRequest

The ExecuteStartRequest request for executeStart operations

ExecutionParameters

Extra details needed to run the user's request

OperationState

Values that define the states of operations in Scheduled Actions

OptimizationPreference

The preferences customers can select to optimize their requests to ScheduledActions

ResourceOperation

High level response from an operation on a resource

ResourceOperationDetails

The details of a response from an operation on a resource

ResourceOperationError

These describe errors that occur at the resource level

ResourceOperationType

The kind of operation types that can be performed on resources using ScheduledActions

Resources

The resources needed for the user request

RetryPolicy

The retry policy for the user request

StartResourceOperationResponse

The response from a start request

DeadlineType

The types of deadlines supported by ScheduledActions

Value Description
Unknown

Default value of Unknown.

InitiateAt

Initiate the operation at the given deadline.

CompleteBy

Complete the operation by the given deadline.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ExecuteStartRequest

The ExecuteStartRequest request for executeStart operations

Name Type Description
correlationid

string

CorrelationId item

executionParameters

ExecutionParameters

The execution parameters for the request

resources

Resources

The resources for the request

ExecutionParameters

Extra details needed to run the user's request

Name Type Description
optimizationPreference

OptimizationPreference

Details that could optimize the user's request

retryPolicy

RetryPolicy

Retry policy the user can pass

OperationState

Values that define the states of operations in Scheduled Actions

Value Description
Unknown

The default value for the operation state enum

PendingScheduling

Operations that are pending scheduling

Scheduled

Operations that have been scheduled

PendingExecution

Operations that are waiting to be executed

Executing

Operations that are in the process of being executed

Succeeded

Operations that suceeded

Failed

Operations that have failed

Cancelled

Operations that have been Cancelled by the user

Blocked

Operations that are blocked

OptimizationPreference

The preferences customers can select to optimize their requests to ScheduledActions

Value Description
Cost

Optimize while considering cost savings

Availability

Optimize while considering availability of resources

CostAvailabilityBalanced

Optimize while considering a balance of cost and availability

ResourceOperation

High level response from an operation on a resource

Name Type Description
errorCode

string

Resource level error code if it exists

errorDetails

string

Resource level error details if they exist

operation

ResourceOperationDetails

Details of the operation performed on a resource

resourceId

string (arm-id)

Unique identifier for the resource involved in the operation, eg ArmId

ResourceOperationDetails

The details of a response from an operation on a resource

Name Type Default value Description
completedAt

string (date-time)

Time the operation was complete if errors are null

deadline

string (date-time)

Deadline for the operation

deadlineType

DeadlineType

Unknown

Type of deadline of the operation

opType

ResourceOperationType

Unknown

Type of operation performed on the resources

operationId

string

Operation identifier for the unique operation

resourceId

string (arm-id)

Unique identifier for the resource involved in the operation, eg ArmId

resourceOperationError

ResourceOperationError

Operation level errors if they exist

retryPolicy

RetryPolicy

Retry policy the user can pass

state

OperationState

Unknown

Current state of the operation

subscriptionId

string

Subscription id attached to the request

timeZone

string

Timezone for the operation

timezone

string

Timezone for the operation

ResourceOperationError

These describe errors that occur at the resource level

Name Type Description
errorCode

string

Code for the error eg 404, 500

errorDetails

string

Detailed message about the error

ResourceOperationType

The kind of operation types that can be performed on resources using ScheduledActions

Value Description
Unknown

The default value for this enum type

Start

Start operations on the resources

Deallocate

Deallocate operations on the resources

Hibernate

Hibernate operations on the resources

Resources

The resources needed for the user request

Name Type Description
ids

string[] (arm-id)

The resource ids used for the request

RetryPolicy

The retry policy for the user request

Name Type Description
retryCount

integer (int32)

Retry count for user request

retryWindowInMinutes

integer (int32)

Retry window in minutes for user request

StartResourceOperationResponse

The response from a start request

Name Type Description
description

string

The description of the operation response

location

string

The location of the start request eg westus

results

ResourceOperation[]

The results from the start request if no errors exist

type

string

The type of resources used in the start request eg virtual machines