All Products
Search
Document Center

E-MapReduce:CreateProcessDefinitionWithSchedule

Last Updated:Dec 01, 2025

Creates a workflow definition.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

emr-serverless-spark:CreateProcessDefinitionWithSchedule

none

*All Resource

*

None None

Request syntax

POST /dolphinscheduler/projects/{bizId}/process-definition HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

bizId

string

Yes

The workspace ID.

w-d8********

Request parameters

Parameter

Type

Required

Description

Example

productNamespace

string

Yes

The product code.

SS

name

string

Yes

The name of the workflow.

ods_batch_workflow

description

string

Yes

The description of the workflow.

ods batch workflow

timeout

integer

No

The default timeout period for a workflow run.

60

taskRelationJson

array<object>

Yes

A JSON array of task dependencies. `preTaskCode` specifies the upstream task ID and `postTaskCode` specifies the downstream task ID. Each task must have a unique ID. For tasks without an upstream dependency, set `preTaskCode` to 0.

object

Yes

A JSON array of task dependencies. `preTaskCode` specifies the upstream task ID and `postTaskCode` specifies the downstream task ID. Each task must have a unique ID. For tasks without an upstream dependency, set `preTaskCode` to 0.

name

string

Yes

The name of the task topology. Use the workflow name.

ods batch workflow

preTaskCode

integer

Yes

The ID of the upstream task.

16************

preTaskVersion

integer

Yes

The version of the upstream task.

1

postTaskCode

integer

Yes

The ID of the downstream task.

28************

postTaskVersion

integer

Yes

The version of the downstream task.

1

taskDefinitionJson

array<object>

Yes

A JSON array of task definitions. This array contains the details for all tasks in the workflow.

array<object>

Yes

A JSON object that defines a task. This object contains the details for the task.

code

integer

Yes

The ID of the task definition.

36************

description

string

No

The description of the task definition.

ods transform task

alertEmailAddress

string

No

The email address to which alerts are sent.

foo_bar@spark.alert.invalid.com

startAlertEnable

boolean

No

Specifies whether to enable alerts when a task starts.

false

failAlertEnable

boolean

No

Specifies whether to enable alerts when a task fails.

false

failRetryTimes

integer

No

The number of times to retry a task after it fails.

1

name

string

Yes

The name of the task.

ods_transform_task

taskParams

object

Yes

The parameters of the task definition.

workspaceBizId

string

Yes

The workspace ID.

w-d8********

taskBizId

string

Yes

The ID of the Data Development task.

TSK-d87******************

resourceQueueId

string

Yes

The resource queue in which the Spark task runs.

root_queue

sparkDriverCores

integer

No

The number of cores for the Spark driver.

1

sparkExecutorCores

integer

No

The number of cores for each Spark executor.

1

sparkDriverMemory

integer

No

The memory of the Spark driver.

4g

sparkExecutorMemory

integer

No

The memory of each Spark executor.

4g

sparkConf

array<object>

No

The configurations of the Spark task.

object

No

key

string

No

The key of the Spark configuration.

spark.dynamicAllocation.enabled

value

string

No

The value of the Spark configuration.

true

sparkVersion

string

No

The version of the Spark engine.

esr-4.0.0 (Spark 3.5.2, Scala 2.12)

sparkLogLevel

string

No

The log level for Spark.

INFO

sparkLogPath

string

No

The path where the Spark task logs are stored.

oss://data***/spark/logs

displaySparkVersion

string

No

The display version of the Spark engine.

esr-4.0.0 (Spark 3.5.2, Scala 2.12)

fusion

boolean

No

Specifies whether to enable the Fusion engine for acceleration.

false

environmentId

string

No

The environment ID.

env-crhq2h5lhtgju93buhkg

type

string

No

The type of the Spark task.

SQL

localParams

array<object>

No

object

No

prop

string

No

direct

string

No

type

string

No

value

string

No

taskType

string

Yes

The type of the workflow node.

EMR_SERVERLESS_SPARK

timeout

integer

No

The timeout period for the callback method, in seconds.

1200

tags

object

No

The tags.

string

No

A JSON string of tag key-value pairs.

“{\"tagkey\":\"tagvalue\"}”

executionType

string

Yes

The execution policy.

PARALLEL

alertEmailAddress

string

No

The email address to which alerts are sent.

foo_bar@spark.alert.invalid.com

schedule

object

No

The scheduling configuration.

startTime

string

No

The start time of the schedule.

2024-12-23 16:13:27

endTime

string

No

The end time of the schedule.

2025-12-23 16:13:27

crontab

string

No

The cron expression for the schedule.

0 0 0 * * ?

timezoneId

string

No

The time zone ID.

Asia/Shanghai

retryTimes

integer

No

The number of retries.

1

taskParallelism

integer

No

The degree of parallelism for tasks.

1

resourceQueue

string

No

The resource queue.

root_queue

tags

object

No

The tags.

string

No

A JSON string of tag key-value pairs.

“{\"tagkey\":\"tagvalue\"}”

publish

boolean

No

Specifies whether to publish the workflow.

true

regionId

string

No

The region ID.

cn-hangzhou

runAs

string

No

The Alibaba Cloud UID of the user who runs the workflow.

113***************

globalParams

array<object>

No

object

No

prop

string

No

value

string

No

direct

string

No

type

string

No

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The ID of the request.

DD6B1B2A-5837-5237-ABE4-FF0C8944****

code

integer

The API return code.

1400009

msg

string

A detailed message for the return code.

No permission for resource action

success

string

Indicates whether the request was successful.

true

failed

string

Indicates whether the request failed.

false

data

object

The returned data.

id

integer

The serial number of the workflow definition.

12342

code

integer

The ID of the workflow definition.

160************

httpStatusCode

integer

The HTTP status code.

200

Examples

Success response

JSON format

{
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****",
  "code": 1400009,
  "msg": "No permission for resource action",
  "success": "true",
  "failed": "false",
  "data": {
    "id": 12342,
    "code": 0
  },
  "httpStatusCode": 200
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.