Documentation ¶
Index ¶
- func Delete(ctx context.Context, service *zscaler.Service, ruleID int) (*http.Response, error)
- type FirewallDNSRules
- func Create(ctx context.Context, service *zscaler.Service, rule *FirewallDNSRules) (*FirewallDNSRules, error)
- func Get(ctx context.Context, service *zscaler.Service, ruleID int) (*FirewallDNSRules, error)
- func GetAll(ctx context.Context, service *zscaler.Service) ([]FirewallDNSRules, error)
- func GetByName(ctx context.Context, service *zscaler.Service, ruleName string) (*FirewallDNSRules, error)
- func Update(ctx context.Context, service *zscaler.Service, ruleID int, ...) (*FirewallDNSRules, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FirewallDNSRules ¶
type FirewallDNSRules struct { // Unique identifier for the Firewall Filtering policy rule ID int `json:"id,omitempty"` // Name of the Firewall Filtering policy rule Name string `json:"name,omitempty"` // Rule order number of the Firewall Filtering policy rule Order int `json:"order,omitempty"` // Admin rank of the Firewall Filtering policy rule Rank int `json:"rank,omitempty"` // The admin’s access privilege to this rule based on the assigned role AccessControl string `json:"accessControl,omitempty"` // A Boolean value that indicates whether full logging is enabled. A true value indicates that full logging is enabled, whereas a false value indicates that aggregate logging is enabled. EnableFullLogging bool `json:"enableFullLogging,omitempty"` // The action the Firewall Filtering policy rule takes when packets match the rule // Supported Values: "ALLOW", "BLOCK", "REDIR_REQ", "REDIR_RES", "REDIR_ZPA", "REDIR_REQ_DOH", "REDIR_REQ_KEEP_SENDER", "REDIR_REQ_TCP", "REDIR_REQ_UDP","BLOCK_WITH_RESPONSE" Action string `json:"action,omitempty"` // Determines whether the Firewall Filtering policy rule is enabled or disabled State string `json:"state,omitempty"` // Additional information about the rule Description string `json:"description,omitempty"` // The IP address to which the traffic will be redirected to when the DNAT rule is triggered. If not set, no redirection is done to specific IP addresses. RedirectIP string `json:"redirectIp,omitempty"` // Specifies the DNS response code to be sent to the client when the action is configured to block and send response code BlockResponseCode string `json:"blockResponseCode,omitempty"` // Timestamp when the rule was last modified. Ignored if the request is POST or PUT. For GET, ignored if or the rule is current version. LastModifiedTime int `json:"lastModifiedTime,omitempty"` // The admin who last modified the rule LastModifiedBy *common.IDNameExtensions `json:"lastModifiedBy,omitempty"` // User-defined source IP addresses for which the rule is applicable. If not set, the rule is not restricted to a specific source IP address. SrcIps []string `json:"srcIps,omitempty"` // Destination IP addresses or FQDNs to which the rule applies. If not set, the rule is not restricted to a // specific destination IP address. Each IP entry can be a single IP address, CIDR (e.g., 10.10.33.0/24), or an IP range (e.g., 10.10.33.1-10.10.33.10). DestAddresses []string `json:"destAddresses,omitempty"` // IP address categories of destination for which the DNAT rule is applicable. If not set, the rule is not restricted to specific destination IP categories. DestIpCategories []string `json:"destIpCategories,omitempty"` // Destination countries for which the rule is applicable. If not set, the rule is not restricted to specific destination countries. DestCountries []string `json:"destCountries,omitempty"` // The countries of origin of traffic for which the rule is applicable. If not set, the rule is not restricted to specific source countries. SourceCountries []string `json:"sourceCountries,omitempty"` // List of destination IP categories to which the rule applies. If not set, the rule is not restricted to specific destination IP categories. ResCategories []string `json:"resCategories,omitempty"` // DNS tunnels and network applications to which the rule applies Applications []string `json:"applications,omitempty"` // DNS request types to which the rule applies DNSRuleRequestTypes []string `json:"dnsRuleRequestTypes,omitempty"` // The protocols to which the rules applies // Supported Values: "ANY_RULE", "SMRULEF_CASCADING_ALLOWED", "TCP_RULE", "UDP_RULE", "DOHTTPS_RULE" Protocols []string `json:"protocols,omitempty"` // If set to true, the default rule is applied DefaultRule bool `json:"defaultRule,omitempty"` // A Boolean value that indicates whether packet capture (PCAP) is enabled or not CapturePCAP bool `json:"capturePCAP"` // A Boolean field that indicates that the rule is predefined by using a true value Predefined bool `json:"predefined,omitempty"` // DNS application groups to which the rule applies ApplicationGroups []common.IDNameExtensions `json:"applicationGroups,omitempty"` // The DNS gateway used to redirect traffic, specified when the rule action is to redirect DNS request to an external DNS service. DNSGateway []common.IDNameExtensions `json:"dnsGateway,omitempty"` // The ZPA IP pool specified when the rule action is to resolve domain names of ZPA applications to an ephemeral IP address from a preconfigured IP pool. ZPAIPGroup *common.IDName `json:"zpaIpGroup"` // EDNS ECS object which resolves DNS request EDNSEcsObject []common.IDNameExtensions `json:"ednsEcsObject,omitempty"` // The locations to which the Firewall Filtering policy rule applies Locations []common.IDNameExtensions `json:"locations,omitempty"` // The location groups to which the Firewall Filtering policy rule applies LocationsGroups []common.IDNameExtensions `json:"locationGroups,omitempty"` // The departments to which the Firewall Filtering policy rule applies Departments []common.IDNameExtensions `json:"departments,omitempty"` // The groups to which the Firewall Filtering policy rule applies Groups []common.IDNameExtensions `json:"groups,omitempty"` // The users to which the Firewall Filtering policy rule applies Users []common.IDNameExtensions `json:"users,omitempty"` // The time interval in which the Firewall Filtering policy rule applies TimeWindows []common.IDNameExtensions `json:"timeWindows,omitempty"` // User-defined network service application group on which the rule is applied. If not set, the rule is not restricted to a specific network service application group. NwApplicationGroups []common.IDNameExtensions `json:"nwApplicationGroups,omitempty"` // Application services on which this rule is applied AppServices []common.IDNameExtensions `json:"appServices,omitempty"` // Application service groups on which this rule is applied AppServiceGroups []common.IDNameExtensions `json:"appServiceGroups,omitempty"` // Labels that are applicable to the rule. Labels []common.IDNameExtensions `json:"labels,omitempty"` // User-defined destination IP address groups on which the rule is applied. If not set, the rule is not restricted to a specific destination IP address group. // Note: For organizations that have enabled IPv6, the destIpv6Groups field lists the IPv6 source address groups for which the rule is applicable. DestIpGroups []common.IDNameExtensions `json:"destIpGroups,omitempty"` // Destination IPv6 address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IPv6 address group. DestIpv6Groups []common.IDNameExtensions `json:"destIpv6Groups,omitempty"` // User-defined network services on which the rule is applied. If not set, the rule is not restricted to a specific network service. NwServices []common.IDNameExtensions `json:"nwServices,omitempty"` // User-defined network service applications on which the rule is applied. If not set, the rule is not restricted to a specific network service application. NwServiceGroups []common.IDNameExtensions `json:"nwServiceGroups,omitempty"` // Source IP address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IP address group. SrcIpGroups []common.IDNameExtensions `json:"srcIpGroups,omitempty"` // This field is applicable for devices that are managed using Zscaler Client Connector. If no value is set, this field is ignored during the policy evaluation. DeviceGroups []common.IDNameExtensions `json:"deviceGroups"` // Name-ID pairs of devices for which rule must be applied. Specifies devices that are managed using Zscaler Client Connector. If no value is set, this field is ignored during the policy evaluation. Devices []common.IDNameExtensions `json:"devices"` // Advanced threat categories to which the rule applies ThreatCategories []common.IDNameExtensions `json:"threatCategories,omitempty"` // The list of ZPA Application Segments for which this rule is applicable. This field is applicable only for the ZPA Gateway forwarding method. ZPAAppSegments []common.ZPAAppSegments `json:"zpaAppSegments"` }
func Create ¶
func Create(ctx context.Context, service *zscaler.Service, rule *FirewallDNSRules) (*FirewallDNSRules, error)
func Update ¶
func Update(ctx context.Context, service *zscaler.Service, ruleID int, rules *FirewallDNSRules) (*FirewallDNSRules, error)
Click to show internal directories.
Click to hide internal directories.