models

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 28, 2018 License: Apache-2.0 Imports: 3 Imported by: 17 modules, 32 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ag

type Ag struct {

	/* 高可用组名称 (Optional) */
	Name string `json:"name"`

	/* 高可用组id (Optional) */
	Id string `json:"id"`
}

type Image

type Image struct {

	/* 镜像ID (Optional) */
	ImageId string `json:"imageId"`

	/* 镜像名称 (Optional) */
	Name string `json:"name"`

	/* 操作系统发行版,[suse, debian, ubuntu, centos, windows-server] (Optional) */
	Platform string `json:"platform"`

	/* 操作系统版本号 (Optional) */
	OsVersion string `json:"osVersion"`

	/* 镜像架构 i386, x86_64 (Optional) */
	Architecture string `json:"architecture"`

	/* 镜像系统盘大小 (Optional) */
	SystemDiskSizeGB int `json:"systemDiskSizeGB"`

	/* 镜像来源 jcloud:官方镜像 marketplace:镜像市场镜像 self:用户自己的镜像 shared:其他用户分享的镜像 (Optional) */
	ImageSource string `json:"imageSource"`

	/* 镜像的操作系统类型,[windows, linux] (Optional) */
	OsType string `json:"osType"`

	/* 镜像状态, [pending, ready, deleting, error] (Optional) */
	Status string `json:"status"`

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

	/* 镜像本身大小 (Optional) */
	SizeMB int `json:"sizeMB"`

	/* 镜像描述 (Optional) */
	Desc string `json:"desc"`

	/* 打包镜像数据盘映射信息 (Optional) */
	DataDisks []InstanceDiskAttachment `json:"dataDisks"`
}

type ImageConstraint

type ImageConstraint struct {

	/* 镜像实例类型限制 (Optional) */
	ImageInstanceTypeConstraint ImageInstanceTypeConstraint `json:"imageInstanceTypeConstraint"`
}

type ImageInstanceTypeConstraint

type ImageInstanceTypeConstraint struct {

	/* 限制的类型  excludes:排除指定的实例类型  includes:只包含指定的实例类型,暂不支持 (Optional) */
	ConstraintsType string `json:"constraintsType"`

	/* 实例类型列表 (Optional) */
	InstanceTypes []string `json:"instanceTypes"`
}

type Instance

type Instance struct {

	/* 实例ID (Optional) */
	InstanceId string `json:"instanceId"`

	/* 实例名称 (Optional) */
	InstanceName string `json:"instanceName"`

	/* 实例类型 (Optional) */
	InstanceType string `json:"instanceType"`

	/* 主网卡所属VPC的ID (Optional) */
	VpcId string `json:"vpcId"`

	/* 主网卡所属子网的ID (Optional) */
	SubnetId string `json:"subnetId"`

	/* 主网卡主IP地址 (Optional) */
	PrivateIpAddress string `json:"privateIpAddress"`

	/* 主网卡主IP绑定弹性IP的ID (Optional) */
	ElasticIpId string `json:"elasticIpId"`

	/* 主网卡主IP绑定弹性IP的地址 (Optional) */
	ElasticIpAddress string `json:"elasticIpAddress"`

	/* 实例状态 (Optional) */
	Status string `json:"status"`

	/* 实例描述 (Optional) */
	Description string `json:"description"`

	/* 镜像ID (Optional) */
	ImageId string `json:"imageId"`

	/* 系统盘信息 (Optional) */
	SystemDisk InstanceDiskAttachment `json:"systemDisk"`

	/* 数据盘信息 (Optional) */
	DataDisks []InstanceDiskAttachment `json:"dataDisks"`

	/* 主网卡信息 (Optional) */
	PrimaryNetworkInterface InstanceNetworkInterfaceAttachment `json:"primaryNetworkInterface"`

	/* 创建时间 (Optional) */
	LaunchTime string `json:"launchTime"`

	/* 可用区 (Optional) */
	Az string `json:"az"`

	/* 密钥对名称 (Optional) */
	KeyNames []string `json:"keyNames"`

	/* 计费信息 (Optional) */
	Charge Charge `json:"charge"`

	/* Tag信息 (Optional) */
	Tags []Tag `json:"tags"`
}

type InstanceDiskAttachment

type InstanceDiskAttachment struct {

	/* 磁盘分类,取值范围{local, cloud} (Optional) */
	DiskCategory string `json:"diskCategory"`

	/* 自动删除,删除主机时自动删除此磁盘,默认为True (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 本地磁盘 (Optional) */
	LocalDisk LocalDisk `json:"localDisk"`

	/* 云硬盘 (Optional) */
	CloudDisk Disk `json:"cloudDisk"`

	/* 数据盘逻辑挂载点vdb,vdc,vdd,vde,vdf,vdg,vdh (Optional) */
	DeviceName string `json:"deviceName"`
}

