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 DisableEnableRequest) (bool, error)
- func (a Account) Enable(ctx context.Context, req DisableEnableRequest) (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) GetConsumption(ctx context.Context, req GetConsumptionRequest) (string, error)
- func (a Account) GetConsumptionGet(ctx context.Context, req GetConsumptionRequest) (string, error)
- func (a Account) GetReservedAccountUnits(ctx context.Context, req GetReservedAccountUnitsRequest) (*ResourceLimits, error)
- func (a Account) GetResourceConsumption(ctx context.Context, req GetResourceConsumptionRequest) (*RecordResourceConsumption, 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) ListResourceConsumption(ctx context.Context) (*ListResourceConsumption, 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 DisableEnableRequest
- type DiskUsage
- type GetConsumedAccountUnitsRequest
- type GetConsumedCloudUnitsByTypeRequest
- type GetConsumptionRequest
- type GetRequest
- type GetReservedAccountUnitsRequest
- type GetResourceConsumptionRequest
- type ItemAccount
- type ItemAudit
- type ItemCompute
- type ItemDisk
- type ItemFLIPGroup
- type ItemRG
- type ItemResourceConsumption
- type ItemTemplate
- type ItemVINS
- type LimitsRG
- type 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 ListResourceConsumption
- type ListTemplates
- type ListTemplatesRequest
- type ListVINS
- type ListVINSRequest
- type Machines
- type RGComputes
- type RGResources
- type RecordACL
- type RecordAccount
- type RecordResourceConsumption
- type Resource
- type ResourceLimits
- 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_DM: consumed max 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_DM: returns consumed max 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) GetConsumption ¶
GetConsumption downloads the resources tracking files for an account within a given period
func (Account) GetConsumptionGet ¶
GetConsumptionGet 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_DM: reserved max vdisk storage in GB
- CU_I: number of public IPs
func (Account) GetResourceConsumption ¶ added in v1.5.0
func (a Account) GetResourceConsumption(ctx context.Context, req GetResourceConsumptionRequest) (*RecordResourceConsumption, error)
GetResourceConsumption show 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 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) ListResourceConsumption ¶ added in v1.5.0
func (a Account) ListResourceConsumption(ctx context.Context) (*ListResourceConsumption, error)
ListResourceConsumption show data list amount of consumed and reserved resources (cpu, ram, disk) by specific accounts
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" validate:"required"` // Name of the user to be given rights // 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:"required,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 { // 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" 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"` }
Request struct for creating account
type DeleteRequest ¶
type DeleteRequest struct { // ID of account to delete // Required: true AccountID uint64 `url:"accountId" json:"accountId" 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 UserID string `url:"userId" json:"userId" 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 DisableEnableRequest ¶
type DisableEnableRequest struct { // ID of account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for change status of account
type DiskUsage ¶
type DiskUsage struct { // Disk size DiskSize float64 `json:"disksize"` // Disk size max DiskSizeMax float64 `json:"disksizemax"` }
Disk usage
type GetConsumedAccountUnitsRequest ¶
type GetConsumedAccountUnitsRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
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" validate:"required"` // Cloud unit resource type // Required: true CUType string `url:"cutype" json:"cutype" validate:"required,accountCUType"` }
Request struct for calculate the currently consumed cloud units of the specified type for all cloudspaces and resource groups in the account
type GetConsumptionRequest ¶
type GetConsumptionRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Epoch represents the start time // Required: true Start uint64 `url:"start" json:"start" validate:"required"` // Epoch represents the end time // Required: true End uint64 `url:"end" json:"end" validate:"required"` }
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" validate:"required"` }
Request struct for get information about account
type GetReservedAccountUnitsRequest ¶
type GetReservedAccountUnitsRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for calculate the reserved units for all cloudspaces and resource groups in the account
type GetResourceConsumptionRequest ¶ added in v1.5.0
type GetResourceConsumptionRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for getting resource consumption
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
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 { // 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 ItemResourceConsumption ¶ added in v1.5.0
type ItemResourceConsumption struct { // Current information about resources Current Resource `json:"Current"` // Reserved information about resources Reserved Resource `json:"Reserved"` // Account ID AccountID uint64 `json:"id"` }
Information about resources
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 ¶
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 ListAccounts ¶
type ListAccounts struct { Data []ItemAccount `json:"data"` EntryCount uint64 `json:"entryCount"` }
List of accounts
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 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"` }
Request struct for a get list compute instances
type ListDeletedRequest ¶
type ListDeletedRequest struct { // 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 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"` }
Request struct for get list 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"` }
Request struct for get list 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 of the 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"` }
Request struct for get list FLIPGroups
type ListRG ¶
type ListRG struct { // Data Data []ItemRG `json:"data"` // Enrtry 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"` }
Request struct for get list 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"` }
Request struct for get list of accounts
type ListResourceConsumption ¶ added in v1.5.0
type ListResourceConsumption struct { Data []ItemResourceConsumption `json:"data"` EntryCount uint64 `json:"entryCount"` }
type ListTemplates ¶
type ListTemplates struct { // Data Data []ItemTemplate `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of templates
type ListTemplatesRequest ¶
type ListTemplatesRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Include deleted images // Required: false IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Find by image id // Required: false ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` // Find by name // Required: false Name string `url:"name,omitempty" json:"name,omitempty"` // Find by type // 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"` }
Request struct for get list templates
type ListVINS ¶
type ListVINS struct { // Data Data []ItemVINS `json:"data"` // Entry count EntryCount uint64 `json:"entryCount"` }
List of VINS
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:"vins,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"` }
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"` // 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"` // 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"` // Machines Machines Machines `json:"machines"` // 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 []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 RecordResourceConsumption ¶ added in v1.5.0
type RecordResourceConsumption struct { ItemResourceConsumption // Resource limits ResourceLimits ResourceLimits `json:"resourceLimits"` }
Information about resource consumption
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"` // Max disk size, GB CUDM float64 `json:"CU_DM"` // 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 RestoreRequest ¶
type RestoreRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` }
Request struct for restore a deleted account
type UpdateRequest ¶
type UpdateRequest struct { // ID an account // Required: true AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` // Name of the account // Required: false Name string `url:"name,omitempty" json:"name,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" json:"sendAccessEmails"` // Limit (positive) or disable (0) GPU resources // Required: false GPUUnits int64 `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" 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:"required,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
- filter.go
- get.go
- get_consumed_account_units.go
- get_consumed_cloud_units_by_type.go
- get_consumption.go
- get_reserved_account_units.go
- get_resource_consumption.go
- list.go
- list_computes.go
- list_deleted.go
- list_disks.go
- list_flipgroups.go
- list_resource_consumption.go
- list_rg.go
- list_templates.go
- list_vins.go
- models.go
- restore.go
- serialize.go
- sorting.go
- update.go
- update_user.go