as

package
v0.9.175 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GROUP_NAME      = "groupName"
	GROUP_ID        = "groupId"
	GROUP_ID_V2     = "groupid"
	ORDER           = "order"
	ORDER_BY        = "orderBy"
	PAGE_NO         = "pageNo"
	PAGE_SIZE       = "pageSize"
	KEW_WORD        = "keyWord"
	KEW_WORD_TYPE   = "keyWordType"
	AS_SCALING_DOWN = "scalingDown"
	AS_SCALING_UP   = "scalingUp"
	AS_ADJUST_NODE  = "adjustNode"
)
View Source
const (
	ProductName        = "as"
	DefaultBcmEndpoint = ProductName + "." + bce.DEFAULT_REGION + "." + bce.DEFAULT_DOMAIN
	VERSION_1_URL      = "v1"
	VERSION_2_URL      = "v2"
	AS_GROUP_URL       = "group"
	AS_NODE_URL        = "node"
	AS_DETAIL_URL      = "detail"
	AS_DELETE_URL      = "delete"
)
View Source
const (
	ListRecordsUrl = "/v1/record"
	BaseURL        = "/v1/group/%s"
	BaseV2URL      = "/v2/group/%s"
	RuleURL        = "/v1/rule"
	RuleIdURL      = "/v1/rule/%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdjustAsGroupRequest

type AdjustAsGroupRequest struct {
	ClientToken string `json:"-"`
	GroupId     string `json:"groupId,omitempty"`
	AdjustNum   int    `json:"adjustNum,omitempty"`
}

type AsEipModel

type AsEipModel struct {
	BandwidthInMbps int    `json:"bandwidthInMbps,omitempty"`
	EipId           string `json:"eipId,omitempty"`
	Address         string `json:"address,omitempty"`
	EipStatus       string `json:"eipStatus,omitempty"`
	EipAllocationId string `json:"eipAllocationId,omitempty"`
}

type AsGroupStatus

type AsGroupStatus string
const (
	CREATING       AsGroupStatus = "CREATING"
	RUNNING        AsGroupStatus = "RUNNING"
	SCALING_UP     AsGroupStatus = "SCALING_UP"
	SCALING_DOWN   AsGroupStatus = "SCALING_DOWN"
	ATTACHING_NODE AsGroupStatus = "ATTACHING_NODE"
	DETACHING_NODE AsGroupStatus = "DETACHING_NODE"
	DELETING       AsGroupStatus = "DELETING"
	BINDING_BLB    AsGroupStatus = "BINDING_BLB"
	UNBINDING_BLB  AsGroupStatus = "UNBINDING_BLB"
	COOLDOWN       AsGroupStatus = "COOLDOWN"
	PAUSE          AsGroupStatus = "PAUSE"
	DELETED        AsGroupStatus = "DELETED"
)

type AsRecord added in v0.9.167

type AsRecord struct {
	GroupID         string         `json:"groupId"`
	RecordID        string         `json:"recordId"`
	StartTime       time.Time      `json:"startTime"`
	Result          string         `json:"result"`
	ActualScaleNode []string       `json:"actualScaleNode"`
	RemainedNode    []string       `json:"remainedNode"`
	Action          string         `json:"action"`
	ScaleCondition  ScaleCondition `json:"scaleCondition"`
	RuleID          string         `json:"ruleId"`
	Message         string         `json:"message"`
	ExpectAction    ExpectAction   `json:"expectAction"`
	ExecuteType     string         `json:"executeType"`
	DagID           string         `json:"dagId"`
}

type AssignTagInfo added in v0.9.167

type AssignTagInfo struct {
	RelationTag bool  `json:"relationTag"`
	Tags        []Tag `json:"tags,omitempty"`
}

type BccNameConfig added in v0.9.167

type BccNameConfig struct {
	BccName            string `json:"bccName,omitempty"`
	BccHostname        string `json:"bccHostname,omitempty"`
	AutoSeqSuffix      bool   `json:"autoSeqSuffix,omitempty"`
	OpenHostnameDomain bool   `json:"openHostnameDomain,omitempty"`
}

type Billing added in v0.9.167

type Billing struct {
	PaymentTiming string `json:"paymentTiming"`
}

type BlbInfo added in v0.9.167

type BlbInfo struct {
	BlbId   string   `json:"blbId,omitempty"`
	BlbName string   `json:"blbName,omitempty"`
	BlbType string   `json:"blbType,omitempty"`
	SgIds   []string `json:"sgIds,omitempty"`
}

type CdsInfo added in v0.9.167

type CdsInfo struct {
	VolumeType   string `json:"volumeType,omitempty"`
	SizeInGB     int    `json:"sizeInGB,omitempty"`
	SnapshotId   string `json:"snapshotId,omitempty"`
	SnapshotName string `json:"snapshotName,omitempty"`
}

type Client

type Client struct {
	*bce.BceClient
}

Client of BCM service is a kind of BceClient, so derived from BceClient

func NewClient

func NewClient(ak, sk, endpoint string) (*Client, error)

NewClient make the as service client with default configuration. Use `cli.Config.xxx` to access the config or change it to non-default value.

func (*Client) AdjustAsGroup

func (c *Client) AdjustAsGroup(req *AdjustAsGroupRequest) error

AdjustAsGroup 将伸缩组节点调整到指定值。

func (*Client) AdjustNode added in v0.9.167

func (c *Client) AdjustNode(groupId string, adjustNum int) (*CreateDagResponse, error)

AdjustNode 伸缩组手动调整节点数

func (*Client) AttachNode added in v0.9.167

func (c *Client) AttachNode(groupId string, req *NodeRequest) error

AttachNode 手动添加节点

func (*Client) CreateAsGroup added in v0.9.167

func (c *Client) CreateAsGroup(req *CreateAsGroupRequest) (*CreateAsGroupResponse, error)

CreateAsGroup 用于创建 AS 组

参数: req:CreateAsGroupRequest类型,包含创建 AS 组的请求参数

返回值: CreateAsGroupResponse:创建 AS 组的响应结果 error:错误信息,如果请求成功则为 nil

func (*Client) CreateRule added in v0.9.167

func (c *Client) CreateRule(req *RuleRequest) (*CreateRuleResult, error)

CreateRule 创建伸缩规则

func (*Client) DecreaseAsGroup

func (c *Client) DecreaseAsGroup(req *DecreaseAsGroupRequest) error

DecreaseAsGroup 伸缩组缩容,用于伸缩组下节点的缩容

func (*Client) DeleteAsGroup added in v0.9.167

func (c *Client) DeleteAsGroup(req *DeleteAsGroupRequest) error

DeleteAsGroup 用于删除一个弹性伸缩组

req: 删除弹性伸缩组的请求参数

返回值: 错误信息,如果成功则返回nil

func (*Client) DeleteRule added in v0.9.167

func (c *Client) DeleteRule(req *RuleDelRequest) error

DeleteRule 删除伸缩规则

func (*Client) DetachNode added in v0.9.167

func (c *Client) DetachNode(groupId string, req *NodeRequest) error

DetachNode 手动移除节点

func (*Client) ExecRule added in v0.9.167

func (c *Client) ExecRule(groupId, ruleId string) (*CreateDagResponse, error)

ExecRule 执行伸缩规则

func (*Client) GetAsGroup

func (c *Client) GetAsGroup(req *GetAsGroupRequest) (*GetAsGroupResponse, error)

GetAsGroup 根据groupId获取AsGroup信息

func (*Client) GetRule added in v0.9.167

func (c *Client) GetRule(ruleId string) (*RuleVO, error)

GetRule 查询伸缩规则

func (*Client) GetRuleList added in v0.9.167

func (c *Client) GetRuleList(req *RuleListQuery) (*RuleVOListResponse, error)

GetRuleList 查询伸缩规则

func (*Client) IncreaseAsGroup

func (c *Client) IncreaseAsGroup(req *IncreaseAsGroupRequest) error

IncreaseAsGroup 伸缩组扩容,用于在指定伸缩组下添加节点

func (*Client) ListAsGroup

func (c *Client) ListAsGroup(req *ListAsGroupRequest) (*ListAsGroupResponse, error)

ListAsGroup 方法用于获取指定用户下的As组列表

func (*Client) ListAsNode

func (c *Client) ListAsNode(req *ListAsGroupRequest) (*ListAsNodeResponse, error)

ListAsNode 方法用于获取节点列表

func (*Client) ListRecords added in v0.9.167

func (c *Client) ListRecords(req *ListRecordsRequest) (*ListRecordsResponse, error)

ListRecords 查询伸缩活动

func (*Client) ScalingDown added in v0.9.167

func (c *Client) ScalingDown(groupId string, req *ScalingDownRequest) error

ScalingDown 缩容

func (*Client) ScalingUp added in v0.9.167

func (c *Client) ScalingUp(groupId string, req *ScalingUpRequest) (*CreateDagResponse, error)

ScalingUp 扩容

func (*Client) UpdateRule added in v0.9.167

func (c *Client) UpdateRule(ruleId string, req *RuleRequest) error

UpdateRule 更新伸缩规则

type CmdConfig added in v0.9.167

type CmdConfig struct {
	HasDecreaseCmd bool   `json:"hasDecreaseCmd,omitempty"`
	DecCmdStrategy string `json:"decCmdStrategy,omitempty"`
	DecCmdData     string `json:"decCmdData,omitempty"`
	DecCmdTimeout  int    `json:"decCmdTimeout,omitempty"`
	DecCmdManual   bool   `json:"decCmdManual,omitempty"`
	HasIncreaseCmd bool   `json:"hasIncreaseCmd,omitempty"`
	IncCmdStrategy string `json:"incCmdStrategy,omitempty"`
	IncCmdData     string `json:"incCmdData,omitempty"`
	IncCmdTimeout  int    `json:"incCmdTimeout,omitempty"`
	IncCmdManual   bool   `json:"incCmdManual,omitempty"`
}

type Config added in v0.9.167

type Config struct {
	MinNodeNum    int `json:"minNodeNum"`
	ExpectNum     int `json:"expectNum"`
	MaxNodeNum    int `json:"maxNodeNum"`
	CooldownInSec int `json:"cooldownInSec"`
}

type CreateAsGroupRequest added in v0.9.167

type CreateAsGroupRequest struct {
	GroupName         string        `json:"groupName"`
	Config            Config        `json:"config"`
	HealthCheck       HealthCheck   `json:"healthCheck"`
	KeypairId         string        `json:"keypairId,omitempty"`
	KeypairName       string        `json:"keypairName,omitempty"`
	Blb               []BlbInfo     `json:"blb"`
	Rds               []string      `json:"rds,omitempty"`
	Scs               []string      `json:"scs,omitempty"`
	ExpansionStrategy string        `json:"expansionStrategy,omitempty"`
	ShrinkageStrategy string        `json:"shrinkageStrategy,omitempty"`
	ZoneInfo          []ZoneInfo    `json:"zoneInfo"`
	AssignTagInfo     AssignTagInfo `json:"assignTagInfo"`
	Nodes             []NodeInfo    `json:"nodes"`
	Eip               Eip           `json:"eip"`
	Billing           Billing       `json:"billing"`
	CmdConfig         CmdConfig     `json:"cmdConfig"`
	BccNameConfig     BccNameConfig `json:"bccNameConfig"`
}

type CreateAsGroupResponse added in v0.9.167

type CreateAsGroupResponse struct {
	GroupId string `json:"groupId,omitempty"`
}

type CreateDagResponse added in v0.9.167

type CreateDagResponse struct {
	Success bool     `json:"success,omitempty"`
	Msg     string   `json:"msg,omitempty"`
	Result  DagModel `json:"result,omitempty"`
}

type CreateRuleResult added in v0.9.167

type CreateRuleResult struct {
	RuleID string `json:"ruleId,omitempty"`
}

type DagActionModel added in v0.9.167

type DagActionModel struct {
	Pause  bool `json:"pause,omitempty"`
	Resume bool `json:"resume,omitempty"`
}

type DagModel added in v0.9.167

type DagModel struct {
	ID                string                         `json:"id,omitempty"`
	Description       string                         `json:"description,omitempty"`
	Revision          int64                          `json:"revision,omitempty"`
	CreatedTimestamp  int64                          `json:"createdTimestamp,omitempty"`
	UpdatedTimestamp  int64                          `json:"updatedTimestamp,omitempty"`
	FinishedTimestamp int64                          `json:"finishedTimestamp,omitempty"`
	Namespace         string                         `json:"namespace,omitempty"`
	State             string                         `json:"state,omitempty"`
	DagSpec           DagSpecModel                   `json:"dagSpec,omitempty"`
	InitContext       map[string]interface{}         `json:"initContext,omitempty"`
	Parallelism       int                            `json:"parallelism,omitempty"`
	Manually          bool                           `json:"manually,omitempty"`
	WorkerSelectors   []TagSelector                  `json:"workerSelectors,omitempty"`
	Tasks             []TaskModel                    `json:"tasks,omitempty"`
	User              UserModel                      `json:"user,omitempty"`
	OperatorActions   map[string]OperatorActionModel `json:"operatorActions,omitempty"`
	DagActions        DagActionModel                 `json:"dagActions,omitempty"`
	Semaphore         SemaphoreModel                 `json:"semaphore,omitempty"`
}

type DagSpecModel added in v0.9.167

type DagSpecModel struct {
	Ref         string                 `json:"ref,omitempty"`
	Namespace   string                 `json:"namespace,omitempty"`
	Name        string                 `json:"name,omitempty"`
	Description string                 `json:"description,omitempty"`
	Tags        map[string]string      `json:"tags,omitempty"`
	Operators   []OperatorModel        `json:"operators,omitempty"`
	Linear      bool                   `json:"linear,omitempty"`
	Links       []LinkModel            `json:"links,omitempty"`
	Inputs      []InputModel           `json:"inputs,omitempty"`
	Outputs     []OutputModel          `json:"outputs,omitempty"`
	Parallelism int                    `json:"parallelism,omitempty"`
	Extra       map[string]interface{} `json:"extra,omitempty"`
}

type DecreaseAsGroupRequest

type DecreaseAsGroupRequest struct {
	ClientToken string   `json:"-"`
	GroupId     string   `json:"groupId,omitempty"`
	Nodes       []string `json:"nodes,omitempty"`
}

type DeleteAsGroupRequest added in v0.9.167

type DeleteAsGroupRequest struct {
	GroupIds []string `json:"groupIds,omitempty"`
}

type Eip added in v0.9.167

type Eip struct {
	IfBindEip       bool   `json:"ifBindEip"`
	BandwidthInMbps int    `json:"bandwidthInMbps"`
	EipProductType  string `json:"eipProductType"`
	PurchaseType    string `json:"purchaseType"`
}

type EphemeralDisk added in v0.9.167

type EphemeralDisk struct {
	StorageType string `json:"storageType,omitempty"`
	SizeInGB    int    `json:"sizeInGB,omitempty"`
}

type ExpectAction added in v0.9.167

type ExpectAction struct {
	ActionType  string `json:"actionType"`
	ActionNum   int    `json:"actionNum"`
	AdjustToNum int    `json:"adjustToNum"`
}

type GetAsGroupRequest

type GetAsGroupRequest struct {
	GroupId string `json:"groupId,omitempty"`
}

type GetAsGroupResponse

type GetAsGroupResponse struct {
	GroupID           string      `json:"groupId,omitempty"`
	GroupName         string      `json:"groupName,omitempty"`
	Region            string      `json:"region,omitempty"`
	Status            string      `json:"status,omitempty"`
	VpcInfo           VpcInfo     `json:"vpcInfo,omitempty"`
	ZoneInfo          []ZoneInfo  `json:"zoneInfo,omitempty"`
	Config            GroupConfig `json:"config,omitempty"`
	BlbID             string      `json:"blbId,omitempty"`
	NodeNum           int         `json:"nodeNum,omitempty"`
	CreateTime        string      `json:"createTime,omitempty"`
	RdsIDs            string      `json:"rdsIds,omitempty"`
	ScsIDs            string      `json:"scsIds,omitempty"`
	ExpansionStrategy string      `json:"expansionStrategy,omitempty"`
	ShrinkageStrategy string      `json:"shrinkageStrategy,omitempty"`
}

type GroupConfig

type GroupConfig struct {
	MinNodeNum    int `json:"minNodeNum,omitempty"`
	MaxNodeNum    int `json:"maxNodeNum,omitempty"`
	CooldownInSec int `json:"cooldownInSec,omitempty"`
	ExpectNum     int `json:"expectNum,omitempty"`
}

type GroupInfo

type GroupInfo struct {
	GroupId    string        `json:"groupId,omitempty"`
	GroupName  string        `json:"groupName,omitempty"`
	Region     string        `json:"region,omitempty"`
	Status     AsGroupStatus `json:"status,omitempty"`
	VpcId      string        `json:"vpcId,omitempty"`
	NodeNum    int           `json:"nodeNum,omitempty"`
	CreateTime string        `json:"createTime,omitempty"`
	ZoneInfo   []ZoneInfo    `json:"zoneInfo,omitempty"`
	Config     GroupConfig   `json:"config,omitempty"`
	BlbId      string        `json:"blbId,omitempty"`
}

type HealthCheck added in v0.9.167

type HealthCheck struct {
	HealthCheckInterval int `json:"healthCheckInterval"`
	GraceTime           int `json:"graceTime"`
}

type IncreaseAsGroupRequest

type IncreaseAsGroupRequest struct {
	ClientToken       string   `json:"-"`
	GroupId           string   `json:"groupId,omitempty"`
	NodeCount         int      `json:"nodeCount,omitempty"`
	Zone              []string `json:"zone,omitempty"`
	ExpansionStrategy string   `json:"expansionStrategy,omitempty"`
}

type InputModel added in v0.9.167

type InputModel struct {
	Name         string   `json:"name,omitempty"`
	Required     bool     `json:"required,omitempty"`
	Type         string   `json:"type,omitempty"`
	Description  string   `json:"description,omitempty"`
	Options      []string `json:"options,omitempty"`
	DefaultValue string   `json:"default,omitempty"`
}

type LinkModel added in v0.9.167

type LinkModel struct {
	Src string `json:"src,omitempty"`
	Dst string `json:"dst,omitempty"`
}

type ListAsGroupRequest

type ListAsGroupRequest struct {
	GroupId     string `json:"groupId,omitempty"`
	OrderBy     string `json:"orderBy,omitempty"`
	Order       string `json:"order,omitempty"`
	PageNo      int    `json:"pageNo,omitempty"`
	PageSize    int    `json:"pageSize,omitempty"`
	KeyWord     string `json:"keyWord,omitempty"`
	KeyWordType string `json:"keyWordType,omitempty"`
}

type ListAsGroupResponse

type ListAsGroupResponse struct {
	OrderBy    string      `json:"orderBy,omitempty"`
	Order      string      `json:"order,omitempty"`
	PageNo     int         `json:"pageNo,omitempty"`
	PageSize   int         `json:"pageSize,omitempty"`
	TotalCount int         `json:"totalCount,omitempty"`
	Result     []GroupInfo `json:"result,omitempty"`
}

type ListAsNodeRequest

type ListAsNodeRequest struct {
	GroupId string `json:"groupId,omitempty"`
	Marker  string `json:"marker,omitempty"`
	MaxKeys int    `json:"maxKeys,omitempty"`
}

type ListAsNodeResponse

type ListAsNodeResponse struct {
	OrderBy    string      `json:"orderBy,omitempty"`
	Order      string      `json:"order,omitempty"`
	PageNo     int         `json:"pageNo,omitempty"`
	PageSize   int         `json:"pageSize,omitempty"`
	TotalCount int         `json:"totalCount,omitempty"`
	Result     []NodeModel `json:"result,omitempty"`
}

type ListRecordsRequest added in v0.9.167

type ListRecordsRequest struct {
	GroupID   string    `json:"groupid"`
	PageNo    int       `json:"pageNo"`
	OrderBy   string    `json:"orderBy"`
	Order     string    `json:"order"`
	PageSize  int       `json:"pageSize"`
	StartTime time.Time `json:"startTime"`
	EndTime   time.Time `json:"endTime"`
}

func (*ListRecordsRequest) GetBceQueryParams added in v0.9.167

func (request *ListRecordsRequest) GetBceQueryParams() map[string]string

type ListRecordsResponse added in v0.9.167

type ListRecordsResponse struct {
	OrderBy    string     `json:"orderBy"`
	Order      string     `json:"order"`
	PageNo     int        `json:"pageNo"`
	PageSize   int        `json:"pageSize"`
	TotalCount int        `json:"totalCount"`
	Result     []AsRecord `json:"result"`
}

type NodeInfo added in v0.9.167

type NodeInfo struct {
	CpuCount           int             `json:"cpuCount"`
	MemoryCapacityInGB int             `json:"memoryCapacityInGB"`
	SysDiskType        string          `json:"sysDiskType"`
	SysDiskInGB        int             `json:"sysDiskInGB"`
	InstanceType       int             `json:"instanceType"`
	ImageId            string          `json:"imageId"`
	ImageType          string          `json:"imageType"`
	SecurityGroupId    string          `json:"securityGroupId"`
	Spec               string          `json:"spec"`
	EphemeralDisks     []EphemeralDisk `json:"ephemeralDisks,omitempty"`
	AspId              string          `json:"aspId,omitempty"`
	UserData           string          `json:"userData,omitempty"`
	Priorities         int             `json:"priorities"`
	ZoneSubnet         string          `json:"zoneSubnet,omitempty"`
	TotalCount         int             `json:"totalCount"`
	Cds                []CdsInfo       `json:"cds,omitempty"`
	BidModel           string          `json:"bidModel"`
	BidPrice           float64         `json:"bidPrice,omitempty"`
	ProductType        string          `json:"productType"`
	OsType             string          `json:"osType"`
}

type NodeModel

type NodeModel struct {
	InstanceId         string           `json:"instanceId,omitempty"`
	InstanceUuid       string           `json:"instanceUuid,omitempty"`
	InstanceName       string           `json:"instanceName,omitempty"`
	FloatingIp         string           `json:"floatingIp,omitempty"`
	InternalIp         string           `json:"internalIp,omitempty"`
	Status             string           `json:"status,omitempty"`
	Payment            string           `json:"payment,omitempty"`
	CpuCount           int64            `json:"cpuCount,omitempty"`
	MemoryCapacityInGB int64            `json:"memoryCapacityInGB,omitempty"`
	InstanceType       string           `json:"instanceType,omitempty"`
	SysDiskInGB        int              `json:"sysDiskInGB,omitempty"`
	CreateTime         string           `json:"createTime,omitempty"`
	Eip                AsEipModel       `json:"eip,omitempty"`
	SubnetType         string           `json:"subnetType,omitempty"`
	IsProtected        bool             `json:"isProtected,omitempty"`
	NodeType           string           `json:"nodeType,omitempty"`
	Tags               []model.TagModel `json:"tags,omitempty"`
	GroupId            string           `json:"groupId,omitempty"`
}

type NodeRequest added in v0.9.167

type NodeRequest struct {
	Nodes []string `json:"nodes,omitempty"`
}

type OperatorActionModel added in v0.9.167

type OperatorActionModel struct {
	RunManually bool `json:"runManually,omitempty"`
	Ignore      bool `json:"ignore,omitempty"`
}

type OperatorModel added in v0.9.167

type OperatorModel struct {
	Name                   string                 `json:"name,omitempty"`
	Description            string                 `json:"description,omitempty"`
	Tags                   map[string]string      `json:"tags,omitempty"`
	Operator               string                 `json:"operator,omitempty"`
	DagSpec                DagSpecModel           `json:"dagSpec,omitempty"`
	Inline                 bool                   `json:"inline,omitempty"`
	Retries                int                    `json:"retries,omitempty"`
	RetryInterval          int                    `json:"retryInterval,omitempty"`
	Timeout                int                    `json:"timeout,omitempty"`
	InitContext            map[string]interface{} `json:"initContext,omitempty"`
	Loops                  map[string]string      `json:"loops,omitempty"`
	ParallelismRatio       float64                `json:"parallelismRatio,omitempty"`
	ParallelismCount       int                    `json:"parallelismCount,omitempty"`
	AllowedFailureRatio    float64                `json:"allowedFailureRatio,omitempty"`
	AllowedFailureCount    int                    `json:"allowedFailureCount,omitempty"`
	Manually               bool                   `json:"manually,omitempty"`
	ScheduleDelayMilli     int                    `json:"scheduleDelayMilli,omitempty"`
	WorkerSelectors        []TagSelector          `json:"workerSelectors,omitempty"`
	CollectChildrenContext string                 `json:"collectChildrenContext,omitempty"`
	TriggerRule            string                 `json:"triggerRule,omitempty"`
	WaitOnAgentMilli       int                    `json:"waitOnAgentMilli,omitempty"`
	Condition              map[string]string      `json:"condition,omitempty"`
}

type OutputModel added in v0.9.167

type OutputModel struct {
	Name        string `json:"name,omitempty"`
	Type        string `json:"type,omitempty"`
	Description string `json:"description,omitempty"`
}

type RuleDelRequest added in v0.9.167

type RuleDelRequest struct {
	RuleIds  []string `json:"ruleIds,omitempty"`
	GroupIds []string `json:"groupIds,omitempty"`
}

type RuleListQuery added in v0.9.167

type RuleListQuery struct {
	GroupID     string `json:"groupId,omitempty"`
	Keyword     string `json:"keyword,omitempty"`
	KeywordType string `json:"keywordType,omitempty"`
	Order       string `json:"order,omitempty"`
	OrderBy     string `json:"orderBy,omitempty"`
	PageNo      int    `json:"pageNo,omitempty"`
	PageSize    int    `json:"pageSize,omitempty"`
}

type RuleRequest added in v0.9.167

type RuleRequest struct {
	RuleID             string `json:"ruleId,omitempty"`
	RuleName           string `json:"ruleName,omitempty"`
	GroupID            string `json:"groupId,omitempty"`
	State              string `json:"state,omitempty"`
	Type               string `json:"type,omitempty"`
	TargetType         string `json:"targetType,omitempty"`
	TargetID           string `json:"targetId,omitempty"`
	Indicator          string `json:"indicator,omitempty"`
	Threshold          string `json:"threshold,omitempty"`
	Unit               string `json:"unit,omitempty"`
	ComparisonOperator string `json:"comparisonOperator,omitempty"`
	ActionType         string `json:"actionType,omitempty"`
	ActionNum          int    `json:"actionNum,omitempty"`
	CronTime           string `json:"cronTime,omitempty"`
	CooldownInSec      int    `json:"cooldownInSec,omitempty"`
	PeriodType         string `json:"periodType,omitempty"`
	PeriodValue        int    `json:"periodValue,omitempty"`
	PeriodStartTime    string `json:"periodStartTime,omitempty"`
	PeriodEndTime      string `json:"periodEndTime,omitempty"`
}

type RuleVO added in v0.9.167

type RuleVO struct {
	RuleID             string `json:"ruleId,omitempty"`
	RuleName           string `json:"ruleName,omitempty"`
	GroupID            string `json:"groupId,omitempty"`
	AccountID          string `json:"accountId,omitempty"`
	State              string `json:"state,omitempty"`
	Type               string `json:"type,omitempty"`
	TargetType         string `json:"targetType,omitempty"`
	TargetID           string `json:"targetId,omitempty"`
	Indicator          string `json:"indicator,omitempty"`
	Threshold          string `json:"threshold,omitempty"`
	Unit               string `json:"unit,omitempty"`
	ComparisonOperator string `json:"comparisonOperator,omitempty"`
	CronTime           string `json:"cronTime,omitempty"`
	ActionType         string `json:"actionType,omitempty"`
	ActionNum          int    `json:"actionNum,omitempty"`
	CooldownInSec      int    `json:"cooldownInSec,omitempty"`
	CreateTime         string `json:"createTime,omitempty"`
	LastExecutionTime  string `json:"lastExecutionTime,omitempty"`
	PeriodStartTime    string `json:"periodStartTime,omitempty"`
	PeriodEndTime      string `json:"periodEndTime,omitempty"`
	PeriodType         string `json:"periodType,omitempty"`
	PeriodValue        int    `json:"periodValue,omitempty"`
}

type RuleVOListResponse added in v0.9.167

type RuleVOListResponse struct {
	OrderBy    string   `json:"orderBy,omitempty"`
	Order      string   `json:"order,omitempty"`
	PageNo     int      `json:"pageNo,omitempty"`
	PageSize   int      `json:"pageSize,omitempty"`
	TotalCount int      `json:"totalCount,omitempty"`
	Result     []RuleVO `json:"result,omitempty"`
}

type ScaleCondition added in v0.9.167

type ScaleCondition struct {
	TargetType         string `json:"targetType"`
	TargetID           string `json:"targetId"`
	Indicator          string `json:"indicator"`
	Threshold          string `json:"threshold"`
	Unit               string `json:"unit"`
	ComparisonOperator string `json:"comparisonOperator"`
	CronTime           string `json:"cronTime"`
	Type               string `json:"type"`
	PeriodType         string `json:"periodType"`
	PeriodValue        int    `json:"periodValue"`
}

type ScalingDownRequest added in v0.9.167

type ScalingDownRequest struct {
	Nodes []string `json:"nodes,omitempty"`
}

type ScalingUpRequest added in v0.9.167

type ScalingUpRequest struct {
	NodeCount         int      `json:"nodeCount,omitempty"`
	Zone              []string `json:"zone,omitempty"`
	ExpansionStrategy string   `json:"expansionStrategy,omitempty"`
}

type SemaphoreModel added in v0.9.167

type SemaphoreModel struct {
	Name     string `json:"name,omitempty"`
	Conflict string `json:"conflict,omitempty"`
}

type Tag added in v0.9.167

type Tag struct {
	TagKey   string `json:"tagKey"`
	TagValue string `json:"tagValue"`
}

type TagExpression added in v0.9.167

type TagExpression struct {
	Key    string   `json:"key,omitempty"`
	Op     string   `json:"op,omitempty"`
	Value  string   `json:"value,omitempty"`
	Values []string `json:"values,omitempty"`
}

type TagSelector added in v0.9.167

type TagSelector struct {
	Expressions []TagExpression `json:"expressions,omitempty"`
}

type TaskModel added in v0.9.167

type TaskModel struct {
	ID                string                 `json:"id,omitempty"`
	LoopIndex         int                    `json:"loopIndex,omitempty"`
	Namespace         string                 `json:"namespace,omitempty"`
	Dag               DagModel               `json:"dag,omitempty"`
	Dags              []DagModel             `json:"dags,omitempty"`
	Revision          int64                  `json:"revision,omitempty"`
	CreatedTimestamp  int64                  `json:"createdTimestamp,omitempty"`
	UpdatedTimestamp  int64                  `json:"updatedTimestamp,omitempty"`
	FinishedTimestamp int64                  `json:"finishedTimestamp,omitempty"`
	State             string                 `json:"state,omitempty"`
	Operator          OperatorModel          `json:"operator,omitempty"`
	Reason            string                 `json:"reason,omitempty"`
	InitContext       map[string]interface{} `json:"initContext,omitempty"`
	Context           map[string]interface{} `json:"context,omitempty"`
	OutputContext     map[string]interface{} `json:"outputContext,omitempty"`
	Tries             int                    `json:"tries,omitempty"`
	Children          []TaskModel            `json:"children,omitempty"`
}

type UserModel added in v0.9.167

type UserModel struct {
	ID string `json:"id,omitempty"`
}

type VpcInfo

type VpcInfo struct {
	VpcId   string `json:"vpcId,omitempty"`
	VpcName string `json:"vpcName,omitempty"`
	VpcUUID string `json:"vpcUuid,omitempty"`
}

type ZoneInfo

type ZoneInfo struct {
	Zone       string `json:"zone,omitempty"`
	SubnetID   string `json:"subnetId,omitempty"`
	SubnetUUID string `json:"subnetUuid,omitempty"`
	SubnetName string `json:"subnetName,omitempty"`
	SubnetType int16  `json:"subnetType,omitempty"`
	NodeCount  int    `json:"nodeCount,omitempty"`
}

Jump to

Keyboard shortcuts

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