type InstanceDiskAttachmentSpec

type InstanceDiskAttachmentSpec struct {

	/* 磁盘分类,local或者cloud;系统盘仅支持local;数据盘仅支持cloud (Optional) */
	DiskCategory *string `json:"diskCategory"`

	/* 自动删除,删除主机时自动删除此磁盘,默认为True,本地盘不能更改此值 (Optional) */
	AutoDelete *bool `json:"autoDelete"`

	/* 云硬盘规格 (Optional) */
	CloudDiskSpec *DiskSpec `json:"cloudDiskSpec"`

	/* 数据盘逻辑挂载点vdb,vdc,vdd,vde,vdf,vdg,vdh (Optional) */
	DeviceName *string `json:"deviceName"`

	/* 排除设备,true则排除对应的deviceName (Optional) */
	NoDevice *bool `json:"noDevice"`
}

type InstanceNetworkInterface

type InstanceNetworkInterface struct {

	/* 弹性网卡ID (Optional) */
	NetworkInterfaceId string `json:"networkInterfaceId"`

	/* 以太网地址 (Optional) */
	MacAddress string `json:"macAddress"`

	/* 虚拟网络ID (Optional) */
	VpcId string `json:"vpcId"`

	/* 子网ID (Optional) */
	SubnetId string `json:"subnetId"`

	/*  (Optional) */
	SecurityGroups []SecurityGroupSimple `json:"securityGroups"`

	/* 源和目标IP地址校验,取值为0或者1 (Optional) */
	SanityCheck int `json:"sanityCheck"`

	/* 网卡主IP (Optional) */
	PrimaryIp NetworkInterfacePrivateIp `json:"primaryIp"`

	/* 网卡辅IP (Optional) */
	SecondaryIps []NetworkInterfacePrivateIp `json:"secondaryIps"`
}

type InstanceNetworkInterfaceAttachment

type InstanceNetworkInterfaceAttachment struct {

	/* 设备Index (Optional) */
	DeviceIndex int `json:"deviceIndex"`

	/* 指明删除实例时是否删除网卡,默认True;当前只能是True (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 网卡接口规范 (Optional) */
	NetworkInterface InstanceNetworkInterface `json:"networkInterface"`
}

type InstanceNetworkInterfaceAttachmentSpec

type InstanceNetworkInterfaceAttachmentSpec struct {

	/* 设备Index (Optional) */
	DeviceIndex *int `json:"deviceIndex"`

	/* 网卡接口规范 (Optional) */
	NetworkInterface *NetworkInterfaceSpec `json:"networkInterface"`
}

type InstanceSpec

type InstanceSpec struct {

	/* 实例所属的可用区  */
	Az string `json:"az"`

	/* 实例类型  */
	InstanceType string `json:"instanceType"`

	/* 镜像ID  */
	ImageId string `json:"imageId"`

	/* 主机名称,不为空且只允许中文、数字、大小写字母、英文下划线“_”及中划线“-”,不超过32字符  */
	Name string `json:"name"`

	/* "密码,长度8-30个字符"
	"a)不能出现的字符或完整单词,如下:jd、JD、360、bug、BUG、com、COM、cloud、CLOUD、password、PASSWORD"
	"b)不能出现连续三位及三位以上数字,例:123、987"
	"c)不能出现连续三位及三位以上的字母,例:abc、CBA、bcde、cdef"
	"d)不能出现三位及三位以上键位顺序(仅包括字母),例:qaz、tfc、wsx、xsw、qwert、trewq"
	"e)密码中不能出现自己的用户名"
	"g)至少同时包含三类(大写字母,小写字母,数字和特殊字符,特殊字符为 ** ()`~!@#$%&_-+={}[]:\";'<>,.?/)*|"
	 (Optional) */
	Password *string `json:"password"`

	/* 密钥对名称  */
	KeyNames []string `json:"keyNames"`

	/* 主网卡主IP关联的弹性IP规格 (Optional) */
	ElasticIp *ElasticIpSpec `json:"elasticIp"`

	/* 主网卡配置信息  */
	PrimaryNetworkInterface *InstanceNetworkInterfaceAttachmentSpec `json:"primaryNetworkInterface"`

	/* 系统盘配置信息  */
	SystemDisk *InstanceDiskAttachmentSpec `json:"systemDisk"`

	/* 数据盘配置信息  */
	DataDisks []InstanceDiskAttachmentSpec `json:"dataDisks"`

	/* 计费配置 (Optional) */
	Charge *ChargeSpec `json:"charge"`

	/* 主机描述,长度不超过256字符  */
	Description string `json:"description"`
}

