models

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	/* 键 (Optional) */
	Key *string `json:"key"`

	/* 值 (Optional) */
	Value *string `json:"value"`
}

type Log

type Log struct {

	/* 日志投递状态,可选值[enable、disable],enable时必传日志集UID与日志主题UID (Optional) */
	LogState *string `json:"logState"`

	/* 日志集UID (Optional) */
	LogsetUID *string `json:"logsetUID"`

	/* 日志主题UID (Optional) */
	LogtopicUID *string `json:"logtopicUID"`
}

type ModifyPolicyDetailSpec

type ModifyPolicyDetailSpec struct {

	/* 触发时间,针对开启的策略生效,格式"yyyy-MM-dd HH24:mm:ss" (Optional) */
	FireTime *string `json:"fireTime"`

	/* 策略触发条件/周期,参考创建策略的规则 (Optional) */
	FireCondition *string `json:"fireCondition"`

	/* 策略触发执行累计次数达到execNumLimit后,自动失效变为disable状态。该参数为-1时不生效,大于0时生效。 (Optional) */
	ExecNumLimit *int `json:"execNumLimit"`

	/* 增加该策略执行时的额外条件配置。如果与原有配置冲突,会执行覆盖操作。 (Optional) */
	AddExecConfig []Config `json:"addExecConfig"`

	/* 要删除的条件配置,需要指定配置key的列表 (Optional) */
	DelExecConfig []string `json:"delExecConfig"`

	/* 日志配置 (Optional) */
	Log *Log `json:"log"`
}

type ModifyPolicySpec

type ModifyPolicySpec struct {

	/* 策略名称,<a href="http://docs.jdcloud.com/virtual-machines/api/general_parameters">参考公共参数规范</a>。 (Optional) */
	Name *string `json:"name"`

	/* 策略描述,<a href="http://docs.jdcloud.com/virtual-machines/api/general_parameters">参考公共参数规范</a>。 (Optional) */
	Description *string `json:"description"`

	/* 策略详细配置 (Optional) */
	PolicyDetailSpec *ModifyPolicyDetailSpec `json:"policyDetailSpec"`
}

type Policy

type Policy struct {

	/* 策略ID。 (Optional) */
	PolicyId string `json:"policyId"`

	/* 策略名称。 (Optional) */
	Name string `json:"name"`

	/* 策略描述。 (Optional) */
	Description string `json:"description"`

	/* 策略开启状态 (Optional) */
	State string `json:"state"`

	/* 策略详细配置 (Optional) */
	PolicyDetail PolicyDetail `json:"policyDetail"`

	/* 创建时间 (Optional) */
	CreateTime string `json:"createTime"`

	/* 修改时间 (Optional) */
	UpdateTime string `json:"updateTime"`
}

type PolicyDetail

type PolicyDetail struct {

	/* 策略类型 (Optional) */
	PolicyType string `json:"policyType"`

	/* 策略触发条件/周期 (Optional) */
	FireCondition string `json:"fireCondition"`

	/* 触发时间 (Optional) */
	FireTime string `json:"fireTime"`

	/* 上一次触发时间 (Optional) */
	PrevFireTime string `json:"prevFireTime"`

	/* 下一次触发时间 (Optional) */
	NextFireTime string `json:"nextFireTime"`

	/* 策略触发执行累计次数的上限数。 (Optional) */
	ExecNumLimit int `json:"execNumLimit"`

	/* 该策略绑定的资源。 (Optional) */
	ExecResource Resource `json:"execResource"`

	/* 该策略执行时的额外条件。 (Optional) */
	ExecConfig []Config `json:"execConfig"`

	/* 日志配置 (Optional) */
	Log Log `json:"log"`
}

type PolicyDetailSpec

type PolicyDetailSpec struct {

	/* 策略类型,可选值如下:
	1. "AutoImage" - 云主机自动创建镜像策略
	*/
	PolicyType string `json:"policyType"`

	/* 触发时间,针对开启的策略生效,格式"yyyy-MM-dd HH24:mm:ss" (Optional) */
	FireTime *string `json:"fireTime"`

	/* 策略触发条件/周期,可选值如下:
	1. "crond xxx" - 暂不支持,crond表达式,如每月1号0点[0 0 1 * *]
	2. "interval xxx" - 间隔时间,支持"秒/分/时/天/周",xxx格式如:[30s、20m、10h、1d、2w]
	3. "condition xxx" - 暂不支持,满足某些条件
	*/
	FireCondition string `json:"fireCondition"`

	/* 策略触发执行累计次数达到execNumLimit后,自动失效变为disable状态。该参数为-1时不生效,大于0时生效。 (Optional) */
	ExecNumLimit *int `json:"execNumLimit"`

	/* 该策略执行时的额外条件配置。 (Optional) */
	ExecConfig []Config `json:"execConfig"`

	/* 日志配置 (Optional) */
	Log *Log `json:"log"`
}

type PolicySpec

type PolicySpec struct {

	/* 策略名称,<a href="http://docs.jdcloud.com/virtual-machines/api/general_parameters">参考公共参数规范</a>。  */
	Name string `json:"name"`

	/* 策略描述,<a href="http://docs.jdcloud.com/virtual-machines/api/general_parameters">参考公共参数规范</a>。 (Optional) */
	Description *string `json:"description"`

	/* 是否开启策略,可选[enable、disable],默认为enable (Optional) */
	State *string `json:"state"`

	/* 策略详细配置 (Optional) */
	PolicyDetailSpec *PolicyDetailSpec `json:"policyDetailSpec"`
}

type Quota

type Quota struct {

	/* 策略类型 (Optional) */
	PolicyType string `json:"policyType"`

	/* 配额上限 (Optional) */
	Limit int `json:"limit"`

	/* 已用配额 (Optional) */
	Used int `json:"used"`
}

type Resource

type Resource struct {

	/* 云主机ID列表 (Optional) */
	Vm []string `json:"vm"`
}

Jump to

Keyboard shortcuts

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