occurrences
Creates, updates, deletes, gets or lists an occurrences resource.
Overview
| Name | occurrences |
| Type | Resource |
| Id | azure.compute_schedule.occurrences |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_scheduled_action
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
provisioningState | string | The aggregated provisioning state of the occurrence. Known values are: "Created", "Rescheduling", "Scheduled", "Succeeded", "Failed", "Cancelling", and "Canceled". (Created, Rescheduling, Scheduled, Succeeded, Failed, Cancelling, Canceled) |
resultSummary | object | The result for occurrences that achieved a terminal state. Required. |
scheduledTime | string (date-time) | The time the occurrence is scheduled for. This value can be changed by calling the delay API. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
provisioningState | string | The aggregated provisioning state of the occurrence. Known values are: "Created", "Rescheduling", "Scheduled", "Succeeded", "Failed", "Cancelling", and "Canceled". (Created, Rescheduling, Scheduled, Succeeded, Failed, Cancelling, Canceled) |
resultSummary | object | The result for occurrences that achieved a terminal state. Required. |
scheduledTime | string (date-time) | The time the occurrence is scheduled for. This value can be changed by calling the delay API. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, scheduled_action_name, occurrence_id, subscription_id | Get a Occurrence. | |
list_by_scheduled_action | select | resource_group_name, scheduled_action_name, subscription_id | List Occurrence resources by ScheduledAction. | |
list_resources | exec | resource_group_name, scheduled_action_name, occurrence_id, subscription_id | List resources attached to Scheduled Actions for the given occurrence. | |
cancel | exec | resource_group_name, scheduled_action_name, occurrence_id, subscription_id, resourceIds | A synchronous resource action. | |
delay | exec | resource_group_name, scheduled_action_name, occurrence_id, subscription_id, delay, resourceIds | A 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.
| Name | Datatype | Description |
|---|---|---|
occurrence_id | string | The name of the Occurrence. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
scheduled_action_name | string | The name of the ScheduledAction. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_scheduled_action
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
;
List Occurrence resources by ScheduledAction.
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 subscription_id = '{{ subscription_id }}' -- required
;
Lifecycle Methods
- list_resources
- cancel
- delay
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
;
A synchronous resource action.
EXEC azure.compute_schedule.occurrences.cancel
@resource_group_name='{{ resource_group_name }}' --required,
@scheduled_action_name='{{ scheduled_action_name }}' --required,
@occurrence_id='{{ occurrence_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"resourceIds": "{{ resourceIds }}"
}'
;
A long-running resource action.
EXEC azure.compute_schedule.occurrences.delay
@resource_group_name='{{ resource_group_name }}' --required,
@scheduled_action_name='{{ scheduled_action_name }}' --required,
@occurrence_id='{{ occurrence_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"delay": "{{ delay }}",
"resourceIds": "{{ resourceIds }}"
}'
;