Skip to main content

GlobalProtect Forwarding Profile Models

Pydantic models for GlobalProtect forwarding profiles in Palo Alto Networks Strata Cloud Manager.

Model Hierarchy

ModelPurpose
ForwardingProfileBaseModelCommon fields shared across all CRUD operations
ForwardingProfileCreateModelFields for creating new forwarding profiles
ForwardingProfileUpdateModelFields for updating profiles (adds optional id)
ForwardingProfileResponseModelFields returned by the API (adds id)

Base Model Attributes

AttributeTypeRequiredDefaultDescription
namestrYesNoneProfile name (max 64 chars, pattern ^[0-9a-zA-Z._-]+$)
descriptionstrNoNoneDescription (max 1023 chars)
definition_methodDefinitionMethodNorulesrules or pac-file
typeUnionNoNoneOne of the three profile type models below

Profile Type Models

The type field accepts exactly one of three wrapper models, matching the API's oneOf schema:

ModelWrapper keyConfig model
ForwardingProfilePacFilepac_fileBasicForwardingConfig
ForwardingProfileGlobalProtectProxyglobal_protect_proxyBasicForwardingConfig
ForwardingProfileZtnaAgentztna_agentZtnaForwardingConfig

BasicForwardingConfig / ZtnaForwardingConfig

AttributeTypeRequiredDefaultDescription
pac_uploadboolNoFalseUser upload PAC file
forwarding_rulesList[ForwardingRule*]NoNoneThe forwarding rules
block_ruleBlockRule*NoNoneThe block rule

BasicForwardingConfig uses ForwardingRuleBasic/BlockRuleBasic; ZtnaForwardingConfig uses ForwardingRuleZtna/BlockRuleZtna.

ForwardingRuleBasic

AttributeTypeRequiredDefaultDescription
namestrYesNoneRule name (max 64 chars, [0-9a-zA-Z._-])
enabledboolNoTrueEnable the rule
user_locationsstrNo"Any"User locations (max 64 chars)
destinationsstrNo"Any"Destinations (max 64 chars)
connectivitystrNo"direct"Connectivity method (max 64 chars)

ForwardingRuleZtna

Adds to the basic rule fields:

AttributeTypeRequiredDefaultDescription
traffic_typeZtnaTrafficTypeNodnsdns, dns-and-network-traffic, or network-traffic
source_applicationsstrNo"Any"Source applications

BlockRuleBasic

AttributeTypeRequiredDefaultDescription
enableboolNoNoneEnable block rule
allow_tcpBlockRuleBasicAllowTcpNoNoneAllow-TCP settings
allow_udpBlockRuleBasicAllowUdpNoNoneAllow-UDP settings

BlockRuleZtna

All fields are optional booleans controlling tunnel traffic blocking behavior, e.g. block_all_other_unmatched_outbound_connections (default False), allow_icmp_for_troubleshooting (default False), enforcer_fqdn_dns_resolution_via_dns_servers (default True).

Enums

EnumValues
DefinitionMethodrules, pac-file
ZtnaTrafficTypedns, dns-and-network-traffic, network-traffic

Usage Example

from scm.models.mobile_agent.forwarding_profiles import (
ForwardingProfileCreateModel,
ForwardingProfileZtnaAgent,
ForwardingRuleZtna,
ZtnaForwardingConfig,
ZtnaTrafficType,
)

profile = ForwardingProfileCreateModel(
name="corp-forwarding",
description="Corporate ZTNA forwarding profile",
type=ForwardingProfileZtnaAgent(
ztna_agent=ZtnaForwardingConfig(
forwarding_rules=[
ForwardingRuleZtna(
name="internal-apps",
traffic_type=ZtnaTrafficType.DNS_AND_NETWORK_TRAFFIC,
destinations="internal-destinations",
)
]
)
),
)

payload = profile.model_dump(exclude_unset=True)