Skip to main content

Region

Regions define geographic locations with optional latitude, longitude, and address associations for use in security policies. The scm CLI provides commands to create, update, delete, show, load, and backup region objects.

Overview

The region commands allow you to:

  • Create regions with geographic coordinates
  • Associate address ranges with regions
  • Delete regions that are no longer needed
  • Bulk import regions from YAML files
  • Export regions for backup or migration

Set Region

Create or update a region.

Syntax

scm set object region NAME [OPTIONS]

Arguments

ArgumentDescriptionRequired
NAMEName of the regionYes

Options

OptionDescriptionRequired
--folder TEXTFolder locationYes*
--snippet TEXTSnippet locationYes*
--device TEXTDevice locationYes*
--latitude FLOATLatitude (-90 to 90)No
--longitude FLOATLongitude (-180 to 180)No
--address TEXTAddress CIDR to associate (repeat for multiple)No

* Exactly one of --folder, --snippet, or --device is required.

Examples

Create a Region with Coordinates

$ scm set object region us-west \
--folder Texas \
--latitude 37.7749 \
--longitude -122.4194
---> 100%
Created region: us-west in folder Texas

Create a Region with Addresses

$ scm set object region branch-offices \
--folder Texas \
--address 10.0.0.0/8 \
--address 172.16.0.0/12
---> 100%
Created region: branch-offices in folder Texas

Delete Region

Delete a region from SCM.

Syntax

scm delete object region NAME [OPTIONS]

Arguments

ArgumentDescriptionRequired
NAMEName of the region to deleteYes

Options

OptionDescriptionRequired
--folder TEXTFolder locationYes*
--snippet TEXTSnippet locationYes*
--device TEXTDevice locationYes*
--forceSkip confirmation promptNo

* Exactly one of --folder, --snippet, or --device is required.

Example

$ scm delete object region us-west --folder Texas --force
---> 100%
Deleted region: us-west from folder Texas

Load Regions

Load multiple regions from a YAML file.

Syntax

scm load object region [OPTIONS]

Options

OptionDescriptionRequired
--file TEXTPath to YAML file containing region definitionsYes
--folder TEXTOverride folder location for all objectsNo
--snippet TEXTOverride snippet location for all objectsNo
--device TEXTOverride device location for all objectsNo
--dry-runPreview changes without applying themNo

YAML File Format

---
regions:
- name: us-west
folder: Texas
latitude: 37.7749
longitude: -122.4194

- name: branch-offices
folder: Texas
addresses:
- 10.0.0.0/8
- 172.16.0.0/12

Examples

Load with Original Locations

$ scm load object region --file regions.yaml
---> 100%
✓ Loaded region: us-west
✓ Loaded region: branch-offices

Successfully loaded 2 out of 2 regions from 'regions.yaml'

Load with Folder Override

$ scm load object region --file regions.yaml --folder Austin
---> 100%
✓ Loaded region: us-west
✓ Loaded region: branch-offices

Successfully loaded 2 out of 2 regions from 'regions.yaml'
note

When using container override options (--folder, --snippet, --device), all regions will be loaded into the specified container, ignoring the container specified in the YAML file.

Show Region

Display region objects.

Syntax

scm show object region [NAME] [OPTIONS]

Arguments

ArgumentDescriptionRequired
NAMEName of the region to show; omit to list allNo

Options

OptionDescriptionRequired
--folder TEXTFolder locationYes*
--snippet TEXTSnippet locationYes*
--device TEXTDevice locationYes*
--max-results INTEGERMaximum number of results to displayNo
--output [table|json|yaml]Output format (default: table)No

* Exactly one of --folder, --snippet, or --device is required.

note

When no NAME argument is provided, all items are listed by default.

Examples

Show Specific Region

$ scm show object region us-west --folder Texas
---> 100%
Region: us-west
Location: Folder 'Texas'
Latitude: 37.7749
Longitude: -122.4194

List All Regions (Default Behavior)

$ scm show object region --folder Texas
---> 100%
Regions in folder 'Texas':
------------------------------------------------------------
Name: us-west
Latitude: 37.7749
Longitude: -122.4194
------------------------------------------------------------
Name: branch-offices
Addresses: 10.0.0.0/8, 172.16.0.0/12
------------------------------------------------------------

Backup Regions

Backup all region objects from a specified location to a YAML file.

Syntax

scm backup object region [OPTIONS]

Options

OptionDescriptionRequired
--folder TEXTFolder to backup regions fromNo*
--snippet TEXTSnippet to backup regions fromNo*
--device TEXTDevice to backup regions fromNo*
--file TEXTOutput filename (defaults to auto-generated)No

* One of --folder, --snippet, or --device is required.

Examples

Backup from Folder

$ scm backup object region --folder Texas
---> 100%
Successfully backed up 5 regions to region_folder_texas_20240115_120530.yaml

Backup with Custom Filename

$ scm backup object region --folder Texas --file texas-regions.yaml
---> 100%
Successfully backed up 5 regions to texas-regions.yaml

Best Practices

  1. Use Descriptive Names: Name regions after geographic locations or office names.
  2. Include Coordinates: Add latitude and longitude for map-based visualization.
  3. Associate Addresses: Link IP address ranges to regions for geographic policy enforcement.
  4. Use YAML for Bulk Operations: For managing multiple regions, use YAML files.
  5. Organize by Folder: Keep regions organized in logical folders.