type InstanceTemplate

type InstanceTemplate struct {

	/* 启动模板ID (Optional) */
	Id string `json:"id"`

	/* 启动模板名称 (Optional) */
	Name string `json:"name"`

	/* 启动模板描述 (Optional) */
	Description string `json:"description"`

	/* 模板的数据 (Optional) */
	InstanceTemplateData InstanceTemplateData `json:"instanceTemplateData"`

	/* ag信息 (Optional) */
	Ags []Ag `json:"ags"`

	/* 创建时间 (Optional) */
	CreatedTime string `json:"createdTime"`
}

type InstanceTemplateData

type InstanceTemplateData struct {

	/* 实例类型 (Optional) */
	InstanceType string `json:"instanceType"`

	/* 主网卡所属VPC的ID (Optional) */
	VpcId string `json:"vpcId"`

	/* 镜像ID (Optional) */
	ImageId string `json:"imageId"`

	/* 密码不会返回,true:为包含密码,false:为不包含密码 (Optional) */
	IncludePassword bool `json:"includePassword"`

	/* 系统盘信息 (Optional) */
	SystemDisk InstanceTemplateDiskAttachment `json:"systemDisk"`

	/* 数据盘信息 (Optional) */
	DataDisks []InstanceTemplateDiskAttachment `json:"dataDisks"`

	/* 主网卡信息 (Optional) */
	PrimaryNetworkInterface InstanceNetworkInterfaceAttachment `json:"primaryNetworkInterface"`

	/* 主网卡主IP关联的弹性IP规格 (Optional) */
	ElasticIp InstanceTemplateElasticIp `json:"elasticIp"`

	/* 密钥对名称;当前只支持一个 (Optional) */
	KeyNames []string `json:"keyNames"`
}

type InstanceTemplateDisk

type InstanceTemplateDisk struct {

	/* 云硬盘类型,取值为 ssd 或 premium-hdd (Optional) */
	DiskType string `json:"diskType"`

	/* 云硬盘大小,单位为 GiB;ssd 类型取值范围[20,1000]GB,步长为10G,premium-hdd 类型取值范围[20,3000]GB,步长为10G (Optional) */
	DiskSizeGB int `json:"diskSizeGB"`

	/* 用于创建云硬盘的快照ID (Optional) */
	SnapshotId string `json:"snapshotId"`
}

type InstanceTemplateDiskAttachment

type InstanceTemplateDiskAttachment struct {

	/* 磁盘分类,local或者cloud;系统盘仅支持local;数据盘仅支持cloud (Optional) */
	DiskCategory string `json:"diskCategory"`

	/* 自动删除,删除主机时自动删除此磁盘,默认为True,本地盘不能更改此值 (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 云硬盘规格 (Optional) */
	InstanceTemplateDisk InstanceTemplateDisk `json:"instanceTemplateDisk"`

	/* 系统盘不需要使用,数据盘时才能够使用。设置数据盘的挂载点,[vdb,vdc,vdd,vde,vdf,vdg,vdh] (Optional) */
	DeviceName string `json:"deviceName"`

	/* 排除镜像数据盘映射中的逻辑挂载点 (Optional) */
	NoDevice bool `json:"noDevice"`
}

type InstanceTemplateDiskAttachmentSpec

type InstanceTemplateDiskAttachmentSpec struct {

	/* 磁盘分类,local或者cloud;系统盘仅支持local;数据盘仅支持cloud (Optional) */
	DiskCategory string `json:"diskCategory"`

	/* 自动删除,删除主机时自动删除此磁盘,默认为True,本地盘不能更改此值 (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 云硬盘规格 (Optional) */
	CloudDiskSpec InstanceTemplateDiskSpec `json:"cloudDiskSpec"`

	/* 数据盘逻辑挂载点vdb,vdc,vdd,vde,vdf,vdg,vdh (Optional) */
	DeviceName string `json:"deviceName"`

	/* 排除镜像数据盘映射中的逻辑挂载点 (Optional) */
	NoDevice bool `json:"noDevice"`
}

type InstanceTemplateDiskSpec

type InstanceTemplateDiskSpec struct {

	/* 云硬盘类型,取值为 ssd 或 premium-hdd (Optional) */
	DiskType string `json:"diskType"`

	/* 云硬盘大小,单位为 GiB;ssd 类型取值范围[20,1000]GB,步长为10G,premium-hdd 类型取值范围[20,3000]GB,步长为10G (Optional) */
	DiskSizeGB int `json:"diskSizeGB"`

	/* 用于创建云硬盘的快照ID (Optional) */
	SnapshotId string `json:"snapshotId"`
}

