param

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CdpPolicyEnabled  CdpPolicyState = "Enabled"
	CdpPolicyDisabled CdpPolicyState = "Disabled"

	CdpTaskTypeVM CdpTaskType = "VM"

	CdpTaskStatusCreated  CdpTaskStatus = "Created"
	CdpTaskStatusStarting CdpTaskStatus = "Starting"
	CdpTaskStatusRunning  CdpTaskStatus = "Running"
	CdpTaskStatusStopped  CdpTaskStatus = "Stopped"
	CdpTaskStatusUnknown  CdpTaskStatus = "Unknown"
	CdpTaskStatusFailed   CdpTaskStatus = "Failed"

	CdpTaskStateEnabled  CdpTaskState = "Enabled"
	CdpTaskStateDisabled CdpTaskState = "Disabled"
)
View Source
const (
	X86_64   Architecture = "x86_64"
	Aarch64  Architecture = "aarch64"
	Mips64el Architecture = "mips64el"

	RootVolumeTemplate MediaType = "RootVolumeTemplate"
	ISO                MediaType = "ISO"
	DataVolumeTemplate MediaType = "DataVolumeTemplate"

	Raw   ImageFormat = "raw"
	Qcow2 ImageFormat = "qcow2"
	Iso   ImageFormat = "iso"
	VMDK  ImageFormat = "vmdk"
	VHD   ImageFormat = "vhd"

	StateEventEnable  StateEvent = "enable"
	StateEventDisable StateEvent = "disable"

	CandidateBackupStorageTypeDefault         CandidateBackupStorageType = ""
	CandidateBackupStorageTypeVolumes         CandidateBackupStorageType = "volumes"
	CandidateBackupStorageTypeVolumeSnapshots CandidateBackupStorageType = "volume-snapshots"

	Legacy      BootMode = "Legacy"
	UEFI        BootMode = "UEFI"
	UEFIWITHCSM BootMode = "UEFI_WITH_CSM"

	SystemTagBootModeUEFI   = "bootMode::UEFI"
	SystemTagBootModeLegacy = "bootMode::Legacy"

	SystemTagApplianceTypeVRouter = "applianceType::vrouter"
)
View Source
const (
	RecoveryPointScaleDay    = "day"
	RecoveryPointScaleHour   = "hour"
	RecoveryPointScaleMinute = "minute"
)
View Source
const (
	ResourceTypeVmInstanceVO          = "VmInstanceVO"
	ResourceTypeImageVO               = "ImageVO"
	ResourceTypeVolumeVo              = "VolumeVO"
	ResourceTypeVolumeSnapshotVO      = "VolumeSnapshotVO"
	ResourceTypeVolumeSnapshotGroupVO = "VolumeSnapshotGroupVO"
	ResourceTypeL3NetworkVO           = "L3NetworkVO"
)
View Source
const (
	UserVm      InstanceType = "UserVm"
	ApplianceVm InstanceType = "ApplianceVm"

	InstantStart  InstanceStrategy = "InstantStart"
	CreateStopped InstanceStrategy = "CreateStopped"

	Grace InstanceStopType = "grace" // Graceful shutdown, requires ACPI driver installed in the VM
	Cold  InstanceStopType = "cold"  // Cold shutdown, equivalent to directly cutting power

	NeverStop HA = "NeverStop" // Enable high availability
	None      HA = "None"      // High availability not enabled

	Host  ClockTrack = "host"
	Guest ClockTrack = "guest"
)

Variables

This section is empty.

Functions

func ConvertStruct2UrlValues

func ConvertStruct2UrlValues(param interface{}) (url.Values, error)

ConvertStruct2UrlValues converts a struct to url.Values.

Types

type AddDnsToL3NetworkDetailParam

type AddDnsToL3NetworkDetailParam struct {
	Dns string `json:"dns"`
}

type AddDnsToL3NetworkParam

type AddDnsToL3NetworkParam struct {
	BaseParam
	Params AddDnsToL3NetworkDetailParam `json:"params"`
}

type AddImageDetailParam

type AddImageDetailParam struct {
	Name               string       `json:"name" example:"vm-image-1"`                                                                                        //镜像名称
	Description        string       `json:"description" example:"vm-image-1 desc"`                                                                            //详细描述
	Url                string       `json:"url" example:"http://172.20.20.132:8001/imagestore/download/image-d1f501b3887a6a084feb66d0a995215731f664e4.qcow2"` //被添加镜像的URL地址
	MediaType          MediaType    `json:"mediaType" example:"RootVolumeTemplate"`                                                                           //镜像的类型,RootVolumeTemplate,ISO,DataVolumeTemplate
	GuestOsType        string       `json:"guestOsType" example:"Windows 10"`                                                                                 //镜像对应客户机操作系统的类型
	System             bool         `json:"system" example:"false"`                                                                                           //                                                                                                           //是否系统镜像(如,云路由镜像)
	Format             ImageFormat  `json:"format" example:"raw"`                                                                                             //镜像的格式,比如:raw
	Platform           string       `json:"platform" example:"Windows"`                                                                                       //                                                                                                         //镜像的系统平台,Linux,Windows,WindowsVirtio,Other,Paravirtualization
	BackupStorageUuids []string     `json:"backupStorageUuids" example:"26684790e4734a0bbb506f40907f57da"`                                                    //指定添加镜像的镜像服务器UUID列表
	Type               string       `json:"type"`                                                                                                             //内部使用字段
	ResourceUuid       string       `json:"resourceUuid"`                                                                                                     //资源UUID。若指定,镜像会使用该字段值作为UUID。
	Architecture       Architecture `json:"architecture" example:"x86_64"`                                                                                    //x86_64,aarch64,mips64el
	TagUuids           []string     `json:"tagUuids"`                                                                                                         //标签UUID列表
	Virtio             bool         `json:"virtio"`
	SystemTags         []string     `json:"systemTags"`
	UserTags           []string     `json:"userTags"`
}

type AddImageParam

type AddImageParam struct {
	BaseParam
	Params AddImageDetailParam `json:"params"`
}

type AddImageStoreBackupStorageDetailParam

type AddImageStoreBackupStorageDetailParam struct {
	Hostname     string            `json:"hostname"`
	Username     string            `json:"username"`
	Password     string            `json:"password"`
	SshPort      int               `json:"sshPort"`
	Url          string            `json:"url"`
	Name         string            `json:"name"`
	Description  string            `json:"description"`
	Type         BackupStorageType `json:"type"`
	ImportImages bool              `json:"importImages"`
	ResourceUuid string            `json:"resourceUuid"`
}

type AddImageStoreBackupStorageParam

type AddImageStoreBackupStorageParam struct {
	BaseParam
	Params AddImageStoreBackupStorageDetailParam `json:"params"`
}

type AddIpRangeByNetworkCidrDetailParam

type AddIpRangeByNetworkCidrDetailParam struct {
	Name        string `json:"name"`
	NetworkCidr string `json:"networkCidr"`
	Gateway     string `json:"gateway"`
	IpRangeType string `json:"ipRangeType"`
}

type AddIpRangeByNetworkCidrParam

type AddIpRangeByNetworkCidrParam struct {
	BaseParam
	Params AddIpRangeByNetworkCidrDetailParam `json:"params"`
}

type AddIpRangeDetailParam

type AddIpRangeDetailParam struct {
	Name        string `json:"name"`
	StartIp     string `json:"startIp"`
	EndIp       string `json:"endIp"`
	Netmask     string `json:"netmask"`
	Gateway     string `json:"gateway"`
	IpRangeType string `json:"ipRangeType"`
}

type AddIpRangeParam

type AddIpRangeParam struct {
	BaseParam
	Params AddIpRangeDetailParam `json:"params"`
}

type AddIpv6RangeByNetworkCidrDetailParam

type AddIpv6RangeByNetworkCidrDetailParam struct {
	Name        string `json:"name"`
	NetworkCidr string `json:"networkCidr"`
	AddressMode string `json:"addressMode"` // SLAAC, Stateful-DHCP, Stateless-DHCP
}

type AddIpv6RangeByNetworkCidrParam

type AddIpv6RangeByNetworkCidrParam struct {
	BaseParam
	Params AddIpv6RangeByNetworkCidrDetailParam `json:"params"`
}

type AddIpv6RangeDetailParam

type AddIpv6RangeDetailParam struct {
	Name        string `json:"name"`
	StartIp     string `json:"startIp"`
	EndIp       string `json:"endIp"`
	Gateway     string `json:"gateway"`
	PrefixLen   int    `json:"prefixLen"`
	AddressMode string `json:"addressMode"` // SLAAC, Stateful-DHCP, Stateless-DHCP
}

type AddIpv6RangeParam

type AddIpv6RangeParam struct {
	BaseParam
	Params AddIpv6RangeDetailParam `json:"params"`
}

type AddKVMHostDetailParam

type AddKVMHostDetailParam struct {
	Username     string `json:"username"`
	Password     string `json:"password"`
	SshPort      int    `json:"sshPort"`
	Name         string `json:"name"`
	ManagementIp string `json:"managementIp"`
	ClusterUuid  string `json:"clusterUuid"`
}

type AddKVMHostParam

type AddKVMHostParam struct {
	BaseParam
	Params AddKVMHostDetailParam `json:"params"`
}

type AddReservedIpRangeDetailParam

type AddReservedIpRangeDetailParam struct {
	StartIp string `json:"startIp"`
	EndIp   string `json:"endIp"`
}

type AddReservedIpRangeParam

type AddReservedIpRangeParam struct {
	BaseParam
	Params AddReservedIpRangeDetailParam `json:"params"`
}

type AddSecurityGroupRule

type AddSecurityGroupRule struct {
	RuleType                string `json:"type"`  // "Ingress" or "Egress
	State                   string `json:"state"` // "Enabled" or "Disabled"
	Description             string `json:"description"`
	IpVersion               int    `json:"ipVersion"`               // "4" or 6"
	Protocol                string `json:"protocol"`                // "TCP", "UDP", "ICMP", "ALL"
	SrcIpRange              string `json:"srcIpRange"`              // CIDR format, e.g., "
	DstIpRange              string `json:"dstIpRange"`              // CIDR format, e.g., "
	Action                  string `json:"action"`                  // "Allow" or "Deny"
	DstPortRange            string `json:"dstPortRange"`            // e.g., "21, 80-443" for TCP/UDP
	RemoteSecurityGroupUuid string `json:"remoteSecurityGroupUuid"` // Optional, for cross-security group rules
}

