Skip to main content

occurrences

Creates, updates, deletes, gets or lists an occurrences resource.

Overview

Nameoccurrences
TypeResource
Idazure.compute_schedule.occurrences

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
provisioningStatestringThe aggregated provisioning state of the occurrence. Known values are: "Created", "Rescheduling", "Scheduled", "Succeeded", "Failed", "Cancelling", and "Canceled". (Created, Rescheduling, Scheduled, Succeeded, Failed, Cancelling, Canceled)
resultSummaryobjectThe result for occurrences that achieved a terminal state. Required.
scheduledTimestring (date-time)The time the occurrence is scheduled for. This value can be changed by calling the delay API. Required.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, scheduled_action_name, occurrence_id, subscription_idGet a Occurrence.
list_by_scheduled_actionselectresource_group_name, scheduled_action_name, subscription_idList Occurrence resources by ScheduledAction.
list_resourcesexecresource_group_name, scheduled_action_name, occurrence_id, subscription_idList resources attached to Scheduled Actions for the given occurrence.
cancelexecresource_group_name, scheduled_action_name, occurrence_id, subscription_id, resourceIdsA synchronous resource action.
delayexecresource_group_name, scheduled_action_name, occurrence_id, subscription_id, delay, resourceIdsA long-running resource action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
occurrence_idstringThe name of the Occurrence. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
scheduled_action_namestringThe name of the ScheduledAction. Required.
subscription_idstring

SELECT examples

Get a Occurrence.

SELECT
id,
name,
provisioningState,
resultSummary,
scheduledTime,
systemData,
type
FROM azure.compute_schedule.occurrences
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND scheduled_action_name = '{{ scheduled_action_name }}' -- required
AND occurrence_id = '{{ occurrence_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

List resources attached to Scheduled Actions for the given occurrence.

EXEC azure.compute_schedule.occurrences.list_resources 
@resource_group_name='{{ resource_group_name }}' --required,
@scheduled_action_name='{{ scheduled_action_name }}' --required,
@occurrence_id='{{ occurrence_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;