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")
  -v, --verbose          true for verbose output
  -w, --workdir string   workdir (default ".")

Use "Permguard zones [command] --help" for more information about a command.

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 --name magicfarmacia-dev

output:

 273165098782: magicfarmacia-dev
JSON Output
permguard zones create --name magicfarmacia-dev --output json

output:

{
  "zones": [
    {
      "zone_id": 273165098782,
      "created_at": "2024-08-25T14:07:59.634Z",
      "updated_at": "2024-08-25T14:07:59.634Z",
      "name": "magicfarmacia-dev"
    }
  ]
}

Fetch Zones

The permguard zones list command allows for the retrieval of all zones.

permguard zones list

output:

273165098782: magicfarmacia-dev
534434453770: magicfarmacia-uat
627303999986: magicfarmacia-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": "magicfarmacia-dev"
    },
    {
      "zone_id": 534434453770,
      "created_at": "2024-08-25T14:07:59.634Z",
      "updated_at": "2024-08-25T14:07:59.634Z",
      "name": "magicfarmacia-uat"
    },
    {
      "zone_id": 627303999986,
      "created_at": "2024-08-25T14:08:58.619Z",
      "updated_at": "2024-08-25T14:08:58.619Z",
      "name": "magicfarmacia-prod"
    }
  ]
}