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
| Field | Type | What it is |
|---|---|---|
name | string | The running lease, originally created with the credential proxy enabled. Required. |
expected_revision | int64 | Revision from the previous call; 0 is the revision at creation. Required when changing bindings. Omit it and both change lists to read the revision. |
add | EgressCredentialBinding[] | New bindings. Requires secrets:access on each named SecretVersion. |
remove_sentinels | string[] | Sentinels to revoke, not secret values. To change a binding, remove its sentinel and add a new binding in the same call. |
EgressCredentialBinding
| Field | Type | What it is |
|---|---|---|
sentinel | string | Opaque placeholder, unique within the lease. Supply it to the guest in its ordinary environment or application configuration, not as a secret. Required. |
allowed_hosts | string[] | 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_ports | int32[] | Approved HTTPS ports. Empty means 443. |
secret_version | string | SecretVersion resource name in the lease's org, project and environment. Required. Never returned again. |
header | string | Case-insensitive HTTP header name. One of the target group. |
query_param | string | Case-sensitive query parameter name. One of the target group. |
request_body | bool | Replace 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_time | timestamp | Required 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
| Field | Type | What it is |
|---|---|---|
revision | int64 | The 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 '{}'