type AddSecurityGroupRuleDetailParam

type AddSecurityGroupRuleDetailParam struct {
	Rules    []AddSecurityGroupRule `json:"rules"`
	Priority int                    `json:"priority"` // Optional
}

type AddSecurityGroupRuleParam

type AddSecurityGroupRuleParam struct {
	BaseParam
	Params AddSecurityGroupRuleDetailParam `json:"params"`
}

type AddVmNicToSecurityGroupDetailParam

type AddVmNicToSecurityGroupDetailParam struct {
	//	SecurityGroupUuid string   `json:"securityGroupUuid"`
	VmNicUuids []string `json:"vmNicUuids"`
}

type AddVmNicToSecurityGroupParam

type AddVmNicToSecurityGroupParam struct {
	BaseParam
	Params AddVmNicToSecurityGroupDetailParam `json:"params"`
}

type Architecture

type Architecture string

type AttachL2NetworkToClusterParam

type AttachL2NetworkToClusterParam struct {
	BaseParam
}

type AttachL3NetworkToVmDetailParam

type AttachL3NetworkToVmDetailParam struct {
	StaticIp string `json:"staticIp"` // Specified IP address to be assigned to the VM
}

type AttachL3NetworkToVmParam

type AttachL3NetworkToVmParam struct {
	BaseParam
	Params AttachL3NetworkToVmDetailParam `json:"params"`
}

type AttachNetworkServiceToL3NetworkDetailParam

type AttachNetworkServiceToL3NetworkDetailParam struct {
	NetworkServices map[string][]string `json:"networkServices"`
}

type AttachNetworkServiceToL3NetworkParam

type AttachNetworkServiceToL3NetworkParam struct {
	BaseParam
	Params AttachNetworkServiceToL3NetworkDetailParam `json:"params"`
}

type AttachTagToResourceDetailParam

type AttachTagToResourceDetailParam struct {
	ResourceUuids []string               `json:"resourceUuids"`
	Tokens        map[string]interface{} `json:"tokens,omitempty"`
}

type AttachTagToResourceParam

type AttachTagToResourceParam struct {
	BaseParam
	Params AttachTagToResourceDetailParam `json:"params"`
}

type AttachType

type AttachType string
const (
	PassThrough AttachType = "PassThrough"
	Redirect    AttachType = "Redirect"
)

type AttachUsbDeviceToVmDetailParam

type AttachUsbDeviceToVmDetailParam struct {
	VmInstanceUuid string `json:"vmInstanceUuid"`
	AttachType     string `json:"attachType"` // PassThrough Redirect
}

type AttachUsbDeviceToVmParam

type AttachUsbDeviceToVmParam struct {
	BaseParam
	Params AttachUsbDeviceToVmDetailParam `json:"params"`
}

type BackupStorageType

type BackupStorageType string
const (
	ImageStoreBackupStorage BackupStorageType = "ImageStoreBackupStorage"
)

type BaseParam

type BaseParam struct {
	SystemTags []string `json:"systemTags,omitempty"` // System tags
	UserTags   []string `json:"userTags,omitempty"`   // User tags
	RequestIp  string   `json:"requestIp,omitempty"`  // Request IP
}

type BootMode

type BootMode string

type CandidateBackupStorageType

type CandidateBackupStorageType string

type CdpPolicyState

type CdpPolicyState string

type CdpTaskState

type CdpTaskState string

type CdpTaskStatus

type CdpTaskStatus string

type CdpTaskType

type CdpTaskType string

type ChangeBackupStorageStateDetailParam

type ChangeBackupStorageStateDetailParam struct {
	StateEvent StateEvent `json:"stateEvent"`
}

type ChangeBackupStorageStateParam

type ChangeBackupStorageStateParam struct {
	BaseParam
	ChangeBackupStorageState ChangeBackupStorageStateDetailParam `json:"changeBackupStorageState"`
}

type ChangeEipStateDetailParam

type ChangeEipStateDetailParam struct {
	StateEvent StateEvent `json:"stateEvent"`
}

type ChangeEipStateParam

type ChangeEipStateParam struct {
	BaseParam

	UUID           string                    `json:"uuid"` // Resource UUID, uniquely identifies the resource
	ChangeEipState ChangeEipStateDetailParam `json:"changeEipState"`
}

type ChangeHostStateDetailParam

type ChangeHostStateDetailParam struct {
	StateEvent StateEvent `json:"stateEvent"` //  enable disable maintain
}

type ChangeHostStateParam

type ChangeHostStateParam struct {
	BaseParam
	ChangeHostState ChangeHostStateDetailParam `json:"changeHostState"`
}

type ChangeImageStateDetailParam

type ChangeImageStateDetailParam struct {
	StateEvent StateEvent `json:"stateEvent"`
}

type ChangeImageStateParam

type ChangeImageStateParam struct {
	BaseParam
	ImageUuid        string                      `json:"imageUuid"` // Image UUID
	ChangeImageState ChangeImageStateDetailParam `json:"changeImageState"`
}

type ChangeSecurityGroupStateDetailParam

type ChangeSecurityGroupStateDetailParam struct {
	StateEvent StateEvent `json:"stateEvent"`
}

type ChangeSecurityGroupStateParam

type ChangeSecurityGroupStateParam struct {
	BaseParam
	SecurityGroupUuid string                              `json:"securityGroupUuid"` // securityGroup UUID
	ChangeImageState  ChangeSecurityGroupStateDetailParam `json:"changeSecurityGroupState"`
}

type ChangeVmNicNetworkDetailParam

type ChangeVmNicNetworkDetailParam struct {
	DestL3NetworkUuid string `json:"destL3NetworkUuid"` // Specified layer 3 network UUID
}

type ChangeVmNicNetworkParam

type ChangeVmNicNetworkParam struct {
	BaseParam
	Params ChangeVmNicNetworkDetailParam `json:"params"`
}

type ChangeVmPasswordParam

type ChangeVmPasswordParam struct {
	Password string `json:"password"`
	Account  string `json:"account"`
}

type ChangeVolumeStateDetailParam

type ChangeVolumeStateDetailParam struct {
	StateEvent VolumeState `json:"stateEvent"` // Enable or disable, valid values: enable, disable
}

type ChangeVolumeStateParam

type ChangeVolumeStateParam struct {
	BaseParam

	ChangeVolumeState ChangeVolumeStateDetailParam `json:"changeVolumeState"`
}

type ClockTrack

type ClockTrack string

type CloneVmInstanceDetailParam

type CloneVmInstanceDetailParam struct {
	Names                           []string         `json:"names"`    // VM instance names
	Strategy                        InstanceStrategy `json:"strategy"` // Strategy, InstantStart for immediate start after cloning, JustCreate for not starting after cloning.
	Full                            *bool            `json:"full"`     // Whether to clone mounted data disks
	PrimaryStorageUuidForRootVolume *string          `json:"primaryStorageUuidForRootVolume" `
	PrimaryStorageUuidForDataVolume *string          `json:"primaryStorageUuidForDataVolume" `
	RootVolumeSystemTags            []string         `json:"rootVolumeSystemTags" `
	DataVolumeSystemTags            []string         `json:"dataVolumeSystemTags" `
}

type CloneVmInstanceParam

type CloneVmInstanceParam struct {
	BaseParam
	CloneVmInstance CloneVmInstanceDetailParam `json:"cloneVmInstance"`
}

type Condition

type Condition struct {
	Key   string `json:"key"`   // Key
	Op    string `json:"op"`    // Operator
	Value string `json:"value"` // Value
}

type CreateCdpPolicyDetailParam

type CreateCdpPolicyDetailParam struct {
	Name                    string `json:"name"`
	Description             string `json:"description"`
	RecoveryPointPerSecond  int64  `json:"recoveryPointPerSecond"`  // Recovery point interval time
	HourlyRpSinceDay        int64  `json:"hourlyRpSinceDay"`        // From which day to keep hourly recovery points
	DailyRpSinceDay         int64  `json:"dailyRpSinceDay"`         // From which day to keep daily recovery points
	ExpireTimeInDay         int64  `json:"expireTimeInDay"`         // Backup data validity period
	FullBackupIntervalInDay int64  `json:"fullBackupIntervalInDay"` // Full backup interval
	ResourceUuid            string `json:"resourceUuid"`            // Resource UUID
}

type CreateCdpPolicyParam

type CreateCdpPolicyParam struct {
	BaseParam
	Params CreateCdpPolicyDetailParam `json:"params"`
}

type CreateCdpTaskDetailParam

type CreateCdpTaskDetailParam struct {
	Name              string      `json:"name"`
	Description       string      `json:"description"`
	TaskType          CdpTaskType `json:"taskType"`          // CDP task type
	PolicyUuid        string      `json:"policyUuid"`        // Policy UUID
	BackupStorageUuid string      `json:"backupStorageUuid"` // Backup storage UUID
	ResourceUuids     []string    `json:"resourceUuids"`     // Backup resource list
	BackupBandwidth   int64       `json:"backupBandwidth"`   // Backup rate for a single cloud disk
	MaxCapacity       int64       `json:"maxCapacity"`       // CDP task planned capacity
	MaxLatency        int64       `json:"maxLatency"`        // CDP task maximum RPO offset
}

type CreateCdpTaskParam

type CreateCdpTaskParam struct {
	BaseParam
	Params CreateCdpTaskDetailParam `json:"params"`
}

type CreateDataVolumeDetailParam

type CreateDataVolumeDetailParam struct {
	Name               string   `json:"name" example:"chenjh-DATA-TEST"`                     // Data volume name
	Description        string   `json:"description" example:"JUST a test Volume For chenjh"` // Description of the data volume
	DiskOfferingUuid   string   `json:"diskOfferingUuid" example:""`                         // Disk offering UUID
	DiskSize           int64    `json:"diskSize" example:"1024"`                             // Disk size
	PrimaryStorageUuid string   `json:"primaryStorageUuid" example:""`                       // Primary storage UUID
	ResourceUuid       string   `json:"resourceUuid" example:""`                             // Resource UUID
	TagUuids           []string `json:"tagUuids" example:""`                                 // List of tag UUIDs
}

type CreateDataVolumeFromVolumeSnapshotDetailParam

type CreateDataVolumeFromVolumeSnapshotDetailParam struct {
	Name               string `json:"name"`               // Data volume name
	Description        string `json:"description"`        // Detailed description of the data volume
	VolumeSnapshotUuid string `json:"volumeSnapshotUuid"` // Volume snapshot UUID
	PrimaryStorageUuid string `json:"primaryStorageUuid"` // Primary storage UUID
	ResourceUuid       string `json:"resourceUuid"`       // Resource Uuid
}

