account

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

API Actor API for managing account

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACL

type ACL struct {
	// Whether access is explicitly specified
	Explicit bool `json:"explicit"`

	// GUID
	GUID string `json:"guid"`

	// Access rights
	Right string `json:"right"`

	// Status
	Status string `json:"status"`

	// Type
	Type string `json:"type"`

	// User group ID
	UserGroupID string `json:"userGroupId"`
}

Access Control List

type Account

type Account struct {
	// contains filtered or unexported fields
}

Structure for creating request to account

func New

func New(client interfaces.Caller) *Account

Builder for account endpoints

func (Account) AddUser

func (a Account) AddUser(ctx context.Context, req AddUserRequest) (bool, error)

AddUser gives a user access rights.

func (Account) Audits

func (a Account) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)

Audits gets audit records for the specified account object

func (Account) Create

func (a Account) Create(ctx context.Context, req CreateRequest) (uint64, error)

Create creates account Setting a cloud unit maximum to -1 or empty will not put any restrictions on the resource

func (Account) Delete

func (a Account) Delete(ctx context.Context, req DeleteRequest) (bool, error)

Delete completes delete an account from the system Returns true if account is deleted or was already deleted or never existed

func (Account) DeleteAccounts

func (a Account) DeleteAccounts(ctx context.Context, req DeleteAccountsRequest) (bool, error)

DeleteAccounts destroys a group of accounts

func (Account) DeleteUser

func (a Account) DeleteUser(ctx context.Context, req DeleteUserRequest) (bool, error)

DeleteUser revokes user access from the account

func (Account) Disable

func (a Account) Disable(ctx context.Context, req DisableRequest) (bool, error)

Disable disables an account

func (Account) DisableAccounts

func (a Account) DisableAccounts(ctx context.Context, req DisableAccountsRequest) (bool, error)

DisableAccounts disables accounts

func (Account) Enable

func (a Account) Enable(ctx context.Context, req EnableRequest) (bool, error)

Enable enables an account

func (Account) EnableAccounts

func (a Account) EnableAccounts(ctx context.Context, req EnableAccountsRequest) (bool, error)

EnableAccounts enables accounts

func (Account) Get

func (a Account) Get(ctx context.Context, req GetRequest) (*RecordAccount, error)

Get gets information about account as a RecordAccount struct

func (Account) GetRaw added in v1.6.6

func (a Account) GetRaw(ctx context.Context, req GetRequest) ([]byte, error)

GetRaw gets information about account as an array of bytes

func (Account) GetResourceConsumption added in v1.5.0

GetResourceConsumption shows amount of consumed and reserved resources (cpu, ram, disk) by specific account

func (Account) List

func (a Account) List(ctx context.Context, req ListRequest) (*ListAccounts, error)

List gets list of all accounts the user has access to as a ListAccounts struct

func (Account) ListComputes

func (a Account) ListComputes(ctx context.Context, req ListComputesRequest) (*ListComputes, error)

ListComputes gets list of all compute instances under specified account, accessible by the user

func (Account) ListDeleted

func (a Account) ListDeleted(ctx context.Context, req ListDeletedRequest) (*ListAccounts, error)

ListDeleted gets list all deleted accounts the user has access to

func (Account) ListDisks

func (a Account) ListDisks(ctx context.Context, req ListDisksRequest) (*ListDisks, error)

ListDisks gets list of all currently unattached disks under specified account

func (Account) ListFLIPGroups

func (a Account) ListFLIPGroups(ctx context.Context, req ListFLIPGroupsRequest) (*ListFLIPGroups, error)

ListFLIPGroups gets list of all FLIPGroups under specified account, accessible by the user

func (Account) ListRG

func (a Account) ListRG(ctx context.Context, req ListRGRequest) (*ListRG, error)

ListRG gets list of all resource groups under specified account, accessible by the user

func (Account) ListRaw added in v1.6.6

func (a Account) ListRaw(ctx context.Context, req ListRequest) ([]byte, error)

ListRaw gets list of all accounts the user has access to as an array of bytes

func (Account) ListResourceConsumption added in v1.5.0

