ess

package
v0.0.0-...-248df56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ESSDefaultEndpoint is the default API endpoint of ESS services
	ESSDefaultEndpoint = "https://ess.aliyuncs.com"
	ESSAPIVersion      = "2014-08-28"
	ESSServiceCode     = "ess"
)
View Source
const (
	Active    = LifecycleState("Active")
	Inacitve  = LifecycleState("Inactive")
	Deleting  = LifecycleState("Deleting")
	InService = LifecycleState("InService")
	Pending   = LifecycleState("Pending")
	Removing  = LifecycleState("Removing")
)
View Source
const (
	MultiAZPolicyPriority      = MultiAZPolicy("PRIORITY")
	MultiAZPolicyCostOptimized = MultiAZPolicy("COST_OPTIMIZED")
	MultiAZPolicyBalance       = MultiAZPolicy("BALANCE")
)
View Source
const (
	QuantityChangeInCapacity = AdjustmentType("QuantityChangeInCapacity")
	PercentChangeInCapacity  = AdjustmentType("PercentChangeInCapacity")
	TotalCapacity            = AdjustmentType("TotalCapacity")
)
View Source
const (
	Daily   = RecurrenceType("Daily")
	Weekly  = RecurrenceType("Weekly")
	Monthly = RecurrenceType("Monthly")
)
View Source
const DefaultWaitForInterval = 5
View Source
const DefaultWaitTimeout = 120

Default timeout value for WaitForInstance method

Variables

This section is empty.

Functions

This section is empty.

Types

type AdjustmentType

type AdjustmentType string

type AttachInstancesArgs

type AttachInstancesArgs struct {
	ScalingGroupId string
	InstanceId     common.FlattenArray
}

type AttachInstancesResponse

type AttachInstancesResponse struct {
	common.Response
	ScalingActivityId string
}

type Client

type Client struct {
	common.Client
}

func NewClient

func NewClient(accessKeyId, accessKeySecret string) *Client

NewClient creates a new instance of RDS client

func NewClientWithEndpoint

func NewClientWithEndpoint(endpoint string, accessKeyId, accessKeySecret string) *Client

func NewClientWithRegion

func NewClientWithRegion(endpoint string, accessKeyId, accessKeySecret string, regionID common.Region) *Client

func NewESSClient

func NewESSClient(accessKeyId, accessKeySecret string, regionID common.Region) *Client

func (*Client) AttachInstances

func (client *Client) AttachInstances(args *AttachInstancesArgs) (resp *AttachInstancesResponse, err error)

AttachInstances attach instances to scaling group

You can read doc at https://help.aliyun.com/document_detail/25954.html?spm=5176.product25855.6.633.y5gmzX

func (*Client) CreateScalingConfiguration

func (client *Client) CreateScalingConfiguration(args *CreateScalingConfigurationArgs) (resp *CreateScalingConfigurationResponse, err error)

CreateScalingConfiguration create scaling configuration

You can read doc at https://help.aliyun.com/document_detail/25944.html?spm=5176.doc25942.6.625.KcE5ir

func (*Client) CreateScalingGroup

func (client *Client) CreateScalingGroup(args *CreateScalingGroupArgs) (resp *CreateScalingGroupResponse, err error)

CreateScalingGroup create scaling group

You can read doc at https://help.aliyun.com/document_detail/25936.html?spm=5176.doc25940.6.617.vm6LXF

func (*Client) CreateScalingRule

func (client *Client) CreateScalingRule(args *CreateScalingRuleArgs) (resp *CreateScalingRuleResponse, err error)

CreateScalingRule create scaling rule

You can read doc at https://help.aliyun.com/document_detail/25948.html?spm=5176.doc25944.6.629.FLkNnj

func (*Client) CreateScheduledTask

func (client *Client) CreateScheduledTask(args *CreateScheduledTaskArgs) (resp *CreateScheduledTaskResponse, err error)

CreateScheduledTask create schedule task

You can read doc at https://help.aliyun.com/document_detail/25957.html?spm=5176.doc25950.6.638.FfQ0BR

func (*Client) DeactivateScalingConfiguration

func (client *Client) DeactivateScalingConfiguration(args *DeactivateScalingConfigurationArgs) (resp *DeactivateScalingConfigurationResponse, err error)

