policysetcontrollerv2

package
v3.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 13 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 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 Credential

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

type ExtranetDTO added in v3.0.4

type ExtranetDTO struct {
	LocationDTO      []LocationDTO      `json:"locationDTO,omitempty"`
	LocationGroupDTO []LocationGroupDTO `json:"locationGroupDTO,omitempty"`
	ZiaErName        string             `json:"ziaErName,omitempty"`
	ZpnErID          string             `json:"zpnErId,omitempty"`
}

type LocationDTO added in v3.0.4

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

type LocationGroupDTO added in v3.0.4

type LocationGroupDTO struct {
	ID           string        `json:"id,omitempty"`
	Name         string        `json:"name,omitempty"`
	ZiaLocations []ZiaLocation `json:"ziaLocations,omitempty"`
}

type Operands

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

type OperandsResourceLHSRHSValue

type OperandsResourceLHSRHSValue struct {
	RHS string `json:"rhs,omitempty"`
	LHS string `json:"lhs,omitempty"`
}

type PolicyRule

type PolicyRule struct {
	ID                           string                                `json:"id,omitempty"`
	Name                         string                                `json:"name,omitempty"`
	Action                       string                                `json:"action,omitempty"`
	ActionID                     string                                `json:"actionId,omitempty"`
	CustomMsg                    string                                `json:"customMsg,omitempty"`
	Description                  string                                `json:"description,omitempty"`
	Disabled                     string                                `json:"disabled,omitempty"`
	ExtranetEnabled              bool                                  `json:"extranetEnabled,omitempty"`
	CreationTime                 string                                `json:"creationTime,omitempty"`
	ModifiedBy                   string                                `json:"modifiedBy,omitempty"`
	ModifiedTime                 string                                `json:"modifiedTime,omitempty"`
	Operator                     string                                `json:"operator,omitempty"`
	PolicySetID                  string                                `json:"policySetId,omitempty"`
	PolicyType                   string                                `json:"policyType,omitempty"`
	Priority                     string                                `json:"priority,omitempty"`
	ReauthIdleTimeout            string                                `json:"reauthIdleTimeout,omitempty"`
	ReauthTimeout                string                                `json:"reauthTimeout,omitempty"`
	RuleOrder                    string                                `json:"ruleOrder,omitempty"`
	ZpnIsolationProfileID        string                                `json:"zpnIsolationProfileId,omitempty"`
	ZpnInspectionProfileID       string                                `json:"zpnInspectionProfileId,omitempty"`
	ZpnInspectionProfileName     string                                `json:"zpnInspectionProfileName,omitempty"`
	MicroTenantID                string                                `json:"microtenantId"`
	MicroTenantName              string                                `json:"microtenantName,omitempty"`
	AppServerGroups              []servergroup.ServerGroup             `json:"appServerGroups"`
	AppConnectorGroups           []appconnectorgroup.AppConnectorGroup `json:"appConnectorGroups"`
	ServiceEdgeGroups            []serviceedgegroup.ServiceEdgeGroup   `json:"serviceEdgeGroups"`
	Conditions                   []PolicyRuleResourceConditions        `json:"conditions,omitempty"`
	Credential                   *Credential                           `json:"credential,omitempty"`
	PrivilegedCapabilities       PrivilegedCapabilities                `json:"privilegedCapabilities,omitempty"`
	ExtranetDTO                  ExtranetDTO                           `json:"extranetDTO,omitempty"`
	PrivilegedPortalCapabilities PrivilegedPortalCapabilities          `json:"privilegedPortalCapabilities,omitempty"`
}

func CreateRule

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

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

type PolicyRuleResource