func (a Account) ListResourceConsumption(ctx context.Context) (*ListResources, error)

ListResourceConsumption show data list amount of consumed and reserved resources (cpu, ram, disk) by specific accounts

func (Account) ListVINS

func (a Account) ListVINS(ctx context.Context, req ListVINSRequest) (*ListVINS, error)

ListVINS gets list of all ViNSes under specified account, accessible by the user

func (Account) Restore

func (a Account) Restore(ctx context.Context, req RestoreRequest) (bool, error)

Restore restores a deleted account

func (Account) SetCPUAllocationParameter added in v1.4.0

func (a Account) SetCPUAllocationParameter(ctx context.Context, req SetCPUAllocationParameterRequest) (bool, error)

SetCPUAllocationParameter sets CPU allocation parameter

func (Account) SetCPUAllocationRatio added in v1.4.0

func (a Account) SetCPUAllocationRatio(ctx context.Context, req SetCPUAllocationRatioRequest) (bool, error)

SetCPUAllocationRatio sets CPU allocation ratio

func (Account) Update

func (a Account) Update(ctx context.Context, req UpdateRequest) (bool, error)

Update updates an account name and resource types and limits

func (Account) UpdateResourceTypes

func (a Account) UpdateResourceTypes(ctx context.Context, req UpdateResourceTypesRequest) (bool, error)

func (Account) UpdateUser

func (a Account) UpdateUser(ctx context.Context, req UpdateUserRequest) (bool, error)

UpdateUser updates user access rights

type AddUserRequest

type AddUserRequest struct {
	// ID of account to add to
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Name of the user to be given rights
	// Required: true
	Username string `url:"username" json:"username" validate:"required"`

	// Account permission types:
	//	- 'R' for read only access
	//	- 'RCX' for Write
	//	- 'ARCXDU' for Admin
	// Required: true
	AccessType string `url:"accesstype" json:"accesstype" validate:"accessType"`
}

AddUserRequest struct for adding permission to access to account for a user

type AuditsRequest

type AuditsRequest struct {
	// ID of the account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
}

AuditsRequest struct to give list of account audits

type Computes

type Computes struct {
	// Started
	Started uint64 `json:"Started"`

	// Stopped
	Stopped uint64 `json:"Stopped"`
}

Computes info

type CreateRequest

type CreateRequest struct {
	// Display name
	// Required: true
	Name string `url:"name" json:"name" validate:"required"`

	// Name of the account
	// Required: true
	Username string `url:"username" json:"username" validate:"required"`

	// Email
	// Required: false
	EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty" validate:"omitempty,email"`

	// Max size of memory in MB
	// Required: false
	MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`

	// Max size of aggregated vdisks in GB
	// Required: false
	MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`

	// Max number of CPU cores
	// Required: false
	MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`

	// Max sent/received network transfer peering
	// Required: false
	MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`

	// Max number of assigned public IPs
	// Required: false
	MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`

	// If true send emails when a user is granted access to resources
	// Required: false
	SendAccessEmails bool `url:"sendAccessEmails" json:"sendAccessEmails"`

	// Limit (positive) or disable (0) GPU resources
	// Required: false
	GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`

	// List of strings with pools
	// i.e.: ["sep1_poolName1", "sep2_poolName2", etc]
	// Required: false
	UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"`
}

CreateRequest struct for creating account

type DeleteAccountsRequest

type DeleteAccountsRequest struct {
	// IDs of accounts
	// Required: true
	AccountsIDs []uint64 `url:"accountIds" json:"accountIds" validate:"min=1"`

	// Reason for deletion
	// Required: false
	Reason string `url:"reason,omitempty" json:"reason,omitempty"`

	// Whether to completely destroy accounts or not
	// Required: false
	Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}

DeleteAccountsRequest struct to delete group of accounts

type DeleteRequest

type DeleteRequest struct {
	// ID of account to delete
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Reason to delete
	// Required: false
	Reason string `url:"reason,omitempty" json:"reason,omitempty"`

	// Whether to completely delete the account
	// Required: false
	Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}

DeleteRequest struct to delete account

type DeleteUserRequest

