Information

This site will undergo a brief period of maintenance on Thursday, 23 April at 2:30 AM Central/1:00 PM IST. During a 30 minute window, site availability may be intermittent.

Information
Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Snapshot - getSnapshotKeyByJobRunId


Snapshot - getSnapshotKeyByJobRunId

Description :

This command returns a snapshot key (a job result key) based on a snapshot job runID, template name (not fully qualified), and server name.

To get the runId, first get the job run key. The JobRun : findAllRunKeysByJobKey command has an example of how to do this. Once you have the job run key, you can use the JobRun : jobRunKeyToJobRunId command to get the runId.

You need a snapshot key for commands such as AuditJob createSnapshotToComponentAuditJob or BlPackage createPackageFromSnapshot . This command returns a snapshot key.

Return type : com.bladelogic.om.infra.model.base.keys.SJobResultKey

Command Input :

Variable Name

Variable Type

Description

runId

Integer

ID of a particular Snapshot Job run.

templateName

String

Name of the template of interest.

targetServerName

String

Name of the server of interest.

Example

The following example shows how to find a snapshot key by Job run Id.

Script





$TEMPLATE_NAME=basefiles

SNAP_JOB_KEY=`blcli SnapshotJob  [getDBKeyByGroupAndName|SnapshotJob - getDBKeyByGroupAndName] /Snapshots snapbasefiles`

#set the run Id

RUNID=12345

SNAPSHOT_KEY=`blcli Snapshot getSnapshotKeyByJobRunId $RUNID $TEMPLATE_NAME $MASTERSERVER `



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.3