Documentation ¶
Index ¶
- func BulkDelete(service *services.Service, ids []int) (*http.Response, error)
- func Delete(service *services.Service, locationID int) (*http.Response, error)
- type DynamiclocationGroups
- type Location
- type Locations
- func Create(service *services.Service, locations *Locations) (*Locations, error)
- func GetAll(service *services.Service) ([]Locations, error)
- func GetAllSublocations(service *services.Service) ([]Locations, error)
- func GetLocation(service *services.Service, locationID int) (*Locations, error)
- func GetLocationByName(service *services.Service, locationName string) (*Locations, error)
- func GetLocationOrSublocationByID(service *services.Service, id int) (*Locations, error)
- func GetLocationOrSublocationByName(service *services.Service, name string) (*Locations, error)
- func GetSubLocation(service *services.Service, locationID, subLocationID int) (*Locations, error)
- func GetSubLocationByName(service *services.Service, subLocatioName string) (*Locations, error)
- func GetSubLocationByNames(service *services.Service, locationName, subLocatioName string) (*Locations, error)
- func GetSubLocationBySubID(service *services.Service, subLocationID int) (*Locations, error)
- func GetSublocations(service *services.Service, locationID int) ([]Locations, error)
- func Update(service *services.Service, locationID int, locations *Locations) (*Locations, *http.Response, error)
- type ManagedBy
- type StaticLocationGroups
- type VPNCredentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BulkDelete ¶ added in v2.71.0
Types ¶
type DynamiclocationGroups ¶ added in v2.61.7
type Locations ¶
type Locations struct { // Location ID ID int `json:"id,omitempty"` // Location Name Name string `json:"name,omitempty"` // Parent Location ID. If this ID does not exist or is 0, it is implied that it is a parent location. Otherwise, it is a sub-location whose parent has this ID. x-applicableTo: SUB ParentID int `json:"parentId,omitempty"` // Upload bandwidth in kbps. The value 0 implies no Bandwidth Control enforcement UpBandwidth int `json:"upBandwidth,omitempty"` // Download bandwidth in kbps. The value 0 implies no Bandwidth Control enforcement DnBandwidth int `json:"dnBandwidth,omitempty"` // Country Country string `json:"country,omitempty"` State string `json:"state,omitempty"` // Language Language string `json:"language,omitempty"` // Timezone of the location. If not specified, it defaults to GMT. TZ string `json:"tz,omitempty"` ChildCount int `json:"childCount,omitempty"` MatchInChild bool `json:"matchInChild,omitempty"` // GeoOverride bool `json:"geoOverride,omitempty"` // For locations: IP addresses of the egress points that are provisioned in the Zscaler Cloud. Each entry is a single IP address (e.g., 238.10.33.9). // For sub-locations: Egress, internal, or GRE tunnel IP addresses. Each entry is either a single IP address, CIDR (e.g., 10.10.33.0/24), or range (e.g., 10.10.33.1-10.10.33.10)). IPAddresses []string `json:"ipAddresses,omitempty"` // IP ports that are associated with the location Ports []int `json:"ports,omitempty"` // VPN User Credentials that are associated with the location. VPNCredentials []VPNCredentials `json:"vpnCredentials,omitempty"` // Enforce Authentication. Required when ports are enabled, IP Surrogate is enabled, or Kerberos Authentication is enabled. AuthRequired bool `json:"authRequired"` // Enable Basic Authentication at the location BasicAuthEnabled bool `json:"basicAuthEnabled"` // Enable Digest Authentication at the location DigestAuthEnabled bool `json:"digestAuthEnabled"` // Enable Kerberos Authentication at the location KerberosAuth bool `json:"kerberosAuth"` // Enable IOT Discovery at the location IOTDiscoveryEnabled bool `json:"iotDiscoveryEnabled"` IOTEnforcePolicySet bool `json:"iotEnforcePolicySet"` CookiesAndProxy bool `json:"cookiesAndProxy"` // This parameter was deprecated and no longer has an effect on SSL policy. It remains supported in the API payload in order to maintain backwards compatibility with existing scripts, but it will be removed in future. // Enable SSL Inspection. Set to true in order to apply your SSL Inspection policy to HTTPS traffic in the location and inspect HTTPS transactions for data leakage, malicious content, and viruses. SSLScanEnabled bool `json:"sslScanEnabled"` // This parameter was deprecated and no longer has an effect on SSL policy. It remains supported in the API payload in order to maintain backwards compatibility with existing scripts, but it will be removed in future. // Enable Zscaler App SSL Setting. When set to true, the Zscaler App SSL Scan Setting takes effect, irrespective of the SSL policy that is configured for the location. ZappSSLScanEnabled bool `json:"zappSSLScanEnabled"` // Enable XFF Forwarding for a location. When set to true, traffic is passed to Zscaler Cloud via the X-Forwarded-For (XFF) header. // Note: For sub-locations, this attribute is a read-only field as the value is inherited from the parent location. XFFForwardEnabled bool `json:"xffForwardEnabled"` // Enable Surrogate IP. When set to true, users are mapped to internal device IP addresses SurrogateIP bool `json:"surrogateIP"` // Idle Time to Disassociation. The user mapping idle time (in minutes) is required if a Surrogate IP is enabled IdleTimeInMinutes int `json:"idleTimeInMinutes,omitempty"` // Display Time Unit. The time unit to display for IP Surrogate idle time to disassociation DisplayTimeUnit string `json:"displayTimeUnit,omitempty"` // Enforce Surrogate IP for Known Browsers. When set to true, IP Surrogate is enforced for all known browsers SurrogateIPEnforcedForKnownBrowsers bool `json:"surrogateIPEnforcedForKnownBrowsers"` // Refresh Time for re-validation of Surrogacy. The surrogate refresh time (in minutes) to re-validate the IP surrogates SurrogateRefreshTimeInMinutes int `json:"surrogateRefreshTimeInMinutes,omitempty"` // Display Refresh Time Unit. The time unit to display for refresh time for re-validation of surrogacy SurrogateRefreshTimeUnit string `json:"surrogateRefreshTimeUnit,omitempty"` // Enable Firewall. When set to true, Firewall is enabled for the location. OFWEnabled bool `json:"ofwEnabled"` // Enable IPS Control. When set to true, IPS Control is enabled for the location if Firewall is enabled. IPSControl bool `json:"ipsControl"` // Enable AUP. When set to true, AUP is enabled for the location AUPEnabled bool `json:"aupEnabled"` // Enable Caution. When set to true, a caution notifcation is enabled for the location CautionEnabled bool `json:"cautionEnabled"` // For First Time AUP Behavior, Block Internet Access. When set, all internet access (including non-HTTP traffic) is disabled until the user accepts the AUP. AUPBlockInternetUntilAccepted bool `json:"aupBlockInternetUntilAccepted"` // For First Time AUP Behavior, Force SSL Inspection. When set, Zscaler forces SSL Inspection in order to enforce AUP for HTTPS traffic. AUPForceSSLInspection bool `json:"aupForceSslInspection"` // Custom AUP Frequency. Refresh time (in days) to re-validate the AUP. AUPTimeoutInDays int `json:"aupTimeoutInDays,omitempty"` // Profile tag that specifies the location traffic type. If not specified, this tag defaults to "Unassigned". Profile string `json:"profile,omitempty"` ExcludeFromDynamicGroups bool `json:"excludeFromDynamicGroups,omitempty"` ExcludeFromManualGroups bool `json:"excludeFromManualGroups,omitempty"` // Additional notes or information regarding the location or sub-location. The description cannot exceed 1024 characters. Description string `json:"description,omitempty"` // If set to true, indicates that this is a default sub-location created by the Zscaler service to accommodate IPv4 addresses that are not part of any user-defined sub-locations. The default sub-location is created with the name Other and it can be renamed, if required. OtherSubLocation bool `json:"otherSubLocation,omitempty"` // If set to true, indicates that this is a default sub-location created by the Zscaler service to accommodate IPv6 addresses that are not part of any user-defined sub-locations. The default sub-location is created with the name Other6 and it can be renamed, if required. This field is applicable only if ipv6Enabled is set is true. Other6SubLocation bool `json:"other6SubLocation,omitempty"` ECLocation bool `json:"ecLocation,omitempty"` // If set to true, IPv6 is enabled for the location and IPv6 traffic from the location can be forwarded to the Zscaler service to enforce security policies. IPv6Enabled bool `json:"ipv6Enabled,omitempty"` // (Optional) Name-ID pair of the NAT64 prefix configured as the DNS64 prefix for the location. If specified, the DNS64 prefix is used for the IP addresses that reside in this location. If not specified, a prefix is selected from the set of supported prefixes. This field is applicable only if ipv6Enabled is set is true. // Before you can configure a DNS64 prefix, you must send a GET request to /ipv6config/nat64prefix to retrieve the IDs of NAT64 prefixes, which can be configured as the DNS64 prefix. IPv6Dns64Prefix bool `json:"ipv6Dns64Prefix,omitempty"` DynamiclocationGroups []common.IDNameExtensions `json:"dynamiclocationGroups"` StaticLocationGroups []common.IDNameExtensions `json:"staticLocationGroups"` }
Gets locations only, not sub-locations. When a location matches the given search parameter criteria only its parent location is included in the result set, not its sub-locations.
func GetAllSublocations ¶ added in v2.61.0
func GetLocation ¶ added in v2.61.0
Gets locations only, not sub-locations. When a location matches the given search parameter criteria only its parent location is included in the result set, not its sub-locations.
func GetLocationByName ¶ added in v2.61.0
GetLocationByName gets a location by its name.
func GetLocationOrSublocationByID ¶ added in v2.61.0
GetLocationOrSublocationByID gets a location or sub-location by its ID.
func GetLocationOrSublocationByName ¶ added in v2.61.0
GetLocationOrSublocationByName gets a location or sub-location by its name.
func GetSubLocation ¶ added in v2.61.0
GetSubLocation gets a sub-location by its ID and parent ID.
func GetSubLocationByName ¶ added in v2.61.0
GetSubLocationByName gets a sub-location by its name (fetches all locations's sub-location to find a match).
func GetSubLocationByNames ¶ added in v2.61.0
func GetSubLocationByNames(service *services.Service, locationName, subLocatioName string) (*Locations, error)
GetSubLocationByNames gets a sub-location by its name and parent location name
func GetSubLocationBySubID ¶ added in v2.61.0
GetSubLocationBySubID gets a sub-location by its ID (fetches all locations's sub-location to find a match).
func GetSublocations ¶ added in v2.61.0
GetSublocations gets all sub-locations for a given location ID.
type StaticLocationGroups ¶ added in v2.61.7
type VPNCredentials ¶
type VPNCredentials struct { // VPN credential id ID int `json:"id,omitempty"` // VPN authentication type (i.e., how the VPN credential is sent to the server). It is not modifiable after VpnCredential is created. // Note: Zscaler no longer supports adding a new XAUTH VPN credential, but existing entries can be edited or deleted using the respective endpoints. Type string `json:"type,omitempty"` // Fully Qualified Domain Name. Applicable only to UFQDN or XAUTH (or HOSTED_MOBILE_USERS) auth type. FQDN string `json:"fqdn,omitempty"` // Static IP address for VPN that is self-provisioned or provisioned by Zscaler. This is a required field for IP auth type and is not applicable to other auth types. // Note: If you want Zscaler to provision static IP addresses for your organization, contact Zscaler Support. IPAddress string `json:"ipAddress"` PreSharedKey string `json:"preSharedKey,omitempty"` // Additional information about this VPN credential. Comments string `json:"comments,omitempty"` // Location that is associated to this VPN credential. Non-existence means not associated to any location. Location []Location `json:"location,omitempty"` // SD-WAN Partner that manages the location. If a partner does not manage the location, this is set to Self. ManagedBy []ManagedBy `json:"managedBy,omitempty"` }