cloud tenants¶
NAME¶
phyware cloud tenants — manage PhyCloud tenants.
SYNOPSIS¶
phyware cloud tenants create [OPTIONS] --name <NAME>
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 | — |
| --name | string | Yes (create) | — | — | | --plan | string | No | free | — |
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 --name "Acme Corp"
# 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
# Create with a specific plan
phyware cloud tenants create --name "Enterprise Co" --plan enterprise
AGENT NOTES¶
create returns a tenant.id — capture it for subsequent keys create and events send calls. 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 |