DeactivateScalingConfiguration deactivate scaling configuration

func (*Client) DeleteScalingConfiguration

func (client *Client) DeleteScalingConfiguration(args *DeleteScalingConfigurationArgs) (resp *DeleteScalingConfigurationResponse, err error)

DeleteScalingConfiguration delete scaling configuration

You can read doc at https://help.aliyun.com/document_detail/25946.html?spm=5176.doc25944.6.627.MjkuuL

func (*Client) DeleteScalingGroup

func (client *Client) DeleteScalingGroup(args *DeleteScalingGroupArgs) (resp *DeleteScalingGroupResponse, err error)

DeleteScalingGroup delete scaling group

You can read doc at https://help.aliyun.com/document_detail/25941.html?spm=5176.doc25940.6.622.mRBCuw

func (*Client) DeleteScalingRule

func (client *Client) DeleteScalingRule(args *DeleteScalingRuleArgs) (resp *DeleteScalingRuleResponse, err error)

DeleteScalingRule delete scaling rule

You can read doc at https://help.aliyun.com/document_detail/25951.html?spm=5176.doc25950.6.632.HbPLMZ

func (*Client) DeleteScheduledTask

func (client *Client) DeleteScheduledTask(args *DeleteScheduledTaskArgs) (resp *DeleteScheduledTaskResponse, err error)

DeleteScheduledTask delete schedule task

You can read doc at https://help.aliyun.com/document_detail/25960.html?spm=5176.doc25959.6.641.aGdNuW

func (*Client) DescribeScalingActivities

func (client *Client) DescribeScalingActivities(args *DescribeScalingActivitiesRequest) (resp *DescribeScalingActivitiesResponse, err error)

func (*Client) DescribeScalingConfigurations

func (client *Client) DescribeScalingConfigurations(args *DescribeScalingConfigurationsArgs) (configs []ScalingConfigurationItemType, pagination *common.PaginationResult, err error)

DescribeScalingConfigurations describes scaling configuration

You can read doc at https://help.aliyun.com/document_detail/25945.html?spm=5176.doc25944.6.626.knG0zz

func (*Client) DescribeScalingGroups

func (client *Client) DescribeScalingGroups(args *DescribeScalingGroupsArgs) (groups []ScalingGroupItemType, pagination *common.PaginationResult, err error)

DescribeScalingGroups describes scaling groups

You can read doc at https://help.aliyun.com/document_detail/25938.html?spm=5176.doc25937.6.619.sUUOT7

func (*Client) DescribeScalingInstances

func (client *Client) DescribeScalingInstances(args *DescribeScalingInstancesArgs) (instances []ScalingInstanceItemType, pagination *common.PaginationResult, err error)

DescribeScalingInstances describes scaling instances

You can read doc at https://help.aliyun.com/document_detail/25942.html?spm=5176.doc25941.6.623.2xA0Uj

func (*Client) DescribeScalingRules

func (client *Client) DescribeScalingRules(args *DescribeScalingRulesArgs) (configs []ScalingRuleItemType, pagination *common.PaginationResult, err error)

DescribeScalingRules describes scaling rules

You can read doc at https://help.aliyun.com/document_detail/25950.html?spm=5176.doc25949.6.631.RwPguo

func (*Client) DescribeScheduledTasks

func (client *Client) DescribeScheduledTasks(args *DescribeScheduledTasksArgs) (tasks []ScheduledTaskItemType, pagination *common.PaginationResult, err error)

DescribeScheduledTasks describes scaling tasks

You can read doc at https://help.aliyun.com/document_detail/25959.html?spm=5176.doc25958.6.640.cLccdR

func (*Client) DisableScalingGroup

func (client *Client) DisableScalingGroup(args *DisableScalingGroupArgs) (resp *DisableScalingGroupResponse, err error)

DisableScalingGroup disable scaling group

You can read doc at https://help.aliyun.com/document_detail/25940.html?spm=5176.doc25939.6.621.M8GuuY

func (*Client) EnableScalingGroup

func (client *Client) EnableScalingGroup(args *EnableScalingGroupArgs) (resp *EnableScalingGroupResponse, err error)

EnableScalingGroup enable scaling group

