Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, groupID string, opts ListOptsBuilder) pagination.Pager
List is a method by which can be able to access the list function that can get instances of a group
Types ¶
type BatchOpts ¶
type BatchOpts struct { Instances []string `json:"instances_id" required:"true"` IsDeleteEcs string `json:"instance_delete,omitempty"` Action string `json:"action,omitempty"` }
BatchOpts is a struct which represents parameters of batch operations
func (BatchOpts) ToInstanceBatchMap ¶
type BatchOptsBuilder ¶
BatchOptsBuilder is an interface which can build the query body of batch operation
type BatchResult ¶
type BatchResult struct {
golangsdk.ErrResult
}
BatchResult is a struct which contains the result of batch operations
func BatchAdd ¶
func BatchAdd(client *golangsdk.ServiceClient, groupID string, instances []string) (r BatchResult)
BatchAdd is a method by which can add numbers of instances into a group
func BatchDelete ¶
func BatchDelete(client *golangsdk.ServiceClient, groupID string, instances []string, deleteEcs string) (r BatchResult)
BatchDelete is a method by which can delete numbers of instances from a group
type DeleteOpts ¶
type DeleteOpts struct {
DeleteInstance bool `q:"instance_delete"`
}
func (DeleteOpts) ToInstanceDeleteQuery ¶
func (opts DeleteOpts) ToInstanceDeleteQuery() (string, error)
type DeleteOptsBuilder ¶
DeleteOptsBuilder is an interface by whick can be able to build the query string of instance deletion
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult is a struct which contains the result of deletion instance
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string, opts DeleteOptsBuilder) (r DeleteResult)
Delete is a method by which can be able to delete an instance from a group
type Instance ¶
type Instance struct { ID string `json:"instance_id"` Name string `json:"instance_name"` GroupID string `json:"scaling_group_id"` GroupName string `json:"scaling_group_name"` LifeCycleStatus string `json:"life_cycle_state"` HealthStatus string `json:"health_status"` ConfigurationName string `json:"scaling_configuration_name"` ConfigurationID string `json:"scaling_configuration_id"` CreateTime string `json:"create_time"` }
Instance is a struct which represents all the infromation of a instance
type InstancePage ¶
type InstancePage struct {
pagination.SinglePageBase
}
InstancePage is a struct which can do the page function
func (InstancePage) Extract ¶
func (r InstancePage) Extract() ([]Instance, error)
func (InstancePage) IsEmpty ¶
func (r InstancePage) IsEmpty() (bool, error)
IsEmpty returns true if a instances number equal to 0.
type ListOpts ¶
type ListOpts struct { LifeCycleStatus string `q:"life_cycle_state"` HealthStatus string `q:"health_status"` }
func (ListOpts) ToInstancesListQuery ¶
type ListOptsBuilder ¶
ListOptsBuilder is an interface by which can be able to build the query string of the list function