Documentation ¶
Index ¶
- func ActionURL(c *gophercloud.ServiceClient, scalingGroupId string) string
- func DeleteURL(c *gophercloud.ServiceClient, instanceId string) string
- func List(client *gophercloud.ServiceClient, scalingGroupId string, opts ListOptsBuilder) pagination.Pager
- func ListURL(c *gophercloud.ServiceClient, scalingGroupId string) string
- type ActionOpts
- type ActionOptsBuilder
- type ActionResult
- type DeleteOpts
- type DeleteOptsBuilder
- type DeleteResult
- type InstancePage
- type ListOpts
- type ListOptsBuilder
- type ListResponse
- type ScalingGroupInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionURL ¶
func ActionURL(c *gophercloud.ServiceClient, scalingGroupId string) string
func DeleteURL ¶
func DeleteURL(c *gophercloud.ServiceClient, instanceId string) string
func List ¶
func List(client *gophercloud.ServiceClient, scalingGroupId string, opts ListOptsBuilder) pagination.Pager
func ListURL ¶
func ListURL(c *gophercloud.ServiceClient, scalingGroupId string) string
Types ¶
type ActionOpts ¶
type ActionOpts struct { // Specifies the ECS ID. InstancesId []string `json:"instances_id" required:"true"` // Specifies whether to delete ECS instances when they are removed // from an AS group. The value can be no (default) or yes.This parameter takes effect // only when the action is set to REMOVE. InstanceDelete string `json:"instance_delete,omitempty"` // Specifies an action to be performed on instances in batches. // The options are as follows:ADD: adds instances to the AS group.REMOVE: removes // instances from the AS group.PROTECT: enables instance protection.UNPROTECT: disables // instance protection. Action string `json:"action" required:"true"` }
func (ActionOpts) ToInstancesActionMap ¶
func (opts ActionOpts) ToInstancesActionMap() (map[string]interface{}, error)
type ActionOptsBuilder ¶
type ActionResult ¶
type ActionResult struct {
gophercloud.ErrResult
}
func Action ¶
func Action(client *gophercloud.ServiceClient, scalingGroupId string, opts ActionOptsBuilder) (r ActionResult)
type DeleteOpts ¶
type DeleteOpts struct { // Specifies whether the instances are deleted when they are // removed from the AS group. The value can be yes or no (default). InstanceDelete string `q:"instance_delete" required:"true"` }
func (DeleteOpts) ToDeleteQuery ¶
func (opts DeleteOpts) ToDeleteQuery() (string, error)
type DeleteOptsBuilder ¶
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
func Delete ¶
func Delete(client *gophercloud.ServiceClient, instanceId string, opts DeleteOptsBuilder) (r DeleteResult)
type InstancePage ¶
type InstancePage struct {
pagination.NumberPageBase
}
func (InstancePage) IsEmpty ¶
func (r InstancePage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult contains no services.
func (InstancePage) LastStartNumber ¶
func (r InstancePage) LastStartNumber() (string, error)
LastStartNumber returns the last service in a ListResult.
type ListOpts ¶
type ListOpts struct { // Specifies the instance lifecycle status in the AS // group.INSERVICE: The instance in the AS group is in use.PENDING: The instance is // being added to the AS group.REMOVING: The instance is being removed from the AS // group.PENDING_WAIT: The instance is waiting to be added to the AS // group.REMOVING_WAIT: The instance is waiting to be removed from the AS group. LifeCycleState string `q:"life_cycle_state"` // Specifies the instance health status.INITIALIZING: The instance // is initializing.NORMAL: The instance is normal.ERROR: The instance is abnormal. HealthStatus string `q:"health_status"` // Specifies the start line number. The default value is 0. StartNumber int `q:"start_number"` // Specifies the total number of query records. The default is 20 // and the maximum is 100. Limit int `q:"limit"` ProtectFromScalingDown string `q:"protect_from_scaling_down"` }
func (ListOpts) ToListQuery ¶
type ListOptsBuilder ¶
type ListResponse ¶
type ListResponse struct { // Specifies the total number of query records. TotalNumber int `json:"total_number"` // Specifies the start line number. StartNumber int `json:"start_number"` // Specifies the number of query records. Limit int `json:"limit"` // Specifies details about the instances in the AS group. ScalingGroupInstances []ScalingGroupInstance `json:"scaling_group_instances"` }
func ExtractInstances ¶
func ExtractInstances(r pagination.Page) (ListResponse, error)
ExtractInstances is a function that takes a ListResult and returns the services' information.
type ScalingGroupInstance ¶
type ScalingGroupInstance struct { // Specifies the instance ID. InstanceId string `json:"instance_id"` // Specifies the instance name. InstanceName string `json:"instance_name"` // Specifies the ID of the AS group to which the instance // belongs. ScalingGroupId string `json:"scaling_group_id"` // Specifies the name of the AS group to which the instance // belongs. ScalingGroupName string `json:"scaling_group_name"` // Specifies the instance lifecycle status in the AS // group.INSERVICE: The instance in the AS group is in use.PENDING: The instance is // being added to the AS group.PENDING_WAIT: The instance is waiting to be added to the // AS group.REMOVING: The instance is being removed from the AS group.REMOVING_WAIT: The // instance is waiting to be removed from the AS group. LifeCycleState string `json:"life_cycle_state"` // Specifies the instance health status.The status can be NORMAL // or ERROR. HealthStatus string `json:"health_status"` // Specifies the AS configuration name.If the AS configuration has // been deleted, no information is displayed.If the instance is manually added to the AS // group, MANNUAL_ADD is returned. ScalingConfigurationName string `json:"scaling_configuration_name"` // Specifies the AS configuration ID. ScalingConfigurationId string `json:"scaling_configuration_id"` // Specifies the time when the instance is added to the AS group. // The time format complies with UTC. CreateTime string `json:"create_time"` // Specifies the instance protection status. ProtectFromScalingDown bool `json:"protect_from_scaling_down"` }
Click to show internal directories.
Click to hide internal directories.