Data Models¶
Welcome to the Data Models documentation for pan-scm-sdk. This section provides detailed information about the
Pydantic models used to validate and structure data when interacting with the Strata Cloud Manager API.
What Are Data Models?¶
Data Models are Pydantic classes that define the schema and validation rules for configuration objects. They ensure that data passed to and received from the API conforms to expected formats, types, and constraints.
Use this section when you need to:
- Understand field constraints - Learn what values are allowed for each field (patterns, lengths, enums)
- Validate configurations - Pre-validate data before sending to the API
- Type annotations - Get proper IDE autocompletion and type checking
- Build configuration dictionaries - Know exactly what fields are required vs optional
Model Types¶
Each resource has three model types:
| Model Type | Purpose | Example |
|---|---|---|
CreateModel |
Validates data for creating new resources | AddressCreateModel |
UpdateModel |
Validates data for updating existing resources (includes id) |
AddressUpdateModel |
ResponseModel |
Represents data returned from the API | AddressResponseModel |
Example Usage¶
from scm.models.objects.address import AddressCreateModel
# Validate configuration before API call
try:
config = AddressCreateModel(
name="web-server",
ip_netmask="10.0.1.100/32",
folder="Texas",
description="Primary web server"
)
print(f"Valid config: {config.model_dump()}")
except ValueError as e:
print(f"Validation error: {e}")
Categories¶
Deployment¶
Models for Prisma Access deployment configuration: - Bandwidth Allocations - BGP Routing - Internal DNS Servers - Network Locations - Remote Networks - Service Connections
Mobile Agent¶
Models for GlobalProtect mobile agent configuration: - Authentication Settings - Agent Versions
Network¶
Models for network infrastructure: - IKE Crypto Profiles - IKE Gateways - IPsec Crypto Profiles - NAT Rules - Security Zones
Objects¶
Models for reusable policy objects: - Addresses - Address Groups - Applications - Application Filters - Application Groups - Auto Tag Actions - Dynamic User Groups - External Dynamic Lists - HIP Objects - HIP Profiles - HTTP Server Profiles - Log Forwarding Profiles - Quarantined Devices - Regions - Schedules - Services - Service Groups - Syslog Server Profiles - Tags
Operations¶
Models for operational tasks: - Candidate Push - Jobs
Security Services¶
Models for security profiles and policies: - Anti-Spyware Profiles - Decryption Profiles - DNS Security Profiles - Security Rules - URL Categories - Vulnerability Protection Profiles - WildFire Antivirus Profiles
Setup¶
Models for organizational containers: - Folders - Labels - Snippets - Devices - Variables
Insights¶
Models for Prisma Access Insights: - Alerts
Relationship to Services¶
The Data Models define what data looks like, while the Services documentation covers how to perform operations. For example:
- Use
AddressCreateModel(Data Models) to understand required fields - Use
client.address.create()(Services) to actually create the address
from scm.client import Scm
client = Scm(client_id="...", client_secret="...", tsg_id="...")
# The dictionary you pass follows AddressCreateModel schema
client.address.create({
"name": "web-server", # Required: str, max 63 chars
"ip_netmask": "10.0.1.100", # One of: ip_netmask, ip_range, ip_wildcard, fqdn
"folder": "Texas", # Required: one container type
})