Documentation
¶
Overview ¶
API Actor API for managing account
Index ¶
- type Account
- func (a Account) AddUser(ctx context.Context, req AddUserRequest) (bool, error)
- func (a Account) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error)
- func (a Account) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (a Account) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (a Account) DeleteUser(ctx context.Context, req DeleteUserRequest) (bool, error)
- func (a Account) Disable(ctx context.Context, req DisabelEnableRequest) (bool, error)
- func (a Account) Enable(ctx context.Context, req DisabelEnableRequest) (bool, error)
- func (a Account) Get(ctx context.Context, req GetRequest) (*RecordAccount, error)
- func (a Account) GetConsumedAccountUnits(ctx context.Context, req GetConsumedAccountUnitsRequest) (*ResourceLimits, error)
- func (a Account) GetConsumedCloudUnitsByType(ctx context.Context, req GetConsumedCloudUnitsByTypeRequest) (float64, error)
- func (a Account) GetConsumtion(ctx context.Context, req GetConsumtionRequest) (string, error)
- func (a Account) GetConsumtionGet(ctx context.Context, req GetConsumtionRequest) (string, error)
- func (a Account) GetReservedAccountUnits(ctx context.Context, req GetReservedAccountUnitsRequest) (*ResourceLimits, error)
- func (a Account) List(ctx context.Context, req ListRequest) (ListAccounts, error)
- func (a Account) ListComputes(ctx context.Context, req ListComputesRequest) (ListComputes, error)
- func (a Account) ListDeleted(ctx context.Context, req ListDeletedRequest) (ListAccounts, error)
- func (a Account) ListDisks(ctx context.Context, req ListDisksRequest) (ListDisks, error)
- func (a Account) ListFLIPGroups(ctx context.Context, req ListFLIPGroupsRequest) (ListFLIPGroups, error)
- func (a Account) ListRG(ctx context.Context, req ListRGRequest) (ListRG, error)
- func (a Account) ListTemplates(ctx context.Context, req ListTemplatesRequest) (ListTemplates, error)
- func (a Account) ListVINS(ctx context.Context, req ListVINSRequest) (ListVINS, error)
- func (a Account) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (a Account) Update(ctx context.Context, req UpdateRequest) (bool, error)
- func (a Account) UpdateUser(ctx context.Context, req UpdateUserRequest) (bool, error)
- type AddUserRequest
- type AuditsRequest
- type Computes
- type CreateRequest
- type DeleteRequest
- type DeleteUserRequest
- type DisabelEnableRequest
- type DiskUsage
- type GetConsumedAccountUnitsRequest
- type GetConsumedCloudUnitsByTypeRequest
- type GetConsumtionRequest
- type GetRequest
- type GetReservedAccountUnitsRequest
- type ItemAccount
- type ItemAudit
- type ItemCompute
- type ItemDisk
- type ItemFLIPGroup
- type ItemRG
- type ItemTemplate
- type ItemVINS
- type LimitsRG
- type ListAccounts
- type ListAudits
- type ListComputes
- type ListComputesRequest
- type ListDeletedRequest
- type ListDisks
- type ListDisksRequest
- type ListFLIPGroups
- type ListFLIPGroupsRequest
- type ListRG
- type ListRGRequest
- type ListRequest
- type ListTemplates
- type ListTemplatesRequest
- type ListVINS
- type ListVINSRequest
- type Machines
- type RGComputes
- type RGResources
- type RecordACL
- type RecordAccount
- type Resource
- type ResourceLimits
- type Resources
- type RestoreRequest
- type UpdateRequest
- type UpdateUserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Structure for creating request to account
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 ¶
Create creates account Setting a cloud unit maximum to -1 or empty will not put any restrictions on the resource
func (Account) Delete ¶
Delete completes delete an account from the system Returns true if account is deleted or was already deleted or never existed
func (Account) DeleteUser ¶
DeleteUser revokes user access from the account
func (Account) Get ¶
func (a Account) Get(ctx context.Context, req GetRequest) (*RecordAccount, error)
Get gets account details
func (Account) GetConsumedAccountUnits ¶
func (a Account) GetConsumedAccountUnits(ctx context.Context, req GetConsumedAccountUnitsRequest) (*ResourceLimits, error)
GetConsumedAccountUnits calculates the currently consumed units for all cloudspaces and resource groups in the account. Calculated cloud units are returned in a dict which includes:
- CU_M: consumed memory in MB
- CU_C: number of cpu cores
- CU_D: consumed vdisk storage in GB
- CU_I: number of public IPs
func (Account) GetConsumedCloudUnitsByType ¶
func (a Account) GetConsumedCloudUnitsByType(ctx context.Context, req GetConsumedCloudUnitsByTypeRequest) (float64, error)
GetConsumedCloudUnitsByType calculates the currently consumed cloud units of the specified type for all cloudspaces and resource groups in the account. Possible types of cloud units are include:
- CU_M: returns consumed memory in MB
- CU_C: returns number of virtual cpu cores
- CU_D: returns consumed virtual disk storage in GB
- CU_S: returns consumed primary storage (NAS) in TB
- CU_A: returns consumed secondary storage (Archive) in TB
- CU_NO: returns sent/received network transfer in operator in GB
- CU_NP: returns sent/received network transfer peering in GB
- CU_I: returns number of public IPs
func (Account) GetConsumtion ¶
GetConsumtion downloads the resources tracking files for an account within a given period
func (Account) GetConsumtionGet ¶
GetConsumtionGet downloads the resources tracking files for an account within a given period
func (Account) GetReservedAccountUnits ¶
func (a Account) GetReservedAccountUnits(ctx context.Context, req GetReservedAccountUnitsRequest) (*ResourceLimits, error)
GetReservedAccountUnits calculates the reserved units for all cloudspaces and resource groups in the account. Calculated cloud units are returned in a dict which includes:
- CU_M: reserved memory in MB
- CU_C: number of cpu cores
- CU_D: reserved vdisk storage in GB
- CU_I: number of public IPs
func (Account) List ¶
func (a Account) List(ctx context.Context, req ListRequest) (ListAccounts, error)
List gets list all accounts the user has access to
func (Account) ListComputes ¶
func (a Account) ListComputes(ctx context.Context, req ListComputesRequest) (ListComputes, error)
ListComputes gets list 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 ¶
ListDisks gets list all currently unattached disks under specified account
func (Account) ListFLIPGroups ¶
func (a Account) ListFLIPGroups(ctx context.Context, req ListFLIPGroupsRequest) (ListFLIPGroups, error)
ListFLIPGroups gets list all FLIPGroups under specified account, accessible by the user
func (Account) ListRG ¶
ListRG gets list all resource groups under specified account, accessible by the user
func (Account) ListTemplates ¶
func (a Account) ListTemplates(ctx context.Context, req ListTemplatesRequest) (ListTemplates, error)
ListTemplates gets list templates which can be managed by this account
func (Account) ListVINS ¶
ListVINS gets list all ViNSes under specified account, accessible by the user
func (Account) UpdateUser ¶
UpdateUser updates user access rights
type AddUserRequest ¶
type AddUserRequest struct {
// ID of account to add to
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Name of the user to be given rights
// Required: true
UserID string `url:"userId" json:"userId"`
// Account permission types:
// - 'R' for read only access
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype" json:"accesstype"`
}
Request 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"`
}
Request struct for give list account audits
type Computes ¶
type Computes struct {
// Number of started computes
Started uint64 `json:"started"`
// Number of stopped computes
Stopped uint64 `json:"stopped"`
}
Information about computes
type CreateRequest ¶
type CreateRequest struct {
// Display name
// Required: true
Name string `url:"name" json:"name"`
// Name of the account
// Required: true
Username string `url:"username" json:"username"`
// Email
// Required: false
EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"`
// 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,omitempty" json:"sendAccessEmails,omitempty"`
// Limit (positive) or disable (0) GPU resources
// Required: false
GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
}
Request struct for creating account
type DeleteRequest ¶
type DeleteRequest struct {
// ID of account to delete
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Whether to completely delete the account
// Required: false
Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"`
}
Request struct for delete account
type DeleteUserRequest ¶
type DeleteUserRequest struct {
// ID of the account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// ID or emailaddress of the user to remove
// Required: true
UserID string `url:"userId" json:"userId"`
// Recursively revoke access rights from owned cloudspaces and vmachines
// Required: false
RecursiveDelete bool `url:"recursivedelete,omitempty" json:"recursivedelete,omitempty"`
}
Request struct for revoke access to account
type DisabelEnableRequest ¶
type DisabelEnableRequest struct {
// ID of account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for change status of account
type DiskUsage ¶ added in v1.1.0
type DiskUsage struct {
// Disk size
DiskSize float64 `json:"disksize"`
// Disk size max
DiskSizeMax uint64 `json:"disksizemax"`
}
Disk usage
type GetConsumedAccountUnitsRequest ¶
type GetConsumedAccountUnitsRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for calculate the currently consumed units for all cloudspaces and resource groups in the account
type GetConsumedCloudUnitsByTypeRequest ¶
type GetConsumedCloudUnitsByTypeRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Cloud unit resource type
// Required: true
CUType string `url:"cutype" json:"cutype"`
}
Request struct for calculate the currently consumed cloud units of the specified type for all cloudspaces and resource groups in the account
type GetConsumtionRequest ¶
type GetConsumtionRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Epoch represents the start time
// Required: true
Start uint64 `url:"start" json:"start"`
// Epoch represents the end time
// Required: true
End uint64 `url:"end" json:"end"`
}
Request struct for download the resources tracking files for an account
type GetRequest ¶
type GetRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for get information about account
type GetReservedAccountUnitsRequest ¶
type GetReservedAccountUnitsRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for calculate the reserved units for all cloudspaces and resource groups in the account
type ItemAccount ¶
type ItemAccount struct {
// Access Control List
ACL []RecordACL `json:"acl"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Deleted time
DeletedTime uint64 `json:"deletedTime"`
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Status
Status string `json:"status"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
}
Main information in one of if the list of accounts
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 {
// ID an account
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 compute
ComputeID uint64 `json:"id"`
// Compute name
ComputeName string `json:"name"`
// Number of RAM
RAM uint64 `json:"ram"`
// Registered or not
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 controlled or not
UserManaged bool `json:"userManaged"`
// Number of connected VINS
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"`
// ID SEP
SEPID uint64 `json:"sepId"`
Shareable bool `json:"shareable"`
// Max size
SizeMax uint64 `json:"sizeMax"`
// Disk type
Type string `json:"type"`
}
Main information about disk
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 {
// Computes
Computes RGComputes `json:"Computes"`
// Resources
Resources RGResources `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"`
// Resource group ID
RGID uint64 `json:"id"`
// Milestones
Milestones uint64 `json:"milestones"`
// Resource group name
RGName string `json:"name"`
// Status
Status string `json:"status"`
// Updated by
UpdatedBy string `json:"updatedBy"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
// Number of VINS
VINSes uint64 `json:"vinses"`
}
Main information about resource group
type ItemTemplate ¶
type ItemTemplate struct {
// UNCPath
UNCPath string `json:"UNCPath"`
// Account ID
AccountID uint64 `json:"accountId"`
// Description
Description string `json:"desc"`
// ID
ID uint64 `json:"id"`
// Name
Name string `json:"name"`
// Public or not
Public bool `json:"public"`
// Size
Size uint64 `json:"size"`
// Status
Status string `json:"status"`
// Type
Type string `json:"type"`
// Username
Username string `json:"username"`
}
Main information about template
type ItemVINS ¶
type ItemVINS struct {
// Account ID
AccountID uint64 `json:"accountId"`
// Name of account
AccountName string `json:"accountName"`
// Number of 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"`
// NNFDev ID
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 LimitsRG ¶ added in v1.1.0
type LimitsRG struct {
// Number of cores
CPU int64 `json:"cpu"`
// Disk size
DiskSize int64 `json:"disksize"`
// Max disk size
DiskSizeMax int64 `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 uint64 `json:"seps"`
}
Resources used
type ListComputesRequest ¶
type ListComputesRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for a get list compute instances
type ListDeletedRequest ¶
type ListDeletedRequest struct {
// Page number
// Required: false
Page uint64 `url:"page" json:"page"`
// Page size
// Required: false
Size uint64 `url:"size" json:"size"`
}
Request struct for get list deleted accounts
type ListDisksRequest ¶
type ListDisksRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for get list deleted disks
type ListFLIPGroupsRequest ¶
type ListFLIPGroupsRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for get list FLIPGroups
type ListRGRequest ¶
type ListRGRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for get list resource groups
type ListRequest ¶
type ListRequest struct {
// Page number
// Required: false
Page uint64 `url:"page" json:"page"`
// Page size
// Required: false
Size uint64 `url:"size" json:"size"`
}
Request struct for get list of accounts
type ListTemplatesRequest ¶
type ListTemplatesRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Include deleted images
// Required: false
IncludeDeleted bool `url:"includedeleted" json:"includedeleted"`
}
Request struct for get list templates
type ListVINSRequest ¶
type ListVINSRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for get list VINS
type Machines ¶
type Machines struct {
// Number of running machines
Running uint64 `json:"running"`
// Number of halted machines
Halted uint64 `json:"halted"`
}
Information about machines
type RGComputes ¶
type RGComputes struct {
// Number of started computes
Started uint64 `json:"Started"`
// Number of stopped computes
Stopped uint64 `json:"Stopped"`
}
Information compute in resource group
type RGResources ¶
type RGResources struct {
// Consumed
Consumed Resource `json:"Consumed"`
// Limits
Limits LimitsRG `json:"Limits"`
// Reserved
Reserved Resource `json:"Reserved"`
}
Resources of Resource group
type RecordACL ¶
type RecordACL struct {
// Whether access is explicitly specified
IsExplicit bool `json:"explicit"`
// GUID
GUID string `json:"guid"`
// Access rights
Rights string `json:"right"`
// Status
Status string `json:"status"`
// Account Type
Type string `json:"type"`
// Account owner ID
UgroupID string `json:"userGroupId"`
// Is it possible to remove
CanBeDeleted bool `json:"canBeDeleted"`
}
Access Control List
type RecordAccount ¶
type RecordAccount struct {
// DCLocation
DCLocation string `json:"DCLocation"`
// Resources
Resources Resources `json:"Resources"`
// CKey
CKey string `json:"_ckey"`
// Access control list
ACL []RecordACL `json:"acl"`
// Company
Company string `json:"company"`
// Company URL
CompanyURL string `json:"companyurl"`
// Computes
Computes Computes `json:"computes"`
// Created by
CreatedBy string `json:"createdBy"`
// Created time
CreatedTime uint64 `json:"createdTime"`
// Deactivation time
DeactivationTime uint64 `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"`
// Machines
Machines Machines `json:"machines"`
// Name
Name string `json:"name"`
// Resource limits
ResourceLimits ResourceLimits `json:"resourceLimits"`
// Resource types
ResourceTypes []string `json:"resourceTypes"`
// Send access emails
SendAccessEmails bool `json:"sendAccessEmails"`
// Status
Status string `json:"status"`
// UniqPools
UniqPools []interface{} `json:"uniqPools"`
// Updated time
UpdatedTime uint64 `json:"updatedTime"`
// Version
Version uint64 `json:"version"`
// VINS
VINS []uint64 `json:"vins"`
// VINSes
VINSes uint64 `json:"vinses"`
}
Main information about account
type Resource ¶
type Resource struct {
// Number of cores
CPU int64 `json:"cpu"`
// Disk size
DiskSize float64 `json:"disksize"`
// Max disk size
DiskSizeMax uint64 `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"`
}
Resources used
type ResourceLimits ¶
type ResourceLimits struct {
// Number of cores
CUC float64 `json:"CU_C"`
// Disk size, GB
CUD float64 `json:"CU_D"`
// Number of public IP addresses
CUI float64 `json:"CU_I"`
// RAM size, MB
CUM float64 `json:"CU_M"`
// Traffic volume, GB
CUNP float64 `json:"CU_NP"`
// Number of graphics cores
GPUUnits float64 `json:"gpu_units"`
}
Resource limits
type Resources ¶
type Resources struct {
// Current information about resources
Current Resource `json:"Current"`
// Reserved information about resources
Reserved Resource `json:"Reserved"`
}
Information about resources
type RestoreRequest ¶
type RestoreRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
}
Request struct for restore a deleted account
type UpdateRequest ¶
type UpdateRequest struct {
// ID an account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Name of the account
// Required: false
Name string `url:"name,omitempty" json:"name,omitempty"`
// Max size of memory in MB
// Required: false
MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"`
// Max size of aggregated vdisks in GB
// Required: false
MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"`
// Max number of CPU cores
// Required: false
MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"`
// Max sent/received network transfer peering
// Required: false
MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"`
// Max number of assigned public IPs
// Required: false
MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"`
// If true send emails when a user is granted access to resources
// Required: false
SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"`
// Limit (positive) or disable (0) GPU resources
// Required: false
GPUUnits uint64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"`
}
Request struct for updaate account
type UpdateUserRequest ¶
type UpdateUserRequest struct {
// ID of the account
// Required: true
AccountID uint64 `url:"accountId" json:"accountId"`
// Userid/Email for registered users or emailaddress for unregistered users
// Required: true
UserID string `url:"userId" json:"userId"`
// Account permission types:
// - 'R' for read only access
// - 'RCX' for Write
// - 'ARCXDU' for Admin
// Required: true
AccessType string `url:"accesstype" json:"accesstype"`
}
Request struct for update user access rights
Source Files
¶
- account.go
- add_user.go
- audits.go
- create.go
- delete.go
- delete_user.go
- disable_enable.go
- get.go
- get_consumed_account_units.go
- get_consumed_cloud_units_by_type.go
- get_consumption.go
- get_reserved_account_units.go
- list.go
- list_computes.go
- list_deleted.go
- list_disks.go
- list_flipgroups.go
- list_rg.go
- list_templates.go
- list_vins.go
- models.go
- restore.go
- update.go
- update_user.go