type InstanceTemplateElasticIp

type InstanceTemplateElasticIp struct {

	/* 弹性公网IP的限速(单位:MB)  */
	BandwidthMbps int `json:"bandwidthMbps"`

	/* IP服务商,取值为BGP,nonBGP (Optional) */
	Provider string `json:"provider"`

	/* 计费类型,bandwith,flow  */
	ChargeMode string `json:"chargeMode"`
}

type InstanceTemplateElasticIpSpec

type InstanceTemplateElasticIpSpec struct {

	/* 弹性公网IP的限速(单位:MB)  */
	BandwidthMbps int `json:"bandwidthMbps"`

	/* IP服务商,取值为BGP,nonBGP (Optional) */
	Provider string `json:"provider"`

	/* 计费类型,bandwith,flow  */
	ChargeMode string `json:"chargeMode"`
}

type InstanceTemplateNetworkInterfaceAttachmentSpec

type InstanceTemplateNetworkInterfaceAttachmentSpec struct {

	/* 设备Index;主网卡的index必须为0;当前仅支持主网卡 (Optional) */
	DeviceIndex int `json:"deviceIndex"`

	/* 指明删除实例时是否删除网卡,默认True;当前只能是True (Optional) */
	AutoDelete bool `json:"autoDelete"`

	/* 网卡接口规范;此字段当前必填  */
	NetworkInterface InstanceTemplateNetworkInterfaceSpec `json:"networkInterface"`
}

type InstanceTemplateNetworkInterfaceSpec

type InstanceTemplateNetworkInterfaceSpec struct {

	/* 子网ID  */
	SubnetId string `json:"subnetId"`

	/* 安全组ID列表 (Optional) */
	SecurityGroups []string `json:"securityGroups"`

	/* PortSecurity,取值为0或者1,默认为1 (Optional) */
	SanityCheck int `json:"sanityCheck"`
}

type InstanceTemplateSpec

type InstanceTemplateSpec struct {

	/* 实例类型  */
	InstanceType string `json:"instanceType"`

	/* 镜像ID  */
	ImageId string `json:"imageId"`

	/* 密码 (Optional) */
	Password string `json:"password"`

	/* 密钥对名称 (Optional) */
	KeyNames []string `json:"keyNames"`

	/* 主网卡主IP关联的弹性IP规格 (Optional) */
	ElasticIp InstanceTemplateElasticIpSpec `json:"elasticIp"`

	/* 主网卡配置信息  */
	PrimaryNetworkInterface InstanceTemplateNetworkInterfaceAttachmentSpec `json:"primaryNetworkInterface"`

	/* 系统盘配置信息  */
	SystemDisk InstanceTemplateDiskAttachmentSpec `json:"systemDisk"`

	/* 数据盘配置信息 (Optional) */
	DataDisks []InstanceTemplateDiskAttachmentSpec `json:"dataDisks"`
}

type InstanceType

type InstanceType struct {

	/* 实例族 (Optional) */
	Family string `json:"family"`

	/* 实例类型,比如g.b1.2xlarge (Optional) */
	InstanceType string `json:"instanceType"`

	/* cpu个数 (Optional) */
	Cpu int `json:"cpu"`

	/* 内存 (Optional) */
	MemoryMB int `json:"memoryMB"`

	/* 描述 (Optional) */
	Desc string `json:"desc"`

	/* 状态 (Optional) */
	State []InstanceTypeState `json:"state"`
}

type InstanceTypeState added in v1.0.2

type InstanceTypeState struct {

	/* 可用区 (Optional) */
	Az string `json:"az"`

	/* true:可用、false:已售罄不可用 (Optional) */
	InStock bool `json:"inStock"`
}

type LocalDisk

type LocalDisk struct {

	/* 磁盘类型,取值范围{premium-hdd, ssd} (Optional) */
	DiskType string `json:"diskType"`

	/* 磁盘大小 (Optional) */
	DiskSizeGB int `json:"diskSizeGB"`
}

type Quota

type Quota struct {

	/* 资源类型[instance,keypair,image] (Optional) */
	ResourceType string `json:"resourceType"`

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

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

type SecurityGroupSimple

type SecurityGroupSimple struct {

	/* 安全组ID (Optional) */
	GroupId string `json:"groupId"`

	/* 安全组名称 (Optional) */
	GroupName string `json:"groupName"`
}

type Tag added in v1.0.2

type Tag struct {

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

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

type TagFilter added in v1.0.2

type TagFilter struct {

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

	/* Tag值 (Optional) */
	Values []string `json:"values"`
}

Jump to

Keyboard shortcuts

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