Cloud Computing Jobs

The following topics describe job types for cloud computing platforms and services:

Job:AWS Batch

AWS Batch enables you to manage and execute batch computing workloads in AWS.

To deploy and run an AWS Batch job, ensure that you have installed the AWS Batch plug-in with the provision image command or the provision agent::update command.

The following examples show how to define an AWS Batch job:

  • An AWS Batch job with basic parameters:

    Copy
    "AWS_Batch_Job_basic"
    {
       "Type": "Job:AWS Batch",
       "ConnectionProfile": "AWS_BATCH",
       "Use Advanced JSON Format": "unchecked",
       "Job Name": "job1",
       "Job Definition and Revision": "ksu-batch-job-definition:1",
       "Job Queue": "ksu-batch-job-queue",
       "Container Overrides Command": "[\"echo\", \"Hello, from Control-M\"]",
       "Job Attempts": "2",
       "Execution Timeout": "65",
       "Status Polling Frequency": "20"
    }
  • An AWS Batch job with various job parameters that are submitted in a JSON body:

    Copy
    "AWS_Batch_Job_advanced"
    {
       "Type": "Job:AWS Batch",
       "ConnectionProfile": "AWS_BATCH",
       "Use Advanced JSON Format": "checked",
       "JSON Format": "{\"containerOverrides\":{\"command\":[\"echo\",\"Hello, from Control-M\"],\"resourceRequirements\":[{\"type\":\"VCPU\",\"value\":\"2\"}]},\"jobDefinition\": \"ctm-batch-jobdefinition:1\",\"jobName\": \"job1\",\"jobQueue\": \"ctm-batch-job-queue\",\"timeout\": {\"attemptDurationSeconds\": 70}}",
       "Status Polling Frequency": "20"
    }

The following table describes the AWS Batch job parameters.

Parameter

Description

ConnectionProfile

Determines the ConnectionProfile:AWS Batch name that connects Control-M to AWS Batch.

Use Advanced JSON Format

Determines whether you supply your own JSON parameters in the JSON Format parameter.

Values:

  • checked

  • unchecked

Default: unchecked

JSON Format

Defines the parameters for the batch job, in JSON format, that enable you to control how the job executes.

For a description of this JSON syntax, see the description of SubmitJob in the AWS Batch API Reference.

This JSON body replaces the use of all other parameters described below, except for Status Polling Frequency:

Copy
{
   "containerOverrides":
   {
      "command":["echo","Hello, from Control-M"],
      "resourceRequirements":[
      {
         "type":"VCPU",
         "value":"2"
      }
]
   }
   "jobDefinition": "ctm-batch-job-definition",
   "jobName": "ctm-batch-job-single",
   "jobQueue": "ctm-batch-job-queue",
   "timeout"
   {
      "attemptDurationSeconds": 70
   }
}

Job Name

Defines the name of the batch job.

Job Definition and Revision

Determines which predefined job definition and version number (revision) is applied to the job, as follows:

  • <jobDefinitionName>: The most recent revision of the job definition.

  • <jobDefinitionName>:<revision>: A specific revision of the job definition.

ctm-batch-job-definition:3

Job Queue

Determines the job queue, which stores your batch job.

Container Overrides Command

(Optional) Defines a command, in JSON format, that overrides the specified command in the job definition.

Job Attempts

(Optional) Determines the number of times to retry a job run, which overrides the number of retry attempts determined in the job definition.

Valid Values: 1–10

Execution Timeout

(Optional) Determines the number of seconds to wait before a timeout occurs in a batch job, which overrides the timeout defined in the job definition.

Status Polling Frequency

Determines the number of seconds to wait before checking the job status.

Default: 20

Job:AWS:Batch

AWS Batch enables you to manage and execute batch computing workloads in AWS.

To deploy and run this type of AWS job, ensure that you have done the following:

  • Installed the Application Pack, which includes the Control-M for AWS plug-in.

  • Created a connection profile, as described in ConnectionProfile:AWS.

BMC recommends that you use the newer job type, Job:AWS Batch.

The following example shows how to define an AWS Batch job:

Copy
"AwsBatchJob"
{
   "Type": "Job:AWS:Batch",
   "ConnectionProfile": "AWS_CONNECTION",
   "JobName": "batchjob1",
   "JobDefinition": "jobDef1",
   "JobDefinitionRevision": "3",
   "JobQueue": "queue1",
   "AWSJobType": "Array",
   "ArraySize": "100",
   "DependsOn"
   {
      "DependencyType": "Standard",
      "JobDependsOn": "job5"
   },
   "Command": [ "ffmpeg", "-i" ],
   "Memory": "10",
   "vCPUs": "2",
   "JobAttempts": "5",
   "ExecutionTimeout": "60",
   "AppendLog": false
}