type CreateDataVolumeFromVolumeSnapshotParam

type CreateDataVolumeFromVolumeSnapshotParam struct {
	BaseParam

	Params CreateDataVolumeFromVolumeSnapshotDetailParam `json:"params"`
}

type CreateDataVolumeFromVolumeTemplateDetailParam

type CreateDataVolumeFromVolumeTemplateDetailParam struct {
	Name               string `json:"name"`               // Data volume name
	Description        string `json:"description"`        // Detailed description of the data volume
	PrimaryStorageUuid string `json:"primaryStorageUuid"` // Primary storage UUID
	HostUuid           string `json:"hostUuid"`           // Host UUID
	ResourceUuid       string `json:"resourceUuid"`
}

type CreateDataVolumeFromVolumeTemplateParam

type CreateDataVolumeFromVolumeTemplateParam struct {
	BaseParam

	Params CreateDataVolumeFromVolumeTemplateDetailParam `json:"params"`
}

type CreateDataVolumeParam

type CreateDataVolumeParam struct {
	BaseParam

	Params CreateDataVolumeDetailParam `json:"params"`
}

type CreateDataVolumeTemplateFromVolumeDetailParam

type CreateDataVolumeTemplateFromVolumeDetailParam struct {
	Name               string   `json:"name"`               // Name
	Description        string   `json:"description"`        // Detailed description
	BackupStorageUuids []string `json:"backupStorageUuids"` // List of backup storage UUIDs
	ResourceUuid       string   `json:"resourceUuid"`       // Root cloud volume image UUID. If specified, the root cloud volume image will use this value as its UUID.
}

type CreateDataVolumeTemplateFromVolumeParam

type CreateDataVolumeTemplateFromVolumeParam struct {
	BaseParam
	VolumeUuid string                                        `json:"volumeUuid"` // Snapshot UUID
	Params     CreateDataVolumeTemplateFromVolumeDetailParam `json:"params"`     // Other parameters in the struct
}

type CreateDataVolumeTemplateFromVolumeSnapshotDetailParam

type CreateDataVolumeTemplateFromVolumeSnapshotDetailParam struct {
	Name               string   `json:"name"`               // Name
	Description        string   `json:"description"`        // Detailed description
	BackupStorageUuids []string `json:"backupStorageUuids"` // List of backup storage UUIDs
	ResourceUuid       string   `json:"resourceUuid"`       // Root cloud volume image UUID. If specified, the root cloud volume image will use this value as its UUID.
	TagUuids           []string `json:"tagUuids"`           // List of tag UUIDs
}

type CreateDataVolumeTemplateFromVolumeSnapshotParam

type CreateDataVolumeTemplateFromVolumeSnapshotParam struct {
	BaseParam
	SnapshotUuid string                                                `json:"snapshotUuid"` // Snapshot UUID
	Params       CreateDataVolumeTemplateFromVolumeSnapshotDetailParam `json:"params"`       // Other parameters in the struct
}

type CreateDiskOfferingDetailParam

type CreateDiskOfferingDetailParam struct {
	Name              string   `json:"name" validate:"required"`     // Resource name
	Description       *string  `json:"description"`                  // Detailed description of the resource
	DiskSize          int64    `json:"diskSize" validate:"required"` // disk size
	AllocatorStrategy *string  `json:"allocatorStrategy"`            // Allocation strategy
	SortKey           *int     `json:"sortKey"`                      // Sort key
	Type              *string  `json:"type"`                         // Type
	ResourceUuid      *string  `json:"resourceUuid"`                 // Resource UUID
	SystemTags        []string `json:"systemTags"`
	UserTags          []string `json:"userTags"`
}

type CreateDiskOfferingParam

type CreateDiskOfferingParam struct {
	BaseParam
	Params CreateDiskOfferingDetailParam `json:"params"`
}

type CreateEipDetailParam

type CreateEipDetailParam struct {
	Name         string `json:"name"`                  // Resource name
	Description  string `json:"description,omitempty"` // Detailed description
	VipUuid      string `json:"vipUuid"`
	VmNicUuid    string `json:"vmNicUuid,omitempty"`
	UsedIpUuid   *int   `json:"usedIpUuid,omitempty"`   // Affinity group policy
	ResourceUuid string `json:"resourceUuid,omitempty"` // Resource UUID. If specified, the image will use this value as the UUID.
}

type CreateEipParam

type CreateEipParam struct {
	BaseParam

	Params CreateEipDetailParam `json:"params"`
}

type CreateInstanceOfferingDetailParam

type CreateInstanceOfferingDetailParam struct {
	Name              string   `json:"name" validate:"required"`       // Resource name
	Description       *string  `json:"description"`                    // Detailed description of the resource
	CpuNum            int      `json:"cpuNum" validate:"required"`     // Number of CPUs
	MemorySize        int64    `json:"memorySize" validate:"required"` // Memory size in bytes
	AllocatorStrategy *string  `json:"allocatorStrategy"`              // Allocation strategy
	SortKey           *int     `json:"sortKey"`                        // Sort key
	Type              *string  `json:"type"`                           // Type
	ResourceUuid      *string  `json:"resourceUuid"`                   // Resource UUID
	TagUuids          []string `json:"tagUuids"`
}

type CreateInstanceOfferingParam

type CreateInstanceOfferingParam struct {
	BaseParam
	Params CreateInstanceOfferingDetailParam `json:"params"`
}

type CreateL2NoVlanNetworkDetailParam

type CreateL2NoVlanNetworkDetailParam struct {
	Name              string `json:"name"`
	Description       string `json:"description"`
	ZoneUuid          string `json:"zoneUuid"`          // Zone UUID
	PhysicalInterface string `json:"physicalInterface"` // Physical network interface
	Type              string `json:"type"`              // Layer 2 network type
	ResourceUuid      string `json:"resourceUuid"`      // Resource UUID
}

type CreateL2NoVlanNetworkParam

type CreateL2NoVlanNetworkParam struct {
	BaseParam
	Params CreateL2NoVlanNetworkDetailParam `json:"params"`
}

type CreateL2VlanNetworkDetailParam

type CreateL2VlanNetworkDetailParam struct {
	Vlan              int    `json:"vlan"`
	Name              string `json:"name"`
	Description       string `json:"description"`
	ZoneUuid          string `json:"zoneUuid"`
	PhysicalInterface string `json:"physicalInterface"` // Physical network interface
	Type              string `json:"type"`              // Layer 2 network type
	ResourceUuid      string `json:"resourceUuid"`      // Resource UUID
}

type CreateL2VlanNetworkParam

type CreateL2VlanNetworkParam struct {
	BaseParam
	Params CreateL2VlanNetworkDetailParam `json:"params"`
}

type CreateL3NetworkDetailParam

type CreateL3NetworkDetailParam struct {
	Name          string `json:"name"`
	Description   string `json:"description"` // Layer 3 network description
	Type          string `json:"type"`
	L2NetworkUuid string `json:"l2NetworkUuid"`
	Category      string `json:"category"`
	System        bool   `json:"system"`
	EnableIPAM    bool   `json:"enableIPAM"`
}

type CreateL3NetworkParam

type CreateL3NetworkParam struct {
	BaseParam
	Params CreateL3NetworkDetailParam `json:"params"`
}

type CreateResourceTagDetailParam

type CreateResourceTagDetailParam struct {
	Name        string `json:"name"`
	Value       string `json:"value"`
	Description string `json:"description"`
	Color       string `json:"color"`
	Type        string `json:"type"` // type 为 simple 不允许更新其 validValues = {"simple", "withToken"})
}

type CreateResourceTagParam

type CreateResourceTagParam struct {
	BaseParam
	Params CreateResourceTagDetailParam `json:"params"`
}

type CreateRootVolumeTemplateFromRootVolumeDetailParam

type CreateRootVolumeTemplateFromRootVolumeDetailParam struct {
	Name               string   `json:"name"`               // Name
	RootVolumeUuid     string   `json:"rootVolumeUuid"`     // Root cloud volume UUID
	Description        string   `json:"description"`        // Detailed description
	GuestOsType        string   `json:"guestOsType"`        // Guest OS type corresponding to the root cloud volume image
	BackupStorageUuids []string `json:"backupStorageUuids"` // List of backup storage UUIDs
	Platform           string   `json:"platform"`           // Image system platform, Linux, Windows, WindowsVirtio, Other, Paravirtualization
	System             bool     `json:"system"`             // Whether it is a system root cloud volume image
	ResourceUuid       string   `json:"resourceUuid"`       // Root cloud volume image UUID. If specified, the root cloud volume image will use this value as its UUID.
	Architecture       string   `json:"architecture"`       // x86_64, aarch64, mips64el
	TagUuids           []string `json:"tagUuids"`           // List of tag UUIDs
}

type CreateRootVolumeTemplateFromRootVolumeParam

type CreateRootVolumeTemplateFromRootVolumeParam struct {
	BaseParam
	RootVolumeUuid string                                            `json:"rootVolumeUuid"` // Root cloud volume UUID
	Params         CreateRootVolumeTemplateFromRootVolumeDetailParam `json:"params"`         // Other parameters in the struct
}

type CreateRootVolumeTemplateFromVolumeSnapshotDetailParams

type CreateRootVolumeTemplateFromVolumeSnapshotDetailParams struct {
	Name               string   `json:"name"`               // Name
	Description        string   `json:"description"`        // Detailed description
	GuestOsType        string   `json:"guestOsType"`        // Guest OS type corresponding to the root cloud volume image
	BackupStorageUuids []string `json:"backupStorageUuids"` // List of backup storage UUIDs
	Platform           string   `json:"platform"`           // Image system platform, Linux, Windows, WindowsVirtio, Other, Paravirtualization
	System             bool     `json:"system"`             // Whether it is a system root cloud volume image
	ResourceUuid       string   `json:"resourceUuid"`       // Root cloud volume image UUID. If specified, the root cloud volume image will use this value as its UUID.
	Architecture       string   `json:"architecture"`       // x86_64, aarch64, mips64el
	TagUuids           []string `json:"tagUuids"`           // List of tag UUIDs
}

type CreateRootVolumeTemplateFromVolumeSnapshotParam

type CreateRootVolumeTemplateFromVolumeSnapshotParam struct {
	BaseParam
	SnapshotUuid string                                                 `json:"snapshotUuid"` // Snapshot UUID
	Params       CreateRootVolumeTemplateFromVolumeSnapshotDetailParams `json:"params"`       // Other parameters in the struct
}

