cloud tenants¶
NAME¶
phyware cloud tenants — manage PhyCloud tenants.
SYNOPSIS¶
phyware cloud tenants create [OPTIONS] --id <TENANT_ID> --name <NAME> [--admin-email <EMAIL>]
phyware cloud tenants list [OPTIONS]
phyware cloud tenants get [OPTIONS] <TENANT_ID>
phyware cloud tenants deactivate [OPTIONS] <TENANT_ID>
DESCRIPTION¶
Tenant management commands. All require the admin:tenants scope.
create¶
Provisions a new tenant, returning the tenant ID.
list¶
Lists all tenants in the installation.
get¶
Returns full details for a single tenant.
deactivate¶
Soft-deletes a tenant. Deactivated tenants cannot ingest new events.
OPTIONS¶
| Flag | Type | Required | Default | Env |
|---|---|---|---|---|
--url | string | No | http://localhost:8000 | PHYCLOUD_URL |
--api-key | string | No | — | PHYCLOUD_API_KEY |
--output | enum | No | table | — |
| --id | string | Yes (create) | — | — | | --name | string | Yes (create) | — | — | | --admin-email | string | No | — | — | | --admin-password | string | No | — | PHYWARE_ADMIN_PASSWORD | | --admin-name | string | No | — | — |
With --admin-email, create also makes the tenant's first admin user, who manages the tenant's users and API keys (but not other tenants): ready to log in with --admin-password, otherwise invited (admin_user.invite_token in the output, shown once).
ARGUMENTS¶
| Name | Required | Description |
|---|---|---|
TENANT_ID | Yes (get/deactivate) | Unique tenant identifier |
INPUT¶
None.
OUTPUT¶
| Field | Type | Description |
|---|---|---|
id | string | Tenant identifier |
name | string | Tenant name |
status | string | active / inactive |
EXIT CODES¶
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic / connection error |
2 | Authentication / authorisation error |
3 | Resource not found |
4 | Validation error |
5 | Server-side error |
EXAMPLES¶
# Create a tenant
phyware cloud tenants create --id acme --name "Acme Corp"
# Create a tenant with its first admin invited
phyware cloud tenants create --id acme --name "Acme Corp" --admin-email ops@acme.example
# List all tenants as JSON
phyware cloud tenants list --output json
# Get a specific tenant
phyware cloud tenants get ten_abc123
# Deactivate a tenant
phyware cloud tenants deactivate ten_abc123
AGENT NOTES¶
create returns the tenant's api_key (shown once) and, with --admin-email, its first admin user. Requires admin:tenants scope. Deactivation is irreversible via the CLI; re-activation requires the admin web UI.
SEE ALSO¶
ERRORS¶
| Code | Message | Remediation |
|---|---|---|
CONFLICT | Tenant name already exists | Choose a different name |
FORBIDDEN | Insufficient scope | Ensure admin:tenants scope |
NOT_FOUND | Tenant not found | Check TENANT_ID |