The following table describes the AWS Batch job parameters.

Parameter

Description

JobName

Defines the name of the batch job.

JobDefinition

Defines the job definition to use.

JobDefinitionRevision

Defines the job definition revision.

JobQueue

Defines the queue to which the job is submitted.

AWSJobType

Determines one of the following job types:

  • Array

  • Single

ArraySize

(Array job type) Determines the number of items in the array.

Valid Values: 2–10,000

DependsOn

Defines parameters that determine a job dependency.

DependencyType

(Array job type) Determines one of the following dependency types:

  • Standard

  • Sequential

  • N-to-N

JobDependsOn

Defines the job ID that the batch job depends upon.

This parameter is mandatory for the following dependencies:

  • Standard

  • N-to-N

Command

Defines a command to send to the container that overrides the default command from the Docker image or the job definition.

Memory

Defines the memory reserved for the job, in megabytes.

Minimum Value: 4

vCPUs

Defines the number of vCPUs to reserve for the container.

JobAttempts

Determines the number of retry attempts.

Valid Values: 1–10

ExecutionTimeout

Defines the timeout duration in seconds.

AppendLog

Determines whether to add the job log to the output.

Values:

  • true

  • false

Default: true

Job:AWSEC2

AWS Elastic Compute Cloud (EC2) enables you to create virtual machines in the Amazon cloud-computing platform.

To deploy and run an AWS EC2 job, ensure that you have installed the AWS EC2 plug-in with the provision image command or the provision agent::update command.

The following example shows how to define an AWS EC2 job.

Copy
"AWSEC2_create"
{
   "Type": "Job:AWSEC2",
   "ConnectionProfile": "AWSEC2",
   "Operations": "Create",
   "Placement Availability Zone": "us-west-2c",
   "Instance Type": "m1.small",
   "Subnet ID": "subnet-00aa899a7db25494d",
   "Key Name": "ksu-aws-ec2-key-pair",
   "Get Instances logs": "unchecked"
}

The following table describes the AWS EC2 job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:AWSEC2 name that connects Control-M to AWS EC2 Virtual Machine.

Operations

Determines one of the following operations to perform on the AWS EC2 Virtual Machine:

  • Create: Creates a new virtual machine.

  • Create from Instance Template: Creates a new virtual machine based on a template.

  • Start: Starts an existing virtual machine.

  • Stop: Stops a running virtual machine.

  • Reboot: Resets a virtual machine.

  • Terminate: Deletes an existing virtual machine.

Launch Template ID

Defines the template to use to create a VM from a template.

Instance ID

Defines the name of the VM instance where you want to run the operation.

This parameter is available for all operations except for the Create operations.

Instance Name

Defines the name of a new VM instance for Create operations.

Placement Availability Zone

Determines which AWS EC2 zone to use for a Create operation.

Instance Type

Determines the software requirements of the host computer when you create a new AWS EC2 Virtual Machine.

Subnet ID

Defines the Subnet ID that is required to launch the instance in a Create operation.

Key Name

Defines the security credential key set for a Create operation.

Image ID

Defines the ID of the Amazon Machine Image (AMI) that is required to launch the instance in a Create operation.

Number of copies

Determines the number of copies of the VM to create in a Create operation.

Default: 1

Get Instance logs

Determines whether to display logs from the AWS EC2 instance at the end of the job output.

This parameter is available for all operations except for the Terminate operation.

Values:

  • checked

  • unchecked

Default: unchecked

Verification Poll Interval

Determines the number of seconds to wait before job status verification.

Default: 15

Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2

Job:AWS Lambda

AWS Lambda is a cloud compute service that enables you to execute code in multiple computer languages on a virtual cluster.

To deploy and run an AWS Lambda job, ensure that you have installed the AWS Lambda plug-in with the provision image command or the provision agent::update command.

The following example shows how to define an AWS Lambda job.

Copy

"AWS Lambda_Job_2":
{
   "Type": "Job:AWS Lambda",
   "ConnectionProfile": "LAMBDA",
   "Function Name": "MyTestFunction",
   "Function Version": "1",
   "Parameters": "{\"action\":\"increment\",\"number\": 3}",
   "Append Log to Output": "checked"
}

