model

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoLaunchGroupInfo

type AutoLaunchGroupInfo struct {

	// 智能购买组ID
	Id string `json:"id"`

	// 智能购买组的名称
	Name string `json:"name"`

	// 请求类型
	Type string `json:"type"`

	// 智能购买组的运行状态,枚举值 SUBMITTED:已提交 ACTIVE:运行中 DELETING:删除中 DELETED:已删除
	Status string `json:"status"`

	// 智能购买组的任务状态,枚举值 HANDLING:购买中 FULFILLED:智能购买组已满配 ERROR:智能购买组异常
	TaskState string `json:"task_state"`

	// 开始时间
	ValidSince *sdktime.SdkTime `json:"valid_since"`

	// 结束时间
	ValidUntil *sdktime.SdkTime `json:"valid_until"`
}

智能购买组列表

func (AutoLaunchGroupInfo) String

func (o AutoLaunchGroupInfo) String() string

type AutoLaunchGroupReqV2

type AutoLaunchGroupReqV2 struct {

	// 智能购买组名称。 取值范围:1-64个字符,只能包含中文、字母、数字、下划线和中划线。
	Name string `json:"name"`

	// 创建智能购买组参数核查 true:发送检查请求,不会创建智能购买组。检查项包括是否填写了必需参数、请求格式等。 如果检查不通过,则返回对应错误。 如果检查通过,则返回202状态码。 false:发送正常请求,通过检查后并且执行创建智能购买组请求。
	DryRun *bool `json:"dry_run,omitempty"`

	// 请求类型,枚举值 request:一次性。仅在启动时交付实例集群,调度失败后不再重试。 maintain:持续供应。在启动时尝试交付实例集群,并监控实时容量,未达到目标容量则尝试继续创建ECS实例。 默认值:maintain
	Type *AutoLaunchGroupReqV2Type `json:"type,omitempty"`

	// 算力保障计划ID
	GuaranteePlanId *string `json:"guarantee_plan_id,omitempty"`

	// 智能购买组目标容量。 实例数量或者CPU个数目标容量大于等于stable_capacity。竞价实例的容量为满配容量减去stable_capacity。
	TargetCapacity int32 `json:"target_capacity"`

	// 按需实例目标容量。 目标容量指实例数量或CPU个数,必须小于等于target_capacity,智能购买组中可以没有按需实例。
	StableCapacity *int32 `json:"stable_capacity,omitempty"`

	// 超过目标容量或目标容量减少时的实例中断行为,枚举值 terminate:释放 noTermination:不释放 默认值:terminate
	ExcessFulfilledCapacityBehavior *AutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior `json:"excess_fulfilled_capacity_behavior,omitempty"`

	// 请求到期正在的实例中断行为,枚举值 terminate:释放 noTermination:不释放 默认值:terminate
	InstancesBehaviorWithExpiration *AutoLaunchGroupReqV2InstancesBehaviorWithExpiration `json:"instances_behavior_with_expiration,omitempty"`

	// 请求开始时间,和valid_until共同确定有效时段。 按照ISO8601标准表示,并使用UTC +0时间,格式为yyyy-MM-ddTHH:mm:ssZ。 默认值:立即生效
	ValidSince *sdktime.SdkTime `json:"valid_since,omitempty"`

	// 请求结束时间,和valid_since共同确定有效时段。 按照ISO8601标准表示,并使用UTC +0时间,格式为yyyy-MM-ddTHH:mm:ssZ。 默认值:无限期
	ValidUntil *sdktime.SdkTime `json:"valid_until,omitempty"`

	// 实例分配策略,枚举值 lowest_price:价格最低策略,智能购买组购买的所有实例的价格总和最低。 prioritized:优先级策略,按照规格设定的优先级创建实例。  capacity_optimized:容量最优化策略,智能购买组购买的实例按照大规格优先进行购买。 默认值:lowest_price
	AllocationStrategy *AutoLaunchGroupReqV2AllocationStrategy `json:"allocation_strategy,omitempty"`

	// 智能购买组内各区域的资源描述
	RegionSpecs []RegionSpec `json:"region_specs"`

	// 资源供给中规格选择策略:枚举值 singlation:选择一种规格供给 multiple:组合多种规格供给 默认值:multiple
	SupplyOption *AutoLaunchGroupReqV2SupplyOption `json:"supply_option,omitempty"`

	// 用户愿意为竞价实例每小时支付的最高价格。如果overrides中没有提供价格,可以使用该价格
	SpotPrice *float64 `json:"spot_price,omitempty"`
}

