Documentation ¶
Index ¶
- Variables
- type ActionOpts
- type ActionResult
- type CreatResult
- type CreateOpts
- type Errors
- type FilterResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type ListResourcesOpts
- type ListResult
- type Match
- type MigrateResourceOpts
- type MigrateResult
- type Project
- type Projects
- type Resource
- type ResourceResult
- 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
}
func Action ¶
func Action(client *golangsdk.ServiceClient, opts ActionOpts, id string) (r ActionResult)
Update accepts a ActionOpts struct and uses the values to enable or diaable a enterprise project.
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"` // A description can contain a maximum of 512 characters. Description string `json:"description"` // Specifies the enterprise project type. // The options are as follows: // poc: indicates a test project. // prod: indicates a commercial project. Type string `json:"type,omitempty"` }
CreateOpts allows to create a enterprise project using given parameters.
type FilterResult ¶
type FilterResult struct { Resources []Resource `json:"resources"` Errors []Errors `json:"errors"` TotalCount int32 `json:"total_count"` }
func ListAssociatedResources ¶
func ListAssociatedResources(client *golangsdk.ServiceClient, opts ListResourcesOpts) (*FilterResult, error)
ListAssociatedResources is a method that used to query associated resources for specified enterprise project using given parameters.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
type ListOpts ¶
type ListOpts struct { Name string `q:"name"` ID string `q:"id"` Status int `q:"status"` Type string `q:"type"` SortKey string `q:"sort_key"` SortDir string `q:"sort_dir"` }
func (ListOpts) ToEnterpriseProjectListQuery ¶
type ListOptsBuilder ¶
type ListResourcesOpts ¶
type ListResourcesOpts struct { // Target enterprise project ID. EnterpriseProjectId string `json:"-" required:"true"` ResourceTypes []string `json:"resource_types" required:"true"` Projects []string `json:"projects,omitempty"` Offset int32 `json:"offset,omitempty"` Limit int32 `json:"limit,omitempty"` Matches []Match `json:"matches,omitempty"` }
type ListResult ¶
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 Resource ¶
type Resource 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 ResourceResult ¶
type ResourceResult struct {
// contains filtered or unexported fields
}
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.