Skip to content
Console
Menu

Generated Assets

Workflows

Getting Started

Authentication

KV Store

Update an usage setting

Updates the usage settings, the enforcement switch included.

Updates the usage settings, the enforcement switch included. A change is recorded with who made it.

  • Path PATCH https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_settings/usage-settings
  • Scope billing:write
  • Effect write — a successful call changes state.
  • Collection usage_settings
  • Query update_mask

#Request

FieldTypeWhat it is
usage_settingsUsageSettingsThe usage settings with its new values; name selects it. Required.
update_maskfield_maskThe fields to change.

#UsageSettings

FieldTypeWhat it is
namestringorgs/{org}/projects/{project}/envs/{env}/usage_settings/default.
metaResourceMetaResource metadata.
currency_codestringThe currency usage is rated and invoiced in (ISO 4217, upper case). Required.
enforcement_enabledboolWhile false a reservation is always granted and a would-be refusal is only recorded. Off until the merchant's admin turns it on.
free_allowance_nanostringWhat a subject with no payment method may use each month, nano-minor, as a decimal string.
past_due_grace_daysint32Days after an invoice's due time before the subject is past due.
suspend_grace_daysint32Days after an invoice's due time before the subject is suspended.
extra_issuerstringA further token issuer (the merchant's own OIDC provider) besides Sylphx Auth; empty for Sylphx Auth only. It needs extra_issuer_jwks_url.
extra_issuer_jwks_urlstringThe issuer's HTTPS JWKS URL.
extra_issuer_audiencestringThe audience that issuer's tokens must carry; required with extra_issuer.
extra_issuer_org_claimstringThe claim that names a customer organization in that issuer's tokens; empty means the issuer proves no organization subject.

#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
namestringorgs/{org}/projects/{project}/envs/{env}/usage_settings/default.
uidstringuset_<cell><ulid>; never reused. Output only.
metaResourceMetaResource metadata.
currency_codestringThe currency usage is rated and invoiced in (ISO 4217, upper case). Required.
enforcement_enabledboolWhile false a reservation is always granted and a would-be refusal is only recorded. Off until the merchant's admin turns it on.
free_allowance_nanostringWhat a subject with no payment method may use each month, nano-minor, as a decimal string.
past_due_grace_daysint32Days after an invoice's due time before the subject is past due.
suspend_grace_daysint32Days after an invoice's due time before the subject is suspended.
extra_issuerstringA further token issuer (the merchant's own OIDC provider) besides Sylphx Auth; empty for Sylphx Auth only. It needs extra_issuer_jwks_url.
extra_issuer_jwks_urlstringThe issuer's HTTPS JWKS URL.
extra_issuer_audiencestringThe audience that issuer's tokens must carry; required with extra_issuer.
extra_issuer_org_claimstringThe claim that names a customer organization in that issuer's tokens; empty means the issuer proves no organization subject.

#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.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X PATCH "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/usage_settings/usage-settings" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"currency_code":"…","name":"orgs/acme/projects/shop/envs/production/usage_settings/usage-settings"}'