This is a auto create Body Object

func (AutoLaunchGroupReqV2) String

func (o AutoLaunchGroupReqV2) String() string

type AutoLaunchGroupReqV2AllocationStrategy

type AutoLaunchGroupReqV2AllocationStrategy struct {
	// contains filtered or unexported fields
}

func (AutoLaunchGroupReqV2AllocationStrategy) MarshalJSON

func (c AutoLaunchGroupReqV2AllocationStrategy) MarshalJSON() ([]byte, error)

func (*AutoLaunchGroupReqV2AllocationStrategy) UnmarshalJSON

func (c *AutoLaunchGroupReqV2AllocationStrategy) UnmarshalJSON(b []byte) error

func (AutoLaunchGroupReqV2AllocationStrategy) Value

type AutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior

type AutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior struct {
	// contains filtered or unexported fields
}

func (AutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior) MarshalJSON

func (*AutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior) UnmarshalJSON

func (AutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior) Value

type AutoLaunchGroupReqV2InstancesBehaviorWithExpiration

type AutoLaunchGroupReqV2InstancesBehaviorWithExpiration struct {
	// contains filtered or unexported fields
}

func (AutoLaunchGroupReqV2InstancesBehaviorWithExpiration) MarshalJSON

func (*AutoLaunchGroupReqV2InstancesBehaviorWithExpiration) UnmarshalJSON

func (AutoLaunchGroupReqV2InstancesBehaviorWithExpiration) Value

type AutoLaunchGroupReqV2SupplyOption

type AutoLaunchGroupReqV2SupplyOption struct {
	// contains filtered or unexported fields
}

func (AutoLaunchGroupReqV2SupplyOption) MarshalJSON

func (c AutoLaunchGroupReqV2SupplyOption) MarshalJSON() ([]byte, error)

func (*AutoLaunchGroupReqV2SupplyOption) UnmarshalJSON

func (c *AutoLaunchGroupReqV2SupplyOption) UnmarshalJSON(b []byte) error

func (AutoLaunchGroupReqV2SupplyOption) Value

type AutoLaunchGroupReqV2SupplyOptionEnum

type AutoLaunchGroupReqV2SupplyOptionEnum struct {
	SINGLATION AutoLaunchGroupReqV2SupplyOption
	MULTIPLE   AutoLaunchGroupReqV2SupplyOption
}

func GetAutoLaunchGroupReqV2SupplyOptionEnum

func GetAutoLaunchGroupReqV2SupplyOptionEnum() AutoLaunchGroupReqV2SupplyOptionEnum

type AutoLaunchGroupReqV2Type

type AutoLaunchGroupReqV2Type struct {
	// contains filtered or unexported fields
}

func (AutoLaunchGroupReqV2Type) MarshalJSON

func (c AutoLaunchGroupReqV2Type) MarshalJSON() ([]byte, error)

func (*AutoLaunchGroupReqV2Type) UnmarshalJSON

func (c *AutoLaunchGroupReqV2Type) UnmarshalJSON(b []byte) error

func (AutoLaunchGroupReqV2Type) Value

func (c AutoLaunchGroupReqV2Type) Value() string

type AutoLaunchGroupReqV2TypeEnum

type AutoLaunchGroupReqV2TypeEnum struct {
	REQUEST  AutoLaunchGroupReqV2Type
	MAINTAIN AutoLaunchGroupReqV2Type
}

func GetAutoLaunchGroupReqV2TypeEnum

func GetAutoLaunchGroupReqV2TypeEnum() AutoLaunchGroupReqV2TypeEnum

type CreateAutoLaunchGroupRequest

type CreateAutoLaunchGroupRequest struct {
	Body *AutoLaunchGroupReqV2 `json:"body,omitempty"`
}

Request Object

func (CreateAutoLaunchGroupRequest) String

type CreateAutoLaunchGroupResponse

type CreateAutoLaunchGroupResponse struct {

	// 创建好的智能购买组
	AutoLaunchGroupId *string `json:"auto_launch_group_id,omitempty"`

	// 错误码。 请求失败时,响应体中包含错误。 请求成功时,不在响应消息体中包含错误码。
	ErrorCode *int32 `json:"error_code,omitempty"`

	// 错误描述 请求失败时,响应体中包含错误 请求成功时,不在响应消息体中包含错误描述
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateAutoLaunchGroupResponse) String

