Documentation
¶
Index ¶
- func BatchAdd(client *golangsdk.ServiceClient, groupID string, instances []string) error
- func BatchDelete(client *golangsdk.ServiceClient, groupID string, instances []string, ...) error
- func Delete(client *golangsdk.ServiceClient, id string, opts DeleteOpts) error
- type BatchOpts
- type DeleteOpts
- type Instance
- type ListOpts
- type ListOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchDelete ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string, opts DeleteOpts) error
Types ¶
type BatchOpts ¶
type BatchOpts struct { // Specifies the ECS ID. Instances []string `json:"instances_id" required:"true"` // Specifies whether to delete an instance when it is removed from an AS group. // Options: // no (default): The instance will not be deleted. // yes: The instance will be deleted. // This parameter takes effect only when the action is set to REMOVE. IsDeleteEcs 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,omitempty"` }
type DeleteOpts ¶
type DeleteOpts struct {
DeleteInstance bool `q:"instance_delete"`
}
type Instance ¶
type Instance struct { // Specifies the instance ID. ID string `json:"instance_id"` // Specifies the instance name. Name string `json:"instance_name"` // Specifies the ID of the AS group to which the instance belongs. GroupID string `json:"scaling_group_id"` // Specifies the name of the AS group to which the instance belongs. // Supports fuzzy search. GroupName string `json:"scaling_group_name"` // Specifies the instance lifecycle status in the AS group. // INSERVICE: The instance is enabled. // PENDING: The instance is being added to the AS group. // REMOVING: The instance is being removed from the AS group. LifeCycleStatus string `json:"life_cycle_state"` // Specifies the instance health status. // INITIALIZING: The instance is being initialized. // NORMAL: The instance is functional. // ERROR: The instance is faulty. HealthStatus string `json:"health_status"` // Specifies the AS configuration name. ConfigurationName string `json:"scaling_configuration_name"` // Specifies the AS configuration ID. // If the returned value is not empty, the instance is an ECS automatically created in a scaling action. // If the returned value is empty, the instance is an ECS manually added to the AS group. ConfigurationID 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"` }
type ListOptsBuilder ¶
Click to show internal directories.
Click to hide internal directories.