Skip to main content

replication_jobs

Creates, updates, deletes, gets or lists a replication_jobs resource.

Overview

Namereplication_jobs
TypeResource
Idazure.recovery_services_site_recovery.replication_jobs

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.
activityIdstringThe activity id.
allowedActionsarrayThe Allowed action the job.
customDetailsobjectThe custom job details like test failover job details.
endTimestring (date-time)The end time.
errorsarrayThe errors.
friendlyNamestringThe DisplayName.
locationstringResource Location.
scenarioNamestringThe ScenarioName.
startTimestring (date-time)The start time.
statestringThe status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other.
stateDescriptionstringThe description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
targetInstanceTypestringThe type of the affected object which is of Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class.
targetObjectIdstringThe affected Object Id.
targetObjectNamestringThe name of the affected object.
tasksarrayThe tasks.
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, resource_name, job_name, subscription_idGets the job details. Get the details of an Azure Site Recovery job.
listselectresource_group_name, resource_name, subscription_id$filterGets the list of jobs. Gets the list of Azure Site Recovery Jobs for the vault.
cancelexecresource_group_name, resource_name, job_name, subscription_idCancels the specified job. The operation to cancel an Azure Site Recovery job.
restartexecresource_group_name, resource_name, job_name, subscription_idRestarts the specified job. The operation to restart an Azure Site Recovery job.
resumeexecresource_group_name, resource_name, job_name, subscription_idResumes the specified job. The operation to resume an Azure Site Recovery job.
exportexecresource_group_name, resource_name, subscription_idExports the details of the Azure Site Recovery jobs of the vault. The operation to export the details of the Azure Site Recovery jobs of the vault.

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
job_namestringJob identifier. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the recovery services vault. Required.
subscription_idstring
$filterstringOData filter options. Default value is None.

SELECT examples

Gets the job details. Get the details of an Azure Site Recovery job.

SELECT
id,
name,
activityId,
allowedActions,
customDetails,
endTime,
errors,
friendlyName,
location,
scenarioName,
startTime,
state,
stateDescription,
systemData,
targetInstanceType,
targetObjectId,
targetObjectName,
tasks,
type
FROM azure.recovery_services_site_recovery.replication_jobs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND job_name = '{{ job_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

Lifecycle Methods

Cancels the specified job. The operation to cancel an Azure Site Recovery job.

EXEC azure.recovery_services_site_recovery.replication_jobs.cancel 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;