Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, ops ListOptsBuilder) pagination.Pager
- type ActionOpts
- type ActionOptsBuilder
- type ActionResult
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type Group
- type GroupPage
- type LBaaSListener
- type LBaaSListenerOpts
- type ListOpts
- type ListOptsBuilder
- type Network
- type NetworkOpts
- type SecurityGroup
- type SecurityGroupOpts
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, ops ListOptsBuilder) pagination.Pager
Types ¶
type ActionOpts ¶
type ActionOpts struct {
Action string `json:"action" required:"true"`
}
func (ActionOpts) ToActionMap ¶
func (opts ActionOpts) ToActionMap() (map[string]interface{}, error)
type ActionOptsBuilder ¶
type ActionResult ¶
type ActionResult struct {
golangsdk.ErrResult
}
this is the action result which is the result of enable or disable operations
func Disable ¶
func Disable(client *golangsdk.ServiceClient, id string) (r ActionResult)
Disable is an operation by which can be able to pause the group
func Enable ¶
func Enable(client *golangsdk.ServiceClient, id string) (r ActionResult)
Enable is an operation by which can make the group enable service
type CreateOpts ¶
type CreateOpts struct { Name string `json:"scaling_group_name" required:"true"` ConfigurationID string `json:"scaling_configuration_id,omitempty"` DesireInstanceNumber int `json:"desire_instance_number,omitempty"` MinInstanceNumber int `json:"min_instance_number,omitempty"` MaxInstanceNumber int `json:"max_instance_number,omitempty"` CoolDownTime int `json:"cool_down_time,omitempty"` LBListenerID string `json:"lb_listener_id,omitempty"` LBaaSListeners []LBaaSListenerOpts `json:"lbaas_listeners,omitempty"` AvailableZones []string `json:"available_zones,omitempty"` Networks []NetworkOpts `json:"networks" required:"ture"` SecurityGroup []SecurityGroupOpts `json:"security_groups" required:"ture"` VpcID string `json:"vpc_id" required:"ture"` HealthPeriodicAuditMethod string `json:"health_periodic_audit_method,omitempty"` HealthPeriodicAuditTime int `json:"health_periodic_audit_time,omitempty"` HealthPeriodicAuditGrace int `json:"health_periodic_audit_grace_period,omitempty"` InstanceTerminatePolicy string `json:"instance_terminate_policy,omitempty"` Notifications []string `json:"notifications,omitempty"` IsDeletePublicip bool `json:"delete_publicip,omitempty"` }
CreateGroupOps is a struct contains the parameters of creating group
func (CreateOpts) ToGroupCreateMap ¶
func (opts CreateOpts) ToGroupCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
CreateGroupBuilder is an interface from which can build the request of creating group
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
CreateGroupResult is a struct retured by CreateGroup request
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
CreateGroup is a method of creating group
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (string, error)
Extract the create group result as a string type.
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteGroupResult contains the body of the deleting group request
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
DeleteGroup is a method of deleting a group by group id
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
GetGroupResult contains the body of getting detailed group request
type Group ¶
type Group struct { Name string `json:"scaling_group_name"` ID string `json:"scaling_group_id"` Status string `json:"scaling_group_status"` ConfigurationID string `json:"scaling_configuration_id"` ConfigurationName string `json:"scaling_configuration_name"` ActualInstanceNumber int `json:"current_instance_number"` DesireInstanceNumber int `json:"desire_instance_number"` MinInstanceNumber int `json:"min_instance_number"` MaxInstanceNumber int `json:"max_instance_number"` CoolDownTime int `json:"cool_down_time"` LBListenerID string `json:"lb_listener_id"` LBaaSListeners []LBaaSListener `json:"lbaas_listeners"` AvailableZones []string `json:"available_zones"` Networks []Network `json:"networks"` SecurityGroups []SecurityGroup `json:"security_groups"` CreateTime string `json:"create_time"` VpcID string `json:"vpc_id"` Detail string `json:"detail"` IsScaling bool `json:"is_scaling"` HealthPeriodicAuditMethod string `json:"health_periodic_audit_method"` HealthPeriodicAuditTime int `json:"health_periodic_audit_time"` HealthPeriodicAuditGrace int `json:"health_periodic_audit_grace_period"` InstanceTerminatePolicy string `json:"instance_terminate_policy"` Notifications []string `json:"notifications"` DeletePublicip bool `json:"delete_publicip"` CloudLocationID string `json:"cloud_location_id"` }
Group represents the struct of one autoscaling group
type GroupPage ¶
type GroupPage struct {
pagination.SinglePageBase
}
type LBaaSListener ¶
type LBaaSListenerOpts ¶
type ListOpts ¶
type ListOpts struct { Name string `q:"scaling_group_name"` ConfigurationID string `q:"scaling_configuration_id"` Status string `q:"scaling_group_status"` }
func (ListOpts) ToGroupListQuery ¶
ToGroupListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
type NetworkOpts ¶
type NetworkOpts struct {
ID string `json:"id,omitempty"`
}
type SecurityGroup ¶
type SecurityGroup struct {
ID string `json:"id"`
}
type SecurityGroupOpts ¶
type SecurityGroupOpts struct {
ID string `json:"id,omitempty"`
}
type UpdateOpts ¶
type UpdateOpts struct { Name string `json:"scaling_group_name,omitempty"` DesireInstanceNumber int `json:"desire_instance_number"` MinInstanceNumber int `json:"min_instance_number"` MaxInstanceNumber int `json:"max_instance_number"` CoolDownTime int `json:"cool_down_time,omitempty"` LBListenerID string `json:"lb_listener_id,omitempty"` LBaaSListeners []LBaaSListenerOpts `json:"lbaas_listeners,omitempty"` AvailableZones []string `json:"available_zones,omitempty"` Networks []NetworkOpts `json:"networks,omitempty"` SecurityGroup []SecurityGroupOpts `json:"security_groups,omitempty"` HealthPeriodicAuditMethod string `json:"health_periodic_audit_method,omitempty"` HealthPeriodicAuditTime int `json:"health_periodic_audit_time,omitempty"` HealthPeriodicAuditGrace int `json:"health_periodic_audit_grace_period,omitempty"` InstanceTerminatePolicy string `json:"instance_terminate_policy,omitempty"` Notifications []string `json:"notifications,omitempty"` IsDeletePublicip bool `json:"delete_publicip,omitempty"` ConfigurationID string `json:"scaling_configuration_id,omitempty"` }
UpdateOpts is a struct which represents the parameters of update function
func (UpdateOpts) ToGroupUpdateMap ¶
func (opts UpdateOpts) ToGroupUpdateMap() (map[string]interface{}, error)
type UpdateOptsBuilder ¶
UpdateOptsBuilder is an interface which can build the map paramter of update function
type UpdateResult ¶
type UpdateResult struct {
golangsdk.Result
}
UpdateResult is a struct from which can get the result of udpate method
func Update ¶
func Update(client *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update is a method which can be able to update the group via accessing to the autoscaling service with Put method and parameters
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (string, error)
Extract will deserialize the result to group id with string