Skip to content
Console
On this page

Update a deployment protection

Updates the environment's desired Deployment Protection policy.

Updates the environment's desired Deployment Protection policy.

  • Path PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/deployment_protections/deployment-protection
  • Scope hosting:write
  • Effect write — a successful call changes state.
  • Collection deployment_protections
  • Query update_mask

Request

FieldTypeWhat it is
deployment_protectionDeploymentProtectionThe policy to update. Name identifies it; mode must be explicitly set. Required.
update_maskfield_maskUnset or mode updates mode. No other fields are writable.

DeploymentProtection

FieldTypeWhat it is
namestringThe environment's deployment_protections/default.
metaResourceMetaPolicy generation and ETag.
modestringThe default mode resolves to org_member in previews and public elsewhere. Explicit public or org_member overrides that default.

ResourceMeta

FieldTypeWhat it is
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.

Response

FieldTypeWhat it is
namestringThe environment's deployment_protections/default.
uidstringStable identity for the environment lifetime. Output only.
metaResourceMetaPolicy generation and ETag.
modestringThe default mode resolves to org_member in previews and public elsewhere. Explicit public or org_member overrides that default.
protectionServingRouteProtectionThe resolved Hosting policy. Output only.

ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only.
create_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

ServingRouteProtection

FieldTypeWhat it is
modestringExplicit public or org_member. For org_member, ingress must add X-Robots-Tag: noindex, nofollow and disable shared caching. Output only.
org_idstringExact Access org ID. Required for org_member; unset for public. Output only.

Errors

Every error arrives in the body Errors describes.

Examples

curl -X PATCH "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/deployment_protections/deployment-protection" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"orgs/acme/projects/shop/envs/production/deployment_protections/deployment-protection"}'