policysetcontroller

package
v3.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkReorder

func BulkReorder(ctx context.Context, service *zscaler.Service, policySetType string, ruleIdToOrder map[string]int) (*http.Response, error)

PUT --> /mgmtconfig/v1/admin/customers/{customerId}/policySet/{policySet}/reorder ruleIdOrders is a map[ruleID]Order

func Delete

func Delete(ctx context.Context, service *zscaler.Service, policySetID, ruleId string) (*http.Response, error)

DELETE --> mgmtconfig​/v1​/admin​/customers​/{customerId}​/policySet​/{policySetId}​/rule​/{ruleId}

func Reorder

func Reorder(ctx context.Context, service *zscaler.Service, policySetID, ruleId string, order int) (*http.Response, error)

PUT --> /mgmtconfig/v1/admin/customers/{customerId}/policySet/{policySetId}/rule/{ruleId}/reorder/{newOrder}

func UpdateRule

func UpdateRule(ctx context.Context, service *zscaler.Service, policySetID, ruleId string, policySetRule *PolicyRule) (*http.Response, error)

PUT --> mgmtconfig​/v1​/admin​/customers​/{customerId}​/policySet​/{policySetId}​/rule​/{ruleId}

Types

type AppConnectorGroups

type AppConnectorGroups struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type AppServerGroups

type AppServerGroups struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type Conditions

type Conditions struct {
	CreationTime  string     `json:"creationTime,omitempty"`
	ID            string     `json:"id,omitempty"`
	ModifiedBy    string     `json:"modifiedBy,omitempty"`
	ModifiedTime  string     `json:"modifiedTime,omitempty"`
	Negated       bool       `json:"negated"`
	Operands      []Operands `json:"operands"`
	Operator      string     `json:"operator,omitempty"`
	MicroTenantID string     `json:"microtenantId,omitempty"`
}

type Credential

type Credential struct {
	ID   string `json:"id"`
	Name string `json:"name,omitempty"`
}

type Operands

type Operands struct {
	CreationTime  string `json:"creationTime,omitempty"`
	ID            string `json:"id,omitempty"`
	IdpID         string `json:"idpId,omitempty"`
	LHS           string `json:"lhs,omitempty"`
	ModifiedBy    string `json:"modifiedBy,omitempty"`
	ModifiedTime  string `json:"modifiedTime,omitempty"`
	Name          string `json:"name,omitempty"`
	ObjectType    string `json:"objectType,omitempty"`
	RHS           string `json:"rhs,omitempty"`
	MicroTenantID string `json:"microtenantId,omitempty"`
}

type PolicyRule

type PolicyRule struct {
	Action                   string                 `json:"action,omitempty"`
	ActionID                 string                 `json:"actionId,omitempty"`
	BypassDefaultRule        bool                   `json:"bypassDefaultRule"`
	CreationTime             string                 `json:"creationTime,omitempty"`
	CustomMsg                string                 `json:"customMsg,omitempty"`
	DefaultRule              bool                   `json:"defaultRule,omitempty"`
	DefaultRuleName          string                 `json:"defaultRuleName,omitempty"`
	Description              string                 `json:"description,omitempty"`
	ID                       string                 `json:"id,omitempty"`
	ModifiedBy               string                 `json:"modifiedBy,omitempty"`
	ModifiedTime             string                 `json:"modifiedTime,omitempty"`
	Name                     string                 `json:"name,omitempty"`
	Operator                 string                 `json:"operator,omitempty"`
	PolicySetID              string                 `json:"policySetId"`
	PolicyType               string                 `json:"policyType,omitempty"`
	Priority                 string                 `json:"priority,omitempty"`
	ReauthDefaultRule        bool                   `json:"reauthDefaultRule"`
	ReauthIdleTimeout        string                 `json:"reauthIdleTimeout,omitempty"`
	ReauthTimeout            string                 `json:"reauthTimeout,omitempty"`
	RuleOrder                string                 `json:"ruleOrder"`
	LSSDefaultRule           bool                   `json:"lssDefaultRule"`
	ZpnCbiProfileID          string                 `json:"zpnCbiProfileId,omitempty"`
	ZpnIsolationProfileID    string                 `json:"zpnIsolationProfileId,omitempty"`
	ZpnInspectionProfileID   string                 `json:"zpnInspectionProfileId,omitempty"`
	ZpnInspectionProfileName string                 `json:"zpnInspectionProfileName,omitempty"`
	MicroTenantID            string                 `json:"microtenantId,omitempty"`
	MicroTenantName          string                 `json:"microtenantName,omitempty"`
	Conditions               []Conditions           `json:"conditions"`
	AppServerGroups          []AppServerGroups      `json:"appServerGroups"`
	AppConnectorGroups       []AppConnectorGroups   `json:"appConnectorGroups"`
	ServiceEdgeGroups        []ServiceEdgeGroups    `json:"serviceEdgeGroups"`
	Credential               *Credential            `json:"credential,omitempty"`
	PrivilegedCapabilities   PrivilegedCapabilities `json:"privilegedCapabilities,omitempty"`
}

func CreateRule

func CreateRule(ctx context.Context, service *zscaler.Service, rule *PolicyRule) (*PolicyRule, *http.Response, error)

POST --> mgmtconfig​/v1​/admin​/customers​/{customerId}​/policySet​/{policySetId}​/rule

func GetAllByType

func GetAllByType(ctx context.Context, service *zscaler.Service, policyType string) ([]PolicyRule, *http.Response, error)

func GetByNameAndType

func GetByNameAndType(ctx context.Context, service *zscaler.Service, policyType, ruleName string) (*PolicyRule, *http.Response, error)

func GetByNameAndTypes

func GetByNameAndTypes(ctx context.Context, service *zscaler.Service, policyTypes []string, ruleName string) (p *PolicyRule, resp *http.Response, err error)

func GetPolicyRule

func GetPolicyRule(ctx context.Context, service *zscaler.Service, policySetID, ruleId string) (*PolicyRule, *http.Response, error)

type PolicySet

type PolicySet struct {
	CreationTime    string       `json:"creationTime,omitempty"`
	Description     string       `json:"description,omitempty"`
	Enabled         bool         `json:"enabled"`
	ID              string       `json:"id,omitempty"`
	ModifiedBy      string       `json:"modifiedBy,omitempty"`
	ModifiedTime    string       `json:"modifiedTime,omitempty"`
	Name            string       `json:"name,omitempty"`
	Sorted          bool         `json:"sorted"`
	PolicyType      string       `json:"policyType,omitempty"`
	MicroTenantID   string       `json:"microtenantId,omitempty"`
	MicroTenantName string       `json:"microtenantName,omitempty"`
	Rules           []PolicyRule `json:"rules"`
}

func GetByPolicyType

func GetByPolicyType(ctx context.Context, service *zscaler.Service, policyType string) (*PolicySet, *http.Response, error)

type PrivilegedCapabilities

type PrivilegedCapabilities struct {
	ID            string   `json:"id"`
	CreationTime  string   `json:"creationTime,omitempty"`
	ModifiedBy    string   `json:"modifiedBy,omitempty"`
	ModifiedTime  string   `json:"modifiedTime,omitempty"`
	MicroTenantID string   `json:"microtenantId,omitempty"`
	Capabilities  []string `json:"capabilities,omitempty"`
}

type ServiceEdgeGroups

type ServiceEdgeGroups struct {
	ID   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL