A deployment can move between different states throughout its lifetime. If you make a request to change a deployment, the deployment state will change based on the nature of your request and whether the request was successful.
A deployment state is the current status of the deployment. For example,
a successful deployment can have a state of
DEPLOYED and a failed deployment
might have a state of
Before you begin
Deployments can have the following states:
DEPLOYED—The deployment was successfully deployed from a previous request.
PREVIEWING—The deployment is being previewed; no resources have yet been created from this preview request.
DEPLOYMENT_FAILED—The deployment was not successfully created or updated, or you stopped an in-progress update to the deployment. If an in-progress update was stopped, then there will be no errors. If the deployment failed on its own, you can view any errors in the
deployments.update.errorsproperty. If the error was caused by a specific resource, the resource will have an
FAILED. View the resource error in the
UPDATING—The deployment is being updated.
Actions that change states
The following actions will change the deployment state:
deployments.update()with or without the
Progression of state changes
Some state changes are not allowed, while other states can change to a number of available states. Use this diagram to understand the possible state changes for your deployment.
For example, a deployment with a
DEPLOYMENT_FAILED state can move to a
PREVIEWING state but cannot move directly to a