Environments can also be managed in the KeyStone Dashboard under Settings > Environments - no code required.
create
list / get
EnvironmentRead
update
deactivate
Deactivate an environment. Preserves all data but blocks M2M authentication using this environment’s credentials.update with isActive: true.