CreateAirflow

Updated at:

Creates an Airflow instance in a workspace.

Operation description

Creates an Airflow instance in a workspace.

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

dms:CreateAirflow

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

WorkspaceId

string

Yes

The ID of the DMS workspace.

8630242382****

AirflowName

string

Yes

The name of the Airflow instance.

testairflow

Description

string

No

The description of the Airflow instance.

order scheduler

AppSpec

string

Yes

The compute specifications for the Airflow instance. Valid values: SMALL, MEDIUM, LARGE, XLARGE, or X2LARGE.

SMALL

WorkerServerlessReplicas

integer

Yes

The number of elastic worker nodes.

0

VpcId

string

Yes

The VPC ID.

vpc-uf63r6coyiw9o5****

VSwitchId

string

Yes

The vSwitch ID.

vsw-8vbaf073jawozfp****

SecurityGroupId

string

Yes

The security group ID.

sg-bp108t8ldzeyk1****

OssBucketName

string

Yes

The name of the OSS bucket.

oss-test

OssPath

string

Yes

The OSS path for log storage.

/airflow

StartupFile

string

No

The path to the startup script in the Airflow container.

default/startup.sh

RequirementFile

string

No

The path to the Python requirements file.

default/requirements.txt

DagsDir

string

No

The path to the DAG directory for Airflow to scan.

default/dags

PluginsDir

string

No

The path to the plugin directory for the Airflow instance to scan.

default/plugins

GracefulShutdownTimeout

integer

No

The graceful shutdown timeout for workers, in seconds.

60

EnableServerless

boolean

No

Specifies whether to enable worker elasticity.

DataMountInfoList

array

No

A list of data mount configurations.

DataMountInfo

No

The data mount configuration.

AirflowVersion

string

No

The Airflow version. Supported versions: 2.10 and 3.1.

3.1

ClientToken

string

No

A client token to ensure request idempotence.

token-****

ZoneId

string

No

The ID of the zone where the instance will be created.

cn-hangzhou-h

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

67E910F2-4B62-5B0C-ACA3-7547695C****

AccessDeniedDetail

string

Details of the access denial.

NOT_FOUND

Root

object

The Airflow data dictionary.

AirflowName

string

The name of the Airflow instance.

testairflow

AppSpec

string

The specifications of the Airflow instance.

SMALL

AppType

string

The application type. This value is always airflow.

airflow

DagsDir

string

The directory that Airflow scans for DAGs.

default/dags

DeployErrorMsg

string

The deployment error message.

vpc not found

Description

string

The description of the Airflow instance.

order scheduler

GmtCreated

string

The time the instance was created.

2025-08-12T05:46:01.000+0000

OssBucketName

string

The name of the OSS bucket.

oss-test

OssPath

string

The OSS path.

/airflow

PluginsDir

string

The plugin directory that Airflow scans.

default/plugins

RequirementFile

string

The path to the requirements file.

default/requirements.txt

SecurityGroupId

string

The security group ID.

sg-2ze1nak7h0alg1xxx

StartupFile

string

The file that is loaded when the Airflow instance starts. You can use this file to set environment variables.

default/startup.sh

Status

string

The status of the Airflow instance.

DEPLOYING

AirflowId

string

The ID of the Airflow instance.

af-****

VSwitchId

string

The VSwitch ID.

vsw-8vbaf073jawozfpbg****

VpcId

string

The VPC ID.

vpc-uf63r6coyiw9o5gf****

WorkerServerlessReplicas

integer

The number of scaled-out worker nodes.

0

WorkspaceId

string

The workspace ID.

86302423828****

ZoneId

string

The zone ID.

cn-hangzhou-h

AirflowVersion

string

The Airflow version.

3.1

CustomAirflowCfg

array

Custom Airflow configurations.

string

A custom configuration in the section.key=value format.

celery.worker_concurrency=10

DataMountInfoList

array

A list of data mount configurations.

DataMountInfo

A data mount configuration.

EnableServerless

boolean

Indicates whether to enable serverless workers.

GracefulShutdownTimeout

integer

The timeout period for a graceful shutdown, in seconds.

60

Message

string

The response message.

Successful

HttpStatusCode

integer

The HTTP status code.

200

ErrorCode

string

The error code.

UnknownError

Success

boolean

Indicates whether the request succeeded. Valid values:

  • true: The request succeeded.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "RequestId": "67E910F2-4B62-5B0C-ACA3-7547695C****",
  "AccessDeniedDetail": "NOT_FOUND",
  "Root": {
    "AirflowName": "testairflow",
    "AppSpec": "SMALL",
    "AppType": "airflow",
    "DagsDir": "default/dags",
    "DeployErrorMsg": "vpc not found",
    "Description": "order scheduler",
    "GmtCreated": "2025-08-12T05:46:01.000+0000",
    "OssBucketName": "oss-test",
    "OssPath": "/airflow",
    "PluginsDir": "default/plugins",
    "RequirementFile": "default/requirements.txt",
    "SecurityGroupId": "sg-2ze1nak7h0alg1xxx",
    "StartupFile": "default/startup.sh",
    "Status": "DEPLOYING",
    "AirflowId": "af-****",
    "VSwitchId": "vsw-8vbaf073jawozfpbg****",
    "VpcId": "vpc-uf63r6coyiw9o5gf****",
    "WorkerServerlessReplicas": 0,
    "WorkspaceId": "86302423828****",
    "ZoneId": "cn-hangzhou-h",
    "AirflowVersion": "3.1",
    "CustomAirflowCfg": [
      "celery.worker_concurrency=10"
    ],
    "DataMountInfoList": [
      {
        "OssBucket": "",
        "Prefix": "",
        "MountFolderName": "",
        "ReadOnly": false
      }
    ],
    "EnableServerless": false,
    "GracefulShutdownTimeout": 60
  },
  "Message": "Successful",
  "HttpStatusCode": 200,
  "ErrorCode": "UnknownError",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.