Zones
Using the zones command, it is possible to manage Zones on the remote server.
This command manages zones.
Usage:
permguard zones [flags]
permguard zones [command]
Available Commands:
create Create a zone
delete Delete a zone
list List zones
update Update a zone
Flags:
-h, --help help for zones
Global Flags:
-o, --output string output format (default "terminal")
--spiffe-enabled enable native SPIFFE mTLS via Workload API
--spiffe-endpoint string SPIFFE Workload API socket path (defaults to SPIFFE_ENDPOINT_SOCKET env)
--tls-ca-file string path to CA certificate for server verification (PEM)
--tls-cert-file string path to client certificate for mTLS (PEM)
--tls-key-file string path to client private key for mTLS (PEM)
--tls-skip-verify skip server certificate verification (insecure, dev only)
-v, --verbose true for verbose output
-w, --workdir string workdir (default ".")
Use "permguard zones [command] --help" for more information about a command.
caution
The output from your current version of Permguard may differ from the example provided on this page.
Create a zone
The permguard zones create command allows to create a zone for the input name.
permguard zones create platform-admin-zone
output:
273165098782: platform-admin-zone
JSON Output
permguard zones create platform-admin-zone --output json
output:
{
"zones": [
{
"zone_id": 273165098782,
"created_at": "2024-08-25T14:07:59.634Z",
"updated_at": "2024-08-25T14:07:59.634Z",
"name": "platform-admin-zone"
}
]
}
Delete a Zone
The permguard zones delete command allows to delete an existing zone.
The --zone-id flag is required: the command does not accept positional arguments.
permguard zones delete --zone-id 273165098782
output:
273165098782: platform-admin-zone
JSON Output
permguard zones delete --zone-id 273165098782 --output json
output:
{
"zones": [
{
"zone_id": 273165098782,
"created_at": "2024-08-25T14:07:59.634Z",
"updated_at": "2024-08-25T14:07:59.634Z",
"name": "platform-admin-zone"
}
]
}
Update a Zone
The permguard zones update command allows to update the name of an existing zone.
The --zone-id flag is required.
permguard zones update --zone-id 273165098782 platform-admin-zone-v2
output:
273165098782: platform-admin-zone-v2
JSON Output
permguard zones update --zone-id 273165098782 platform-admin-zone-v2 --output json
output:
{
"zones": [
{
"zone_id": 273165098782,
"created_at": "2024-08-25T14:07:59.634Z",
"updated_at": "2024-08-25T14:10:12.301Z",
"name": "platform-admin-zone-v2"
}
]
}
Fetch Zones
The permguard zones list command allows for the retrieval of all zones.
permguard zones list
output:
273165098782: platform-admin-zone
534434453770: root-uat
627303999986: root-prod
JSON Output
permguard zones list --output json
output:
{
"zones": [
{
"zone_id": 273165098782,
"created_at": "2024-08-25T14:07:07.04Z",
"updated_at": "2024-08-25T14:07:07.04Z",
"name": "platform-admin-zone"
},
{
"zone_id": 534434453770,
"created_at": "2024-08-25T14:07:59.634Z",
"updated_at": "2024-08-25T14:07:59.634Z",
"name": "root-uat"
},
{
"zone_id": 627303999986,
"created_at": "2024-08-25T14:08:58.619Z",
"updated_at": "2024-08-25T14:08:58.619Z",
"name": "root-prod"
}
]
}