type CreateSecurityGroupDetailParam

type CreateSecurityGroupDetailParam struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	IpVersion   int    `json:"ipVersion"`   // 4 or 6 default is 4
	VSwitchType string `json:"vSwitchType"` // "LinuxBridge" or "OvnDpdk" default is "LinuxBridge"
}

type CreateSecurityGroupParam

type CreateSecurityGroupParam struct {
	BaseParam
	Params CreateSecurityGroupDetailParam `json:"params"`
}

type CreateTagDetailParam

type CreateTagDetailParam struct {
	ResourceType string `json:"resourceType"`
	ResourceUuid string `json:"resourceUuid"`
	Tag          string `json:"tag"`
}

type CreateTagParam

type CreateTagParam struct {
	BaseParam

	Params CreateTagDetailParam `json:"params"`
}

type CreateVipDetailParam

type CreateVipDetailParam struct {
	Name              string               `json:"name"`                        // Resource name
	Description       string               `json:"description,omitempty"`       // Detailed description
	L3NetworkUUID     string               `json:"l3NetworkUuid"`               // Layer 3 network UUID
	IpRangeUUID       string               `json:"ipRangeUuid,omitempty"`       // IP range UUID
	AllocatorStrategy VipAllocatorStrategy `json:"allocatorStrategy,omitempty"` // Allocation strategy
	RequiredIp        string               `json:"requiredIp,omitempty"`        // Requested IP
	ResourceUuid      string               `json:"resourceUuid,omitempty"`      // Resource UUID. If specified, the image will use this field value as the UUID.
}

type CreateVipParam

type CreateVipParam struct {
	BaseParam
	Params CreateVipDetailParam `json:"params"`
}

type CreateVirtualRouterInstanceDetailParam

type CreateVirtualRouterInstanceDetailParam struct {
	Name                            string   `json:"name" `                            // VM instance name
	VirtualRouterOfferingUuid       string   `json:"virtualRouterOfferingUuid" `       // Instance offering UUID, specifies CPU, memory, etc.
	Description                     string   `json:"description" `                     // Detailed description of the VM instance
	ResourceUuid                    string   `json:"resourceUuid" `                    // Resource UUID, if specified, the VM will use this value as its UUID.
	ZoneUuid                        string   `json:"zoneUuid" `                        // Zone UUID, if specified, the VM will be created in the specified zone.
	ClusterUUID                     string   `json:"clusterUuid" `                     // Cluster UUID, if specified, the VM will be created in the specified cluster, higher priority than zoneUuid.
	HostUuid                        string   `json:"hostUuid" `                        // Host UUID, if specified, the VM will be created on the specified host, higher priority than zoneUuid and clusterUuid.
	PrimaryStorageUuidForRootVolume *string  `json:"primaryStorageUuidForRootVolume" ` // Primary storage UUID, if specified, the root volume will be created on the specified primary storage.
	RootVolumeSystemTags            []string `json:"rootVolumeSystemTags"`
	TagUuids                        []string `json:"tagUuids" ` // List of tag UUIDs
}

type CreateVirtualRouterInstanceParam

type CreateVirtualRouterInstanceParam struct {
	BaseParam
	Params CreateVirtualRouterInstanceDetailParam `json:"params"`
}

type CreateVirtualRouterOfferingDetailParam

type CreateVirtualRouterOfferingDetailParam struct {
	Name                  string   `json:"name" validate:"required"` // Resource name
	Description           string   `json:"description"`              // Detailed description of the resource
	ZoneUuid              string   `json:"zoneUuid" validate:"required"`
	ManagementNetworkUuid string   `json:"managementNetworkUuid" validate:"required"`
	ImageUuid             string   `json:"imageUuid" validate:"required"`
	PublicNetworkUuid     string   `json:"publicNetworkUuid"`
	IsDefault             bool     `json:"isDefault"`
	CpuNum                int      `json:"cpuNum" validate:"required"`     // Number of CPUs
	MemorySize            int64    `json:"memorySize" validate:"required"` // Memory size in bytes
	AllocatorStrategy     string   `json:"allocatorStrategy"`              // Allocation strategy
	SortKey               int      `json:"sortKey"`                        // Sort key
	Type                  string   `json:"type" validate:"required"`       // Type
	ResourceUuid          string   `json:"resourceUuid"`                   // Resource UUID
	TagUuids              []string `json:"tagUuids"`
}

type CreateVirtualRouterOfferingParam

type CreateVirtualRouterOfferingParam struct {
	BaseParam
	Params CreateVirtualRouterOfferingDetailParam `json:"params"`
}

type CreateVmCdRomDetailParam

type CreateVmCdRomDetailParam struct {
	Name           string `json:"name"`
	Description    string `json:"description"`
	VmInstanceUuid string `json:"vmInstanceUuid"`
	IsoUuid        string `json:"isoUuid"`
	ResourceUuid   string `json:"resourceUuid"`
}

type CreateVmCdRomParam

type CreateVmCdRomParam struct {
	BaseParam
	Params CreateVmCdRomDetailParam `json:"params"`
}

type CreateVmFromCdpBackupDetailParam

type CreateVmFromCdpBackupDetailParam struct {
	Name                            string   `json:"name" validate:"required"`
	GroupId                         int64    `json:"groupId" validate:"required"`
	CdpTaskUuid                     string   `json:"cdpTaskUuid" validate:"required"`
	InstanceOfferingUuid            string   `json:"instanceOfferingUuid" validate:"required"`
	DefaultL3NetworkUuid            string   `json:"defaultL3NetworkUuid" `
	L3NetworkUuids                  []string `json:"l3NetworkUuids" validate:"required"`
	Type                            *string  `json:"type" `
	ZoneUuid                        *string  `json:"zoneUuid" `
	ClusterUuid                     *string  `json:"clusterUuid" `
	HostUuid                        *string  `json:"hostUuid" `
	PrimaryStorageUuidForRootVolume *string  `json:"primaryStorageUuidForRootVolume" `
	PrimaryStorageUuidForDataVolume *string  `json:"primaryStorageUuidForDataVolume" `
	RecoverBandwidth                *int64   `json:"recoverBandwidth" `
	Description                     *string  `json:"description" `
	RootVolumeSystemTags            []string `json:"rootVolumeSystemTags" `
	DataVolumeSystemTags            []string `json:"dataVolumeSystemTags" `
	ResourceUuid                    *string  `json:"resourceUuid" `
	TagUuids                        []string `json:"tagUuids" `
}

type CreateVmFromCdpBackupJobData

type CreateVmFromCdpBackupJobData struct {
	BaseParam
	CreateVmFromCdpBackupDetailParam
}

type CreateVmFromCdpBackupParam

type CreateVmFromCdpBackupParam struct {
	BaseParam
	CreateVmFromCdpBackup CreateVmFromCdpBackupDetailParam `json:"createVmFromCdpBackup"`
}

type CreateVmFromOvfImageParam

type CreateVmFromOvfImageParam struct {
	OvfId string    `json:"ovfId"`
	Type  ImageType `json:"type"`
	Url   string    `json:"url"`
	Uuid  string    `json:"uuid"`
}

type CreateVmFromVolumeDetailParams

type CreateVmFromVolumeDetailParams struct {
	Name                 string   `json:"name"`                 // VM instance name
	Description          string   `json:"description"`          // Detailed description of the resource
	InstanceOfferingUuid string   `json:"instanceOfferingUuid"` // Instance offering UUID, note: this parameter is mutually exclusive with CPU number and memory size.
	CpuNum               int      `json:"cpuNum"`               // CPU number/memory size, note: this parameter is mutually exclusive with instanceOfferingUuid.
	MemorySize           int64    `json:"memorySize"`           // CPU number/memory size, note: this parameter is mutually exclusive with instanceOfferingUuid.
	L3NetworkUuids       []string `json:"l3NetworkUuids"`       // List of layer 3 network UUIDs, one NIC will be created for each network.
	Type                 string   `json:"type"`                 // VM instance type, reserved field, no need to specify.
	VolumeUuid           string   `json:"volumeUuid"`           // Volume UUID
	Platform             string   `json:"platform"`             // Volume system platform
	ZoneUuid             string   `json:"zoneUuid"`             // Zone UUID, if specified, the VM will be created in the specified zone.
	ClusterUuid          string   `json:"clusterUuid"`          // Cluster UUID, if specified, the VM will be created in the specified cluster, higher priority than zoneUuid.
	HostUuid             string   `json:"hostUuid"`             // Host UUID, if specified, the VM will be created on the specified host, higher priority than zoneUuid and clusterUuid.
	PrimaryStorageUuid   string   `json:"primaryStorageUuid"`   // Primary storage UUID, if specified, the root volume will be created on the specified primary storage.
	DefaultL3NetworkUuid string   `json:"defaultL3NetworkUuid"` // Default layer 3 network UUID, specifies the default network for routing when multiple networks are specified.
	Strategy             string   `json:"strategy"`             // VM creation strategy, 1. Start immediately after creation, 2. Do not start after creation.
	ResourceUuid         string   `json:"resourceUuid"`         // Resource UUID, if specified, the VM will use this value as its UUID.
	TagUuids             []string `json:"tagUuids"`             // List of tag UUIDs
}

type CreateVmFromVolumeParam

type CreateVmFromVolumeParam struct {
	BaseParam
	Params CreateVmFromVolumeDetailParams `json:"params"`
}

type CreateVmInstanceDetailParam

