Cluster Jobs - Run Job

Operations on jobs of HDInsight on AKS cluster.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob?api-version=2023-06-01-preview

URI Parameters

Name In Required Type Description
clusterName
path True

string

The name of the HDInsight cluster.

clusterPoolName
path True

string

The name of the cluster pool.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
properties True ClusterJobProperties:

FlinkJobProperties

Properties of cluster job.

Responses

Name Type Description
200 OK

ClusterJob

Successful.

202 Accepted

Run cluster job action request accepted.

Headers

location: string

Other Status Codes

ErrorResponse

Error Response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

RunClusterJob

Sample Request

POST https://management.azure.com/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/runJob?api-version=2023-06-01-preview

{
  "properties": {
    "jobType": "FlinkJob",
    "jobName": "flink-job-name",
    "action": "START",
    "jobJarDirectory": "abfs://flinkjob@hilosa.dfs.core.windows.net/jars",
    "jarName": "flink-sleep-job-0.0.1-SNAPSHOT.jar",
    "entryClass": "com.microsoft.hilo.flink.job.streaming.SleepJob",
    "flinkConfiguration": {
      "parallelism": "1",
      "savepoint.directory": "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"
    }
  }
}

Sample Response

location: http://azure.async.operation/status
{
  "properties": {
    "jobType": "FlinkJob",
    "jobName": "flink-job-name",
    "action": "START",
    "jobJarDirectory": "abfs://flinkjob@hilosa.dfs.core.windows.net/jars",
    "jarName": "flink-sleep-job-0.0.1-SNAPSHOT.jar",
    "entryClass": "com.microsoft.hilo.flink.job.streaming.SleepJob",
    "flinkConfiguration": {
      "parallelism": "1",
      "savepoint.directory": "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"
    }
  }
}

Definitions

Name Description
action

A string property that indicates the action to be performed on the Flink job. It can have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE.

ClusterJob

Cluster job.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

FlinkJobProperties

Properties of flink job.

systemData

Metadata pertaining to creation and last modification of the resource.

action

A string property that indicates the action to be performed on the Flink job. It can have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE.

Name Type Description
CANCEL

string

DELETE

string

LIST_SAVEPOINT

string

NEW

string

SAVEPOINT

string

START

string

STATELESS_UPDATE

string

STOP

string

UPDATE

string

ClusterJob

Cluster job.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties ClusterJobProperties:

FlinkJobProperties

Properties of cluster job.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

FlinkJobProperties

Properties of flink job.

Name Type Description
action

action

A string property that indicates the action to be performed on the Flink job. It can have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE.

actionResult

string

Action result of job.

args

string

A string property representing additional JVM arguments for the Flink job. It should be space separated value.

entryClass

string

A string property that specifies the entry class for the Flink job.

flinkConfiguration

object

Additional properties used to configure Flink jobs. It allows users to set properties such as parallelism and jobSavePointDirectory. It accepts additional key-value pairs as properties, where the keys are strings and the values are strings as well.

jarName

string

A string property that represents the name of the job JAR.

jobId

string

Unique id for identifying a job

jobJarDirectory

string

A string property that specifies the directory where the job JAR is located.

jobName

string

Name of job

jobOutput

string

Output of job.

jobType string:

FlinkJob

Type of cluster job.

lastSavePoint

string

The last savepoint.

savePointName

string

A string property that represents the name of the savepoint for the Flink job

status

string

Status of job.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.