You can call this operation to modify a job.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyFlowJob

The operation that you want to perform. Set the value to ModifyFlowJob.

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 where your project resides.

ClusterId String No C-A23BD131A862F184

The ID of the cluster.

Description String No This is the description of a job

The description of the job.

EnvConf String No {"key":"value"}

The environment variables configured for the job.

FailAct String No CONTINUE

The action to take upon an operation failure of the node instance. Valid values:

  • CONTINUE: skips the node instance
  • STOP: stops the workflow instance
MaxRetry Integer No 5

The maximum number of retries to run the node instance if a failure occurs.

  • Valid values: 0 to 5.
Mode String No YARN

The submission mode of the job. Valid values: YARN and LOCAL.

  • YARN: submits the job from a worker node.
  • LOCAL: submits the job from a header or gateway node.
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 of the job. This parameter only applies to SPARK_STREAMING jobs.

Name String No my_shell_job

The name of the job.

ParamConf String No {"date":"${yyyy-MM-dd}"}

The configuration parameters of the job.

Params String No ls -l

The content of the job.

ResourceList.N.Alias String No demo.jar

The alias of the resource.

ResourceList.N.Path String No oss://path/demo.jar

The storage path of the resource. The resource can be stored in OSS and HDFS.

RetryInterval Long No 200

The interval between successive retries to run the node instance. Valid values: 0 to 300. Unit: seconds.

RunConf String No {"priority":1,"userName":"hadoop","memory":2048,"cores":1}

The scheduling parameters configured for the job.

  • priority: the priority of the job.
  • userName: the name of the Linux user who summits the job.
  • memory: the memory allocated to the job. Unit: MB.
  • cores: the number of vCPUs allocated to the job.

Response parameters

Parameter Type Example Description
Data Boolean true

The result of the operation.

RequestId String 549175a-6d14-4c8a-89f9-5e28300f6d7e

The ID of the request.

Examples

Sample requests


/? Action=ModifyFlowJob
&Id=FJ-BBCAE48B90CCB37B
&ProjectId=FP-257A173659F59685
&RegionId=cn-hangzhou
&ClusterId=C-A23BD131A862F184
&Description=This is the description of a job
&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>

Sample success responses

XML format

<ModifyFlowJobResponse>
	  <RequestId>ECC2D0D1-B6D5-468D-B698-30E8805EB574</RequestId>
	  <Data>true</Data>
</ModifyFlowJobResponse>

JSON format

{
	"Data":true,
	"RequestId":"ECC2D0D1-B6D5-468D-B698-30E8805EB574"
}

Error codes

For a list of error codes, visit the API Error Center.