type CreateVmInstanceDetailParam struct {
	Name                            string       `json:"name" `                            // VM instance name
	InstanceOfferingUUID            string       `json:"instanceOfferingUuid" `            // Instance offering UUID, specifies CPU, memory, etc.
	CpuNum                          int64        `json:"cpuNum"`                           // CPU number
	MemorySize                      int64        `json:"memorySize"`                       // Memory size
	ImageUUID                       string       `json:"imageUuid" `                       // Image UUID, the root volume of the VM will be created from this image.
	L3NetworkUuids                  []string     `json:"l3NetworkUuids" `                  // List of layer 3 network UUIDs, one NIC will be created for each network.
	Type                            InstanceType `json:"type" `                            // VM instance type, reserved field, no need to specify. UserVm/ApplianceVm
	RootDiskOfferingUuid            string       `json:"rootDiskOfferingUuid" `            // Root disk offering UUID, must be specified if the image type is ISO.
	RootDiskSize                    *int64       `json:"rootDiskSize"`                     // Root disk size
	DataDiskOfferingUuids           []string     `json:"dataDiskOfferingUuids" `           // List of data disk offering UUIDs, one or more data disks will be created.
	DataDiskSizes                   []int64      `json:"dataDiskSizes"`                    // Data disk sizes
	ZoneUuid                        string       `json:"zoneUuid" `                        // Zone UUID, if specified, the VM will be created in the specified zone.
	ClusterUUID                     string       `json:"clusterUuid" `                     // Cluster UUID, if specified, the VM will be created in the specified cluster, higher priority than zoneUuid.
	HostUuid                        string       `json:"hostUuid" `                        // Host UUID, if specified, the VM will be created on the specified host, higher priority than zoneUuid and clusterUuid.
	PrimaryStorageUuidForRootVolume *string      `json:"primaryStorageUuidForRootVolume" ` // Primary storage UUID, if specified, the root volume will be created on the specified primary storage.
	Description                     string       `json:"description" `                     // Detailed description of the VM instance
	DefaultL3NetworkUuid            string       `json:"defaultL3NetworkUuid" `            // Default layer 3 network UUID, specifies the default network for routing when multiple networks are specified.
	ResourceUuid                    string       `json:"resourceUuid" `                    // Resource UUID, if specified, the VM will use this value as its UUID.

	TagUuids             []string         `json:"tagUuids" ` // List of tag UUIDs
	Strategy             InstanceStrategy `json:"strategy" ` // VM creation strategy, InstantStart for immediate start, CreateStopped for stopped after creation.
	RootVolumeSystemTags []string         `json:"rootVolumeSystemTags"`
	DataVolumeSystemTags []string         `json:"dataVolumeSystemTags"`
}

type CreateVmInstanceFromOvfDetailParam

type CreateVmInstanceFromOvfDetailParam struct {
	XmlBase64               string  `json:"xmlBase64"`               // Resource name
	JsonImageInfos          string  `json:"jsonImageInfos"`          // JSON string describing the relationship between disk ID and image file in OVF
	BackupStorageUuid       string  `json:"backupStorageUuid"`       // Backup storage UUID for storing uploaded image files
	JsonCreateVmParam       string  `json:"jsonCreateVmParam"`       // JSON string containing the message with VM creation parameters
	DeleteImageAfterSuccess bool    `json:"deleteImageAfterSuccess"` // Delete image file after successful deployment
	DeleteImageOnFail       bool    `json:"deleteImageOnFail"`       // Delete image file after deployment failure
	ResourceUuid            *string `json:"resourceUuid"`            // Resource UUID
}

type CreateVmInstanceFromOvfParam

type CreateVmInstanceFromOvfParam struct {
	BaseParam
	Params CreateVmInstanceFromOvfDetailParam `json:"params"`
}

type CreateVmInstanceParam

type CreateVmInstanceParam struct {
	BaseParam
	Params CreateVmInstanceDetailParam `json:"params" `
}

type CreateVmInstanceScriptDetailParam

type CreateVmInstanceScriptDetailParam struct {
	Name          string   `json:"name"`
	Description   string   `json:"description"`            // 描述
	ScriptContent string   `json:"scriptContent"`          // 脚本内容
	EncodingType  string   `json:"encodingType"`           // 编码类型 Supports: UTF8, GBK, GB2312, Big5, ISO8859-1
	Platform      string   `json:"platform"`               // 平台类型
	ScriptType    string   `json:"scriptType"`             // script Type Supports: Shell, Python, Perl, Bat, Powershell
	ScriptTimeout int      `json:"scriptTimeout"`          // 超时时间(秒)
	RenderParams  string   `json:"renderParams,omitempty"` // Optional
	TagUuids      []string `json:"tagUuids"`
}

type CreateVmInstanceScriptParam

type CreateVmInstanceScriptParam struct {
	BaseParam
	Params CreateVmInstanceScriptDetailParam `json:"params"`
}

type DeleteExportedImageFromBackupStorageParam

type DeleteExportedImageFromBackupStorageParam struct {
	BackupStorageUuid string `json:"backupStorageUuid"`
	ImageUuid         string `json:"imageUuid"`
}

type DeleteMode

type DeleteMode string
const (
	DeleteModePermissive DeleteMode = "Permissive"
	DeleteModeEnforcing  DeleteMode = "Enforcing"
)

type DeleteVmStaticIpDetailParam

type DeleteVmStaticIpDetailParam struct {
	L3NetworkUuid string     `json:"l3NetworkUuid"` // Layer 3 network UUID
	DeleteMode    DeleteMode `json:"deleteMode"`
}

type DeleteVmStaticIpParam

type DeleteVmStaticIpParam struct {
	BaseParam
	Params DeleteVmStaticIpDetailParam `json:"params"`
}

type DetachUsbDeviceFromVmParam

type DetachUsbDeviceFromVmParam struct {
	BaseParam
	Params interface{} `json:"params"`
}

type ExecuteVmInstanceScriptDetailParam

type ExecuteVmInstanceScriptDetailParam struct {
	VmInstanceUuids []string `json:"vmInstanceUuids"` // 虚拟机实例 UUID
	ScriptTimeout   int      `json:"scriptTimeout"`   // 脚本超时时间(秒)
}

type ExecuteVmInstanceScriptParam

type ExecuteVmInstanceScriptParam struct {
	BaseParam
	Params ExecuteVmInstanceScriptDetailParam `json:"executeGuestVmScript"`
}

type ExportImageFromBackupStorageDetailParam

type ExportImageFromBackupStorageDetailParam struct {
	ImageUuid string `json:"imageUuid"`
}

type ExportImageFromBackupStorageParam

type ExportImageFromBackupStorageParam struct {
	BaseParam
	BackupStorageUuid            string                                  `json:"backupStorageUuid"`
	ExportImageFromBackupStorage ExportImageFromBackupStorageDetailParam `json:"exportImageFromBackupStorage"`
}

type ExpungeImageParam

type ExpungeImageParam struct {
	BaseParam
	BackupStorageUuids []string `json:"backupStorageUuids"`
}

type GetAllMetricMetadataParam

type GetAllMetricMetadataParam struct {
	BaseParam
	Namespace string `json:"namespace"` // Metric namespace
	Name      string `json:"name"`      // Metric name
}

func (GetAllMetricMetadataParam) ToQueryParam

func (p GetAllMetricMetadataParam) ToQueryParam() QueryParam

type GetCandidateBackupStorageForCreatingImageParam

type GetCandidateBackupStorageForCreatingImageParam struct {
	BaseParam
	CandidateBackupStorageType CandidateBackupStorageType `json:"candidateBackupStorageType"`
	VolumeUuid                 string                     `json:"volumeUuid"`         // Cloud volume UUID, note: either volumeUuid or volumeSnapshotUuid is required
	VolumeSnapshotUuid         string                     `json:"volumeSnapshotUuid"` // Cloud volume snapshot UUID, note: either volumeUuid or volumeSnapshotUuid is required
}

type GetEipAttachableVmNicsParam

type GetEipAttachableVmNicsParam struct {
	BaseParam

	EipUuid string `json:"eipUuid,omitempty"` // Elastic IP UUID
	VipUuid string `json:"vipUuid,omitempty"` // VIP UUID
}

type GetMetricDataParam

type GetMetricDataParam struct {
	BaseParam
	Namespace                string   `json:"namespace"`                // Namespace
	MetricName               string   `json:"metricName"`               // Metric name
	StartTime                int64    `json:"startTime"`                // Start time, timestamp in seconds
	EndTime                  int64    `json:"endTime"`                  // End time, timestamp in seconds
	Period                   int32    `json:"period"`                   // Data precision
	Labels                   []string `json:"labels"`                   // Filter labels
	ValueConditions          []string `json:"valueConditions"`          // Value conditions (TODO: clarify)
	Functions                []string `json:"functions"`                // Function list
	OffsetAheadOfCurrentTime int64    `json:"offsetAheadOfCurrentTime"` // Offset ahead of current time (TODO: clarify)
}

func (GetMetricDataParam) ToQueryParam

func (p GetMetricDataParam) ToQueryParam() QueryParam

type GetMetricLabelValueParam

type GetMetricLabelValueParam struct {
	BaseParam
	Namespace    string   `json:"namespace"`    // Namespace name
	MetricName   string   `json:"metricName"`   // Metric name
	StartTime    int64    `json:"startTime"`    // Start time, timestamp in seconds
	EndTime      int64    `json:"endTime"`      // End time, timestamp in seconds
	LabelNames   []string `json:"labelNames"`   // List of label names to get values for
	FilterLabels []string `json:"filterLabels"` // List of label filters, e.g., HostUuid=e47f7145f4cd4fca8e2856038ecdf3e1 to select a specific physical machine
}

func (GetMetricLabelValueParam) ToQueryParam

func (p GetMetricLabelValueParam) ToQueryParam() QueryParam

type GetRecoveryPointParam

type GetRecoveryPointParam struct {
	BaseParam `json:",inline,omitempty"`
	GroupId   int64 `json:"groupId" validate:"required"`
}

type GetUploadImageJobDetailsParam

type GetUploadImageJobDetailsParam struct {
	BaseParam
	ImageId string `json:"imageId"`
}

type GetVmNicAttachableEipsParam

type GetVmNicAttachableEipsParam struct {
	BaseParam

	VmNicUuid string `json:"vmNicUuid"`
	IpVersion int    `json:"ipVersion,omitempty"`
	Limit     int    `json:"limit,omitempty"`
	Start     int    `json:"start,omitempty"`
}

type HA

type HA string

type HqlParam

type HqlParam struct {
	OperationName string    `json:"operationName"` // Request name
	Query         string    `json:"query"`         // Query statement
	Variables     Variables `json:"variables"`     // Parameters for the statement
}

type ImageFormat

type ImageFormat string

type ImageType

type ImageType string
const (
	Download  ImageType = "Download"
	Upload    ImageType = "Upload"
	ImageUuid ImageType = "ImageUuid"
)

type InstanceStopType

type InstanceStopType string

type InstanceStrategy

type InstanceStrategy string

type InstanceType

type InstanceType string

type L3Category

type L3Category string
const (
	Public  L3Category = "Public"
	Private L3Category = "Private"
	System  L3Category = "System"
)

type LogInByUserDetailParam