type DeleteAutoLaunchGroupReqV2

type DeleteAutoLaunchGroupReqV2 struct {

	// 删除智能购买组时组内实例的中断行为。枚举值 terminate:释放,由delete_publicip和delete_volume决定是否释放弹性公网IP和磁盘 noTermination:不释放,弹性公网IP和磁盘也不释放 默认值:terminate
	DeleteInstances *DeleteAutoLaunchGroupReqV2DeleteInstances `json:"delete_instances,omitempty"`
}

This is a delete Request Object

func (DeleteAutoLaunchGroupReqV2) String

type DeleteAutoLaunchGroupReqV2DeleteInstances

type DeleteAutoLaunchGroupReqV2DeleteInstances struct {
	// contains filtered or unexported fields
}

func (DeleteAutoLaunchGroupReqV2DeleteInstances) MarshalJSON

func (*DeleteAutoLaunchGroupReqV2DeleteInstances) UnmarshalJSON

func (DeleteAutoLaunchGroupReqV2DeleteInstances) Value

type DeleteAutoLaunchGroupReqV2DeleteInstancesEnum

type DeleteAutoLaunchGroupReqV2DeleteInstancesEnum struct {
	TERMINATE      DeleteAutoLaunchGroupReqV2DeleteInstances
	NO_TERMINATION DeleteAutoLaunchGroupReqV2DeleteInstances
}

func GetDeleteAutoLaunchGroupReqV2DeleteInstancesEnum

func GetDeleteAutoLaunchGroupReqV2DeleteInstancesEnum() DeleteAutoLaunchGroupReqV2DeleteInstancesEnum

type DeleteAutoLaunchGroupRequest

type DeleteAutoLaunchGroupRequest struct {

	// 智能购买组ID
	AutoLaunchGroupId string `json:"auto_launch_group_id"`

	Body *DeleteAutoLaunchGroupReqV2 `json:"body,omitempty"`
}

Request Object

func (DeleteAutoLaunchGroupRequest) String

type DeleteAutoLaunchGroupResponse

