adminuserrolemgmt

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminRoles

type AdminRoles struct {
	// Admin role Id
	ID int `json:"id"`

	// Admin rank of this admin role. This is applicable only when admin rank is enabled in the advanced settings. Default value is 7 (the lowest rank). The assigned admin rank determines the roles or admin users this user can manage, and which rule orders this admin can access.
	Rank int `json:"rank,omitempty"`

	// Name of the admin role
	Name string `json:"name,omitempty"`

	// Policy access permission
	PolicyAccess string `json:"policyAccess,omitempty"`

	// Dashboard access permission
	DashboardAccess string `json:"dashboardAccess"`

	// Report access permission
	ReportAccess string `json:"reportAccess,omitempty"`

	// Insights logs access permission
	AnalysisAccess string `json:"analysisAccess,omitempty"`

	// Username access permission. When set to NONE, the username will be obfuscated
	UsernameAccess string `json:"usernameAccess,omitempty"`

	// Admin and role management access permission
	AdminAcctAccess string `json:"adminAcctAccess,omitempty"`

	// Indicates whether this is an auditor role
	IsAuditor bool `json:"isAuditor,omitempty"`

	// List of functional areas to which this role has access. This attribute is subject to change
	Permissions []string `json:"permissions,omitempty"`

	// Indicates whether or not this admin user is editable/deletable
	IsNonEditable bool `json:"isNonEditable,omitempty"`

	// Log range limit
	LogsLimit string `json:"logsLimit,omitempty"`

	// The admin role type. ()This attribute is subject to change.)
	RoleType string `json:"roleType,omitempty"`
}

type AdminUsers

type AdminUsers struct {
	//Admin or auditor's user ID
	ID int `json:"id,omitempty"`

	// Admin or auditor's login name. loginName is in email format and uses the domain name associated to the Zscaler account
	LoginName string `json:"loginName,omitempty"`

	// Admin or auditor's username
	UserName string `json:"userName,omitempty"`

	// Admin or auditor's email address
	Email string `json:"email,omitempty"`

	// Additional information about the admin or auditor
	Comments string `json:"comments,omitempty"`

	// Indicates whether or not the admin account is disabled
	Disabled bool `json:"disabled,omitempty"`

	// The admin's password. If admin single sign-on (SSO) is disabled, then this field is mandatory for POST requests. This information is not provided in a GET response."
	Password string `json:"password,omitempty"`

	PasswordLastModifiedTime int `json:"pwdLastModifiedTime,omitempty"`

	// Indicates whether or not the admin can be edited or deleted
	IsNonEditable bool `json:"isNonEditable,omitempty"`

	// The default is true when SAML Authentication is disabled. When SAML Authentication is enabled, this can be set to false in order to force the admin to login via SSO only.
	IsPasswordLoginAllowed bool `json:"isPasswordLoginAllowed,omitempty"`

	// Indicates whether or not an admin's password has expired
	IsPasswordExpired bool `json:"isPasswordExpired,omitempty"`

	// Indicates whether the user is an auditor. This attribute is subject to change.
	IsAuditor bool `json:"isAuditor,omitempty"`

	// Communication for Security Report is enabled.
	IsSecurityReportCommEnabled bool `json:"isSecurityReportCommEnabled,omitempty"`

	// Communication setting for Service Update
	IsServiceUpdateCommEnabled bool `json:"isServiceUpdateCommEnabled,omitempty"`

	// Communication setting for Product Update
	IsProductUpdateCommEnabled bool `json:"isProductUpdateCommEnabled,omitempty"`

	// Indicates whether or not Executive Insights App access is enabled for the admin
	IsExecMobileAppEnabled bool `json:"isExecMobileAppEnabled,omitempty"`

	// Only applicable for the LOCATION_GROUP admin scope type, in which case this attribute gives the list of ID/name pairs of locations within the location group. The attribute name is subject to change
	AdminScopeGroupMemberEntities []common.IDNameExtensions `json:"adminScopescopeGroupMemberEntities,omitempty"`

	// Based on the admin scope type, the entities can be the ID/name pair of departments, locations, or location groups. The attribute name is subject to change
	AdminScopeEntities []common.IDNameExtensions `json:"adminScopeScopeEntities,omitempty"`

	// The admin's scope. A scope is required for admins, but not applicable to auditors. This attribute is subject to change
	AdminScopeType string `json:"adminScopeType,omitempty"`

	// Role of the admin. This is not required for an auditor
	Role *Role `json:"role,omitempty"`

	// Read-only information about a Executive Insights App token, if it exists
	ExecMobileAppTokens []ExecMobileAppTokens `json:"execMobileAppTokens,omitempty"`
}

type ExecMobileAppTokens

type ExecMobileAppTokens struct {
	Cloud       string `json:"cloud,omitempty"`
	OrgId       int    `json:"orgId,omitempty"`
	Name        string `json:"name,omitempty"`
	TokenId     string `json:"tokenId,omitempty"`
	Token       string `json:"token,omitempty"`
	TokenExpiry int    `json:"tokenExpiry,omitempty"`
	CreateTime  int    `json:"createTime,omitempty"`
	DeviceId    string `json:"deviceId,omitempty"`
	DeviceName  string `json:"deviceName,omitempty"`
}

type Role

type Role struct {
	// Identifier that uniquely identifies an entity
	ID int `json:"id,omitempty"`

	// The configured name of the entity
	Name         string                 `json:"name,omitempty"`
	IsNameL10Tag bool                   `json:"isNameL10nTag,omitempty"`
	Extensions   map[string]interface{} `json:"extensions,omitempty"`
}

type Service

type Service struct {
	Client *zia.Client
}

func New

func New(c *zia.Client) *Service

func (*Service) CreateAdminUser

func (service *Service) CreateAdminUser(adminUser AdminUsers) (*AdminUsers, error)

func (*Service) DeleteAdminUser

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

func (*Service) Get

func (service *Service) Get(adminRoleId int) (*AdminRoles, error)

func (*Service) GetAPIRole

func (service *Service) GetAPIRole(apiRole string) (*AdminRoles, error)

func (*Service) GetAdminByUsername

func (service *Service) GetAdminByUsername(adminUsername string) (*AdminUsers, error)

func (*Service) GetAdminUsers

func (service *Service) GetAdminUsers(adminUserId int) (*AdminUsers, error)

func (*Service) GetAdminUsersByLoginName

func (service *Service) GetAdminUsersByLoginName(adminUsersLoginName string) (*AdminUsers, error)

func (*Service) GetAllAdminRoles

func (service *Service) GetAllAdminRoles() ([]AdminRoles, error)

func (*Service) GetAllAdminUsers

func (service *Service) GetAllAdminUsers() ([]AdminUsers, error)

func (*Service) GetAuditorRole

func (service *Service) GetAuditorRole(auditorRole string) (*AdminRoles, error)

func (*Service) GetByName

func (service *Service) GetByName(adminRoleName string) (*AdminRoles, error)

func (*Service) GetPartnerRole

func (service *Service) GetPartnerRole(partnerRole string) (*AdminRoles, error)

func (*Service) UpdateAdminUser

func (service *Service) UpdateAdminUser(adminUserID int, adminUser AdminUsers) (*AdminUsers, error)

Jump to

Keyboard shortcuts

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