Skip to content

Latest commit

 

History

History
104 lines (74 loc) · 4.47 KB

environment-license.md

File metadata and controls

104 lines (74 loc) · 4.47 KB

Environment & License

Overview

Read-only view of the platform tenant itself: which environment the active context points at, whether it is a trial or a platform subscription, and which licensed feature settings are switched on. Use it to confirm you are talking to the environment you think you are, and to check whether a capability (Automation, AI functions, log ingest tiers) is licensed before building on it. Nothing here is writable — licensing changes happen in Account Management, not through dtctl.

dtctl docs / Resources / Environment & License

Supported operations

Operation Resource Command syntax Description Mutating Access
describe environment dtctl describe environment Show details of a specific resource no read
get environment dtctl get environment Display one or many resources no read
describe license dtctl describe license Show details of a specific resource no read
get license dtctl get license Display one or many resources no read
get license-settings dtctl get license-settings Display one or many resources no read

Flags

These commands take dtctl's global flags (-o/--output, --context, --jq, -v, and more). Some verbs add their own flags (apply, diff, query, inventory); see the verb in COMMANDS.md. Individual commands may take further flags of their own — run dtctl <verb> <resource> --help for the authoritative list.

Required token scopes

Safety level Scopes
read app-engine:apps:run (or instead any one of: app-engine:functions:run; platform-management:environments:read)

Output

All three are single-object (or flat-list) reads, so there are no IDs to resolve and no pagination.

  • environment returns environmentId, type, state, createTime, and blockTime. The table form shows ID, type, and state; describe adds the two timestamps, date-only.
  • license returns the two booleans trial and platformSubscription.
  • license-settings returns a flat list of {key, value} objects, one per licensed feature. Note the mismatch: the table column is headed ENABLED, but in -o json/-o yaml the field is named value and its contents are the string "true"/"false", not a boolean. Compare against "true", not true.

-o json and -o yaml return the full object in every case; nothing is truncated in the table form except the date formatting noted above.

Examples

# Which environment is this context actually pointing at?
dtctl get environment
ID         TYPE       STATE
abc12345   INTERNAL   ACTIVE
# Trial or paid?
dtctl get license
TRIAL   PLATFORM SUBSCRIPTION
false   true
# Full detail, including the creation and block timestamps
dtctl describe environment
ID:         abc12345
Type:       INTERNAL
State:      ACTIVE
Created:    2025-03-13
Block Time: 2031-01-01
# Is a specific capability licensed? Filter by one or more keys.
dtctl get license-settings AUTOMATION AI_FUNCTIONS_STANDARD
KEY                     ENABLED
AI_FUNCTIONS_STANDARD   true
AUTOMATION              true
# Gate a script on a licensed feature (note: the JSON field is a string)
dtctl get license-settings AUTOMATION -o json --jq '.[0].value'    # -> "true"

Notes

  • license-settings has no describe form — each object is just a key and a value, so get already shows everything.
  • An unknown key is not an error. dtctl get license-settings NOT_A_REAL_KEY prints No resources found. and exits 0, so a script that greps for a key name should check the row count rather than the exit code.
  • Both resources accept short aliases: env for environment, license-setting for license-settings.
  • The required scope for all five commands is app-engine:apps:run, which most contexts already hold. The API also accepts app-engine:functions:run or platform-management:environments:read instead, and --check-scopes accepts a token that holds either one — see TOKEN_SCOPES.md.