recovery_jobs
Creates, updates, deletes, gets or lists a recovery_jobs resource.
Overview
| Name | recovery_jobs |
| Type | Resource |
| Id | azure.resilience_management.recovery_jobs |
Fields
The following fields are returned by SELECT queries:
- get
- list
| 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. |
duration | string | The time elapsed during the execution of this job. |
endTime | string (date-time) | The end time of the job execution. |
errorDetails | object | Details of any errors that occurred during the execution of this job. |
executionConfigurations | object | Execution configurations for the job. |
jobExtendedInfo | object | Additional information about the job. |
jobType | string | Discriminator for the Job object hierarchy. Required. Recovery Orchestration Plan created job. |
operation | string | The operation that this job is intended to perform. |
provisioningState | string | The provisioning state of the recovery job. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted) |
resourceId | string | The resource for which this job was created. This is typically the resource that the job is intended to manage or operate on. |
retryDetails | array | Details of any retries that have been attempted for this job. |
startTime | string (date-time) | The start time of the job execution. |
status | string | The current status of the job execution. Known values are: "NotApplicable", "NotStarted", "Pending", "InProgress", "Completed", "CompletedWithWarnings", "Failed", "Skipped", "Cancelling", "Cancelled", and "Paused". (NotApplicable, NotStarted, Pending, InProgress, Completed, CompletedWithWarnings, Failed, Skipped, Cancelling, Cancelled, Paused) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
triggeredBy | string | Indicates whether the job was triggered by the system or a user. Known values are: "System" and "User". (System, User) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userComments | array | User Comments. |
| 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. |
duration | string | The time elapsed during the execution of this job. |
endTime | string (date-time) | The end time of the job execution. |
errorDetails | object | Details of any errors that occurred during the execution of this job. |
executionConfigurations | object | Execution configurations for the job. |
jobExtendedInfo | object | Additional information about the job. |
jobType | string | Discriminator for the Job object hierarchy. Required. Recovery Orchestration Plan created job. |
operation | string | The operation that this job is intended to perform. |
provisioningState | string | The provisioning state of the recovery job. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted) |
resourceId | string | The resource for which this job was created. This is typically the resource that the job is intended to manage or operate on. |
retryDetails | array | Details of any retries that have been attempted for this job. |
startTime | string (date-time) | The start time of the job execution. |
status | string | The current status of the job execution. Known values are: "NotApplicable", "NotStarted", "Pending", "InProgress", "Completed", "CompletedWithWarnings", "Failed", "Skipped", "Cancelling", "Cancelled", and "Paused". (NotApplicable, NotStarted, Pending, InProgress, Completed, CompletedWithWarnings, Failed, Skipped, Cancelling, Cancelled, Paused) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
triggeredBy | string | Indicates whether the job was triggered by the system or a user. Known values are: "System" and "User". (System, User) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userComments | array | User Comments. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_group_name, recovery_plan_name, recovery_job_name | Get a RecoveryJob. | |
list | select | service_group_name, recovery_plan_name | List RecoveryJob resources by RecoveryPlan. | |
cancel | exec | service_group_name, recovery_plan_name, recovery_job_name, operation-id | This action attempts to cancel the ongoing recovery orchestration job. | |
resume | exec | service_group_name, recovery_plan_name, recovery_job_name, operation-id | This action resumes the ongoing recovery orchestration job that was paused for required user intervention. | |
retry | exec | service_group_name, recovery_plan_name, recovery_job_name, operation-id | This action retries the ongoing recovery orchestration job for resources that failed in previous attempts. |
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 |
|---|---|---|
operation-id | string | A GUID that represents the Long Running OperationId. Required. |
recovery_job_name | string | The unique name (GUID) of the recovery job. Required. |
recovery_plan_name | string | The name of the recovery orchestration plan. Required. |
service_group_name | string | The name of the service group. Required. |
SELECT examples
- get
- list
Get a RecoveryJob.
SELECT
id,
name,
duration,
endTime,
errorDetails,
executionConfigurations,
jobExtendedInfo,
jobType,
operation,
provisioningState,
resourceId,
retryDetails,
startTime,
status,
systemData,
triggeredBy,
type,
userComments
FROM azure.resilience_management.recovery_jobs
WHERE service_group_name = '{{ service_group_name }}' -- required
AND recovery_plan_name = '{{ recovery_plan_name }}' -- required
AND recovery_job_name = '{{ recovery_job_name }}' -- required
;
List RecoveryJob resources by RecoveryPlan.
SELECT
id,
name,
duration,
endTime,
errorDetails,
executionConfigurations,
jobExtendedInfo,
jobType,
operation,
provisioningState,
resourceId,
retryDetails,
startTime,
status,
systemData,
triggeredBy,
type,
userComments
FROM azure.resilience_management.recovery_jobs
WHERE service_group_name = '{{ service_group_name }}' -- required
AND recovery_plan_name = '{{ recovery_plan_name }}' -- required
;
Lifecycle Methods
- cancel
- resume
- retry
This action attempts to cancel the ongoing recovery orchestration job.
EXEC azure.resilience_management.recovery_jobs.cancel
@service_group_name='{{ service_group_name }}' --required,
@recovery_plan_name='{{ recovery_plan_name }}' --required,
@recovery_job_name='{{ recovery_job_name }}' --required,
@operation-id='{{ operation-id }}' --required
@@json=
'{
"description": "{{ description }}"
}'
;
This action resumes the ongoing recovery orchestration job that was paused for required user intervention.
EXEC azure.resilience_management.recovery_jobs.resume
@service_group_name='{{ service_group_name }}' --required,
@recovery_plan_name='{{ recovery_plan_name }}' --required,
@recovery_job_name='{{ recovery_job_name }}' --required,
@operation-id='{{ operation-id }}' --required
@@json=
'{
"description": "{{ description }}"
}'
;
This action retries the ongoing recovery orchestration job for resources that failed in previous attempts.
EXEC azure.resilience_management.recovery_jobs.retry
@service_group_name='{{ service_group_name }}' --required,
@recovery_plan_name='{{ recovery_plan_name }}' --required,
@recovery_job_name='{{ recovery_job_name }}' --required,
@operation-id='{{ operation-id }}' --required
;