Documentation ¶
Overview ¶
Package quotas contains functionality for working with Magnum Quota API.
Example to Create a Quota
createOpts := quotas.CreateOpts{ ProjectID: "aa5436ab58144c768ca4e9d2e9f5c3b2", Resource: "Cluster", HardLimit: 10, } quota, err := quotas.Create(serviceClient, createOpts).Extract() if err != nil { panic(err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { ProjectID string `json:"project_id"` Resource string `json:"resource"` HardLimit int `json:"hard_limit"` }
CreateOpts params
func (CreateOpts) ToQuotaCreateMap ¶
func (opts CreateOpts) ToQuotaCreateMap() (map[string]interface{}, error)
ToQuotaCreateMap constructs a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder Builder.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is the response of a Create operations.
func Create ¶
func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create requests the creation of a new quota.
Click to show internal directories.
Click to hide internal directories.