admins

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) 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) GetAllAdminUsers

func (service *Service) GetAllAdminUsers() ([]AdminUsers, 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