Deployment

Create a Deployment

POST
Create a Deployment in the Organization. An Astro Deployment is an Airflow environment that is powered by all core Airflow components.

Path parameters

organizationIdstringRequired
The ID of the Organization in which to create the Deployment.

Request

This endpoint expects a union.
Create Dedicated Deployment Requestobject
OR
Create Hybrid Deployment Requestobject
OR
Create Standard Deployment Requestobject

Response

This endpoint returns an object
airflowVersion
string
The Deployment's Airflow version.
astroRuntimeVersion
string
The Deployment's Astro Runtime version.
createdAt
datetime

The time when the Deployment was created in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

createdBy
object
id
string
The Deployment's ID.
imageRepository
string
The URL of the Deployment's image repository.
imageTag
string
The Deployment's custom image tag. Appears only if specified in the most recent deploy.
isCicdEnforced
boolean
Whether the Deployment requires that all deploys are made through CI/CD.
isDagDeployEnabled
boolean
Whether the Deployment has DAG deploys enabled.
name
string
The Deployment's name.
namespace
string
The Deployment's namespace name in the Kubernetes cluster.
organizationId
string
The ID of the Organization to which the Deployment belongs.
runtimeVersion
string
Deprecated: runtimeVersion has been replaced with astroRuntimeVersion
schedulerCpu
string
The CPU limit for the Deployment's scheduler. Specified in number of CPU cores.
schedulerMemory
string

The memory limit for the Deployment’s scheduler. Units in Gibibytes or Gi.

schedulerReplicas
integer
The number of schedulers to use in the Deployment.
status
enum
The status of the Deployment.
updatedAt
datetime

The time when the Deployment was last updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

updatedBy
object
webServerAirflowApiUrl
string
The Deployment's webserver's base url to directly access the Airflow api.
webServerCpu
string
The CPU limit for the Deployment's webserver. Units are in number of CPU cores.
webServerIngressHostname
string
The Deployment's webserver's ingress hostname.
webServerMemory
string

The memory limit for the Deployment’s webserver. Units in Gibibytes or Gi.

webServerUrl
string
The Deployment's webserver's url.
workspaceId
string
The ID of the Workspace to which the Deployment belongs.
cloudProvider
enumOptional
The cloud provider of the cluster. Only for Standard Deployment.
Allowed values: AWSAZUREGCP
clusterId
stringOptional
The ID of the cluster where the Deployment is hosted.
clusterName
stringOptional
The name of the cluster where the Deployment is hosted. Only for Dedicated and Hybrid Deployments.
contactEmails
list of stringsOptional
The list of contact emails for the Deployment.
dagTarballVersion
stringOptional
The Deployment's current DAG tarball version, also known as the Bundle Version in the Astro UI. If no deploys are currently processing, this value should be the same as DesiredDagTarballVersion.
defaultTaskPodCpu
stringOptional
The default CPU resource usage for a worker Pod when running the Kubernetes executor or KubernetesPodOperator. Units are in number of CPU cores.
defaultTaskPodMemory
stringOptional

The default memory resource usage for a worker Pod when running the Kubernetes executor or KubernetesPodOperator. Units are in Gi. This value must always be twice the value of DefaultTaskPodCpu.

description
stringOptional
The Deployment's description.
desiredDagTarballVersion
stringOptional
The Deployment's expected DAG tarball version after a currently processing deploy completes. This value is updated when a user triggers a DAG-only deploy to indicate that the Deployment is expecting a new DAG tarball version. If no deploys are currently processing, this value should be the same as DagTarballVersion.
environmentVariables
list of objectsOptional
The Deployment's environment variables. Secret values will be omitted from response.
executor
enumOptional
The Deployment's executor type.
Allowed values: CELERYKUBERNETES
externalIPs
list of stringsOptional
A list of the Deployment's external IPs.
imageVersion
stringOptional
A tag that Astronomer applies to the Deployment's Astro Runtime image during a deploy. It includes the date and time of the deploy.
isDevelopmentMode
booleanOptional
If true, deployment will be able to use development-only features, such as hibernation, but will not have guaranteed uptime SLAs
isHighAvailability
booleanOptional

