Skip to content
GitmoapAPIBeta
Schema

UpdateEnvironmentRequest

Changes some of an environment's fields. A field left out is not changed; null clears display_name or url.

Shape

  • archivedboolean or nulloptional
  • concurrencyConcurrencyPolicy or nulloptional
    • The ConcurrencyPolicy schema
    • exclusivebooleanoptionaldefault falseWhether deploys to this environment run one at a time. Off by default.
    • max_lock_wait_secondsinteger · int32optional0–∞default 0How long a queued deploy waits for its turn before failing, in seconds: from 60 (shorter values are rounded up) to 21600. 0, the default, means it waits for as long as the pipeline's timeout allows.
    • modeConcurrencyModequeueskipcancel_previousoptionalWhat happens when a run wants to deploy while another run holds the lock: queue (the default) waits its turn, skip skips the step, and cancel_previous cancels the other run. cancel_previous is available on environments only, not on a step's resource group.
  • display_namestring or nulloptional
  • protectionEnvironmentProtection or nulloptional
    • The EnvironmentProtection schema
    • accept_fromAcceptFrompeople_signed_inpeoplepeople_and_service_accountspeople_and_agentsoptionalWhich kinds of approval count. A deployment approved by a bot is rarely what anyone meant, so the default is people, signed in.
    • allowed_refsarray of stringoptionalGlobs the ref a run was started from must match for it to deploy here, in the same pattern language as branch rules. Empty allows any ref.
    • allowed_scopesarray of ScopeRef or nulloptionalThe only groups and repositories allowed to deploy to this environment. Absent means the group or repository that owns it and everything beneath it.
    • approversarray of ApproverRefoptionalWho may approve: people, teams, or a role at a group or repository. Authority to approve a deployment comes from being named here, never from a role alone.
    • prevent_self_approvalbooleanoptionaldefault falseWhether the person who started the run is barred from approving its deployment. What counts is who started the run, not who wrote the commit: deploying somebody else's commit is still your deploy.
    • requiredinteger · int32optional0–∞default 1Distinct approvals needed before the deployment starts, 1–10.
    • requires_approvalbooleanoptionaldefault falseWhen set, a deployment to this environment waits for approval before it starts. Nothing runs and no credentials are issued while it waits.
    • wait_timer_secondsinteger · int32optional0–∞default 0How long a deployment waits before it may start, in seconds, up to one hour. 0 means no wait.
  • slugEnvironmentSlug (string) or nulloptional
  • tierEnvironmentTierdevelopmenttestingstagingproductionor nulloptionalWhat kind of environment this is, whatever it is called: development, testing, staging or production. A production environment is protected by default.
  • urlstring or nulloptional
  • versioninteger · int64 or nulloptionalOptimistic-concurrency guard. When supplied and stale, the write is a 409.

Example

Synthesized example
{
"archived": false,
"concurrency": {
"exclusive": false,
"max_lock_wait_seconds": 0,
"mode": "queue"
},
"display_name": "Mara Okafor",
"protection": {
"accept_from": "people_signed_in",
"allowed_refs": [
"allowed-refs-7862",
"allowed-refs-950b"
],
"allowed_scopes": [
{
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
},
{
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
],
"approvers": [
{
"anyone": {}
}
],
"prevent_self_approval": false,
"required": 1,
"requires_approval": false,
"wait_timer_seconds": 0
},
"slug": "slug-925e",
"tier": "development",
"url": "https://gitmoap.example/acme/f0ce0859",
"version": 67
}

Graph

Used inside

No schema contains this one.

Used by

Returned by 0 operations

No operation returns it directly.