CreateAirflow
Creates an Airflow instance in a workspace.
Operation description
Creates an Airflow instance in a workspace.
Try it now
Test
RAM authorization
|
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 |
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.