You can call this operation to create a job.

Request parameters

Name Type Required Example Description
Description String Yes "This is a job description." The description of the job.
Name String Yes my_shell_job The name of the job.
ProjectId String Yes FP-257A173659F59685 The ID of the project.
RegionId String Yes cn-hangzhou The ID of the region.
Type String Yes SHELL The type of the job. Valid values: MR, SPARK, HIVE_SQL, HIVE, PIG, SQOOP, SPARK_SQL, SPARK_STREAMING, and SHELL.
Adhoc Boolean No false Indicates whether the job is an ad-hoc query.
ClusterId String No C-A23BD131A862F184 The ID of the cluster.
EnvConf String No {"key":"value"} The configuration of the environment variables.
FailAct String No CONTINUE The strategy to apply after failure. Valid values: CONTINUE and STOP.
MaxRetry Integer No 5 The maximum number of retries. Valid values: 0 to 5.
Mode String No YARN The mode of the model. Valid values: YARN and LOCAL. YARN: Packages the job to a launcher and submit it to YARN for execution. LOCAL: Runs the job as a process on the machine.
MonitorConf String No {"inputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic","":"kafka_consumer_group"}],"outputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic"}]} The configurations of the monitor. *
ParamConf String No {"date":"${yyyy-MM-dd}"} The configurations of the parameter.
Params String No ls -l The content of the job.
ParentCategory String No FC-5BD9575E34623940 The ID of the parent category.
ResourceList.N.Alias String No demo.jar The alias of the resource.
ResourceList.N.Path String No oss://path/demo.jar The path of the resource. Valid values: oss and hdfs.
RetryInterval Long No 200 The interval between retries. Valid values: 0 to 300. Unit: seconds.
RunConf String No {"priority":1,"userName":"hadoop","memory":2048,"cores":1} The run configurations. priority: The priority to run the job. userName: The Linux user that submits the job. memory: The size of the allocated memory for running the job. Unit: megabytes. cores: The number of allocated vCPUs for running the job.

Response parameters

Name Type Example Description
RequestId String 1549175a-6d14-4c8a-89f9-5e28300f6d7e The ID of the request.
Id String FJ-A23BD131A862F184 The ID of the job.


  • Sample requests
    /? Description=This is a job description.
    &Params=ls -l
    &ResourceList. 1 Alias=demo.jar
    &ResourceList. 1. Path=oss://path/demo.jar
    &<Common request parameters>
  • Successful response examples
    JSON format
  • Error response examples
    JSON format
        "message":"Invalid job type [INVALID_TYPE]",

Error codes

View error codes.