Back to Prefect

Deployment events

docs/v3/api-ref/events/deployment-events.mdx

3.6.30.dev33.2 KB
Original Source

Deployment events track the lifecycle of deployments, including creation, updates, deletion, and status transitions. These events are emitted server-side. For more on deployments, see Deployments.

prefect.deployment.created

Emitted when a new deployment is created.

Resource

LabelDescription
prefect.resource.idprefect.deployment.{uuid}
prefect.resource.nameDeployment name
Resource ID patternRoleWhen present
prefect.flow.{uuid}flowAlways
prefect.work-queue.{uuid}work-queueWhen a work queue is assigned
prefect.work-pool.{uuid}work-poolWhen a work pool is assigned (includes prefect.work-pool.type label)

Payload

This event has no payload.

prefect.deployment.updated

Emitted when one or more deployment fields are changed.

Resource

LabelDescription
prefect.resource.idprefect.deployment.{uuid}
prefect.resource.nameDeployment name

Same as prefect.deployment.created.

Payload

FieldTypeDescription
updated_fieldsarray of stringsNames of fields that changed
updatesobjectMap of field name to {"from": <old>, "to": <new>}
<Expandable title="Example: deployment schedule updated">
json
{
  "occurred": "2026-03-31T18:30:00.000000Z",
  "event": "prefect.deployment.updated",
  "resource": {
    "prefect.resource.id": "prefect.deployment.b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "prefect.resource.name": "my-etl-flow/production"
  },
  "related": [
    {
      "prefect.resource.id": "prefect.flow.a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "prefect.resource.name": "my-etl-flow",
      "prefect.resource.role": "flow"
    }
  ],
  "payload": {
    "updated_fields": ["is_schedule_active"],
    "updates": {
      "is_schedule_active": {
        "from": true,
        "to": false
      }
    }
  },
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}
</Expandable>

prefect.deployment.deleted

Emitted when a deployment is deleted.

Resource

LabelDescription
prefect.resource.idprefect.deployment.{uuid}
prefect.resource.nameDeployment name

Same as prefect.deployment.created.

Payload

This event has no payload.

prefect.deployment.{status}

Emitted when a deployment's readiness status changes. The {status} suffix is the kebab-case status value.

Status variants

Event nameDescription
prefect.deployment.readyDeployment is ready to create runs
prefect.deployment.not-readyDeployment is not ready (for example, no active schedule or no available work pool)

Resource

LabelDescription
prefect.resource.idprefect.deployment.{uuid}
prefect.resource.nameDeployment name

Same as prefect.deployment.created.

Payload

This event has no payload.