The following table describes the AWS Lambda job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:AWS Lambda name that connects Control-M to AWS Lambda.

Function Name

Defines the name of the predefined Lambda function that is executed.

Function Version

Defines the version of the named Lambda function that is executed.

Default: $LATEST

Parameters

Defines the parameters for the AWS Lambda job, in JSON format, that enable you to control how the job executes, as shown in the following example:

Copy
"{\"action\":\"increment\",\"number\": 3}",

For no parameters, type {}.

Append Log to Output

(Optional) Determines whether to add the log to the job output.

Values:

  • checked

  • unchecked

Default: checked

Job:AWS:Lambda

AWS Lambda enables you to execute code on a virtual cluster.

To deploy and run this type of AWS job, ensure that you have done the following:

  • Installed the Application Pack, which includes the Control-M for AWS plug-in.

  • Created a connection profile, as described in ConnectionProfile:AWS.

BMC recommends that you use the newer job type, Job:AWS Lambda.

The following example shows how to define an AWS Lambda job:

Copy
"AwsLambdaJob"
{
   "Type": "Job:AWS:Lambda",
   "ConnectionProfile": "AWS_CONNECTION",
   "FunctionName": "LambdaFunction",
   "Version": "1",
   "Payload" : "{\"myVar\" :\"value1\" \\n\"myOtherVar\" : \"value2\"}"
   "AppendLog": true
}

The following table describes the AWS Lambda job parameters.

Parameter

Description

FunctionName

Defines the Lambda function to execute.

Version

(Optional) Defines the Lambda function version.

Payload

(Optional) Defines the Lambda function payload, in JSON format.

Invalid Characters: Special characters.

AppendLog

Determines whether to add the log to the job’s output.

Values:

  • true

  • false

Default: true

Job:Azure Batch Accounts

Azure Batch Accounts enables you to efficiently execute large-scale, parallel, computer-intensive tasks in the cloud.

To deploy and run an Azure Batch Accounts job, ensure that you have installed the Azure Batch Accounts plug-in with the provision image command or the provision agent::update command.

The following example shows how to define an Azure Batch Accounts job:

Copy
"Azure Batch Accounts_Job_2"
{
   "Type": "Job:Azure Batch Accounts",
   "ConnectionProfile": "AZURE_BATCH",
   "Batch Job ID": "abc-jobid",
   "Task ID Prefix": "ctm",
   "Task Command Line": "cmd /c echo hello from Control-M",
   "Max Wall Clock Time": "Custom",
   "Max Wall Time Digits": "3",
   "Max Wall Time Unit": "Minutes",
   "Max Task Retry Count": "Custom",
   "Retry Number": "3",
   "Retention Time": "Custom",
   "Retention Time Digits": "4",
   "Retention Time Unit": "Days",
   "Append Log to Output": "checked",
   "Status Polling Interval": "20"
}

The following table describes the Azure Batch Accounts job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:Azure Batch Accounts name that connects Control-M to Azure Batch Accounts.

Batch Job ID

Defines the name of the Batch Account Job created in Azure Portal.

Task ID Prefix

Defines a prefix string to append to the task ID.

Task Command Line

Defines the command line that runs your application or script on the compute node. The task is added to the job at runtime.

Max Wall Clock Time

Determines one of the following types of time limits for the job run:

  • Unlimited

  • Custom

Default: Unlimited

Max Wall Time Digits

Defines the number (of the specified time unit) for a custom maximum time limit.

Default: 1

Max Wall Time Unit

Determines the time units for a custom maximum time limit:

  • Seconds

  • Minutes

  • Hours

  • Days

Default: Minutes

Max Task Retry Count

Determines the maximum number of times to rerun a failed task:

  • Unlimited

  • Custom

  • None

Default: None

Retry Number

Determines the number of retries for a custom task retry count.

Default: 1

Retention Time

Determines one of the following options for a minimum period of time for retention of the Task directory of the batch job:

  • Unlimited: By Azure default, 7 days, unless the compute node is removed or the job is deleted.

  • Custom

Default: Unlimited

Retention Time Digits

Determines the number (of the specified time unit) for a custom retention period.

Default: 1

Retention Time Unit

Determines one of the following time units for a custom retention period:

  • Seconds

  • Minutes

  • Hours

  • Days

Default: Hours

Append Log to Output

Determines whether to add task stdout.txt content to the plug-in job output.

Values:

  • checked

  • unchecked

Default: checked