You can read doc at https://help.aliyun.com/document_detail/25939.html?spm=5176.doc25938.6.620.JiJhkx

func (*Client) ExecuteScalingRule

func (client *Client) ExecuteScalingRule(args *ExecuteScalingRuleArgs) (*ExecuteScalingRuleResponse, error)

ExecuteScalingRule execute scaling rule

You can read doc at https://help.aliyun.com/document_detail/25953.html?spm=5176.doc25961.6.632.7sXDx6

func (*Client) ModifyScalingConfiguration

func (client *Client) ModifyScalingConfiguration(args *ModifyScalingConfigurationRequest) (resp *ModifyScalingConfigurationResponse, err error)

func (*Client) ModifyScalingGroup

func (client *Client) ModifyScalingGroup(args *ModifyScalingGroupArgs) (resp *ModifyScalingGroupResponse, err error)

ModifyScalingGroup modify scaling group

You can read doc at https://help.aliyun.com/document_detail/25937.html?spm=5176.doc25936.6.618.iwDcXT

func (*Client) ModifyScalingRule

func (client *Client) ModifyScalingRule(args *ModifyScalingRuleArgs) (resp *ModifyScalingRuleResponse, err error)

ModifyScalingRule modify scaling rule

You can read doc at https://help.aliyun.com/document_detail/25949.html?spm=5176.doc25948.6.630.HGN1va

func (*Client) ModifyScheduledTask

func (client *Client) ModifyScheduledTask(args *ModifyScheduledTaskArgs) (resp *ModifyScheduledTaskResponse, err error)

ModifyScheduledTask modify schedule task

You can read doc at https://help.aliyun.com/document_detail/25958.html?spm=5176.doc25957.6.639.rgxQ1c

func (*Client) RemoveInstances

func (client *Client) RemoveInstances(args *RemoveInstancesArgs) (resp *RemoveInstancesResponse, err error)

RemoveInstances detach instances from scaling group

You can read doc at https://help.aliyun.com/document_detail/25955.html?spm=5176.doc25954.6.634.GtpzuJ

func (*Client) WaitForScalingGroup

func (client *Client) WaitForScalingGroup(regionId common.Region, groupId string, status LifecycleState, timeout int) error

WaitForScalingGroup waits for group to given status

type CreateScalingConfigurationArgs

type CreateScalingConfigurationArgs struct {
	ScalingGroupId           string
	ImageId                  string
	InstanceType             string
	IoOptimized              ecs.IoOptimized
	SecurityGroupId          string
	ScalingConfigurationName string
	InternetChargeType       common.InternetChargeType
	InternetMaxBandwidthIn   int
	InternetMaxBandwidthOut  *int
	SystemDisk_Category      common.UnderlineString
	SystemDisk_Size          common.UnderlineString
	DataDisk                 []DataDiskType
	UserData                 string
	KeyPairName              string
	RamRoleName              string
	Tags                     string
	InstanceName             string
}

type CreateScalingConfigurationResponse

type CreateScalingConfigurationResponse struct {
	ScalingConfigurationId string
	common.Response
}

type CreateScalingGroupArgs

type CreateScalingGroupArgs struct {
	RegionId         common.Region
	ScalingGroupName string
	LoadBalancerIds  string
	VpcId            string
	VSwitchId        string
	VSwitchIds       common.FlattenArray
	// NOTE: Set MinSize, MaxSize and DefaultCooldown type to int pointer to distinguish zero value from unset value.
	MinSize         *int
	MaxSize         *int
	MultiAZPolicy   MultiAZPolicy
	DefaultCooldown *int
	RemovalPolicy   common.FlattenArray
	DBInstanceIds   string
}

type CreateScalingGroupResponse

type CreateScalingGroupResponse struct {
	common.Response
	ScalingGroupId string
}

type CreateScalingRuleArgs

type CreateScalingRuleArgs struct {
	RegionId        common.Region
	ScalingGroupId  string
	AdjustmentType  AdjustmentType
	AdjustmentValue int
	Cooldown        int
	ScalingRuleName string
}

type CreateScalingRuleResponse

type CreateScalingRuleResponse struct {
	common.Response
	ScalingRuleId  string
	ScalingRuleAri string
}

type CreateScheduledTaskArgs