type LogInByUserDetailParam struct {
	AccountUuid string                 `json:"accountUuid"` // Account UUID
	AccountName string                 `json:"accountName"` // Account name
	UserName    string                 `json:"userName"`    // User name
	Password    string                 `json:"password"`    // Password
	ClientInfo  map[string]interface{} `json:"clientInfo"`  // Client information
}

type LogInByUserParam

type LogInByUserParam struct {
	BaseParam
	LogInByUser LogInByUserDetailParam `json:"logInByUser"`
}

type LoginByAccountDetailParam

type LoginByAccountDetailParam struct {
	AccountName string                 `json:"accountName"` // Account name
	Password    string                 `json:"password"`    // Password
	AccountType string                 `json:"accountType"` // Account type
	CaptchaUuid string                 `json:"captchaUuid"` // Captcha UUID
	VerifyCode  string                 `json:"verifyCode"`  // Verification code
	ClientInfo  map[string]interface{} `json:"clientInfo"`  // Client information
}

type LoginByAccountParam

type LoginByAccountParam struct {
	BaseParam
	LoginByAccount LoginByAccountDetailParam `json:"logInByAccount"`
}

type LongJobState

type LongJobState string
const (
	Waiting   LongJobState = "Waiting"
	Suspended LongJobState = "Suspended"
	Running   LongJobState = "Running"
	Succeeded LongJobState = "Succeeded"
	Canceling LongJobState = "Canceling"
	Canceled  LongJobState = "Canceled"
	Failed    LongJobState = "Failed"
)

type MediaType

type MediaType string

type MountVmInstanceRecoveryPointDetailParam

type MountVmInstanceRecoveryPointDetailParam struct {
	VmUuid  string `json:"vmUuid"`
	GroupId int64  `json:"groupId"`
	Https   bool   `json:"https"`
}

type MountVmInstanceRecoveryPointParam

type MountVmInstanceRecoveryPointParam struct {
	BaseParam
	Params MountVmInstanceRecoveryPointDetailParam `json:"params"`
}

type PageVar

type PageVar struct {
	Start int `json:"start,omitempty"` // Start page
	Limit int `json:"limit,omitempty"` // Limit per page
}

type ParseOvfDetailParam

type ParseOvfDetailParam struct {
	XmlBase64 string `json:"xmlBase64"` // Base64 encoded OVF file content
}

type ParseOvfParam

type ParseOvfParam struct {
	BaseParam
	Params ParseOvfDetailParam `json:"params"`
}

type PrimaryStorageType

type PrimaryStorageType string
const (
	PrimaryStorageLocalStorage PrimaryStorageType = "LocalStorage"
	PrimaryStorageCeph         PrimaryStorageType = "Ceph"
)

type ProtectVmInstanceRecoveryDetailPointParam

type ProtectVmInstanceRecoveryDetailPointParam struct {
	GroupId     int64  `json:"groupId,omitempty"`
	Description string `json:"description,omitempty"`
}

type ProtectVmInstanceRecoveryPointParam

type ProtectVmInstanceRecoveryPointParam struct {
	BaseParam                      `json:",inline,omitempty"`
	ProtectVmInstanceRecoveryPoint ProtectVmInstanceRecoveryDetailPointParam `json:"protectVmInstanceRecoveryPoint"`
}

type QueryL3NetworkRequest

type QueryL3NetworkRequest struct {
	UUID string `json:"uuid"` // Resource UUID, uniquely identifies the resource
}

QueryL3NetworkRequest queries a layer 3 network

type QueryParam

type QueryParam struct {
	url.Values
}

func NewQueryParam

func NewQueryParam() QueryParam

func (*QueryParam) AddQ

func (params *QueryParam) AddQ(q string) *QueryParam

AddQ adds a query condition, similar to a MySQL database query. Omitting this field will return all records, with the number of returned records limited by the 'limit' field.

func (*QueryParam) Count

func (params *QueryParam) Count(count bool) *QueryParam

Count sets the query to return the count of records that match the query conditions, similar to MySQL's 'count()' function.

func (*QueryParam) Fields

func (params *QueryParam) Fields(fields []string) *QueryParam

Fields specifies the fields to return, similar to MySQL's 'select' fields functionality.

func (*QueryParam) FilterName

func (params *QueryParam) FilterName(filterName string) *QueryParam

FilterName sets a filter name, functionality is unknown from ZStack Java SDK (sdk-4.4.0.jar).

func (*QueryParam) GroupBy

func (params *QueryParam) GroupBy(groupBy string) *QueryParam

GroupBy groups the results by a specified field, similar to MySQL's 'group by' keyword.

func (*QueryParam) Limit

func (params *QueryParam) Limit(limit int) *QueryParam

Limit sets the maximum number of records to return, similar to MySQL's 'limit'. Default value is 1000.

func (*QueryParam) ReplyWithCount

func (params *QueryParam) ReplyWithCount(replyWithCount bool) *QueryParam

ReplyWithCount, when set to true, includes the total count of records that match the query in the response.

func (*QueryParam) Sort

func (params *QueryParam) Sort(sort string) *QueryParam

Sort sorts the results by a specified field, similar to MySQL's 'sort by' keyword. Use '+' for ascending order and '-' for descending order, followed by the field name.

func (*QueryParam) Start

func (params *QueryParam) Start(start int) *QueryParam

Start sets the starting position for the query, similar to MySQL's 'offset'. Used with 'limit' for pagination.

type QueryProtectRecoveryPointParam

type QueryProtectRecoveryPointParam struct {
	BaseParam `json:",inline,omitempty"`
	PageVar   `json:",inline,omitempty"`
}

type QueryRecoveryPointParam

type QueryRecoveryPointParam struct {
	BaseParam `json:",inline,omitempty"`
	PageVar   `json:",inline,omitempty"`
	StartTime string `json:"startTime,omitempty"`
	EndTime   string `json:"endTime,omitempty"`
	Scale     string `json:"scale,omitempty"`
}

type RecoverImageDetailParams

type RecoverImageDetailParams struct {
	BackupStorageUuids []string `json:"backupStorageUuids"` // List of backup storage UUIDs to add the image to
}

type RecoverImageParam

type RecoverImageParam struct {
	BaseParam
	ImageUuid    string                   `json:"imageUuid"`    // Image UUID
	RecoverImage RecoverImageDetailParams `json:"recoverImage"` // Backup storage UUIDs
}

type ReloadLicenseDetailParam

type ReloadLicenseDetailParam struct {
	ManagementNodeUuids []string `json:"managementNodeUuids"` // Management node UUIDs
}

type ReloadLicenseParam

type ReloadLicenseParam struct {
	BaseParam
	ReloadLicense ReloadLicenseDetailParam `json:"reloadLicense"`
}

type RenderParams

type RenderParams struct {
	Key         string `json:"key"`         // 渲染参数的键
	Value       string `json:"value"`       // 渲染参数的值
	Description string `json:"description"` // 渲染参数的描述
}

type RequestConsoleAccessDetailParam

type RequestConsoleAccessDetailParam struct {
	VMInstanceUUID string `json:"vmInstanceUuid" bson:"vmInstanceUuid"` //VM instance UUID
}

type RequestConsoleAccessParam

type RequestConsoleAccessParam struct {
	BaseParam
	Params RequestConsoleAccessDetailParam `json:"params" bson:"params"`
}

type RevertVmFromCdpBackupDetailParam

type RevertVmFromCdpBackupDetailParam struct {
	BackupStorageUuid               string   `json:"backupStorageUuid" validate:"required"`
	GroupId                         int64    `json:"groupId" validate:"required"`
	PrimaryStorageUuidForRootVolume *string  `json:"primaryStorageUuidForRootVolume" `
	PrimaryStorageUuidForDataVolume *string  `json:"primaryStorageUuidForDataVolume" `
	RootVolumeSystemTags            []string `json:"rootVolumeSystemTags" `
	DataVolumeSystemTags            []string `json:"dataVolumeSystemTags" `
	HostUuid                        *string  `json:"hostUuid" `
	UseExistingVolume               *bool    `json:"useExistingVolume" `
	RecoverBandwidth                *int64   `json:"recoverBandwidth" `
}

type RevertVmFromCdpBackupJobData

type RevertVmFromCdpBackupJobData struct {
	BaseParam
	RevertVmFromCdpBackupDetailParam
	VmInstanceUuid string `json:"vmInstanceUuid"`
	StopVm         bool   `json:"stopVm"`
}

type RevertVmFromCdpBackupParam

type RevertVmFromCdpBackupParam struct {
	BaseParam
	RevertVmFromCdpBackup RevertVmFromCdpBackupDetailParam `json:"revertVmFromCdpBackup"`
}

type SetImageBootModeParams

type SetImageBootModeParams struct {
	BootMode BootMode `json:"bootMode"` // Image boot mode, Legacy, UEFI, UEFI_WITH_CSM
}

type SetImageBootModeRequest

type SetImageBootModeRequest struct {
	BaseParam
	Uuid             string                 `json:"uuid"`
	SetImageBootMode SetImageBootModeParams `json:"setImageBootMode"` // Boot mode
}

type SetImageQgaDetailParam

type SetImageQgaDetailParam struct {
	Enable bool `json:"enable"`
}

type SetImageQgaParam

type SetImageQgaParam struct {
	BaseParam
	Uuid        string                 `json:"uuid"`
	SetImageQga SetImageQgaDetailParam `json:"setImageQga"` // Enable
}

type SetSshKeyParam

type SetSshKeyParam struct {
	SshKey string `json:"SshKey"`
}

type SetVmBootModeDetailParam

type SetVmBootModeDetailParam struct {
	BootMode BootMode `json:"bootMode"` // Boot mode: Legacy, UEFI, UEFI_WITH_CSM
}

type SetVmBootModeParam

type SetVmBootModeParam struct {
	BaseParam
	SetVmBootMode SetVmBootModeDetailParam `json:"setVmBootMode"`
}

type SetVmQgaParam

type SetVmQgaParam struct {
	Enable bool `json:"enable"`
}

type SetVmStaticIpDetailParam

type SetVmStaticIpDetailParam struct {
	L3NetworkUuid string `json:"l3NetworkUuid"` // Layer 3 network UUID
	Ip            string `json:"ip"`            // Specified IP address
	Ip6           string `json:"ip6"`           // Specified IPv6 address
}

type SetVmStaticIpParam

type SetVmStaticIpParam struct {
	BaseParam
	SetVmStaticIp SetVmStaticIpDetailParam `json:"setVmStaticIp"`
}

type SetVolumeQoSDetailParam

