// ResourceType represents the ID of a resource type (for limits)
typeResourceTypestring
const(
// VirtualMachineType is the resource type ID of a VM
VirtualMachineTypeResourceType="0"
// IPAddressType is the resource type ID of an IP address
IPAddressTypeResourceType="1"
// VolumeType is the resource type ID of a volume
VolumeTypeResourceType="2"
// SnapshotType is the resource type ID of a snapshot
SnapshotTypeResourceType="3"
// TemplateType is the resource type ID of a template
TemplateTypeResourceType="4"
// ProjectType is the resource type ID of a project
ProjectTypeResourceType="5"
// NetworkType is the resource type ID of a network
NetworkTypeResourceType="6"
// VPCType is the resource type ID of a VPC
VPCTypeResourceType="7"
// CPUType is the resource type ID of a CPU
CPUTypeResourceType="8"
// MemoryType is the resource type ID of Memory
MemoryTypeResourceType="9"
// PrimaryStorageType is the resource type ID of primary storage
PrimaryStorageTypeResourceType="10"
// SecondaryStorageType is the resource type ID of secondary storage
SecondaryStorageTypeResourceType="11"
)
// ResourceLimit represents the limit on a particular resource
typeResourceLimitstruct{
Accountstring`json:"account,omitempty" doc:"the account of the resource limit"`
Domainstring`json:"domain,omitempty" doc:"the domain name of the resource limit"`
DomainIDstring`json:"domainid,omitempty" doc:"the domain ID of the resource limit"`
Maxint64`json:"max,omitempty" doc:"the maximum number of the resource. A -1 means the resource currently has no limit."`
ResourceTypeResourceType`json:"resourcetype,omitempty" doc:"resource type. Values include 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11. See the resourceType parameter for more information on these values."`
ResourceTypeNamestring`json:"resourcetypename,omitempty" doc:"resource type name. Values include user_vm, public_ip, volume, snapshot, template, project, network, vpc, cpu, memory, primary_storage, secondary_storage."`
}
// APILimit represents the limit count
typeAPILimitstruct{
Accountstring`json:"account,omitempty" doc:"the account name of the api remaining count"`
Accountidstring`json:"accountid,omitempty" doc:"the account uuid of the api remaining count"`
APIAllowedint`json:"apiAllowed,omitempty" doc:"currently allowed number of apis"`
APIIssuedint`json:"apiIssued,omitempty" doc:"number of api already issued"`
ExpireAfterint64`json:"expireAfter,omitempty" doc:"seconds left to reset counters"`
Accountstring`json:"account,omitempty" doc:"list resources by account. Must be used with the domainId parameter."`
DomainIDstring`json:"domainid,omitempty" doc:"list only resources belonging to the domain specified"`
IDint64`json:"id,omitempty" doc:"Lists resource limits by ID."`
IsRecursive*bool`json:"isrecursive,omitempty" doc:"defaults to false, but if true, lists all resources from the parent specified by the domainId till leaves."`
Keywordstring`json:"keyword,omitempty" doc:"List by keyword"`
ListAll*bool`json:"listall,omitempty" doc:"If set to false, list only resources belonging to the command's caller; if set to true - list resources that the caller is authorized to see. Default value is false"`
Pageint`json:"page,omitempty"`
PageSizeint`json:"pagesize,omitempty"`
ResourceTypeResourceType`json:"resourcetype,omitempty" doc:"Type of resource. Values are 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 and 11. 0 - Instance. Number of instances a user can create. 1 - IP. Number of public IP addresses an account can own. 2 - Volume. Number of disk volumes an account can own. 3 - Snapshot. Number of snapshots an account can own. 4 - Template. Number of templates an account can register/create. 5 - Project. Number of projects an account can own. 6 - Network. Number of networks an account can own. 7 - VPC. Number of VPC an account can own. 8 - CPU. Number of CPU an account can allocate for his resources. 9 - Memory. Amount of RAM an account can allocate for his resources. 10 - PrimaryStorage. Total primary storage space (in GiB) a user can use. 11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use. 12 - Elastic IP. Number of public elastic IP addresses an account can own. 13 - SMTP. If the account is allowed SMTP outbound traffic."`
ResourceTypeNamestring`json:"resourcetypename,omitempty" doc:"Type of resource (wins over resourceType if both are provided). Values are: user_vm - Instance. Number of instances a user can create. public_ip - IP. Number of public IP addresses an account can own. volume - Volume. Number of disk volumes an account can own. snapshot - Snapshot. Number of snapshots an account can own. template - Template. Number of templates an account can register/create. project - Project. Number of projects an account can own. network - Network. Number of networks an account can own. vpc - VPC. Number of VPC an account can own. cpu - CPU. Number of CPU an account can allocate for his resources. memory - Memory. Amount of RAM an account can allocate for his resources. primary_storage - PrimaryStorage. Total primary storage space (in GiB) a user can use. secondary_storage - SecondaryStorage. Total secondary storage space (in GiB) a user can use. public_elastic_ip - IP. Number of public elastic IP addresses an account can own. smtp - SG. If the account is allowed SMTP outbound traffic."`
Accountstring`json:"account,omitempty" doc:"Update resource for a specified account. Must be used with the domainId parameter."`
DomainIDstring`json:"domainid,omitempty" doc:"Update resource limits for all accounts in specified domain. If used with the account parameter, updates resource limits for a specified account in specified domain."`
ResourceTypeResourceType`json:"resourcetype" doc:"Type of resource to update. Values are 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 and 11. 0 - Instance. Number of instances a user can create. 1 - IP. Number of public IP addresses a user can own. 2 - Volume. Number of disk volumes a user can create. 3 - Snapshot. Number of snapshots a user can create. 4 - Template. Number of templates that a user can register/create. 6 - Network. Number of guest network a user can create. 7 - VPC. Number of VPC a user can create. 8 - CPU. Total number of CPU cores a user can use. 9 - Memory. Total Memory (in MB) a user can use. 10 - PrimaryStorage. Total primary storage space (in GiB) a user can use. 11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use."`
_bool`name:"updateResourceLimit" description:"Updates resource limits for an account or domain."`