replication_jobs
Creates, updates, deletes, gets or lists a replication_jobs resource.
Overview
| Name | replication_jobs |
| Type | Resource |
| Id | azure.recovery_services_site_recovery.replication_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. |
activityId | string | The activity id. |
allowedActions | array | The Allowed action the job. |
customDetails | object | The custom job details like test failover job details. |
endTime | string (date-time) | The end time. |
errors | array | The errors. |
friendlyName | string | The DisplayName. |
location | string | Resource Location. |
scenarioName | string | The ScenarioName. |
startTime | string (date-time) | The start time. |
state | string | The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. |
stateDescription | string | The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetInstanceType | string | The type of the affected object which is of Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class. |
targetObjectId | string | The affected Object Id. |
targetObjectName | string | The name of the affected object. |
tasks | array | The tasks. |
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. |
activityId | string | The activity id. |
allowedActions | array | The Allowed action the job. |
customDetails | object | The custom job details like test failover job details. |
endTime | string (date-time) | The end time. |
errors | array | The errors. |
friendlyName | string | The DisplayName. |
location | string | Resource Location. |
scenarioName | string | The ScenarioName. |
startTime | string (date-time) | The start time. |
state | string | The status of the Job. It is one of these values - NotStarted, InProgress, Succeeded, Failed, Cancelled, Suspended or Other. |
stateDescription | string | The description of the state of the Job. For e.g. - For Succeeded state, description can be Completed, PartiallySucceeded, CompletedWithInformation or Skipped. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetInstanceType | string | The type of the affected object which is of Microsoft.Azure.SiteRecovery.V2015_11_10.AffectedObjectType class. |
targetObjectId | string | The affected Object Id. |
targetObjectName | string | The name of the affected object. |
tasks | array | The tasks. |
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, resource_name, job_name, subscription_id | Gets the job details. Get the details of an Azure Site Recovery job. | |
list | select | resource_group_name, resource_name, subscription_id | $filter | Gets the list of jobs. Gets the list of Azure Site Recovery Jobs for the vault. |
cancel | exec | resource_group_name, resource_name, job_name, subscription_id | Cancels the specified job. The operation to cancel an Azure Site Recovery job. | |
restart | exec | resource_group_name, resource_name, job_name, subscription_id | Restarts the specified job. The operation to restart an Azure Site Recovery job. | |
resume | exec | resource_group_name, resource_name, job_name, subscription_id | Resumes the specified job. The operation to resume an Azure Site Recovery job. | |
export | exec | resource_group_name, resource_name, subscription_id | Exports 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.
| Name | Datatype | Description |
|---|---|---|
job_name | string | Job identifier. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
resource_name | string | The name of the recovery services vault. Required. |
subscription_id | string | |
$filter | string | OData filter options. Default value is None. |
SELECT examples
- get
- list
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
;
Gets the list of jobs. Gets the list of Azure Site Recovery Jobs for the vault.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
Lifecycle Methods
- cancel
- restart
- resume
- export
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
;
Restarts the specified job. The operation to restart an Azure Site Recovery job.
EXEC azure.recovery_services_site_recovery.replication_jobs.restart
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Resumes the specified job. The operation to resume an Azure Site Recovery job.
EXEC azure.recovery_services_site_recovery.replication_jobs.resume
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@job_name='{{ job_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Exports 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.
EXEC azure.recovery_services_site_recovery.replication_jobs.export
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"startTime": "{{ startTime }}",
"endTime": "{{ endTime }}",
"fabricId": "{{ fabricId }}",
"affectedObjectTypes": "{{ affectedObjectTypes }}",
"jobStatus": "{{ jobStatus }}",
"jobOutputType": "{{ jobOutputType }}",
"jobName": "{{ jobName }}",
"timezoneOffset": {{ timezoneOffset }}
}'
;