type DeleteUserRequest struct {
	// ID of the account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// ID or emailaddress of the user to remove
	// Required: true
	UserName string `url:"username" json:"username" validate:"required"`

	// Recursively revoke access rights from owned cloudspaces and vmachines
	// Required: false
	RecursiveDelete bool `url:"recursivedelete" json:"recursivedelete"`
}

DeleteUserRequest struct to revoke access to account

type DisableAccountsRequest

type DisableAccountsRequest struct {
	// IDs of accounts
	// Required: true
	AccountIDs []uint64 `url:"accountIds" json:"accountIds" validate:"min=1"`
}

DisableAccountsRequest struct to disable group of accounts

type DisableRequest

type DisableRequest struct {
	// ID of account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Reason to disable
	// Required: true
	Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}

DisableRequest struct to disable account

type DiskUsage

type DiskUsage struct {
	// Disk size
	DiskSize float64 `json:"disksize"`

	// Disk size max
	DiskSizeMax float64 `json:"disksizemax"`
}

Disk usage

type EnableAccountsRequest

type EnableAccountsRequest struct {
	// IDs od accounts
	// Required: true
	AccountIDs []uint64 `url:"accountIds" json:"accountIds" validate:"min=1"`
}

EnableAccountsRequest to enable group of accounts

type EnableRequest

type EnableRequest struct {
	// ID of account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Reason to enable
	// Required: true
	Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}

EnableRequest struct to enable account

type GetRequest

type GetRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
}

GetRequest struct to get information about account

type GetResourceConsumptionRequest added in v1.5.0

type GetResourceConsumptionRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`
}

GetResourceConsumptionRequest struct for getting resource consumption

type InfoAccount

type InfoAccount struct {
	// DCLocation
	DCLocation string `json:"DCLocation"`

	// CKey
	CKey string `json:"_ckey"`

	// Access Control List
	ACL []ACL `json:"acl"`

	// Company
	Company string `json:"company"`

	// Company URL
	CompanyURL string `json:"companyurl"`

	// CPU allocation parameter
	CPUAllocationParameter string `json:"cpu_allocation_parameter"`

	// CPU allocation ratio
	CPUAllocationRatio float64 `json:"cpu_allocation_ratio"`

	// Created by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deactivation time
	DeactivationTime float64 `json:"deactivationTime"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// Display name
	DisplayName string `json:"displayname"`

	// GUID
	GUID uint64 `json:"guid"`

	// ID
	ID uint64 `json:"id"`

	// Name
	Name string `json:"name"`

	// Resource limits
	ResourceLimits ResourceLimits `json:"resourceLimits"`

	// Resource types
	ResTypes []string `json:"resourceTypes"`

	// Send access emails
	SendAccessEmails bool `json:"sendAccessEmails"`

	// Status
	Status string `json:"status"`

	// UniqPools
	UniqPools []string `json:"uniqPools"`

	// UpdatedTime
	UpdatedTime uint64 `json:"updatedTime"`

	// Version
	Version uint64 `json:"version"`

	// List of VINS IDs
	VINS []uint64 `json:"vins"`
}

Main information about account

type ItemAccount

type ItemAccount struct {
	// Meta
	Meta []interface{} `json:"_meta"`

	// Main information about account
	InfoAccount
}

More information about account

func (ItemAccount) Serialize

func (ia ItemAccount) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

type ItemAudit

type ItemAudit struct {
	// Call
	Call string `json:"call"`

	// Response time
	ResponseTime float64 `json:"responsetime"`

	// Status code
	StatusCode uint64 `json:"statuscode"`

	// Timestamp
	Timestamp float64 `json:"timestamp"`

	// User
	User string `json:"user"`
}

Main info about audit

type ItemCompute

