You can call this operation to modify a job.

Request parameters

Name Type Required Example Description
Id String Yes FJ-BCCAE48B90CCB37B The ID of the job.
ProjectId String Yes FP-257A173659F59685 The ID of the project.
RegionId String Yes cn-hangzhou The ID of the region.
ClusterId String No C-A23BD131A862F184 The ID of the cluster.
Description String No This is a job description. The description of the job.
EnvConf String No {"key":"value"} The configurations of the environment variables.
FailAct String No CONTINUE The action to take after failure. Valid values: STOP and CONTINUE.
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: The job is submitted to and runs on YARN as a launcher. LOCAL: The job runs on the local machine as a process.
MonitorConf String No {"inputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic","consumer.group":"kafka_consumer_group"}],"outputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic"}]} The monitoring configurations. Only jobs of the SPARK_STREAMING type are supported.
Name String No my_shell_job The name of the job.
ParamConf String No {"date":"${yyyy-MM-dd}"} The parameter configurations.
Params String No ls -l The content of the job.
ResourceList.N.Alias String No demo.jar The alias of the job.
ResourceList.N.Path String No oss://path/demo.jar The path of the resource. OSS and HDFS are supported.
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 instance. userName: The Linux user that submits the instance. memory: The size of the allocated memory for running the instance. Unit: megabytes. cores: The number of allocated vCPUs for running the instance.

Response parameters

Name Type Example Description
RequestId String 549175a-6d14-4c8a-89f9-5e28300f6d7e The ID of the request.
Data Boolean true Indicates whether the job is modified.

Examples

  • Sample requests
    /? Action=ModifyFlowJob
    &Id=FJ-BBCAE48B90CCB37B
    &ProjectId=FP-257A173659F59685
    &RegionId=cn-hangzhou
    &ClusterId=C-A23BD131A862F184
    &Description="This is a job description."
    &EnvConf={"key":"value"} 
    &FailAct=CONTINUE
    &MaxRetry=5
    &Mode=YARN
    &MonitorConf={"inputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic","consumer.group":"kafka_consumer_group"}],"outputs":[{"type":"KAFKA","clusterId":"C-1234567","topics":"kafka_topic"}]} 
    &Name=my_shell_job
    &ParamConf={"date":"${yyyy-MM-dd}"}
    &Params=ls -l
    &ResourceList. 1. Alias=demo.jar
    &ResourceList. 1. Path=oss://path/demo.jar
    &RetryInterval=200
    &RunConf={"priority":1,"userName":"hadoop","memory":2048,"cores":1}
    &<Common request parameters>
  • Successful response examples
    JSON format
    {
    	"Data":true,
    	"RequestId":"ECC2D0D1-B6D5-468D-B698-30E8805EB574"
    }
  • Error response examples
    JSON format
    {
    	"code":"FLOW_API_FAILED",
    	"message":"Invalid job type [INVALID_TYPE]",
    	"requestId":"11BAFBD8-8509-4177-A26D-407505E73713",
    	"successResponse":false
    }

Error codes

View error codes.