Documentation ¶
Index ¶
- func List(client *golangsdk.ServiceClient, ops ListOptsBuilder) pagination.Pager
- type ActionOpts
- type ActionOptsBuilder
- type ActionResult
- type AddressPair
- type AddressPairOpts
- type BandWidth
- type BandWidthOpts
- 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 ¶
ActionResult 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 AddressPair ¶
type AddressPair struct {
IpAddress string `json:"ip_address"`
}
type AddressPairOpts ¶
type AddressPairOpts struct {
IpAddress string `json:"ip_address,omitempty"`
}
type BandWidthOpts ¶
type BandWidthOpts struct {
ID string `json:"id" required:"true"`
}
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"` VpcID string `json:"vpc_id" required:"ture"` Networks []NetworkOpts `json:"networks" required:"ture"` 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"` IsDeleteVolume bool `json:"delete_volume,omitempty"` MultiAZPriorityPolicy string `json:"multi_az_priority_policy,omitempty"` Description string `json:"description,omitempty"` IamAgencyName string `json:"iam_agency_name,omitempty"` EnterpriseProjectID string `json:"enterprise_project_id,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 ¶
CreateResult is a struct retured by CreateGroup request
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create 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 ¶
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
func ForceDelete ¶
func ForceDelete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
ForceDelete is a method of force deleting a group by group id
type GetResult ¶
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"` ActivityType string `json:"activity_type"` MultiAZPriorityPolicy string `json:"multi_az_priority_policy"` Description string `json:"description"` IamAgencyName string `json:"iam_agency_name"` EnterpriseProjectID string `json:"enterprise_project_id"` }
Group represents the struct of one autoscaling group
type GroupPage ¶
type GroupPage struct {
pagination.SinglePageBase
}
type LBaaSListener ¶
type LBaaSListenerOpts ¶
type LBaaSListenerOpts struct { PoolID string `json:"pool_id" required:"true"` ProtocolPort int `json:"protocol_port" required:"true"` Weight int `json:"weight,omitempty"` // Field `protocol_version` cannot be specified to empty string. This filed must be `IPv4` or `IPv6` ProtocolVersion string `json:"protocol_version,omitempty"` }
type ListOpts ¶
type ListOpts struct { Name string `q:"scaling_group_name"` ConfigurationID string `q:"scaling_configuration_id"` Status string `q:"scaling_group_status"` 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 BandWidth `json:"ipv6_bandwidth"` AllowedAddressPairs []AddressPair `json:"allowed_address_pairs"` }
type NetworkOpts ¶
type NetworkOpts struct { ID string `json:"id,omitempty"` IPv6Enable bool `json:"ipv6_enable,omitempty"` IPv6BandWidth *BandWidthOpts `json:"ipv6_bandwidth,omitempty"` AllowedAddressPairs []AddressPairOpts `json:"allowed_address_pairs,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"` IsDeleteVolume *bool `json:"delete_volume,omitempty"` ConfigurationID string `json:"scaling_configuration_id,omitempty"` MultiAZPriorityPolicy string `json:"multi_az_priority_policy,omitempty"` Description *string `json:"description,omitempty"` IamAgencyName string `json:"iam_agency_name,omitempty"` EnterpriseProjectID string `json:"enterprise_project_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 ¶
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