type CreateScheduledTaskArgs struct {
	RegionId             common.Region
	ScheduledAction      string
	LaunchTime           string
	ScheduledTaskName    string
	Description          string
	LaunchExpirationTime int
	RecurrenceType       RecurrenceType
	RecurrenceValue      string
	RecurrenceEndTime    string
	TaskEnabled          bool
}

type CreateScheduledTaskResponse

type CreateScheduledTaskResponse struct {
	common.Response
	ScheduledTaskId string
}

type DBInstanceIdSetType

type DBInstanceIdSetType struct {
	DBInstanceId []string
}

type DataDisk

type DataDisk struct {
	Size                 int
	SnapshotId           string
	Category             string
	Device               string
	DeleteWithInstance   bool
	Encrypted            bool
	KMSKeyId             string
	DiskName             string
	Description          string
	AutoSnapshotPolicyId string
}

type DataDiskItemType

type DataDiskItemType struct {
	Size       int
	Category   string
	SnapshotId string
	Device     string
}

type DataDiskType

type DataDiskType struct {
	Category   string
	SnapshotId string
	Device     string
	Size       int
}

type DeactivateScalingConfigurationArgs

type DeactivateScalingConfigurationArgs struct {
	ScalingConfigurationId string
}

type DeactivateScalingConfigurationResponse

type DeactivateScalingConfigurationResponse struct {
	common.Response
}

type DeleteScalingConfigurationArgs

type DeleteScalingConfigurationArgs struct {
	ScalingConfigurationId string
	ScalingGroupId         string
	ImageId                string
}

type DeleteScalingConfigurationResponse

type DeleteScalingConfigurationResponse struct {
	common.Response
}

type DeleteScalingGroupArgs

type DeleteScalingGroupArgs struct {
	ScalingGroupId string
	ForceDelete    bool
}

type DeleteScalingGroupResponse

type DeleteScalingGroupResponse struct {
	common.Response
}

type DeleteScalingRuleArgs

type DeleteScalingRuleArgs struct {
	RegionId      common.Region
	ScalingRuleId string
}

type DeleteScalingRuleResponse

type DeleteScalingRuleResponse struct {
	common.Response
}

type DeleteScheduledTaskArgs

type DeleteScheduledTaskArgs struct {
	RegionId        common.Region
	ScheduledTaskId string
}

type DeleteScheduledTaskResponse

type DeleteScheduledTaskResponse struct {
	common.Response
}

type DescribeInstancesResponse

type DescribeInstancesResponse struct {
	common.Response
	common.PaginationResult
	ScalingGroups struct {
		ScalingGroup []ScalingGroupItemType
	}
}

type DescribeScalingActivitiesRequest

type DescribeScalingActivitiesRequest struct {
	ScalingActivityId []string
	ScalingGroupId    string
	StatusCode        string
	RegionId          common.Region
	common.Pagination
}

type DescribeScalingActivitiesResponse

type DescribeScalingActivitiesResponse struct {
	common.PaginationResult
	common.Response
	ScalingActivities struct {
		ScalingActivity []ScalingActivity
	}
}

type DescribeScalingConfigurationsArgs

type DescribeScalingConfigurationsArgs struct {
	RegionId                 common.Region
	ScalingGroupId           string
	ScalingConfigurationId   common.FlattenArray
	ScalingConfigurationName common.FlattenArray
	common.Pagination
}

type DescribeScalingConfigurationsResponse

type DescribeScalingConfigurationsResponse struct {
	common.Response
	common.PaginationResult
	ScalingConfigurations struct {
		ScalingConfiguration []ScalingConfigurationItemType
	}
}

type DescribeScalingGroupsArgs

type DescribeScalingGroupsArgs struct {
	RegionId         common.Region
	ScalingGroupId   common.FlattenArray
	ScalingGroupName common.FlattenArray
	common.Pagination
}

type DescribeScalingInstancesArgs

type DescribeScalingInstancesArgs struct {
	RegionId               common.Region
	ScalingGroupId         string
	ScalingConfigurationId string
	HealthStatus           string
	CreationType           string
	LifecycleState         LifecycleState
	InstanceId             common.FlattenArray
	common.Pagination
}

type DescribeScalingInstancesResponse