type ItemCompute struct {
	// Account ID
	AccountID uint64 `json:"accountId"`

	// Account name
	AccountName string `json:"accountName"`

	// Number of CPU
	CPUs uint64 `json:"cpus"`

	// Created by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// ID
	ID uint64 `json:"id"`

	// Name
	Name string `json:"name"`

	// Number of RAM
	RAM uint64 `json:"ram"`

	// Registered
	Registered bool `json:"registered"`

	// Resource group ID
	RGID uint64 `json:"rgId"`

	// Resource group name
	RgName string `json:"rgName"`

	// Status
	Status string `json:"status"`

	// Tech status
	TechStatus string `json:"techStatus"`

	// Total disks size
	TotalDisksSize uint64 `json:"totalDisksSize"`

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`

	// User managed
	UserManaged bool `json:"userManaged"`

	// VINS Connected
	VINSConnected uint64 `json:"vinsConnected"`
}

Main information about compute

type ItemDisk

type ItemDisk struct {
	// ID
	ID uint64 `json:"id"`

	// Name
	Name string `json:"name"`

	// Pool
	Pool string `json:"pool"`

	// SepID
	SepID uint64 `json:"sepId"`

	// Shareable
	Shareable bool `json:"shareable"`

	// Size max
	SizeMax uint64 `json:"sizeMax"`

	// Type
	Type string `json:"type"`
}

Main information about disks

type ItemFLIPGroup

type ItemFLIPGroup struct {
	// Account ID
	AccountID uint64 `json:"accountId"`

	// Client type
	ClientType string `json:"clientType"`

	// Connection type
	ConnType string `json:"connType"`

	// Created by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Default GW
	DefaultGW string `json:"defaultGW"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// Description
	Description string `json:"desc"`

	// Grid ID
	GID uint64 `json:"gid"`

	// GUID
	GUID uint64 `json:"guid"`

	// ID
	ID uint64 `json:"id"`

	// IP
	IP string `json:"ip"`

	// Milestones
	Milestones uint64 `json:"milestones"`

	// Name
	Name string `json:"name"`

	// Network ID
	NetID uint64 `json:"netId"`

	// Network type
	NetType string `json:"netType"`

	// Network mask
	Netmask uint64 `json:"netmask"`

	// Status
	Status string `json:"status"`

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`
}

Main information about FLIPGroup

type ItemRG

type ItemRG struct {
	// Compute
	Computes Computes `json:"Computes"`

	// Resources of resource group
	Resources RGResuorces `json:"Resources"`

	// Created by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// ID
	ID uint64 `json:"id"`

	// Milestones
	Milestones uint64 `json:"milestones"`

	// Name
	Name string `json:"name"`

	// Status
	Status string `json:"status"`

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`

	// Number of VINSes
	VINSes uint64 `json:"vinses"`
}

Main information about Resource group

type ItemResourceConsumption added in v1.5.0

type ItemResourceConsumption struct {
	// Current information about resources
	Consumed Resource `json:"consumed"`

	// Reserved information about resources
	Reserved Resource `json:"reserved"`

	// ID of account
	AccountID uint64 `json:"id"`
}

type ItemVINS

type ItemVINS struct {
	// Account ID
	AccountID uint64 `json:"accountId"`

	// Account name
	AccountName string `json:"accountName"`

	// Computes
	Computes uint64 `json:"computes"`

	// Created by
	CreatedBy string `json:"createdBy"`

	// Created time
	CreatedTime uint64 `json:"createdTime"`

	// Deleted by
	DeletedBy string `json:"deletedBy"`

	// Deleted time
	DeletedTime uint64 `json:"deletedTime"`

	// External IP
	ExternalIP string `json:"externalIP"`

	// ID
	ID uint64 `json:"id"`

	// Name
	Name string `json:"name"`

	// Network
	Network string `json:"network"`

	// PriVNFDevID
	PriVNFDevID uint64 `json:"priVnfDevId"`

	// Resource group ID
	RGID uint64 `json:"rgId"`

	// Resource group name
	RGName string `json:"rgName"`

	// Status
	Status string `json:"status"`

	// Updated by
	UpdatedBy string `json:"updatedBy"`

	// Updated time
	UpdatedTime uint64 `json:"updatedTime"`
}

Main information about VINS

type Limits

type Limits struct {
	// Number of CPU
	CPU int64 `json:"cpu"`

	// Disk size
	DiskSize int64 `json:"disksize"`

	// Disk size max
	DiskSizeMax int64 `json:"disksizemax"`

	// External IPs
	ExtIPs int64 `json:"extips"`

	// External traffic
	ExtTraffic int64 `json:"exttraffic"`

	// Number of GPU
	GPU int64 `json:"gpu"`

	// Number of RAM
	RAM int64 `json:"ram"`

	// SEPs number
	SEPs uint64 `json:"seps"`
}