type PolicyRuleResource struct {
	ID                           string                                `json:"id,omitempty"`
	Name                         string                                `json:"name,omitempty"`
	Description                  string                                `json:"description,omitempty"`
	Disabled                     string                                `json:"disabled,omitempty"`
	ExtranetEnabled              bool                                  `json:"extranetEnabled,omitempty"`
	Action                       string                                `json:"action,omitempty"`
	ActionID                     string                                `json:"actionId,omitempty"`
	CreationTime                 string                                `json:"creationTime,omitempty"`
	ModifiedBy                   string                                `json:"modifiedBy,omitempty"`
	ModifiedTime                 string                                `json:"modifiedTime,omitempty"`
	AuditMessage                 string                                `json:"auditMessage,omitempty"`
	CustomMsg                    string                                `json:"customMsg,omitempty"`
	DefaultRule                  bool                                  `json:"defaultRule,omitempty"`
	DefaultRuleName              string                                `json:"defaultRuleName,omitempty"`
	Operator                     string                                `json:"operator,omitempty"`
	PolicySetID                  string                                `json:"policySetId,omitempty"`
	PolicyType                   string                                `json:"policyType,omitempty"`
	Priority                     string                                `json:"priority,omitempty"`
	ReauthIdleTimeout            string                                `json:"reauthIdleTimeout,omitempty"`
	ReauthTimeout                string                                `json:"reauthTimeout,omitempty"`
	RuleOrder                    string                                `json:"ruleOrder,omitempty"`
	ZpnIsolationProfileID        string                                `json:"zpnIsolationProfileId,omitempty"`
	ZpnInspectionProfileID       string                                `json:"zpnInspectionProfileId,omitempty"`
	ZpnInspectionProfileName     string                                `json:"zpnInspectionProfileName,omitempty"`
	MicroTenantID                string                                `json:"microtenantId"`
	MicroTenantName              string                                `json:"microtenantName,omitempty"`
	Conditions                   []PolicyRuleResourceConditions        `json:"conditions"`
	AppServerGroups              []servergroup.ServerGroup             `json:"appServerGroups"`
	AppConnectorGroups           []appconnectorgroup.AppConnectorGroup `json:"appConnectorGroups"`
	ServiceEdgeGroups            []serviceedgegroup.ServiceEdgeGroup   `json:"serviceEdgeGroups"`
	Credential                   *Credential                           `json:"credential,omitempty"`
	PrivilegedCapabilities       PrivilegedCapabilities                `json:"privilegedCapabilities,omitempty"`
	ExtranetDTO                  ExtranetDTO                           `json:"extranetDTO,omitempty"`
	PrivilegedPortalCapabilities PrivilegedPortalCapabilities          `json:"privilegedPortalCapabilities,omitempty"`
}

###################################################################################################### ########################################## API V1 Structure ########################################## ################################### Used to process the API Response ################################# ######################################################################################################

func GetAllByType

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

func GetByNameAndType

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

func GetByNameAndTypes

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

func GetPolicyRule

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

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

type PolicyRuleResourceConditions

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

type PolicyRuleResourceOperands

type PolicyRuleResourceOperands struct {
	ID                string                        `json:"id,omitempty"`
	CreationTime      string                        `json:"creationTime,omitempty"`
	ModifiedBy        string                        `json:"modifiedBy,omitempty"`
	ModifiedTime      string                        `json:"modifiedTime,omitempty"`
	ObjectType        string                        `json:"objectType,omitempty"`
	Values            []string                      `json:"values,omitempty"`
	IDPID             string                        `json:"idpId,omitempty"`
	LHS               string                        `json:"lhs,omitempty"`
	RHS               string                        `json:"rhs,omitempty"`
	EntryValuesLHSRHS []OperandsResourceLHSRHSValue `json:"entryValues,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"`
	MicroTenantID   string       `json:"microtenantId"`
	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"`
	Capabilities  []string `json:"capabilities,omitempty"`
}

type PrivilegedPortalCapabilities added in v3.0.4

type PrivilegedPortalCapabilities struct {
	Capabilities  []string `json:"capabilities,omitempty"`
	MicroTenantID string   `json:"microtenantId,omitempty"`
}

type ZiaLocation added in v3.0.4

type ZiaLocation 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