Status Polling Interval

Determines the number of seconds to wait before checking the status of the job.

Default: 20

Job:Azure:BatchAccount

Azure Batch Account enables you to manage and execute batch computing workloads in Azure.

To deploy and run this type of Azure job, ensure that you have done the following:

  • Installed the Application Pack, which includes the Control-M for Azure plug-in.

  • Created a connection profile, as described in ConnectionProfile:Azure.

BMC recommends that you use the newer job type, Job:Azure Batch Accounts.

The following example shows how to define an Azure Batch Account job.

Copy
"AzureBatchJob"
{
   "Type": "Job:Azure:BatchAccount",
   "ConnectionProfile": "AZURE_CONNECTION",
   "JobId": "AzureJob1",
   "CommandLine": "echo \"Hello\"",
   "AppendLog": false,
   "Wallclock"
   {
      "Time": "770",
      "Unit": "Minutes"
    },
   "MaxTries"
    {
      "Count": "6",
      "Option": "Custom"
    },
   "Retention"
    {
      "Time": "1",
      "Unit": "Hours"
    }
}

The following table describes the Azure Batch Account job parameters.

Parameter

Description

JobId

Defines the ID of the batch job.

CommandLine

Defines a command line that the batch job runs.

AppendLog

(Optional) Determines whether to add the log to the job output.

Values:

  • true

  • false

Default: true

Wallclock

(Optional) Determines a maximum limit for the job's run time. (Unit is determined)

If you do not include this parameter, the default is unlimited run time.

Use this parameter to set a custom time limit. Include the following next-level parameters:

  • Time: Number of the specified time unit—0 or higher.

  • Unit: One of the following units of time:

    • Seconds

    • Minutes

    • Hours

    • Days

MaxTries

(Optional) Defines the number of times to retry running a failed task.

If you do not include this parameter, the default is none (no retries).

Use this parameter to choose between the following options:

  • Unlimited number of retries. For this option, include the following next-level parameter:

    Option: "Unlimited"

  • Custom number of retries, 1 or higher. For this option, include the following next-level parameters:

    • "Count": number

    • "Option": "Custom"

Retention

(Optional) Defines a file retention period for the batch job.

If you do not include this parameter, the default is an unlimited retention period.

Use this parameter to set a custom time limit for retention. Include the following next-level parameters:

  • Time: Number of the specified time unit—0 or higher.

  • Unit: One of the following units of time:

    • Seconds

    • Minutes

    • Hours

    • Days

Job:AzureFunctions

Azure Functions enables you to develop, test, and run applications in the cloud.

To deploy and run an Azure Functions job, ensure that you have installed the Azure Functions plug-in with the provision image command or the provision agent::update command.

The following example shows how to define an Azure Functions job:

Copy
"AzureFunction"
{
   "Type": "Job:AzureFunctions"
   "ConnectionProfile": "AZUREFUNCTIONS"
   "Function App": "new-function",
   "Function Name": "Hello"
   "Optional Input Parameters": "\"{\"param1\":\"val1\", \"param2\":\"val2\"}\"",
   "Function Type":"activity",
   "Status Polling Frequency": "20",
   "Failure Tolerance": "2" 
}

The following table describes the Azure Functions job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:AzureFunctions name that connects Control-M to Azure Functions.

Function App

Defines the name of the Azure function application that you want to run.

Function Name

Defines the name of the function that you want to run.

Optional Input Parameters

Defines the function parameters, in JSON format, that enable you to control the presentation of data, as follows:

