Skip to main content

GlobalProtect Infrastructure Settings Configuration Object

Manages GlobalProtect infrastructure settings (DNS servers, IP pools, portal hostname, WINS, and static IP pools) for mobile users in Palo Alto Networks Strata Cloud Manager.

Class Overview

The InfrastructureSettings class inherits from BaseObject and provides CRUD operations for GlobalProtect infrastructure settings objects.

note

This resource has no /{id} API paths. Objects are addressed by name within the Mobile Users folder, both passed as query parameters. create() and update() send the folder as a query parameter alongside the JSON payload, and delete() addresses the object by name and folder.

Methods

MethodDescriptionParametersReturn Type
create()Creates new infrastructure settingsdata: Dict[str, Any], folder: strOptional[InfrastructureSettingsResponseModel]
update()Updates existing settings (by name in body)data: Dict[str, Any], folder: strOptional[InfrastructureSettingsResponseModel]
delete()Deletes settings by name and foldername: str, folder: strNone
list()Lists settings (name required by the API)name: str, folder: str, **filtersList[InfrastructureSettingsResponseModel]
fetch()Gets settings by name and foldername: str, folder: strInfrastructureSettingsResponseModel
note

The API returns 201 Created / 200 OK with an empty body for create() and update(), in which case these methods return None.

Model Attributes

AttributeTypeRequiredDefaultDescription
namestrYesNoneName of the infrastructure settings
dns_serversList[DnsServerEntry]YesNoneDNS server entries
ip_poolsList[IpPool]YesNoneIP pools for mobile users
portal_hostnamePortalHostnameYesNonePortal hostname (custom or default domain)
enable_winsEnableWinsNoNoneWINS configuration (yes/no choice)
ipv6boolNoNoneWhether IPv6 is enabled
udp_queriesUdpQueriesNoNoneUDP query retry configuration
static_ip_poolsList[StaticIpPool]NoNoneStatic IP pools (theatres, users, user groups)
idUUIDResponseNoneUUID of the resource (response only)

Exceptions

ExceptionHTTP CodeDescription
InvalidObjectError400Invalid settings data or folder value
MissingQueryParameterError400Missing required parameters (e.g. name)
ObjectNotPresentError404Infrastructure settings not found
AuthenticationError401Authentication failed
ServerError500Internal server error

Basic Configuration

from scm.client import Scm

client = Scm(
client_id="your_client_id",
client_secret="your_client_secret",
tsg_id="your_tsg_id"
)

infrastructure_settings = client.infrastructure_settings

Methods

List Infrastructure Settings

The API requires the name query parameter for this endpoint.

settings = client.infrastructure_settings.list(name="mobile-users-infra")

for setting in settings:
print(f"Name: {setting.name}, IPv6: {setting.ipv6}")

Fetch Infrastructure Settings

infra = client.infrastructure_settings.fetch(name="mobile-users-infra", folder="Mobile Users")
print(f"Found infrastructure settings: {infra.name}")

Create Infrastructure Settings

infra_config = {
"name": "mobile-users-infra",
"dns_servers": [
{
"name": "dns-config",
"dns_suffix": ["example.com"],
"primary_public_dns": {"dns_server": "8.8.8.8"},
"secondary_public_dns": {"dns_server": "8.8.4.4"},
}
],
"ip_pools": [
{
"name": "ip-pool-1",
"ip_pool": ["10.10.0.0/16"],
}
],
"portal_hostname": {
"default_domain": {"hostname": "acme"},
},
"ipv6": False,
}

client.infrastructure_settings.create(infra_config)

Update Infrastructure Settings

The object is addressed by the name field in the payload; there is no ID-based update.

infra_config = {
"name": "mobile-users-infra",
"dns_servers": [
{
"name": "dns-config",
"primary_public_dns": {"dns_server": "1.1.1.1"},
}
],
"ip_pools": [
{
"name": "ip-pool-1",
"ip_pool": ["10.20.0.0/16"],
}
],
"portal_hostname": {
"custom_domain": {
"hostname": "vpn.example.com",
"cname": "vpn.example.com.gp.prismaaccess.com",
},
},
}

client.infrastructure_settings.update(infra_config)

Delete Infrastructure Settings

client.infrastructure_settings.delete(name="mobile-users-infra", folder="Mobile Users")