Whether the Deployment has high availability (HA) enabled. If true, multiple scheduler Pods will run at once.

oidcIssuerUrl
stringOptional
OIDC issuer URL of the deployment's cluster
region
stringOptional
The region of the cluster. Only for Dedicated and Hybrid Deployments.
resourceQuotaCpu
stringOptional
The CPU quota for worker Pods when running the Kubernetes executor or KubernetesPodOperator. If current CPU usage across all workers exceeds the quota, no new worker Pods can be scheduled. Units are in number of CPU cores.
resourceQuotaMemory
stringOptional

The memory quota for worker Pods when running the Kubernetes executor or KubernetesPodOperator. If current memory usage across all workers exceeds the quota, no new worker Pods can be scheduled. Units are in Gi. This value must always be twice the value of ResourceQuotaCpu.

scalingSpec
objectOptional
scalingStatus
objectOptional
schedulerAu
integerOptional
The number of Astronomer units (AU) for the Deployment's scheduler. Applies only to Deployments hosted on Hybrid clusters.
schedulerSize
enumOptional
The Deployment's scheduler size.
Allowed values: SMALLMEDIUMLARGE
statusReason
stringOptional
A message that provides context for the Deployment's status.
taskPodNodePoolId
stringOptional
The node pool ID for the task pod.
type
enumOptional
The type of cluster that the Deployment runs on.
Allowed values: DEDICATEDHYBRIDSTANDARD
webServerReplicas
integerOptional
The number of webserver replicas.
workerQueues
list of objectsOptional
A list of the Deployment's worker queues.
workloadIdentity
stringOptional
The Deployment's workload identity.
workspaceName
stringOptional
The name of the Workspace to which the Deployment belongs.
POST
$curl -X POST https://api.astronomer.io/platform/v1beta1/organizations/organizationId/deployments \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "astroRuntimeVersion": "9.1.0",
> "clusterId": "clmh9g6zj000008mg77if5wa2",
> "defaultTaskPodCpu": "0.5",
> "defaultTaskPodMemory": "1Gi",
> "description": "My deployment description",
> "environmentVariables": [
> {
> "isSecret": false,
> "key": "my-var",
> "value": "my-var-value"
> }
> ],
> "executor": "CELERY",
> "isCicdEnforced": true,
> "isDagDeployEnabled": true,
> "isHighAvailability": true,
> "name": "My deployment",
> "resourceQuotaCpu": "160",
> "resourceQuotaMemory": "320Gi",
> "schedulerSize": "SMALL",
> "type": "DEDICATED",
> "workerQueues": [
> {
> "astroMachine": "A5",
> "id": "clmha1mzc000b08mi96n182au",
> "isDefault": true,
> "maxWorkerCount": 1,
> "minWorkerCount": 1,
> "name": "My worker queue",
> "workerConcurrency": 1
> }
> ],
> "workloadIdentity": "arn:aws:iam::123456789:role/AirflowS3Logs-clmk2qqia000008mhff3ndjr0",
> "workspaceId": "clmh8ol3x000008jo656y4285"
>}'
Response
1{
2 "airflowVersion": "2.7.2, if airflow version is not found, it will return NA",
3 "astroRuntimeVersion": "9.1.0",
4 "createdAt": "2022-11-22T04:37:12Z",
5 "createdBy": {
6 "id": "clm8qv74h000008mlf08scq7k",
7 "apiTokenName": "my-token",
8 "avatarUrl": "https://avatar.url",
9 "fullName": "Jane Doe",
10 "subjectType": "USER",
11 "username": "user1@company.com"
12 },
13 "id": "clmh57jtm000008lb58fe2wmv",
14 "imageRepository": "https://my-image-repository",
15 "imageTag": "my-image-tag",
16 "isCicdEnforced": true,
17 "isDagDeployEnabled": true,
18 "name": "My deployment",
19 "namespace": "weightless-diameter-8927",
20 "organizationId": "clmh59gt0000308lbgswe5fvh",
21 "runtimeVersion": "9.1.0",
22 "schedulerCpu": "1",
23 "schedulerMemory": "1Gi",
24 "schedulerReplicas": 1,
25 "status": "CREATING",
26 "updatedAt": "2022-11-22T04:37:12Z",
27 "updatedBy": {
28 "id": "clm8qv74h000008mlf08scq7k",
29 "apiTokenName": "my-token",
30 "avatarUrl": "https://avatar.url",
31 "fullName": "Jane Doe",
32 "subjectType": "USER",
33 "username": "user1@company.com"
34 },
35 "webServerAirflowApiUrl": "myorganization.astronomer-dev.run/d8fe2wmv/api/v1",
36 "webServerCpu": "0.5",
37 "webServerIngressHostname": "clmh597sg000208lb2kjhcn8q.astronomer.run/d8fe2wmv",
38 "webServerMemory": "0.5Gi",
39 "webServerUrl": "myorganization.astronomer-dev.run/d8fe2wmv?orgId=org_edxLzpFcLrgEfpD5",
40 "workspaceId": "clmh58o7d000108lb74ktc9o64",
41 "cloudProvider": "AWS",
42 "clusterId": "clmh597sg000208lb2kjhcn8q",
43 "clusterName": "my cluster",
44 "contactEmails": [
45 "contactEmails"
46 ],
47 "dagTarballVersion": "2024-01-12T18:32:20.5898930Z",
48 "defaultTaskPodCpu": "0.5",
49 "defaultTaskPodMemory": "1Gi",
50 "description": "My deployment description",
51 "desiredDagTarballVersion": "2024-01-12T18:32:20.5898930Z",
52 "environmentVariables": [
53 {
54 "isSecret": true,
55 "key": "my-var",
56 "updatedAt": "2022-11-22T04:37:12Z",
57 "value": "my-var-value"
58 }
59 ],
60 "executor": "CELERY",
61 "externalIPs": [
62 "externalIPs"
63 ],
64 "imageVersion": "deploy-2023-09-14T19-04",
65 "isDevelopmentMode": true,
66 "isHighAvailability": true,
67 "oidcIssuerUrl": "https://westus2.oic.prod-aks.azure.com/b84efac8-cfee-467a-b223-23b9aea1486d/3075f79e-abc2-4602-a691-28117197e83d/",
68 "region": "us-east-1",
69 "resourceQuotaCpu": "160",
70 "resourceQuotaMemory": "320Gi",
71 "scalingSpec": {
72 "hibernationSpec": {
73 "schedules": [
74 {
75 "hibernateAtCron": "hibernateAtCron",
76 "isEnabled": true,
77 "wakeAtCron": "wakeAtCron"
78 }
79 ]
80 }
81 },
82 "scalingStatus": {
83 "hibernationStatus": {
84 "isHibernating": true,
85 "nextEventAt": "nextEventAt",
86 "nextEventType": "HIBERNATE",
87 "reason": "reason"
88 }
89 },
90 "schedulerAu": 5,
91 "schedulerSize": "SMALL",
92 "statusReason": "Successfully Deployed",
93 "taskPodNodePoolId": "clmh5mash000008mia6lnbs0f",
94 "type": "DEDICATED",
95 "webServerReplicas": 1,
96 "workerQueues": [
97 {
98 "id": "clmh9vsuf000908midngba9mw",
99 "isDefault": true,
100 "maxWorkerCount": 10,
101 "minWorkerCount": 1,
102 "name": "default",
103 "podCpu": "1",
104 "podMemory": "2Gi",
105 "workerConcurrency": 20,
106 "astroMachine": "A5",
107 "nodePoolId": "clmh9yjcn000a08mi8dsgbno9"
108 }
109 ],
110 "workloadIdentity": "workloadIdentity",
111 "workspaceName": "my-workspace"
112}