type SetVolumeQoSDetailParam struct {
	VolumeBandwidth int64  `json:"volumeBandwidth"` // Data volume speed limit bandwidth
	Mode            string `json:"mode"`            // total read write
	ReadBandwidth   int64  `json:"readBandwidth"`
	WriteBandwidth  int64  `json:"writeBandwidth"`
	TotalBandwidth  int64  `json:"totalBandwidth"`
	ReadIOPS        int64  `json:"readIOPS"`
	WriteIOPS       int64  `json:"writeIOPS"`
	TotalIOPS       int64  `json:"totalIOPS"`
}

type SetVolumeQoSParam

type SetVolumeQoSParam struct {
	BaseParam

	SetVolumeQoS SetVolumeQoSDetailParam `json:"setVolumeQos"`
}

type StartVmInstanceDetailParam

type StartVmInstanceDetailParam struct {
	HostUuid string `json:"hostUuid"` // Host UUID
}

type StartVmInstanceParam

type StartVmInstanceParam struct {
	BaseParam
	StartVmInstance StartVmInstanceDetailParam `json:"startVmInstance"` // Can pass hostUuid
}

type StateEvent

type StateEvent string

type StopVmInstanceDetailParam

type StopVmInstanceDetailParam struct {
	Type   InstanceStopType `json:"type"`   // Default is grace: graceful shutdown; cold: cold shutdown (power off)
	StopHA bool             `json:"stopHa"` // Completely shut down HA VM
}

type StopVmInstanceParam

type StopVmInstanceParam struct {
	BaseParam
	StopVmInstance StopVmInstanceDetailParam `json:"stopVmInstance"` // Requires uuid and type
}

type SubmitLongJobDetailParam

type SubmitLongJobDetailParam struct {
	Name               *string  `json:"name"`
	Description        *string  `json:"description"`
	JobName            string   `json:"jobName" validate:"required"`
	JobData            string   `json:"jobData" validate:"required"`
	ResourceUuid       *string  `json:"resourceUuid" `
	TargetResourceUuid *string  `json:"targetResourceUuid" `
	TagUuids           []string `json:"tagUuids" `
}

type SubmitLongJobParam

type SubmitLongJobParam struct {
	BaseParam
	Params SubmitLongJobDetailParam `json:"params"`
}

type SyncImageSizeDetailParam

type SyncImageSizeDetailParam struct {
}

type SyncImageSizeParam

type SyncImageSizeParam struct {
	BaseParam
	ImageUuid     string                   `json:"imageUuid"` // Image UUID
	SyncImageSize SyncImageSizeDetailParam `json:"syncImageSize"`
}

type UnmountVmInstanceRecoveryPointParam

type UnmountVmInstanceRecoveryPointParam MountVmInstanceRecoveryPointParam

type UnprotectVmInstanceRecoveryPointDetailParam

type UnprotectVmInstanceRecoveryPointDetailParam struct {
	GroupId int64 `json:"groupId,omitempty"`
}

type UnprotectVmInstanceRecoveryPointParam

type UnprotectVmInstanceRecoveryPointParam struct {
	BaseParam                        `json:",inline,omitempty"`
	UnprotectVmInstanceRecoveryPoint UnprotectVmInstanceRecoveryPointDetailParam `json:"unprotectVmInstanceRecoveryPoint"`
}

type UpdateCdpPolicyDetailParam

type UpdateCdpPolicyDetailParam struct {
	Name                    *string `json:"name"`
	Description             *string `json:"description"`
	RetentionTimePerDay     *int64  `json:"retentionTimePerDay"`     // Retention time for recovery points
	RecoveryPointPerSecond  *int64  `json:"recoveryPointPerSecond"`  // Recovery point interval time
	HourlyRpSinceDay        *int64  `json:"hourlyRpSinceDay"`        // From which day to keep hourly recovery points
	DailyRpSinceDay         *int64  `json:"dailyRpSinceDay"`         // From which day to keep daily recovery points
	ExpireTimeInDay         *int64  `json:"expireTimeInDay"`         // Backup data validity period
	FullBackupIntervalInDay *int64  `json:"fullBackupIntervalInDay"` // Full backup interval
}

type UpdateCdpPolicyParam

type UpdateCdpPolicyParam struct {
	BaseParam
	UpdateCdpPolicy UpdateCdpPolicyDetailParam `json:"updateCdpPolicy"`
}

type UpdateCdpTaskDetailParam

type UpdateCdpTaskDetailParam struct {
	Name            *string `json:"name"`
	Description     *string `json:"description"`
	BackupBandwidth *int64  `json:"backupBandwidth"`
	MaxCapacity     *int64  `json:"maxCapacity"`
	MaxLatency      *int64  `json:"maxLatency"`
}

type UpdateCdpTaskParam

type UpdateCdpTaskParam struct {
	BaseParam
	UpdateCdpTask UpdateCdpTaskDetailParam `json:"updateCdpTask"`
}

type UpdateConfigDetailParam

type UpdateConfigDetailParam struct {
	Value string `json:"value"`
}

type UpdateEipDetailParam

type UpdateEipDetailParam struct {
	Name        string `json:"name,omitempty"`        // Resource name
	Description string `json:"description,omitempty"` // Detailed description
}

type UpdateEipParam

type UpdateEipParam struct {
	BaseParam

	UUID      string               `json:"uuid"` // Resource UUID, uniquely identifies the resource
	UpdateEip UpdateEipDetailParam `json:"updateEip"`
}

type UpdateGlobalConfigParam

type UpdateGlobalConfigParam struct {
	BaseParam
	UpdateGlobalConfig UpdateConfigDetailParam `json:"updateGlobalConfig"`
}

type UpdateHostDetailParam

type UpdateHostDetailParam struct {
	Name         *string `json:"name"`
	Description  *string `json:"description"`
	ManagementIp *string `json:"managementIp"`
}

type UpdateHostParam

type UpdateHostParam struct {
	BaseParam
	UpdateHost UpdateHostDetailParam `json:"updateHost"`
}

type UpdateImageArchitectureDetailParam

type UpdateImageArchitectureDetailParam struct {
	UUID         string       `json:"uuid"`         // Resource UUID, uniquely identifies the resource
	Architecture Architecture `json:"architecture"` // x86_64, aarch64, mips64el
}

type UpdateImageArchitectureParam

type UpdateImageArchitectureParam struct {
	BaseParam
	UpdateImage UpdateImageArchitectureDetailParam `json:"updateImage"`
}

type UpdateImageDetailParam

type UpdateImageDetailParam struct {
	Name        string  `json:"name"`        // Image name
	Description *string `json:"description"` // Detailed description of the image
}

type UpdateImageParam

type UpdateImageParam struct {
	BaseParam
	UpdateImage UpdateImageDetailParam `json:"updateImage"`
}

type UpdateImagePlatformDetailParam

type UpdateImagePlatformDetailParam struct {
	Platform    string `json:"platform"`    // Platform
	GuestOsType string `json:"guestOsType"` // Guest OS type corresponding to the image
	UUID        string `json:"uuid"`        // Resource UUID, uniquely identifies the resource
}

type UpdateImagePlatformParam

type UpdateImagePlatformParam struct {
	BaseParam
	UpdateImage UpdateImagePlatformDetailParam `json:"updateImage"`
}

type UpdateImageStoreBackupStorageDetailParam

type UpdateImageStoreBackupStorageDetailParam struct {
	UUID        string  `json:"uuid"`
	Username    *string `json:"username"`
	Password    *string `json:"password"`
	Hostname    *string `json:"hostname"`
	SshPort     *int    `json:"sshPort"`
	Name        *string `json:"name"`
	Description *string `json:"description"`
}

type UpdateImageStoreBackupStorageParam

type UpdateImageStoreBackupStorageParam struct {
	BaseParam
	UpdateImageStoreBackupStorage UpdateImageStoreBackupStorageDetailParam `json:"updateImageStoreBackupStorage"`
}

type UpdateImageVirtioDetailParam

type UpdateImageVirtioDetailParam struct {
	Virtio bool   `json:"virtio"`
	UUID   string `json:"uuid"` // Resource UUID, uniquely identifies the resource
}

type UpdateImageVirtioParam

type UpdateImageVirtioParam struct {
	BaseParam
	UpdateImage UpdateImageVirtioDetailParam `json:"updateImage"`
}

type UpdateL2NetworkDetailParam

type UpdateL2NetworkDetailParam struct {
	Name        string  `json:"name"`
	Description *string `json:"description"`
}

type UpdateL2NetworkParam

type UpdateL2NetworkParam struct {
	BaseParam
	UpdateL2Network UpdateL2NetworkDetailParam `json:"updateL2Network"`
}

type UpdateL3NetworkDetailParam

type UpdateL3NetworkDetailParam struct {
	BaseParam
	Name        string      `json:"name"`        // Layer 3 network name
	Description *string     `json:"description"` // Layer 3 network description
	System      *bool       `json:"system"`      // Whether it is for system cloud hosts
	DnsDomain   *string     `json:"dnsDomain"`   // DNS domain of the layer 3 network
	Category    *L3Category `json:"category"`    // Category of the layer 3 network
}

type UpdateL3NetworkParam

type UpdateL3NetworkParam struct {
	BaseParam
	UpdateL3Network UpdateL3NetworkDetailParam `json:"updateL3Network"`
}

type UpdateLicenseDetailParam

type UpdateLicenseDetailParam struct {
	License         string `json:"license"`         // Base64 encoded license content, passing the license file for all management nodes will update all management nodes
	AdditionSession string `json:"additionSession"` // Additional information, a JSON string, optional parameter
}

type UpdateLicenseParam

type UpdateLicenseParam struct {
	BaseParam
	UpdateLicense UpdateLicenseDetailParam `json:"updateLicense"`
}

type UpdateLongJobDetailParam

type UpdateLongJobDetailParam struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
}

type UpdateLongJobParam

type UpdateLongJobParam struct {
	BaseParam
	UpdateLongJob UpdateLongJobDetailParam `json:"updateLongJob"`
}

type UpdateResourceConfigParam

type UpdateResourceConfigParam struct {
	BaseParam
	UpdateResourceConfig UpdateConfigDetailParam `json:"updateResourceConfig"`
}

type UpdateResourceTagDetailParam

type UpdateResourceTagDetailParam struct {
	Name        string `json:"name"`
	Value       string `json:"value"` //不允许更改 simple Pattern 的 value,仅允许更改 withToken Pattern 的 key 值,如果是withToken 那么 name::{key1}::{key2} … ::{keyN}
	Description string `json:"description"`
	Color       string `json:"color"`
}