type DescribeScalingInstancesResponse struct {
	common.Response
	common.PaginationResult
	ScalingInstances struct {
		ScalingInstance []ScalingInstanceItemType
	}
}

type DescribeScalingRulesArgs

type DescribeScalingRulesArgs struct {
	common.Pagination
	RegionId        common.Region
	ScalingGroupId  string
	ScalingRuleId   common.FlattenArray
	ScalingRuleName common.FlattenArray
	ScalingRuleAri  common.FlattenArray
}

type DescribeScalingRulesResponse

type DescribeScalingRulesResponse struct {
	common.Response
	common.PaginationResult
	ScalingRules struct {
		ScalingRule []ScalingRuleItemType
	}
}

type DescribeScheduledTasksArgs

type DescribeScheduledTasksArgs struct {
	RegionId          common.Region
	ScheduledTaskId   common.FlattenArray
	ScheduledTaskName common.FlattenArray
	ScheduledAction   common.FlattenArray
	common.Pagination
}

type DescribeScheduledTasksResponse

type DescribeScheduledTasksResponse struct {
	common.Response
	common.PaginationResult
	ScheduledTasks struct {
		ScheduledTask []ScheduledTaskItemType
	}
}

type DisableScalingGroupArgs

type DisableScalingGroupArgs struct {
	ScalingGroupId string
}

type DisableScalingGroupResponse

type DisableScalingGroupResponse struct {
	common.Response
}

type EnableScalingGroupArgs

type EnableScalingGroupArgs struct {
	ScalingGroupId               string
	ActiveScalingConfigurationId string
	InstanceId                   common.FlattenArray
}

type EnableScalingGroupResponse

type EnableScalingGroupResponse struct {
	common.Response
}

type ExecuteScalingRuleArgs

type ExecuteScalingRuleArgs struct {
	ScalingRuleAri string
	ClientToken    string
}

type ExecuteScalingRuleResponse

type ExecuteScalingRuleResponse struct {
	common.Response
	ScalingActivityId string
}

type LifecycleState

type LifecycleState string

type LoadBalancerIdSetType

type LoadBalancerIdSetType struct {
	LoadBalancerId []string
}

type ModifyScalingConfigurationRequest

type ModifyScalingConfigurationRequest struct {
	ScalingConfigurationId   string
	IoOptimized              string
	DataDisk                 []DataDisk
	SpotStrategy             string
	SpotPriceLimit           []SpotPriceLimit
	ScalingConfigurationName string
	InstanceName             string
	HostName                 string
	ImageId                  string
	ImageName                string
	InstanceTypes            []string
	Cpu                      int
	Memory                   int
	InternetChargeType       string
	InternetMaxBandwidthOut  int
	SystemDisk               SystemDisk
	LoadBalancerWeight       string
	UserData                 string
	KeyPairName              string
	RamRoleName              string
	PasswordInherit          string
	Tags                     string
	DeploymentSetId          string
	SecurityGroupId          string
	Override                 bool
	ResourceGroupId          string
	SecurityGroupIds         []string
	HpcClusterId             string

	InstanceDescription string
	Ipv6AddressCount    int

	CreditSpecification string
	ImageFamily         string
	DedicatedHostId     string
	Affinity            string
	Tenancy             string
}

type ModifyScalingConfigurationResponse

type ModifyScalingConfigurationResponse struct {
	common.Response
}

type ModifyScalingGroupArgs

type ModifyScalingGroupArgs struct {
	ScalingGroupId               string
	ScalingGroupName             string
	ActiveScalingConfigurationId string
	// NOTE: Set MinSize/MaxSize type to int pointer to distinguish zero value from unset value.
	MinSize         *int
	MaxSize         *int
	DefaultCooldown *int
	RemovalPolicy   common.FlattenArray
}

type ModifyScalingGroupResponse

type ModifyScalingGroupResponse struct {
	common.Response
}

type ModifyScalingRuleArgs

type ModifyScalingRuleArgs struct {
	RegionId        common.Region
	ScalingRuleId   string
	AdjustmentType  AdjustmentType
	AdjustmentValue int
	Cooldown        int
	ScalingRuleName string
}

type ModifyScalingRuleResponse

type ModifyScalingRuleResponse struct {
	common.Response
}

