rolling_releases
Creates, updates, deletes, gets or lists a rolling_releases resource.
Overview
| Name | rolling_releases |
| Type | Resource |
| Id | vercel.rolling_release.rolling_releases |
Fields
The following fields are returned by SELECT queries:
- get
Rolling release information including configuration and document details, or null if no rolling release exists
| Name | Datatype | Description |
|---|---|---|
queued_deployment_id | string | The ID of a deployment queued for the next rolling release (example: dpl_ghi789) (wire: queuedDeploymentId) |
active_stage | object | The currently active stage, null if the rollout is aborted (wire: activeStage) |
advancement_type | string | The advancement type of the rolling release (automatic, manual-approval) (example: manual-approval) (wire: advancementType) |
canary_deployment | object | The canary deployment being rolled out (wire: canaryDeployment) |
current_canary_percentage | number | When set (for example while {@link substate} is PAUSED), the canary traffic percentage persisted on the rollout document — use for dashboard display when linear shift is active. (wire: currentCanaryPercentage) |
current_deployment | object | The current deployment receiving production traffic (wire: currentDeployment) |
next_stage | object | The next stage to be activated, null if not in ACTIVE state (wire: nextStage) |
stages | array | All stages configured for this rolling release |
started_at | number | Unix timestamp in milliseconds when the rolling release started (wire: startedAt) |
state | string | The current state of the rolling release (ABORTED, ACTIVE, COMPLETE) (example: ACTIVE) |
substate | string | When set to PAUSED, the rollout is frozen at the current percentage until continued. (PAUSED, ) |
updated_at | number | Unix timestamp in milliseconds when the rolling release was last updated (wire: updatedAt) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id_or_name | state, team_id, slug | Return the Rolling Release for a project, regardless of whether the rollout is active, aborted, or completed. If the feature is enabled but no deployment has occurred yet, null will be returned. |
approve_stage | exec | id_or_name, nextStageIndex, canaryDeploymentId | teamId, slug | Advance a rollout to the next stage. This is only needed when rolling releases is configured to require manual approval. |
start | exec | id_or_name, canaryDeploymentId | teamId, slug | Start a rolling release for a deployment. If a rolling release is already active for the same canary deployment, returns the current state without side effects. |
complete | exec | id_or_name, canaryDeploymentId | teamId, slug | Force-complete a Rolling Release. The canary deployment will begin serving 100% of the traffic. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
id_or_name | string | Project ID or project name (URL-encoded) |
slug | string | The Team slug to perform the request on behalf of. |
state | string | Filter by rolling release state |
teamId | string | The Team identifier to perform the request on behalf of. |
team_id | string | The Team identifier to perform the request on behalf of. (wire: teamId) |
SELECT examples
- get
Return the Rolling Release for a project, regardless of whether the rollout is active, aborted, or completed. If the feature is enabled but no deployment has occurred yet, null will be returned.
SELECT
queued_deployment_id,
active_stage,
advancement_type,
canary_deployment,
current_canary_percentage,
current_deployment,
next_stage,
stages,
started_at,
state,
substate,
updated_at
FROM vercel.rolling_release.rolling_releases
WHERE id_or_name = '{{ id_or_name }}' -- required
AND state = '{{ state }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;
Lifecycle Methods
EXEC variables use wire (API) names.
- approve_stage
- start
- complete
Advance a rollout to the next stage. This is only needed when rolling releases is configured to require manual approval.
EXEC vercel.rolling_release.rolling_releases.approve_stage
@id_or_name='{{ id_or_name }}' --required,
@teamId='{{ teamId }}',
@slug='{{ slug }}'
@@json=
'{
"nextStageIndex": {{ nextStageIndex }},
"canaryDeploymentId": "{{ canaryDeploymentId }}"
}'
;
Start a rolling release for a deployment. If a rolling release is already active for the same canary deployment, returns the current state without side effects.
EXEC vercel.rolling_release.rolling_releases.start
@id_or_name='{{ id_or_name }}' --required,
@teamId='{{ teamId }}',
@slug='{{ slug }}'
@@json=
'{
"canaryDeploymentId": "{{ canaryDeploymentId }}"
}'
;
Force-complete a Rolling Release. The canary deployment will begin serving 100% of the traffic.
EXEC vercel.rolling_release.rolling_releases.complete
@id_or_name='{{ id_or_name }}' --required,
@teamId='{{ teamId }}',
@slug='{{ slug }}'
@@json=
'{
"canaryDeploymentId": "{{ canaryDeploymentId }}"
}'
;