policysetcontroller

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConnectorGroups

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

type AppServerGroups

type AppServerGroups struct {
	ID string `json:"id,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,omitempty"`
	Operator     string     `json:"operator,omitempty"`
}

type Count

type Count struct {
	Count string `json:"count"`
}

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"`
}

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"`
	IsolationDefaultRule     bool                 `json:"isolationDefaultRule"`
	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"`
	Conditions               []Conditions         `json:"conditions,omitempty"`
	AppServerGroups          []AppServerGroups    `json:"appServerGroups,omitempty"`
	AppConnectorGroups       []AppConnectorGroups `json:"appConnectorGroups,omitempty"`
}

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"`
	Rules        []PolicyRule `json:"rules"`
}

type Service

type Service struct {
	Client *zpa.Client
}

func New

func New(c *zpa.Client) *Service

func (*Service) Create

func (service *Service) Create(rule *PolicyRule) (*PolicyRule, *http.Response, error)

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

func (*Service) Delete

func (service *Service) Delete(policySetID, ruleId string) (*http.Response, error)

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

func (*Service) GetAllByType added in v0.0.4

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

func (*Service) GetByNameAndType

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

func (*Service) GetByNameAndTypes

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

func (*Service) GetByPolicyType

func (service *Service) GetByPolicyType(policyType string) (*PolicySet, *http.Response, error)

func (*Service) GetPolicyRule

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

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

func (*Service) Reorder

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

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

func (*Service) RulesCount

func (service *Service) RulesCount() (int, *http.Response, error)

func (*Service) Update

func (service *Service) Update(policySetID, ruleId string, policySetRule *PolicyRule) (*http.Response, error)

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

Jump to

Keyboard shortcuts

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