type UpdateResourceTagParam

type UpdateResourceTagParam struct {
	BaseParam
	UpdateResourceTag UpdateResourceTagDetailParam `json:"updateTag"`
}

type UpdateSecurityGroupRuleDetailParam

type UpdateSecurityGroupRuleDetailParam struct {
	Description             string `json:"description,omitempty"`             // Optional, update rule description
	RemoteSecurityGroupUuid string `json:"remoteSecurityGroupUuid,omitempty"` // Optional, update remote security group UUID
	Action                  string `json:"action,omitempty"`                  // Optional, update action (Allow or Deny)
	State                   string `json:"state,omitempty"`                   // Optional, update state (Enabled or Disabled)
	Priority                int    `json:"priority"`                          // Require, update priority
	Protocol                string `json:"protocol,omitempty"`                // Optional, update protocol (TCP, UDP, ICMP, ALL)
	SrcIpRange              string `json:"srcIpRange,omitempty"`              // Optional, update source IP
	DstIpRange              string `json:"dstIpRange,omitempty"`              // Optional, update destination IP
	DstPortRange            string `json:"dstPortRange,omitempty"`            // Optional, update destination port
}

type UpdateSecurityGroupRuleParam

type UpdateSecurityGroupRuleParam struct {
	BaseParam
	ChangeSecurityGroupRule UpdateSecurityGroupRuleDetailParam `json:"changeSecurityGroupRule"`
}

type UpdateSystemTagParam

type UpdateSystemTagParam struct {
	BaseParam

	UpdateSystemTag UpdateTagDetailParam `json:"updateSystemTag"`
}

type UpdateTagDetailParam

type UpdateTagDetailParam struct {
	Tag string `json:"tag"`
}

type UpdateUsbDeviceDetailParam

type UpdateUsbDeviceDetailParam struct {
	Name        *string `json:"name"`
	Description *string `json:"description"`
	State       *string `json:"state"`
}

type UpdateUsbDeviceParam

type UpdateUsbDeviceParam struct {
	BaseParam
	UpdateUsbDevice UpdateUsbDeviceDetailParam `json:"updateUsbDevice"`
}

type UpdateVipDetailParam

type UpdateVipDetailParam struct {
	Name        string `json:"name"`                  // Resource name
	Description string `json:"description,omitempty"` // Detailed description
}

type UpdateVipParam

type UpdateVipParam struct {
	BaseParam
	UUID      string               `json:"uuid"` // Resource UUID, uniquely identifies the resource
	UpdateVip UpdateVipDetailParam `json:"updateVip"`
}

type UpdateVmCdRomDetailParam

type UpdateVmCdRomDetailParam struct {
	Name string `json:"name"`
}

type UpdateVmCdRomParam

type UpdateVmCdRomParam struct {
	BaseParam
	UpdateVmCdRom UpdateVmCdRomDetailParam `json:"updateVmCdRom"`
}

type UpdateVmInstanceChangePwdParam

type UpdateVmInstanceChangePwdParam struct {
	UUID             string                `json:"uuid"`
	ChangeVmPassword ChangeVmPasswordParam `json:"changeVmPassword"`
}

type UpdateVmInstanceClockTrackDetailParam

type UpdateVmInstanceClockTrackDetailParam struct {
	Track             ClockTrack `json:"track"`             // Clock synchronization method, optional values: guest, host
	SyncAfterVMResume bool       `json:"syncAfterVMResume"` // Whether to synchronize the clock when the VM resumes
	IntervalInSeconds float64    `json:"intervalInSeconds"` // Clock synchronization interval, unit: seconds (0, 60, 600, 1800, 3600, 7200, 21600, 43200, 86400)
}

type UpdateVmInstanceClockTrackParam

type UpdateVmInstanceClockTrackParam struct {
	BaseParam
	SetVmClockTrack UpdateVmInstanceClockTrackDetailParam `json:"setVmClockTrack"`
}

type UpdateVmInstanceDetailParam

type UpdateVmInstanceDetailParam struct {
	Name                 string  `json:"name"`        // VM instance name
	Description          *string `json:"description"` // Detailed description of the VM instance
	State                string  `json:"state"`
	DefaultL3NetworkUuid string  `json:"defaultL3NetworkUuid"` // Default layer 3 network UUID, specifies the default network for routing when multiple networks are specified.
	Platform             string  `json:"platform"`             // Volume system platform
	CpuNum               *int    `json:"cpuNum"`               // Number of CPUs
	MemorySize           *int64  `json:"memorySize"`           // CPU number/memory size, note: this parameter is mutually exclusive with instanceOfferingUuid.
	GuestOsType          string  `json:"guestOsType"`
}

type UpdateVmInstanceParam

type UpdateVmInstanceParam struct {
	BaseParam
	UpdateVmInstance UpdateVmInstanceDetailParam `json:"updateVmInstance"`
}

type UpdateVmInstanceQgaParam

type UpdateVmInstanceQgaParam struct {
	BaseParam
	SetVmQga SetVmQgaParam `json:"setVmQga"`
	UUID     string        `json:"UUID"`
}

type UpdateVmInstanceScriptDetailParam

type UpdateVmInstanceScriptDetailParam struct {
	Name          string `json:"name,omitempty"`          // 资源名称
	Description   string `json:"description,omitempty"`   // 资源描述
	ScriptContent string `json:"scriptContent,omitempty"` // 脚本内容
	EncodingType  string `json:"encodingType,omitempty"`  // 编码类型
	Platform      string `json:"platform,omitempty"`      // 平台类型
	ScriptType    string `json:"scriptType,omitempty"`    // 脚本类型
	ScriptTimeout int    `json:"scriptTimeout,omitempty"` // 超时时间(秒)
	RenderParams  string `json:"renderParams,omitempty"`  // Optional
}

type UpdateVmInstanceScriptParam

type UpdateVmInstanceScriptParam struct {
	BaseParam
	Params UpdateVmInstanceScriptDetailParam `json:"updateGuestVmScript"`
}

type UpdateVmInstanceSshKeyParam

type UpdateVmInstanceSshKeyParam struct {
	UUID        string         `json:"uuid"`
	SetVmSshKey SetSshKeyParam `json:"setVmSshKey"`
}

type UpdateVmNicMacDetailParam

type UpdateVmNicMacDetailParam struct {
	Mac string `json:"mac"` // MAC address
}

type UpdateVmNicMacParam

type UpdateVmNicMacParam struct {
	BaseParam
	UpdateVmNicMac UpdateVmNicMacDetailParam `json:"updateVmNicMac"`
}

type UpdateVolumeDetailParam

type UpdateVolumeDetailParam struct {
	Name        string  `json:"name"`        // Resource name
	Description *string `json:"description"` // Detailed description of the resource
}

type UpdateVolumeParam

type UpdateVolumeParam struct {
	BaseParam

	UpdateVolume UpdateVolumeDetailParam `json:"updateVolume"`
}

type UpdateVolumeSnapshotDetailParam

type UpdateVolumeSnapshotDetailParam struct {
	Name        string `json:"name"`        // New name for the snapshot
	Description string `json:"description"` // New detailed description for the snapshot
}

type UpdateVolumeSnapshotGroupDetailParam

type UpdateVolumeSnapshotGroupDetailParam struct {
	Name        string `json:"name"`        // Resource name
	Description string `json:"description"` // Detailed description of the resource
}

type UpdateVolumeSnapshotGroupParam

type UpdateVolumeSnapshotGroupParam struct {
	BaseParam

	UpdateVolumeSnapshotGroup UpdateVolumeSnapshotGroupDetailParam `json:"updateVolumeSnapshotGroup"`
}

type UpdateVolumeSnapshotParam

type UpdateVolumeSnapshotParam struct {
	BaseParam

	UpdateVolumeSnapshot UpdateVolumeSnapshotDetailParam `json:"updateVolumeSnapshot"`
}

type Variables

type Variables struct {
	Conditions      []Condition            `json:"conditions"`      // Conditions
	ExtraConditions []Condition            `json:"extraConditions"` // Extra conditions
	Input           map[string]interface{} `json:"input"`           // Input parameters
	PageVar         `json:",inline,omitempty"`
	Type            string `json:"type"` // Type
}

type VipAllocatorStrategy

type VipAllocatorStrategy string
const (
	DefaultHostAllocatorStrategy            VipAllocatorStrategy = "DefaultHostAllocatorStrategy"
	LastHostPreferredAllocatorStrategy      VipAllocatorStrategy = "LastHostPreferredAllocatorStrategy"
	LeastVmPreferredHostAllocatorStrategy   VipAllocatorStrategy = "LeastVmPreferredHostAllocatorStrategy"
	MinimumCPUUsageHostAllocatorStrategy    VipAllocatorStrategy = "MinimumCPUUsageHostAllocatorStrategy"
	MinimumMemoryUsageHostAllocatorStrategy VipAllocatorStrategy = "MinimumMemoryUsageHostAllocatorStrategy"
	MaxInstancePerHostHostAllocatorStrategy VipAllocatorStrategy = "MaxInstancePerHostHostAllocatorStrategy"
)

type VolumeSnapshotDetailParam

type VolumeSnapshotDetailParam struct {
	Name         string `json:"name" example:"chenjh-test-snapshot"`                         // Snapshot name
	Description  string `json:"description" example:"JUST a test VolumeSnapshot For chenjh"` // Detailed description of the snapshot (optional)
	ResourceUuid string `json:"resourceUuid" example:""`                                     // Resource Uuid (optional)
}

type VolumeSnapshotGroupDetailParam

type VolumeSnapshotGroupDetailParam struct {
	RootVolumeUuid string `json:"rootVolumeUuid"` // Root volume UUID
	Name           string `json:"name"`           // Resource name
	Description    string `json:"description"`    // Detailed description of the resource (optional)
	ResourceUuid   string `json:"resourceUuid"`   // Resource Uuid (optional)
}

type VolumeSnapshotGroupParam

type VolumeSnapshotGroupParam struct {
	BaseParam

	Params VolumeSnapshotGroupDetailParam `json:"params"`
}

type VolumeSnapshotParam

type VolumeSnapshotParam struct {
	BaseParam

	Params VolumeSnapshotDetailParam `json:"params"`
}

type VolumeState

type VolumeState string
const (
	VolumeStateEnable  VolumeState = "enable"
	VolumeStateDisable VolumeState = "disable"
)

Jump to

Keyboard shortcuts

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