type ModifyScheduledTaskArgs

type ModifyScheduledTaskArgs struct {
	RegionId             common.Region
	ScheduledTaskId      string
	ScheduledAction      string
	LaunchTime           string
	ScheduledTaskName    string
	Description          string
	LaunchExpirationTime int
	RecurrenceType       RecurrenceType
	RecurrenceValue      string
	RecurrenceEndTime    string
	TaskEnabled          bool
}

type ModifyScheduledTaskResponse

type ModifyScheduledTaskResponse struct {
	common.Response
}

type MultiAZPolicy

type MultiAZPolicy string

type RecurrenceType

type RecurrenceType string

type RemovalPolicySetType

type RemovalPolicySetType struct {
	RemovalPolicy []string
}

type RemoveInstancesArgs

type RemoveInstancesArgs struct {
	ScalingGroupId string
	InstanceId     common.FlattenArray
}

type RemoveInstancesResponse

type RemoveInstancesResponse struct {
	common.Response
	ScalingActivityId string
}

type ScalingActivity

type ScalingActivity struct {
	AttachedCapacity      int
	AutoCreatedCapacity   int
	Cause                 string
	Description           string
	EndTime               string
	Progress              int
	ScalingActivityId     string
	ScalingGroupId        string
	ScalingInstanceNumber int
	StartTime             string
	StatusCode            string
	StatusMessage         string
	TotalCapacity         int
}

type ScalingConfigurationItemType

type ScalingConfigurationItemType struct {
	ScalingConfigurationId   string
	ScalingConfigurationName string
	ScalingGroupId           string
	ImageId                  string
	InstanceType             string
	InstanceName             string
	IoOptimized              string
	SecurityGroupId          string
	InternetChargeType       string
	LifecycleState           LifecycleState
	CreationTime             string
	InternetMaxBandwidthIn   int
	InternetMaxBandwidthOut  int
	SystemDiskSize           int
	SystemDiskCategory       string
	DataDisks                struct {
		DataDisk []DataDiskItemType
	}
	KeyPairName string
	RamRoleName string
	UserData    string
	Tags        struct {
		Tag []TagItemType
	}
}

type ScalingGroupItemType

type ScalingGroupItemType struct {
	ScalingGroupId               string
	ScalingGroupName             string
	ActiveScalingConfigurationId string
	RegionId                     string
	LoadBalancerId               string
	VSwitchId                    string
	VSwitchIds                   VSwitchIdsSetType
	CreationTime                 string
	LifecycleState               LifecycleState
	MinSize                      int
	MaxSize                      int
	DefaultCooldown              int
	TotalCapacity                int
	ActiveCapacity               int
	PendingCapacity              int
	RemovingCapacity             int
	RemovalPolicies              RemovalPolicySetType
	DBInstanceIds                DBInstanceIdSetType
	LoadBalancerIds              LoadBalancerIdSetType
}

type ScalingInstanceItemType

type ScalingInstanceItemType struct {
	InstanceId             string
	ScalingGroupId         string
	ScalingConfigurationId string
	HealthStatus           string
	CreationTime           string
	CreationType           string
	LifecycleState         LifecycleState
}

type ScalingRuleItemType

type ScalingRuleItemType struct {
	ScalingRuleId   string
	ScalingGroupId  string
	ScalingRuleName string
	AdjustmentType  string
	ScalingRuleAri  string
	Cooldown        int
	AdjustmentValue int
}

type ScheduledTaskItemType

type ScheduledTaskItemType struct {
	ScheduledTaskId      string
	ScheduledTaskName    string
	Description          string
	ScheduledAction      string
	LaunchTime           string
	RecurrenceType       string
	RecurrenceValue      string
	RecurrenceEndTime    string
	LaunchExpirationTime int
	TaskEnabled          bool
}

type SpotPriceLimit

type SpotPriceLimit struct {
	InstanceType string
	PriceLimit   float32
}

type SystemDisk

type SystemDisk struct {
	Category             string
	Size                 int
	DiskName             string
	Description          string
	AutoSnapshotPolicyId string
}

type TagItemType

type TagItemType struct {
	Key   string
	Value string
}

type VSwitchIdsSetType

type VSwitchIdsSetType struct {
	VSwitchId []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL