Documentation ¶
Index ¶
- Variables
- type ActionOpts
- type ActionResult
- type CreatResult
- type CreateOpts
- type Errors
- type FilterResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type ListResult
- type Match
- type MigrateResourceOpts
- type MigrateResult
- type Project
- type Projects
- type ResourceOpts
- type ResourceResult
- type Resources
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type ActionOpts ¶
type ActionOpts struct { // enable: Enable an enterprise project. // disable: Disable an enterprise project. Action string `json:"action" required:"true"` }
type ActionResult ¶
type ActionResult struct {
// contains filtered or unexported fields
}
type CreatResult ¶
type CreatResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (r CreatResult)
Create accepts a CreateOpts struct and uses the values to create a new enterprise project.
type CreateOpts ¶
type CreateOpts struct { // A name can contain 1 to 64 characters. // Only letters, digits, underscores (_), and hyphens (-) are allowed. // The name must be unique in the domain and cannot include any form of // the word "default" ("deFaulT", for instance). Name string `json:"name" required:"true"` //Resource set. The value can contain 1 to 36 characters, //including only lowercase letters, digits, and hyphens (-). ProjectId string `json:"project_id" required:"true"` // A description can contain a maximum of 512 characters. Description string `json:"description"` }
CreateOpts allows to create a enterprise project using given parameters.
type FilterResult ¶
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
type ListOpts ¶
type ListOpts struct { Name string `q:"name"` ID string `q:"id"` IDs string `q:"ids"` DomainId string `q:"domain_id"` VdcId string `q:"vdc_id"` Inherit bool `q:"inherit"` ProjectId string `q:"project_id"` Type string `q:"type"` Status int `q:"status"` QueryType string `q:"query_type"` AuthAction string `q:"auth_action"` ContainDefault bool `q:"contain_default"` Offset string `q:"offset"` Limit string `q:"limit"` SortKey string `q:"sort_key"` SortDir string `q:"sort_dir"` }
func (ListOpts) ToEnterpriseProjectListQuery ¶
type ListOptsBuilder ¶
type ListResult ¶
type ListResult struct {
golangsdk.Result
}
func List ¶
func List(c *golangsdk.ServiceClient, opts ListOptsBuilder) (r ListResult)
func (ListResult) Extract ¶
func (r ListResult) Extract() ([]Project, error)
type MigrateResourceOpts ¶
type MigrateResourceOpts struct { ResourceId string `json:"resource_id" required:"true"` ResourceType string `json:"resource_type" required:"true"` // this filed is required when resource_type is bucket RegionId string `json:"region_id,omitempty"` // this filed is required when resource_type is region level ProjectId string `json:"project_id,omitempty"` // only support for EVS、EIP Associated *bool `json:"associated,omitempty"` }
type MigrateResult ¶
type MigrateResult struct {
// contains filtered or unexported fields
}
func Migrate ¶
func Migrate(client *golangsdk.ServiceClient, opts MigrateResourceOpts, id string) (r MigrateResult)
type Project ¶
type Project struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` DeleteFlag bool `json:"delete_flag"` Status int `json:"status"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DomainId string `json:"domain_id"` VdcId string `json:"vdc_id"` ProjectId string `json:"project_id"` DomainName string `json:"domain_name"` VdcName string `json:"vdc_name"` ProjectName string `json:"project_name"` }
type ResourceOpts ¶
type ResourceResult ¶
type ResourceResult struct {
// contains filtered or unexported fields
}
type Resources ¶
type Resources struct { EnterpriseProjectId string `json:"enterprise_project_id"` ProjectId string `json:"project_id"` ProjectName string `json:"project_name"` ResourceDetail interface{} `json:"-"` ResourceId string `json:"resource_id"` ResourceName string `json:"resource_name"` ResourceType string `json:"resource_type"` }
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
func Update ¶
func Update(client *golangsdk.ServiceClient, opts CreateOpts, id string) (r UpdateResult)
Update accepts a CreateOpts struct and uses the values to Update a enterprise project.
Click to show internal directories.
Click to hide internal directories.