Skip to content

client.projects.production

View as Markdown

client.projects.production — the projects.production operations.

On AsyncKindgi every method is the same, awaited.

set(
project_id: str | UUID,
body: ProjectProductionBody | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> ProjectProduction
Signature

Put a project in production, or take it out. PUT /v1/projects/{projectId}/production

A run in a project in production is a production run; a run anywhere else is staging. For tenant admins (admin on the workspace), both ways. Setting what's already set answers 200 unchanged and keeps the first productionSince. With the runtime's production gate on, putting a project in production is refused with 403 production-not-allowed while the workspace isn't allowed it, with details.next naming where to go to be allowed when the runtime names one; a project already in production stays so. With the workspace's projectsInProduction limit set, putting another project in production is refused with 403 production-limit-reached while that many of its projects are in production, or more; taking one out is never refused. Putting a project in production is refused with 409 promote-only-build while a promote-only build was deployed into it (not promoted there), whether it serves or not: such a build reaches a project in production only by promotion, so that project never goes into production. 501 production-unsupported from a runtime whose projects can't be put in production.