Copy
 {\"param1\":\"val1\", \"param2\":\"val2\"}

For no parameters, specify {}.

Function Type

Determines which of the following types of Azure functions to run:

  • Activity: The basic unit of work in a durable function and that can be called by an orchestrator function.

  • HTTP: An HTTP-triggered function that can be used to build serverless APIs and respond to webhooks. You cannot call an orchestrator function from an HTTP function.

  • Orchestrator: A type of durable function that enables you to determine how and in what order actions are executed.

Status Polling Frequency

Determines the number of seconds to wait before checking the status of the Azure Functions job.

Default: 20

Failure Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2

Job:Azure:Function

Azure Functions enables you to develop, test, and run applications in the cloud.

To deploy and run this type of Azure job, ensure that you have done the following:

  • Installed the Application Pack, which includes the Control-M for Azure plug-in.

  • Created a connection profile, as described in ConnectionProfile:Azure.

BMC recommends that you use the newer job type, Job:AzureFunctions.

The following example shows how to define an Azure Function job:

Copy
"AzureFunctionJob"
{
   "Type": "Job:Azure:Function",
   "ConnectionProfile": "AZURE_CONNECTION",
   "AppendLog": false,
   "Function": "AzureFunction",
   "FunctionApp": "AzureFunctionApp",
   "Parameters": [
    {"firstParamName": "firstParamValue"},
    {"secondParamName": "secondParamValue"}
]
}

The following table describes the Azure Function job parameters.

Parameter

Description

Function

Defines the name of the Azure function to execute.

FunctionApp

Defines the name of the Azure function app.

Parameters

(Optional) Defines function parameters as pairs of name and value.

AppendLog

(Optional) Determines whether to add the job log to the output.

Values:

  • true

  • false

Job:Azure VM

Azure Virtual Machine (VM) enables you to create, manage, and delete virtual machines in the Azure cloud.

To deploy and run an Azure Virtual Machine VM job, ensure that you have installed the Azure VM plug-in with the provision image command or the provision agent::update command.

The following example shows how to define an Azure VM job:

Copy
"Azure VM_update"
{
   "Type": "Job:Azure VM",
   "ConnectionProfile": "AZUREVM",
   "VM Name": "tb-vm1",
   "Operation": "Create\\Update",
   "Input Parameters": "{\"key\": \"val\"}",
   "Get Logs": "checked",
   "Verification Poll Interval": "10",
   "Tolerance": "3"
}

The following table describes the Azure VM job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:Azure VM name that connects Control-M to Azure Virtual Machine.

VM Name

Defines the name of the Azure Virtual Machine to run the operation.

Operation

Determines one of the following operations to perform on the Azure Virtual Machine.

  • Create\Update: Create a new virtual machine.

  • Delete: Delete an existing virtual machine.

  • Deallocate: Empty a virtual machine.

  • Reset: Reset a virtual machine.

  • Start: Start a virtual machine.

  • Stop: Stop a running virtual machine.

Input Parameters

Defines the input parameters in JSON format for a Create operation, as follows:

Copy
{\"param1\":\"val1\", \"param2\":\"val2\"}

Get Logs

Determines whether to display logs from Azure VM at the end of the job output.

This parameter is available for all operations except for the Delete operation.

Values:

  • checked

  • unchecked

Default: unchecked

Delete VM disk

Determines whether to delete the Azure Virtual Machine disk when you delete an Azure Virtual Machine.

Values:

  • checked

  • unchecked

Default: unchecked

Verification Poll Interval

Determines the number of seconds to wait before job status verification.

Default: 15

Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2

Job:GCP Batch

Google Cloud Platform (GCP) Batch enables you to manage, schedule, and execute batch computing workloads on a virtual machine that is provisioned to accommodate your resource and capacity needs.

To deploy and run a GCP Batch job, ensure that you have installed the GCP Batch plug-in with the provision image command or the provision agent::update command.

The following example shows how to define a GCP Batch job.

Copy
"GCP Batch_Job_2"
{
   "Type": "Job:GCP Batch",
   "ConnectionProfile": "GCP_BATCH",
   "Project ID": "gcp_projectID",
   "Region": "us-central1",
   "Override Region": "Yes",
   "Allowed Locations": ["zones/us-central1-a", "zones/us-central1-c"],
   "Job Name": "unique",
   "Priority": "99",
   "Runnable Type": "Container",
   "Task Script Text": "echo hello world",
   "Override Commands": "Yes",
   "Commands": "\"echo\",\"hello world\"",
   "CPU": "1500",
   "Memory": "1500",
   "Instance Policy": "Machine Template",
   "Machine Type": "e2-medium",
   "Machine Template": "template-name",
   "Provisioning Model": "Spot",
   "Logs Policy": "Cloud Logging",
   "Use Advanced JSON Format": "unchecked",
   "Status Polling Frequency": "10"
}

The following table describes the GCP Batch job parameters.

Parameter

Description

Connection Profile

Defines the ConnectionProfile:GCP Batch name that connects Control-M to GCP Batch.

Project ID

Defines the GCP project ID where the batch job runs.

A project is a set of configuration settings that define the resources your GCP Batch jobs use and how they interact with GCP.

Region

Defines the region that is predefined in the GCP Batch platform where the virtual machine resources are located.

Override Region

Determines whether to override the predefined region in the GCP Batch platform, as follows:

  • Yes

  • No

Default: No

Allowed Locations

Defines the new region, or zones in a region, where the virtual machine resources are located.

Job Name

Defines a unique name for the batch job.

Priority

Determines the run priority of the batch job.

Larger numbers indicate higher priority.

Valid Values: 1–99

Default: 99

Runnable Type

Determines one of the following types of batch jobs:

  • Script: Runs a UNIX shell scripting language.

  • Container: Creates a Docker container from an image.

Task Script Text

Defines the shell script that the batch job runs.

Container Image URI

Defines the Uniform Resource Identifier (URI) that points to the container image.

Entry Point

Defines the entry point (ENTRYPOINT) for the Docker container, which overrides the entry point defined in the original image.

An entry point is the location in the container where the program begins its execution.

Copy
"/bin/project"

Override Commands

Determines whether to override the Docker command (CMD), which is the executable container application code that is defined in the original image, as follows:

  • Yes

  • No

Default: No

Commands

Defines the Docker command (CMD) that executes when a Docker container runs.

If the container image contains an entry point or if an entry point is defined in the Entry Point parameter, the command is appended as an argument.

Container Volumes

Defines the file or directory to copy (mount) onto a container volume, which is a virtual hard drive, inside the Docker container.

This copies the /home/user directory on the host machine and pastes it into the /app directory on a volume in the Docker container:

Copy
/home/usr:/app/

CPU

Defines the number of millicores of virtual CPU resources that are reserved for the batch job.

Virtual machines measure CPU resources in millicores (m), which are thousandths of a CPU core. For example, 2000m equals 2 cores.

Memory

Determines the number of mebibytes (MiB; mega binary bytes) of virtual memory resources that are reserved for the batch job.

Maximum Retry Count

Determines the number of times to retry a job run when it fails.

Valid Characters:  0–10

Default: 0

Instance Policy

Determines which kind of virtual machine (instance) runs the job.

  • Machine Type: Runs the job on one of the virtual machine types available in the Google Compute Engine (GCE), which is the infrastructure-as-a-service component of GCP.

  • Machine Template: Runs the job on a custom-made virtual machine, based on a predefined template in the GCE.

Machine Type

Defines the virtual machine type that runs the job.

Machine Template

Defines the virtual machine template that runs the job.

Provisioning Model

Determines the price and availability of virtual machine resources, as follows:

  • Standard: Allocates virtual machine resources to the user and is used for production-level jobs.
  • Spot: Allocates virtual machine resources only when there is excess capacity in the Google Compute Engine (GCE). These resources disappear when they are needed by other users, which might prevent a job from running or cause it to fail.

Default: Standard

Logs Policy

Determines whether to save the batch job logs and where they appear.

  • No Logs: The batch job logs are not saved in the GCP Batch platform or in the Control-M Log in the Monitoring domain.

  • Cloud Logging: The batch job logs are saved in both the GCP Batch platform and the Control-M Log in the Monitoring domain.

Use Advanced JSON Format

Determines whether you supply your own JSON parameters, instead of several of the parameters described above.

JSON Format

Defines the parameters for the batch job, in JSON format, that enable you to control how the job runs.

For a description of this JSON syntax, see the description of Resource:Job in the GCP Batch Job API Reference.

Copy
{
   "priority": "99",
   "taskGroups": [
   {
      "taskSpec"
      {
         "computeResource"
         {
            "cpuMilli": "1000",
            "memoryMib": "1000"
         },
         "runnables": [
         {
            "script"
            {
               "text": "Total tasks: ${BATCH_TASK_COUNT}"
            }
         }]
      },
      "taskCount": "1",
      "parallelism": "1"
   }],
   "allocationPolicy"
   {
      "location"
      {
         "allowedLocations"
         [ 
            "regions/us-east1",
            "zones/us-east1-b",
            "zones/us-east1-c",
            "zones/us-east1-d"
         ]
      },
      "labels"
      {
         "batch-job-id": "guy3"
      },
      "instances": [
      {
         "policy"
         {
            "machineType": "e2-micro",
            "provisioningModel": "STANDARD"
         }
      } ]
   },
   "logsPolicy"
   {
      "destination": "CLOUD_LOGGING"
   }
}

Status Polling Frequency

Determines the number of seconds to wait before checking the status of the GCP Batch job.

Default: 10

Job:GCP Functions

Google Cloud Platform (GCP) Functions enables you to develop, test, and run applications in the cloud.

To deploy and run a GCP Functions, ensure that you have installed the GCP Functions plug-in with the provision image command or the provision agent::update command.

The following example shows how to define a GCP Functions job:

Copy
"GCP Functions_Job"
{
   "Type": "Job:GCP Functions",
   "ConnectionProfile": "GCPFUNCTIONS",
   "Project ID": "myProject",
   "Location": "us-central1",
   "Function Name": "myFunction",
   "Function Parameters": "Body",
   "Body": "{\\\"message\\\":\\\"controlm-body-%%ORDERID\\\"}",
   "Status Polling Frequency": "20",
   "Failure Tolerance": "2",
   "Get Logs": "unchecked",
}

The following table describes the GCP Functions job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:GCP Functions name that connects Control-M to GCP Functions.

Project ID

Defines the GCP project ID where the GCP Functions job executes.

A project is a set of configuration settings that define the resources your GCP Batch jobs use and how they interact with GCP.

Location

Defines where the functions job executes.

Function Name

Defines the name of the function that you want to execute.

Function Parameters

Determines one of the following types of parameters to pass to the function:

  • URL Parameters

  • Body

URL Parameters

Defines the URL parameters that are passed to the function, in the following format:

<Parameter_Name_1>=<Value_1>

Body

Defines the JSON-based body parameters that are passed to the function, in the following format:

Copy
{\\\"parameter_1\\\":\\\"value_1\\\", \\\"parameter_2\\\":\\\"value_2\\\"}

For no parameters, type {}.

Maximum Characters: 4,000

Status Polling Frequency

Determines the number of seconds to wait before checking the status of the GCP Functions job.

Default: 20

Failure Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2

Get Logs

Determines whether to append the GCP Functions logs to the outputClosed A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location..

Values:

  • checked

  • unchecked

Default: unchecked

Job:GCP VM

Google Cloud Platform (GCP) Virtual Machine (VM) enables you to create, manage, and delete virtual machines on the Google Compute Engine (GCE).

To deploy and run a GCP VM, ensure that you have installed the GCP VM plug-in with the provision image command or the provision agent::update command.

The following example shows how to define a GCP VM job:

Copy
"GCP VM_create"
{
   "Type": "Job:GCP VM",
   "ConnectionProfile": "GCPVM",
   "Project ID": "applied-lattice",
   "Zone": "us-central1-f",
   "Operation": "Create",
   "Parameters": "{ \"key\": \"value\"}",
   "Instance Name": "tb-mastercluster-m",
   "Get Logs": "checked",
   "Verification Poll Interval": "20",
   "Tolerance": "3"
}

The following table describes the GCP VM job parameters.

Parameter

Description

ConnectionProfile

Defines the ConnectionProfile:GCP VM name that connects Control-M to GCP VM.

Project ID

Defines the project ID of the  Google Cloud Project Virtual Machine.

Zone

Defines the name of the zone for the request.

Operation

Determines one of the following operations to perform on the Google Virtual Machine:

  • Create: Create a virtual machine.

  • Create from Template: Create a new virtual machine based on a template.

  • Start: Start an existing virtual machine.

  • Stop: Stop a running virtual machine.

  • Reset: Reset a virtual machine.

  • Delete: Delete an existing virtual machine.

Template Name

Defines the name of a template for creation of a new Google Virtual Machine from a template. 

Instance Name

Defines the name of the VM instance where you want to run the operation.

This parameter is available for all operations except for the Create operations.

Parameters

Defines the input parameters in JSON format for a Create operation, as follows:

Copy
{"param1": "value1", "param2": "value2", …}

Get Logs

Determines whether to display logs from Google VM at the end of the job output.

This parameter is available for all operations except for the Delete operation.

Values:

  • checked

  • unchecked

Default: unchecked

Verification Poll Interval

Determines the number of seconds to wait before job status verification.

Default: 15

Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2

Job:OCI VM

Oracle Cloud Infrastructure Virtual Machine (OCI VM) plug-in enables you to create, manage, and delete virtual machines in the Oracle cloud.

To deploy and run an OCI VM, ensure that you have installed the OCI VM plug-in with the provision image command or the provision agent::update command.

The following examples show how to define an OCI VM job.

  • This JSON defines the Create action:

    Copy
    "OCI VM_Job_CREATE_MACHINE"
    {
       "Type": "Job:OCI VM",
       "ConnectionProfile": "OCI_VM",
       "Action": "Create",
       "Parameters": "
       {
          "availabilityDomain": "Idbi:PHX-AD-1",
          "compartmentId": "ocid1.compartment.oc1..aaaaaaaahjo7g63l5dhmgepb7xfszhpgikuby4rdybd4wrsdgre12312",
          "displayName": "Machine_From_ControlM",
          "subnetId": "ocid1.subnet.oc1.phx.aaaaaaaa3dhxqzuamhhyozrleorlsfofyntcsdfsdf234234",
          "faultDomain": "FAULT-DOMAIN-2",
          "imageId": "ocid1.image.oc1.phx.aaaaaaaam7ncdrjaz5vgvew4usku3ve5iygevvg4whphsqechjv6fgt2nbka",
          "launchMode": "PARAVIRTUALIZED",
          "launchOptions"
          {
             "bootVolumeType": "PARAVIRTUALIZED",
             "firmware": "UEFI_64",
             "networkType": "PARAVIRTUALIZED",
             "remoteDataVolumeType": "PARAVIRTUALIZED",
             "isPvEncryptionInTransitEnabled": true,
             "isEncryptionInTransitEnabled": null,
             "isConsistentVolumeNamingEnabled": true
          },
          "instanceOptions"
          {
             "areLegacyImdsEndpointsDisabled": false
          },
          "availabilityConfig"
          {
             "isLiveMigrationPreferred": null,
             "recoveryAction": "RESTORE_INSTANCE"
          },
          "preemptibleInstanceConfig": null,
          "metadata": {},
          "region": "phx",
          "shape": "VM.Standard.A1.Flex",
          "shapeConfig"
          {
             "ocpus": 1.0,
             "memoryInGBs": 6.0,
             "baselineOcpuUtilization": null,
             "processorDescription": "3.0 GHz Ampere Altra",
             "networkingBandwidthInGbps": 1.0,
             "maxVnicAttachments": 2,
             "gpus": 0,
             "gpuDescription": null,
             "localDisks": 0,
             "localDisksTotalSizeInGBs": null,
             "localDiskDescription": null,
             "vcpus": 1
          },
          "isCrossNumaNode": false,
          "sourceDetails"
          {
             "sourceType": "image",
             "bootVolumeSizeInGBs": null,
             "imageId": "ocid1.image.oc1.phx.aaaaaaaam7ncdrjaz5vgvew4usku3ve5iygevvg4whphsqechjv6fgt2nbka",
             "kmsKeyId": null,
             "bootVolumeVpusPerGB": null,
             "instanceSourceImageFilterDetails": null
          }
       }",
       "CreatedBy": "emuser",
       "RunAs": "OCI_VM"
    }
  • This JSON defines the Start action:

    For the Stop, Reset, Get Details, Soft Stop, Soft Reset, and Delete actions the JSON is the same except for the Action parameter value.

    Copy
    "OCI VM_Job_Manage"
    {
       "Type": "Job:OCI VM",
       "ConnectionProfile": "OCI_VM",
       "Action": "Start",
       "Instance ID": "ocid1.instance.oc1.us-phoenix-1.anwxiljru2nrodicsdlca72feeowinjvusqw3vij5k6dysczyarc6me37xma",
       "Status Polling Frequency": "15",
       "Failure Tolerance": "2",
    }

The following table describes the OCI VM job parameters.

Parameter

Description

ConnectionProfile

Determines the Connection Profile:OCI VM name that connects Control-M to OCI VM.

Action

Determines one of the following actions to perform on the OCI VM.

  • Start: Powers on the instance.

  • Stop: Powers off the instance.

  • Reset Powers off the instance and then powers it back on.

  • Create: Creates a virtual machine.

  • Get Details: Gets details of the VM.

  • Soft Stop: Shuts down the instance using the OS. Sends a shutdown command to the instance's operating system, waits for 15 minutes for the OS to shut down, then powers off the instance.

    If the applications that run on the instance take more than 15 minutes to shut down, they can stop improperly, resulting in data corruption. To avoid this, manually shut down the instance using the OS commands before you softstop the instance.

  • Soft Reset: Reboots the instance using the OS. Sends a shutdown command to the instance's operating system, waits for 15 minutes for the OS to shut down, then reboots the instance.

  • Delete: Deletes a virtual machine.

Parameters

Defines the input parameters in JSON format for a Create action, as appears in the example above.

Instance ID

Defines the name of the OCI VM instance you wish to create or operate on.

Status Polling Frequency

Determines the number of seconds to wait before checking the status of the OCI VM job.

Default: 15

Failure Tolerance

Determines the number of times to check the job status before ending Not OK.

Default: 2