type DeleteAutoLaunchGroupResponse struct {

	// 错误码 请求失败时,响应体中包含错误码 请求成功时,不在响应消息体中包含错误码
	ErrorCode *int32 `json:"error_code,omitempty"`

	// 错误描述 请求失败时,响应体中包含错误描述 请求成功时,不在响应消息体中包含错误描述
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (DeleteAutoLaunchGroupResponse) String

type DistinctLocation

type DistinctLocation struct {

	// 区域ID
	RegionId string `json:"region_id"`

	// 可用区ID
	AvailabilityZoneId *string `json:"availability_zone_id,omitempty"`
}

func (DistinctLocation) String

func (o DistinctLocation) String() string

type DoubleRange

type DoubleRange struct {

	// 最大值,-1表示无限制
	Max *float64 `json:"max,omitempty"`

	// 最小值,-1表示无限制
	Min *float64 `json:"min,omitempty"`
}

资源取值范围,最大值最小值可取。 约束:min<=max

func (DoubleRange) String

func (o DoubleRange) String() string

type FlavorConstraint

type FlavorConstraint struct {

	// 接受的体系结构描述
	ArchitectureType *[]FlavorConstraintArchitectureType `json:"architecture_type,omitempty"`

	// 资源的需求约束
	FlavorRequirements *[]FlavorRequirement `json:"flavor_requirements,omitempty"`
}

资源规格的筛选约束

func (FlavorConstraint) String

func (o FlavorConstraint) String() string

type FlavorConstraintArchitectureType

type FlavorConstraintArchitectureType struct {
	// contains filtered or unexported fields
}

func (FlavorConstraintArchitectureType) MarshalJSON

func (c FlavorConstraintArchitectureType) MarshalJSON() ([]byte, error)

func (*FlavorConstraintArchitectureType) UnmarshalJSON

func (c *FlavorConstraintArchitectureType) UnmarshalJSON(b []byte) error

func (FlavorConstraintArchitectureType) Value

type FlavorConstraintArchitectureTypeEnum

type FlavorConstraintArchitectureTypeEnum struct {
	X86_64 FlavorConstraintArchitectureType
	ARM64  FlavorConstraintArchitectureType
}

func GetFlavorConstraintArchitectureTypeEnum

func GetFlavorConstraintArchitectureTypeEnum() FlavorConstraintArchitectureTypeEnum

type FlavorRequirement

type FlavorRequirement struct {
	VcpuCount *IntegerRange `json:"vcpu_count,omitempty"`

	MemoryMb *IntegerRange `json:"memory_mb,omitempty"`

	// 可选CPU制造商,不填表示接受所有
	CpuManufacturers *[]FlavorRequirementCpuManufacturers `json:"cpu_manufacturers,omitempty"`

	MemoryGbPerVcpu *DoubleRange `json:"memory_gb_per_vcpu,omitempty"`

	// 接受的资源代系,不填表示接受所有
	InstanceGenerations *[]FlavorRequirementInstanceGenerations `json:"instance_generations,omitempty"`
}

对规格的资源需求约束

func (FlavorRequirement) String

func (o FlavorRequirement) String() string

type FlavorRequirementCpuManufacturers

type FlavorRequirementCpuManufacturers struct {
	// contains filtered or unexported fields
}

func (FlavorRequirementCpuManufacturers) MarshalJSON

func (c FlavorRequirementCpuManufacturers) MarshalJSON() ([]byte, error)

func (*FlavorRequirementCpuManufacturers) UnmarshalJSON

func (c *FlavorRequirementCpuManufacturers) UnmarshalJSON(b []byte) error

func (FlavorRequirementCpuManufacturers) Value

type FlavorRequirementInstanceGenerations

type FlavorRequirementInstanceGenerations struct {
	// contains filtered or unexported fields
}

func (FlavorRequirementInstanceGenerations) MarshalJSON

func (c FlavorRequirementInstanceGenerations) MarshalJSON() ([]byte, error)

func (*FlavorRequirementInstanceGenerations) UnmarshalJSON

func (c *FlavorRequirementInstanceGenerations) UnmarshalJSON(b []byte) error

func (FlavorRequirementInstanceGenerations) Value

type FlavorRequirementInstanceGenerationsEnum

type FlavorRequirementInstanceGenerationsEnum struct {
	CURRENT  FlavorRequirementInstanceGenerations
	PREVIOUS FlavorRequirementInstanceGenerations
}

func GetFlavorRequirementInstanceGenerationsEnum

func GetFlavorRequirementInstanceGenerationsEnum() FlavorRequirementInstanceGenerationsEnum

type InstanceInfo

type InstanceInfo struct {

	// 实例名称。
	Name string `json:"name"`

	// 实例ID。
	Id string `json:"id"`

	// 可用区ID
	AvailabilityZoneId string `json:"availability_zone_id"`

	// 实例规格
	FlavorId string `json:"flavor_id"`

	// 实例状态
	Status string `json:"status"`

	// 销售模型,枚举值 spot:竞价实例 onDemand:按需实例
	SellMode string `json:"sell_mode"`
}

实例列表

func (InstanceInfo) String

func (o InstanceInfo) String() string

type IntegerRange

type IntegerRange struct {

	// 最大值,-1表示无限制
	Max *int32 `json:"max,omitempty"`

	// 最小值,-1表示无限制
	Min *int32 `json:"min,omitempty"`
}

资源取值范围,最大值最小值可取。 约束:min<=max

func (IntegerRange) String

func (o IntegerRange) String() string

type LaunchTemplateConfig

type LaunchTemplateConfig struct {
	LaunchTemplate *LaunchTemplateInfo `json:"launch_template"`

	// 实例的详细信息
	Overrides []OverrideInfo `json:"overrides"`
}

启动模板相关配置

func (LaunchTemplateConfig) String

func (o LaunchTemplateConfig) String() string

type LaunchTemplateInfo

type LaunchTemplateInfo struct {

	// 实例的启动模板ID,唯一标识一个启动模板
	LaunchTemplateId string `json:"launch_template_id"`

	// 启动模板版本号
	Version string `json:"version"`
}

实例的启动模板,创建虚拟机时,使用到安全组、网络、镜像、flavor等信息

func (LaunchTemplateInfo) String

func (o LaunchTemplateInfo) String() string

type ListAutoLaunchGroupsRequest

type ListAutoLaunchGroupsRequest struct {

	// 查询返回智能购买组的数量限制 取值范围:1-1000。
	Limit *int32 `json:"limit,omitempty"`

	// 取值为上一页数据的最后一条记录的唯一标识
	Marker *string `json:"marker,omitempty"`

	// 智能购买组名称
	Name *string `json:"name,omitempty"`

	// 请求开始时间,按照时间范围过滤 按照ISO8601标准表示,并使用UTC +0时间,格式为yyyy-MM-ddTHH:mm:ssZ
	ValidSince *string `json:"valid_since,omitempty"`

	// 请求结束时间,按照时间范围过滤 按照ISO8601标准表示,并使用UTC +0时间,格式为yyyy-MM-ddTHH:mm:ssZ
	ValidUntil *string `json:"valid_until,omitempty"`
}

Request Object

func (ListAutoLaunchGroupsRequest) String

type ListAutoLaunchGroupsResponse

type ListAutoLaunchGroupsResponse struct {

	// 智能购买组列表
	AutoLaunchGroups *[]AutoLaunchGroupInfo `json:"auto_launch_groups,omitempty"`

	PageInfo       *PageInfo `json:"page_info,omitempty"`
	HttpStatusCode int       `json:"-"`
}

Response Object

func (ListAutoLaunchGroupsResponse) String

type ListInstancesRequest

type ListInstancesRequest struct {

	// 查询返回实例数量限制 取值范围:1-1000。
	Limit *int32 `json:"limit,omitempty"`

	// 取值为上一页数据的最后一条记录的唯一标识
	Marker *string `json:"marker,omitempty"`

	// 智能购买组ID
	AutoLaunchGroupId string `json:"auto_launch_group_id"`
}

Request Object

func (ListInstancesRequest) String

func (o ListInstancesRequest) String() string

type ListInstancesResponse

type ListInstancesResponse struct {

	// 实例列表
	Instances *[]InstanceInfo `json:"instances,omitempty"`

	PageInfo       *PageInfo `json:"page_info,omitempty"`
	HttpStatusCode int       `json:"-"`
}

Response Object

func (ListInstancesResponse) String

func (o ListInstancesResponse) String() string

type ListSupplyRecommendationRequest

type ListSupplyRecommendationRequest struct {
	Body *ListSupplyRecommendationRequestBody `json:"body,omitempty"`
}

Request Object

func (ListSupplyRecommendationRequest) String

type ListSupplyRecommendationRequestBody

type ListSupplyRecommendationRequestBody struct {
	FlavorConstraint *FlavorConstraint `json:"flavor_constraint,omitempty"`

	// 接受推荐的规格列表
	FlavorIds *[]string `json:"flavor_ids,omitempty"`

	// 接受推荐的地域列表,默认接受所有区域
	Locations *[]DistinctLocation `json:"locations,omitempty"`

	Option *SupplyOption `json:"option,omitempty"`

	// 推荐的策略。 CAPACITY:容量策略 COST:成本策略
	Strategy *ListSupplyRecommendationRequestBodyStrategy `json:"strategy,omitempty"`

	// 查询返回的数量限制
	Limit *int32 `json:"limit,omitempty"`

	// 取值为上一页数据的最后一条记录的唯一标记
	Marker *string `json:"marker,omitempty"`
}

This is a auto create Body Object

func (ListSupplyRecommendationRequestBody) String

type ListSupplyRecommendationRequestBodyStrategy

type ListSupplyRecommendationRequestBodyStrategy struct {
	// contains filtered or unexported fields
}

func (ListSupplyRecommendationRequestBodyStrategy) MarshalJSON

func (*ListSupplyRecommendationRequestBodyStrategy) UnmarshalJSON

func (ListSupplyRecommendationRequestBodyStrategy) Value

type ListSupplyRecommendationResponse

type ListSupplyRecommendationResponse struct {

	// 资源供给推荐结果
	SupplyRecommendations *[]SupplyRecommendation `json:"supply_recommendations,omitempty"`
	HttpStatusCode        int                     `json:"-"`
}

Response Object

func (ListSupplyRecommendationResponse) String

type OverrideInfo

type OverrideInfo struct {

	// 可用区ID
	AvailabilityZoneId string `json:"availability_zone_id"`

	// 实例规格ID
	FlavorId string `json:"flavor_id"`

	// 用户愿意为竞价实例每小时支付的最高价格
	SpotPrice *float64 `json:"spot_price,omitempty"`

	// 优先级。数值越小,优先级越高,优先购买。 取值范围:0到Integer.MAX_VALUE 默认值是Integer.MAX_VALUE
	Priority *int32 `json:"priority,omitempty"`

	// 实例规格的权重。取值越高,单台实例满足计算力需求的能力越大,所需的实例数量越小。 取值范围:大于0 可以根据指定实例规格的计算力和集群单节点最低计算力得出权重值。 假设单节点最低计算力为8vcpu、60GB,则8vcpu、60GB的实例规格权重可设置为1,16vcpu、120GB的实例规格权重可设置为2
	WeightedCapacity *float64 `json:"weighted_capacity,omitempty"`
}

实例的详细信息

func (OverrideInfo) String

func (o OverrideInfo) String() string

type PageInfo

type PageInfo struct {

	// 返回下一页查询地址
	NextMarker string `json:"next_marker"`
}

页标记

func (PageInfo) String

func (o PageInfo) String() string

type RegionSpec

type RegionSpec struct {

	// 区域ID
	RegionId string `json:"region_id"`

	// 区域内期望的总算力容量
	ExpectTargetCapacity int32 `json:"expect_target_capacity"`

	// 区域内期望的稳定算力容量
	ExpectStableCapacity int32 `json:"expect_stable_capacity"`

	LaunchTemplateConfig *LaunchTemplateConfig `json:"launch_template_config"`
}

一个区域内的资源需求描述

func (RegionSpec) String

func (o RegionSpec) String() string

type ShowAutoLaunchGroupRequest

type ShowAutoLaunchGroupRequest struct {

	// 智能购买组ID
	AutoLaunchGroupId string `json:"auto_launch_group_id"`
}

Request Object

func (ShowAutoLaunchGroupRequest) String

type ShowAutoLaunchGroupResp

type ShowAutoLaunchGroupResp struct {

	// 智能购买组名称
	Name string `json:"name"`

	// 请求类型。枚举值 request:一次性。仅在启动时交付实例集群,调度失败后不再重试。 maintain:持续供应。在启动时尝试交付实例集群,并监控实时容量,未达到目标容量则尝试继续创建ECS实例
	Type ShowAutoLaunchGroupRespType `json:"type"`

	// 智能购买组的运行状态,枚举值 SUBMITTED:已提交 ACTIVE:运行中 DELETING:删除中 DELETED:已删除
	Status string `json:"status"`

	// 智能购买组的任务状态,枚举值 HANDLING:购买中 FULFILLED:智能购买组已满配 ERROR:智能购买组异常
	TaskState string `json:"task_state"`

	// 智能购买组目标容量. 实例数量或者CPU个数,目标容量大于等于stable_capacity。竞价实例的容量为满配容量减去stable_capacity
	TargetCapacity int32 `json:"target_capacity"`

	// 按需实例目标容量 目标容量指实例数量或CPU个数,必须小于等于target_capacity,智能购买组中可以没有按需实例
	StableCapacity int32 `json:"stable_capacity"`

	// 当前已经购买成功的总算力
	CurrentCapacity int32 `json:"current_capacity"`

	// 当前已经购买成功的按需算力
	CurrentStableCapacity int32 `json:"current_stable_capacity"`

	// 超过目标容量或目标容量减少时的实例中断行为,枚举值 terminate:释放 noTermination:不释放
	ExcessFulfilledCapacityBehavior ShowAutoLaunchGroupRespExcessFulfilledCapacityBehavior `json:"excess_fulfilled_capacity_behavior"`

	// 请求到期时的实例中断行为,枚举值 terminate:释放 noTermination:不释放
	InstancesBehaviorWithExpiration ShowAutoLaunchGroupRespInstancesBehaviorWithExpiration `json:"instances_behavior_with_expiration"`

	// 请求开始时间,格式为yyyy-MM-ddTHH:mm:ssZ
	ValidSince *sdktime.SdkTime `json:"valid_since"`

	// 请求结束时间,格式为yyyy-MM-ddTHH:mm:ssZ
	ValidUntil *sdktime.SdkTime `json:"valid_until"`

	// 智能购买组在各个区域的配置
	RegionSpecs []RegionSpec `json:"region_specs"`

	// 实例分配策略,枚举值 lowest_price:价格最低策略,智能购买组购买的所有实例的价格总和最低。 prioritized:优先级策略,按照规格设定的优先级创建实例。 capacity_optimized:容量最优化策略,智能购买组购买的实例按照大规格优先进行购买。
	AllocationStrategy ShowAutoLaunchGroupRespAllocationStrategy `json:"allocation_strategy"`

	// 用户愿意为竞价实例每小时支付的最高价格。如果overrides中没有提供价格,可以使用该价格。
	SpotPrice *float64 `json:"spot_price,omitempty"`

	// 智能购买组创建时间
	CreatedAt *sdktime.SdkTime `json:"created_at"`
}

智能购买组信息

func (ShowAutoLaunchGroupResp) String

func (o ShowAutoLaunchGroupResp) String() string

type ShowAutoLaunchGroupRespAllocationStrategy

type ShowAutoLaunchGroupRespAllocationStrategy struct {
	// contains filtered or unexported fields
}

func (ShowAutoLaunchGroupRespAllocationStrategy) MarshalJSON

func (*ShowAutoLaunchGroupRespAllocationStrategy) UnmarshalJSON

func (ShowAutoLaunchGroupRespAllocationStrategy) Value

type ShowAutoLaunchGroupRespExcessFulfilledCapacityBehavior

type ShowAutoLaunchGroupRespExcessFulfilledCapacityBehavior struct {
	// contains filtered or unexported fields
}

func (ShowAutoLaunchGroupRespExcessFulfilledCapacityBehavior) MarshalJSON

func (*ShowAutoLaunchGroupRespExcessFulfilledCapacityBehavior) UnmarshalJSON

func (ShowAutoLaunchGroupRespExcessFulfilledCapacityBehavior) Value

type ShowAutoLaunchGroupRespInstancesBehaviorWithExpiration

type ShowAutoLaunchGroupRespInstancesBehaviorWithExpiration struct {
	// contains filtered or unexported fields
}

func (ShowAutoLaunchGroupRespInstancesBehaviorWithExpiration) MarshalJSON

func (*ShowAutoLaunchGroupRespInstancesBehaviorWithExpiration) UnmarshalJSON

func (ShowAutoLaunchGroupRespInstancesBehaviorWithExpiration) Value

type ShowAutoLaunchGroupRespType

type ShowAutoLaunchGroupRespType struct {
	// contains filtered or unexported fields
}

func (ShowAutoLaunchGroupRespType) MarshalJSON

func (c ShowAutoLaunchGroupRespType) MarshalJSON() ([]byte, error)

func (*ShowAutoLaunchGroupRespType) UnmarshalJSON

func (c *ShowAutoLaunchGroupRespType) UnmarshalJSON(b []byte) error

func (ShowAutoLaunchGroupRespType) Value

type ShowAutoLaunchGroupRespTypeEnum

type ShowAutoLaunchGroupRespTypeEnum struct {
	REQUEST  ShowAutoLaunchGroupRespType
	MAINTAIN ShowAutoLaunchGroupRespType
}

func GetShowAutoLaunchGroupRespTypeEnum

func GetShowAutoLaunchGroupRespTypeEnum() ShowAutoLaunchGroupRespTypeEnum

type ShowAutoLaunchGroupResponse

type ShowAutoLaunchGroupResponse struct {
	AutoLaunchGroup *ShowAutoLaunchGroupResp `json:"auto_launch_group,omitempty"`
	HttpStatusCode  int                      `json:"-"`
}

Response Object

func (ShowAutoLaunchGroupResponse) String

type SupplyOption

type SupplyOption struct {

	// 推荐结果的粒度 BY_REGION:对每个区域打分,可使用多种规格满足需求 BY_AZ:对每个可用区打分 BY_FLAVOR:对每个规格打分,可使用多地域满足需求 BY_FLAVOR_AND_REGION:对每个区域下的每个规格打分 BY_FLAVOR_AND_AZ:对每个可用区下的每个规格打分
	ResultGranularity *SupplyOptionResultGranularity `json:"result_granularity,omitempty"`

	// 是否推荐竞价实例
	EnableSpot *bool `json:"enable_spot,omitempty"`
}

供给推荐的选项

func (SupplyOption) String

func (o SupplyOption) String() string

type SupplyOptionResultGranularity

type SupplyOptionResultGranularity struct {
	// contains filtered or unexported fields
}

func (SupplyOptionResultGranularity) MarshalJSON

func (c SupplyOptionResultGranularity) MarshalJSON() ([]byte, error)

func (*SupplyOptionResultGranularity) UnmarshalJSON

func (c *SupplyOptionResultGranularity) UnmarshalJSON(b []byte) error

func (SupplyOptionResultGranularity) Value

type SupplyOptionResultGranularityEnum

type SupplyOptionResultGranularityEnum struct {
	BY_REGION            SupplyOptionResultGranularity
	BY_AZ                SupplyOptionResultGranularity
	BY_FLAVOR            SupplyOptionResultGranularity
	BY_FLAVOR_AND_REGION SupplyOptionResultGranularity
	BY_FLAVOR_AND_AZ     SupplyOptionResultGranularity
}

func GetSupplyOptionResultGranularityEnum

func GetSupplyOptionResultGranularityEnum() SupplyOptionResultGranularityEnum

type SupplyRecommendation

type SupplyRecommendation struct {

	// 实例规格ID
	FlavorId *string `json:"flavor_id,omitempty"`

	// 区域ID
	RegionId *string `json:"region_id,omitempty"`

	// 可用区ID
	AvailabilityZoneId *string `json:"availability_zone_id,omitempty"`

	// 推荐分数
	Score *int32 `json:"score,omitempty"`
}

资源供给推荐结果

func (SupplyRecommendation) String

func (o SupplyRecommendation) String() string

type UpdateAutoLaunchGroupReqV2

type UpdateAutoLaunchGroupReqV2 struct {

	// 智能购买组名称。 取值范围:1-64个字符,只能包含中文、字母、数字、下划线和中划线
	Name *string `json:"name,omitempty"`

	// 算力保障计划ID
	GuaranteePlanId *string `json:"guarantee_plan_id,omitempty"`

	// 智能购买组目标容量。 实例数量或者CPU个数,目标容量大于等于stable_capacity。竞价实例的容量为满配容量减去stable_capacity。
	TargetCapacity *int32 `json:"target_capacity,omitempty"`

	// 按需实例目标容量。 目标容量指实例数量或CPU个数,必须小于等于target_capacity,智能购买组中可以没有按需实例。
	StableCapacity *int32 `json:"stable_capacity,omitempty"`

	// 超过目标容量或目标容量减少时的实例中断行为,枚举值 terminate:释放 noTermination:不释放 默认值:terminate
	ExcessFulfilledCapacityBehavior *UpdateAutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior `json:"excess_fulfilled_capacity_behavior,omitempty"`

	// 请求到期时正在运行实例的中断行为,枚举值 terminate:释放 noTermination:不释放 默认值:terminate
	InstancesBehaviorWithExpiration *UpdateAutoLaunchGroupReqV2InstancesBehaviorWithExpiration `json:"instances_behavior_with_expiration,omitempty"`

	// 用户愿意为竞价实例每小时支付的最高价格。如果overrides中没有提供价格,可以使用该价格
	SpotPrice *float64 `json:"spot_price,omitempty"`
}

This is a auto create Body Object

func (UpdateAutoLaunchGroupReqV2) String

type UpdateAutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior

type UpdateAutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior struct {
	// contains filtered or unexported fields
}

func (UpdateAutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior) MarshalJSON

func (*UpdateAutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior) UnmarshalJSON

func (UpdateAutoLaunchGroupReqV2ExcessFulfilledCapacityBehavior) Value

type UpdateAutoLaunchGroupReqV2InstancesBehaviorWithExpiration

type UpdateAutoLaunchGroupReqV2InstancesBehaviorWithExpiration struct {
	// contains filtered or unexported fields
}

func (UpdateAutoLaunchGroupReqV2InstancesBehaviorWithExpiration) MarshalJSON

func (*UpdateAutoLaunchGroupReqV2InstancesBehaviorWithExpiration) UnmarshalJSON

func (UpdateAutoLaunchGroupReqV2InstancesBehaviorWithExpiration) Value

type UpdateAutoLaunchGroupRequest

type UpdateAutoLaunchGroupRequest struct {

	// 智能购买组ID
	AutoLaunchGroupId string `json:"auto_launch_group_id"`

	Body *UpdateAutoLaunchGroupReqV2 `json:"body,omitempty"`
}

Request Object

func (UpdateAutoLaunchGroupRequest) String

type UpdateAutoLaunchGroupResponse

type UpdateAutoLaunchGroupResponse struct {

	// 错误码 请求失败时,响应体中包含错误码 请求成功时,不在响应消息体中包含错误码
	ErrorCode *int32 `json:"error_code,omitempty"`

	// 错误描述 请求失败时,响应体中包含错误描述 请求成功时,不在响应消息体中包含错误描述
	ErrorMsg       *string `json:"error_msg,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (UpdateAutoLaunchGroupResponse) String

Jump to

Keyboard shortcuts

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