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 IPv6Bandwidth
- 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
}
ActionResult 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:"true"` SecurityGroup []SecurityGroupOpts `json:"security_groups,omitempty"` VpcID string `json:"vpc_id" required:"true"` 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"` IsDeleteVolume *bool `json:"delete_volume,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` MultiAZPriorityPolicy string `json:"multi_az_priority_policy,omitempty"` }
CreateOpts is a struct contains the parameters of creating group
func (CreateOpts) ToGroupCreateMap ¶
func (opts CreateOpts) ToGroupCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
CreateOptsBuilder is an interface from which can build the request of creating group
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult is a struct returned by Create request
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create is a method of creating group
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult contains the body of the deleting group request
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete is a method of deleting a group by group id
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
GetResult 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"` DeleteVolume bool `json:"delete_volume"` CloudLocationID string `json:"cloud_location_id"` EnterpriseProjectID string `json:"enterprise_project_id"` ActivityType string `json:"activity_type"` MultiAZPriorityPolicy string `json:"multi_az_priority_policy"` }
Group represents the struct of one autoscaling group
func ExtractGroups ¶ added in v0.3.1
func ExtractGroups(r pagination.Page) ([]Group, error)
ExtractGroups returns a slice of AS Groups contained in a single page of results.
type GroupPage ¶
type GroupPage struct {
pagination.SinglePageBase
}
type IPv6Bandwidth ¶ added in v0.3.1
type IPv6Bandwidth struct {
ID string `json:"id"`
}
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"` StartNumber int `q:"start_number"` Limit int `q:"limit"` EnterpriseProjectID string `q:"enterprise_project_id"` }
func (ListOpts) ToGroupListQuery ¶
ToGroupListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
type Network ¶
type Network struct { ID string `json:"id"` IPv6Enable bool `json:"ipv6_enable"` IPv6Bandwidth IPv6Bandwidth `json:"ipv6_bandwidth"` }
type NetworkOpts ¶
type NetworkOpts struct {
ID string `json:"id" required:"true"`
}
type SecurityGroup ¶
type SecurityGroup struct {
ID string `json:"id"`
}
type SecurityGroupOpts ¶
type SecurityGroupOpts struct {
ID string `json:"id" required:"true"`
}
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"` 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"` IsDeleteVolume *bool `json:"delete_volume,omitempty"` ConfigurationID string `json:"scaling_configuration_id,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,omitempty"` MultiAZPriorityPolicy string `json:"multi_az_priority_policy,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 parameter of update function
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult is a struct from which can get the result of Update request
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