Skip to content
Console
On this page

Update egress credentials on a lease

Atomically adds and removes bindings on a running proxy-backed lease, without restarting the guest.

Atomically adds and removes bindings on a running proxy-backed lease, without restarting the guest. The proxy uses the new revision for all subsequent substitutions. This never changes the lease's network policy.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:updateEgressCredentials
  • Scope sandboxes:write
  • Effect write — a successful call changes state.
  • Collection leases

Request

FieldTypeWhat it is
namestringThe running lease, originally created with the credential proxy enabled. Required.
expected_revisionint64Revision from the previous call; 0 is the revision at creation. Required when changing bindings. Omit it and both change lists to read the revision.
addEgressCredentialBinding[]New bindings. Requires secrets:access on each named SecretVersion.
remove_sentinelsstring[]Sentinels to revoke, not secret values. To change a binding, remove its sentinel and add a new binding in the same call.

EgressCredentialBinding

FieldTypeWhat it is
sentinelstringOpaque placeholder, unique within the lease. Supply it to the guest in its ordinary environment or application configuration, not as a secret. Required.
allowed_hostsstring[]Exact DNS names or one leading wildcard label, such as *.example.com. A wildcard matches exactly one label, not the apex or nested names. List the apex explicitly if needed. IP literals are refused. Required.
allowed_portsint32[]Approved HTTPS ports. Empty means 443.
secret_versionstringSecretVersion resource name in the lease's org, project and environment. Required. Never returned again.
headerstringCase-insensitive HTTP header name. One of the target group.
query_paramstringCase-sensitive query parameter name. One of the target group.
request_bodyboolReplace literal placeholder bytes in an uncompressed request body; the proxy recalculates its length. Set to true to select this target. One of the target group.
expire_timetimestampRequired absolute cutoff for substitution. A request at or after this instant, after removal, or after the underlying authority is revoked is refused. Renewal never extends a binding's lifetime. Required.

Response

FieldTypeWhat it is
revisionint64The committed revision, initially zero. Output only.

Errors

  • UNAUTHENTICATED — No valid key or token was presented.
  • PERMISSION_DENIED — The key lacks the method's permission.
  • RESOURCE_NOT_FOUND — The named Resource does not exist or is not visible.
  • INVALID_FIELD — A field failed validation.
  • INVALID_STATE — The Resource is in a state that forbids the call.
  • ETAG_MISMATCH — The etag sent does not match the Resource's current etag.
  • UNAVAILABLE — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body Errors describes.

Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:updateEgressCredentials" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'