Documentation
¶
Overview ¶
API Actor API for managing account
Index ¶
- type ACL
- 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) DeleteAccounts(ctx context.Context, req DeleteAccountsRequest) (bool, error)
- func (a Account) DeleteUser(ctx context.Context, req DeleteUserRequest) (bool, error)
- func (a Account) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (a Account) DisableAccounts(ctx context.Context, req DisableAccountsRequest) (bool, error)
- func (a Account) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (a Account) EnableAccounts(ctx context.Context, req EnableAccountsRequest) (bool, error)
- func (a Account) Get(ctx context.Context, req GetRequest) (*RecordAccount, 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) ListVINS(ctx context.Context, req ListVINSRequest) (ListVINS, error)
- func (a Account) Restore(ctx context.Context, req RestoreRequest) (bool, error)
- func (a Account) SetCPUAllocationParameter(ctx context.Context, req SetCPUAllocationParameterRequest) (bool, error)
- func (a Account) SetCPUAllocationRatio(ctx context.Context, req SetCPUAllocationRatioRequest) (bool, error)
- func (a Account) Update(ctx context.Context, req UpdateRequest) (bool, error)
- func (a Account) UpdateResourceTypes(ctx context.Context, req UpdateResourceTypesRequest) (bool, error)
- func (a Account) UpdateUser(ctx context.Context, req UpdateUserRequest) (bool, error)
- type AddUserRequest
- type AuditsRequest
- type Computes
- type Consumed
- type CreateRequest
- type DeleteAccountsRequest
- type DeleteRequest
- type DeleteUserRequest
- type DisableAccountsRequest
- type DisableRequest
- type DiskUsage
- type EnableAccountsRequest
- type EnableRequest
- type GetRequest
- type InfoAccount
- type ItemAccount
- type ItemAudit
- type ItemCompute
- type ItemDisk
- type ItemFLIPGroup
- type ItemRG
- type ItemVINS
- type Limits
- type ListAccounts
- func (la ListAccounts) FilterByCompany(company string) ListAccounts
- func (la ListAccounts) FilterByCreatedBy(createdBy string) ListAccounts
- func (la ListAccounts) FilterByID(id uint64) ListAccounts
- func (la ListAccounts) FilterByName(name string) ListAccounts
- func (la ListAccounts) FilterByStatus(status string) ListAccounts
- func (la ListAccounts) FilterByUserGroupID(userGroupID string) ListAccounts
- func (la ListAccounts) FilterFunc(predicate func(ItemAccount) bool) ListAccounts
- func (la ListAccounts) FindOne() ItemAccount
- func (la ListAccounts) Serialize(params ...string) (serialization.Serialized, error)
- func (la ListAccounts) SortByCreatedTime(inverse bool) ListAccounts
- func (la ListAccounts) SortByDeletedTime(inverse bool) ListAccounts
- func (la ListAccounts) SortByUpdatedTime(inverse bool) ListAccounts
- type ListAudits
- type ListComputes
- type ListComputesRequest
- type ListDeletedRequest
- type ListDisks
- type ListDisksRequest
- type ListFLIPGroups
- type ListFLIPGroupsRequest
- type ListRG
- type ListRGRequest
- type ListRequest
- type ListVINS
- type ListVINSRequest
- type RGResuorces
- type RecordAccount
- type RecordResources
- type Resource
- type ResourceLimits
- type RestoreRequest
- type SetCPUAllocationParameterRequest
- type SetCPUAllocationRatioRequest
- type UpdateRequest
- type UpdateResourceTypesRequest
- type UpdateUserRequest
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 (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) DeleteAccounts ¶
DeleteAccounts destroy a group of accounts
func (Account) DeleteUser ¶
DeleteUser revokes user access from the account
func (Account) DisableAccounts ¶
DisableAccounts disables accounts
func (Account) EnableAccounts ¶
EnableAccounts enables accounts
func (Account) Get ¶
func (a Account) Get(ctx context.Context, req GetRequest) (*RecordAccount, error)
Get gets information about account
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) ListVINS ¶
ListVINS gets list all ViNSes under specified account, accessible by the user
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) UpdateResourceTypes ¶
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" 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"` }
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" validate:"required"` }
Request struct for give list account audits
type Computes ¶
type Computes struct { // Started Started uint64 `json:"Started"` // Stopped Stopped uint64 `json:"Stopped"` }
Computes info
type Consumed ¶
type Consumed struct { // Number of CPU CPU uint64 `json:"cpu"` // Disk size DiskSize uint64 `json:"disksize"` // Disk size max DiskSizeMax int64 `json:"disksizemax"` // External IPs ExtIPs uint64 `json:"extips"` // External traffic ExtTraffic uint64 `json:"exttraffic"` // Number of GPU GPU uint64 `json:"gpu"` // Number of RAM RAM uint64 `json:"ram"` // SEPs SEPs map[string]map[string]DiskUsage `json:"seps"` }
Consumed
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"` }
Request 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: true Reason string `url:"reason" json:"reason" validate:"required"` // Whether to completely destroy accounts or not // Required: false Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` }
Request struct for delete group 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: true Reason string `url:"reason" json:"reason" validate:"required"` // 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" 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,omitempty" json:"recursivedelete,omitempty"` }
Request struct for revoke access to account
type DisableAccountsRequest ¶
type DisableAccountsRequest struct { // IDs of accounts // Required: true AccountIDs []uint64 `url:"accountIds" json:"accountIds" validate:"min=1"` }
Request struct for disable group 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" json:"reason" validate:"required"` }
Request struct for disable account
type DiskUsage ¶
type DiskUsage struct { // Disk size DiskSize float64 `json:"disksize"` // Disk size max DiskSizeMax uint64 `json:"disksizemax"` }
Disk usage
type EnableAccountsRequest ¶
type EnableAccountsRequest struct { // IDs od accounts // Required: true AccountIDs []uint64 `url:"accountIds" json:"accountIds" validate:"min=1"` }
Request for enable group 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" json:"reason" validate:"required"` }
Request struct for enable account
type GetRequest ¶
type GetRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for get information about account
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 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 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 []ItemAccount
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 ListAccounts 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 ListComputesRequest ¶
type ListComputesRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
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" validate:"required"` }
Request struct for get list deleted disks
type ListFLIPGroupsRequest ¶
type ListFLIPGroupsRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for get list FLIPGroups
type ListRGRequest ¶
type ListRGRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
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 ListVINSRequest ¶
type ListVINSRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for get list VINS
type RGResuorces ¶
type RGResuorces struct { // Consumed Consumed Consumed `json:"Consumed"` // Limits Limits Limits `json:"Limits"` // Reserved Reserved Resource `json:"Reserved"` }
Resources of resource group
type RecordAccount ¶
type RecordAccount struct { // Resources Resources RecordResources `json:"Resources"` // Main information about account InfoAccount }
Deatailed information about account
type RecordResources ¶
type Resource ¶
type Resource struct { // Number of cores CPU int64 `json:"cpu"` // Disk size DiskSize float64 `json:"disksize"` // Disk size max 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"` }
type ResourceLimits ¶
type ResourceLimits struct { // CuC CuC float64 `json:"CU_C"` // CuD CuD float64 `json:"CU_D"` // 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: true Reason string `url:"reason" json:"reason" validate:"required"` }
Request struct for 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"` }
Request 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 // Required: true Ratio float64 `url:"ratio" json:"ratio" validate:"required"` }
Request for setting CPU allocation ratio
type UpdateRequest ¶
type UpdateRequest struct { // ID of account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Display name // Required: false Name string `url:"name" json:"name"` // Name of the account // Required: true Username string `url:"username,omitempty" json:"username,omitempty"` // 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"` }
Request struct for 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"` }
Request struct for 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"` }
Request struct for update user access rights
Source Files
¶
- account.go
- add_user.go
- audits.go
- create.go
- delete.go
- delete_accounts.go
- delete_user.go
- disable.go
- disable_accounts.go
- enable.go
- enable_accounts.go
- filter.go
- get.go
- list.go
- list_computes.go
- list_deleted.go
- list_disks.go
- list_flip_groups.go
- list_rg.go
- list_vins.go
- models.go
- restore.go
- serialize.go
- set_cpu_allocation_parameter.go
- set_cpu_allocation_ratio.go
- sorting.go
- update.go
- update_resource_types.go
- update_user.go