Limits

type ListAccounts

type ListAccounts struct {
	// Data
	Data []ItemAccount `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of accounts

func (ListAccounts) FilterByCompany

func (la ListAccounts) FilterByCompany(company string) ListAccounts

FilterByCompany returns ListAccounts with specified Company.

func (ListAccounts) FilterByCreatedBy

func (la ListAccounts) FilterByCreatedBy(createdBy string) ListAccounts

FilterByCreatedBy returns ListAccounts created by specified user.

func (ListAccounts) FilterByID

func (la ListAccounts) FilterByID(id uint64) ListAccounts

FilterByID returns ListAccounts with specified ID.

func (ListAccounts) FilterByName

func (la ListAccounts) FilterByName(name string) ListAccounts

FilterByName returns ListAccounts with specified Name.

func (ListAccounts) FilterByStatus

func (la ListAccounts) FilterByStatus(status string) ListAccounts

FilterByStatus returns ListAccounts with specified Status.

func (ListAccounts) FilterByUserGroupID

func (la ListAccounts) FilterByUserGroupID(userGroupID string) ListAccounts

FilterByUserGroupID returns ListAccounts with specified UserGroupID.

func (ListAccounts) FilterFunc

func (la ListAccounts) FilterFunc(predicate func(ItemAccount) bool) ListAccounts

FilterFunc allows filtering ListAccounts based on a user-specified predicate.

func (ListAccounts) FindOne

func (la ListAccounts) FindOne() ItemAccount

FindOne returns first found ItemAccount. If none was found, returns an empty struct.

func (ListAccounts) Serialize

func (la ListAccounts) Serialize(params ...string) (serialization.Serialized, error)

Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.

In order to serialize with indent make sure to follow these guidelines:

  • First argument -> prefix
  • Second argument -> indent

func (ListAccounts) SortByCreatedTime

func (la ListAccounts) SortByCreatedTime(inverse bool) ListAccounts

SortByCreatedTime sorts ListAccounts by the CreatedTime field in ascending order.

If inverse param is set to true, the order is reversed.

func (ListAccounts) SortByDeletedTime

func (la ListAccounts) SortByDeletedTime(inverse bool) ListAccounts

SortByDeletedTime sorts LisAccounts by the DeletedTime field in ascending order.

If inverse param is set to true, the order is reversed.

func (ListAccounts) SortByUpdatedTime

func (la ListAccounts) SortByUpdatedTime(inverse bool) ListAccounts

SortByUpdatedTime sorts ListAccounts by the UpdatedTime field in ascending order.

If inverse param is set to true, the order is reversed.

type ListAudits

type ListAudits []ItemAudit

List of audits

type ListComputes

type ListComputes struct {
	// Data
	Data []ItemCompute `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of computes

type ListComputesRequest

type ListComputesRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Find by compute id
	// Required: false
	ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by resource group name
	// Required: false
	RGName string `url:"rgName,omitempty" json:"rgName,omitempty"`

	// Find by resource group id
	// Required: false
	RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`

	// Find by tech status
	// Required: false
	TechStatus string `url:"techStatus,omitempty" json:"techStatus,omitempty"`

	// Find by ip address
	// Required: false
	IPAddress string `url:"ipAddress,omitempty" json:"ipAddress,omitempty"`

	// Find by external network name
	// Required: false
	ExtNetName string `url:"extNetName,omitempty" json:"extNetName,omitempty"`

	// Find by external network id
	// Required: false
	ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListComputesRequest struct to a get list of compute instances

type ListDeletedRequest

type ListDeletedRequest struct {
	// Find by ID
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by access control list
	// Required: false
	ACL string `url:"acl,omitempty" json:"acl,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListDeletedRequest struct to get list of deleted accounts

type ListDisks

type ListDisks struct {
	// Data
	Data []ItemDisk `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of disks

type ListDisksRequest

type ListDisksRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Find by disk id
	// Required: false
	DiskID uint64 `url:"diskId,omitempty" json:"diskId,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by max size disk
	// Required: false
	DiskMaxSize uint64 `url:"diskMaxSize,omitempty" json:"diskMaxSize,omitempty"`

	// Type of the disks
	// Required: false
	Type string `url:"type,omitempty" json:"type,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListDisksRequest struct to get list of deleted disks

type ListFLIPGroups

type ListFLIPGroups struct {
	// Data
	Data []ItemFLIPGroup `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of FLIPGroups

type ListFLIPGroupsRequest

type ListFLIPGroupsRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by vinsId
	// Required: false
	VINSID uint64 `url:"vinsId,omitempty" json:"vinsId,omitempty"`

	// Find by VINS name
	// Required: false
	VINSName string `url:"vinsName,omitempty" json:"vinsName,omitempty"`

	// Find by external network id
	// Required: false
	ExtNetID uint64 `url:"extnetId,omitempty" json:"extnetId,omitempty"`

	// Find by IP
	// Required: false
	ByIP string `url:"byIp,omitempty" json:"byIp,omitempty"`

	// Find by flipGroup Id
	// Required: false
	FLIPGroupID uint64 `url:"flipGroupId,omitempty" json:"flipGroupId,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListFLIPGroupsRequest struct to get list of FLIPGroups

type ListRG

type ListRG struct {
	// Data
	Data []ItemRG `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of resource groups

type ListRGRequest

type ListRGRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`

	// Find by resource group id
	// Required: false
	RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by vinsId
	// Required: false
	VINSID uint64 `url:"vinsId,omitempty" json:"vinsId,omitempty"`

	// Find by VM ID
	// Required: false
	VMID uint64 `url:"vmId,omitempty" json:"vmId,omitempty"`

	// Find by status
	// Required: false
	Status string `url:"status,omitempty" json:"status,omitempty"`
}

ListRGRequest struct to get list of resource groups

type ListRequest

type ListRequest struct {
	// Find by ID
	// Required: false
	ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by access control list
	// Required: false
	ACL string `url:"acl,omitempty" json:"acl,omitempty"`

	// Find by status
	// Required: false
	Status string `url:"status,omitempty" json:"status,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListRequest struct to get list of accounts

type ListResources added in v1.5.0

type ListResources struct {
	// Data
	Data []ItemResourceConsumption `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

type ListVINS

type ListVINS struct {
	//Data
	Data []ItemVINS `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

List of VINSes

type ListVINSRequest

type ListVINSRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Find by VINS ID
	// Required: false
	VINSID uint64 `url:"vinsId,omitempty" json:"vinsId,omitempty"`

	// Find by name
	// Required: false
	Name string `url:"name,omitempty" json:"name,omitempty"`

	// Find by resource group id
	// Required: false
	RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"`

	// Find by external network ip
	// Required: false
	ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"`

	// Page number
	// Required: false
	Page uint64 `url:"page,omitempty" json:"page,omitempty"`

	// Page size
	// Required: false
	Size uint64 `url:"size,omitempty" json:"size,omitempty"`
}

ListVINSRequest struct to get list of VINS

type RGResuorces

type RGResuorces struct {
	//  Consumed
	Consumed Resource `json:"Consumed"`

	// Limits
	Limits Limits `json:"Limits"`

	// Reserved
	Reserved Resource `json:"Reserved"`
}

Resources of resource group

type RecordAccount

type RecordAccount struct {
	// Main information about account
	InfoAccount
}

Deatailed information about account

type RecordResourceConsumption added in v1.5.0

type RecordResourceConsumption struct {
	ItemResourceConsumption

	ResourceLimits ResourceLimits `json:"resourceLimits"`
}

type Resource

type Resource struct {
	// Number of cores
	CPU int64 `json:"cpu"`

	// Disk size
	DiskSize float64 `json:"disksize"`

	// Disk size max
	DiskSizeMax float64 `json:"disksizemax"`

	// Number of External IPs
	ExtIPs int64 `json:"extips"`

	// External traffic
	ExtTraffic int64 `json:"exttraffic"`

	// Number of grafic cores
	GPU int64 `json:"gpu"`

	// Number of RAM
	RAM int64 `json:"ram"`

	// SEPs
	SEPs map[string]map[string]DiskUsage `json:"seps"`
}

type ResourceLimits

type ResourceLimits struct {
	// CuC
	CuC float64 `json:"CU_C"`

	// CuD
	CuD float64 `json:"CU_D"`

	// CuDM
	CuDM float64 `json:"CU_DM"`

	// CuI
	CuI float64 `json:"CU_I"`

	// CuM
	CuM float64 `json:"CU_M"`

	// CuNP
	CuNP float64 `json:"CU_NP"`

	// GPUUnits
	GPUUnits float64 `json:"gpu_units"`
}

Resource limits

type RestoreRequest

type RestoreRequest struct {
	// ID an account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Reason to restore
	// Required: false
	Reason string `url:"reason,omitempty" json:"reason,omitempty"`
}

RestoreRequest struct to restore a deleted account

type SetCPUAllocationParameterRequest added in v1.4.0

type SetCPUAllocationParameterRequest struct {
	// Account ID
	// Required: true
	AccountID uint64 `url:"accountId" json:"accoutnId" validate:"required"`

	// CPU allocation parameter.
	// If "strict" VM can't be run if not enough CPU resources.
	// "loose" allow running VM if not enough resources.
	// Required: true
	StrictLoose string `url:"strict_loose" json:"strict_loose" validate:"required,strict_loose"`
}

SetCPUAllocationParameterRequest struct for setting CPU allocation parameter

type SetCPUAllocationRatioRequest added in v1.4.0

type SetCPUAllocationRatioRequest struct {
	// Account ID
	// Required: true
	AccountID uint64 `url:"accountId" json:"accoutnId" validate:"required"`

	// CPU allocation ratio, i.e. one pCPU = ratio*vCPU
	// if don't set, default value = 0
	// Required: false
	Ratio float64 `url:"ratio" json:"ratio"`
}

SetCPUAllocationRatioRequest struct for setting CPU allocation ratio

type UpdateRequest

type UpdateRequest struct {
	// ID of account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Name of the account
	// Required: false
	Name string `url:"name" json:"name"`

	// Max size of memory in MB
	// Required: false
	MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`

	// Max size of aggregated vdisks in GB
	// Required: false
	MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`

	// Max number of CPU cores
	// Required: false
	MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`

	// Max sent/received network transfer peering
	// Required: false
	MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`

	// Max number of assigned public IPs
	// Required: false
	MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`

	// If true send emails when a user is granted access to resources
	// Required: false
	SendAccessEmails bool `url:"sendAccessEmails" json:"sendAccessEmails"`

	// Limit (positive) or disable (0) GPU resources
	// Required: false
	GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`

	// List of strings with pools
	// i.e.: ["sep1_poolName1", "sep2_poolName2", etc]
	// Required: false
	UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"`
}

UpdateRequest struct to update account

type UpdateResourceTypesRequest

type UpdateResourceTypesRequest struct {
	// ID of account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Resource types available to create in this account
	// Each element in a resource type slice must be one of:
	//	- compute
	//	- vins
	//	- k8s
	//	- openshift
	//	- lb
	//	- flipgroup
	// Required: true
	ResTypes []string `url:"resourceTypes" json:"resourceTypes" validate:"min=1,resTypes"`
}

UpdateResourceTypesRequest struct to update resource types in account

type UpdateUserRequest

type UpdateUserRequest struct {
	// ID of the account
	// Required: true
	AccountID uint64 `url:"accountId" json:"accountId" validate:"required"`

	// Userid/Email for registered users or emailaddress for unregistered users
	// Required: true
	UserID string `url:"userId" json:"userId" validate:"required"`

	// Account permission types:
	//	- 'R' for read only access
	//	- 'RCX' for Write
	//	- 'ARCXDU' for Admin
	// Required: true
	AccessType string `url:"accesstype" json:"accesstype" validate:"accessType"`
}

UpdateUserRequest struct to update user access rights

Jump to

Keyboard shortcuts

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