tcapi

package module
v0.0.0-...-11bcd02 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	AddressId        string
	AddressName      string
	AddressState     string
	AddressIp        string
	BindedResourceId string
	CreatedTime      string
}

type AssociateInstancesKeyPairsRequest

type AssociateInstancesKeyPairsRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	KeyIds      []string `json:",omitempty" url:",omitempty,dotnumbered"`
	ForceStop   bool     `json:",omitempty" url:",omitempty"`
}

type AvailabilityZone

type AvailabilityZone struct {
	RegionId  string
	Zone      string
	ZoneName  string
	ZoneState string
}

type Client

type Client struct {

	// API secret identifier
	SecretId string
	// API secret
	Secret string
	// Region to use in API operations
	Region string
	// contains filtered or unexported fields
}

Client instances contain configuration and context information for the API.

func New

func New(secret_id, secret, region string, httpClient *http.Client) *Client

New returns a new instance of the client. region defaults to "hk" if null. If you wish to use your own http.Client instance (to provide caching, et al.), you may provide one; if nil, the http.DefaultClient will be used.

if environment variables are present, they will override any values set statically here:

TENCENT_REGION     -> region
TENCENT_API_KEY_ID -> secret_id
TENCENT_API_KEY    -> secret

func (*Client) AssociateInstancesKeyPairs

func (c *Client) AssociateInstancesKeyPairs(req *AssociateInstancesKeyPairsRequest) error

func (*Client) Copy

func (c *Client) Copy(region string, httpClient *http.Client) *Client

func (*Client) CreateImage

func (c *Client) CreateImage(req *CreateImageRequest) error

func (*Client) CreateKeyPair

func (c *Client) CreateKeyPair(req *CreateKeyPairRequest) (*CreateKeyPairResponse, error)

func (*Client) CreateScalingConfiguration

func (c *Client) CreateScalingConfiguration(req *CreateScalingConfigurationRequest) (*[]string, error)

func (*Client) CreateScalingGroup

func (c *Client) CreateScalingGroup(req *CreateScalingGroupRequest) (*[]string, error)

func (*Client) DeleteImages

func (c *Client) DeleteImages(req *DeleteImagesRequest) error

func (*Client) DeleteKeyPairs

func (c *Client) DeleteKeyPairs(req *DeleteKeyPairsRequest) error

func (*Client) DeleteScalingConfiguration

func (c *Client) DeleteScalingConfiguration(req *DeleteScalingConfigurationRequest) error

func (*Client) DeleteScalingGroup

func (c *Client) DeleteScalingGroup(req *DeleteScalingGroupRequest) error

func (*Client) DescribeImages

func (c *Client) DescribeImages(req *DescribeImagesRequest) (*DescribeImagesResponse, error)

func (*Client) DescribeInstances

func (c *Client) DescribeInstances(req *DescribeInstancesRequest) (*DescribeInstancesResponse, error)

func (*Client) DescribeInstancesStatus

func (c *Client) DescribeInstancesStatus(req *DescribeInstancesStatusRequest) (*DescribeInstancesStatusResponse, error)

func (*Client) DescribeKeyPairs

func (c *Client) DescribeKeyPairs(req *DescribeKeyPairsRequest) (*DescribeKeyPairsResponse, error)

func (*Client) DescribeScalingGroup

func (c *Client) DescribeScalingGroup(request *DescribeScalingGroupRequest) (*DescribeScalingGroupResponseData, error)

func (*Client) DetachInstance

func (c *Client) DetachInstance(req *DetachInstanceRequest) error

func (*Client) DisassociateInstancesKeyPairs

func (c *Client) DisassociateInstancesKeyPairs(req *DisassociateInstancesKeyPairsRequest) error

func (*Client) Do

func (c *Client) Do(module, request string, params interface{}) (*json.RawMessage, error)

func (*Client) ImportKeyPair

func (c *Client) ImportKeyPair(req *ImportKeyPairRequest) (*ImportKeyPairResponse, error)

func (*Client) InquiryPriceRenewInstances

func (c *Client) InquiryPriceRenewInstances(req *RenewInstancesRequest) (*InquiryPriceRenewInstancesResponse, error)

func (*Client) InquiryPriceResetInstance

func (c *Client) InquiryPriceResetInstance(req *ResetInstanceRequest) (*InquiryPriceResetInstanceResponse, error)

func (*Client) InquiryPriceResetInstancesType

func (c *Client) InquiryPriceResetInstancesType(req *ResetInstancesTypeRequest) (*InquiryPriceResetInstancesTypeResponse, error)

func (*Client) InquiryPriceResizeInstanceDisks

func (c *Client) InquiryPriceResizeInstanceDisks(req *ResizeInstanceDisksRequest) (*InquiryPriceResizeInstanceDisksResponse, error)

func (*Client) InquiryPriceRunInstances

func (c *Client) InquiryPriceRunInstances(req *RunInstancesRequest) (*InquiryPriceRunInstancesResponse, error)

func (*Client) ModifyImageAttribute

func (c *Client) ModifyImageAttribute(req *ModifyImageAttributeRequest) error

func (*Client) ModifyImageSharePermission

func (c *Client) ModifyImageSharePermission(req *ModifyImageSharePermissionRequest) error

func (*Client) ModifyInstancesAttribute

func (c *Client) ModifyInstancesAttribute(req *ModifyInstancesAttributeRequest) error

func (*Client) ModifyInstancesProject

func (c *Client) ModifyInstancesProject(req *ModifyInstancesProjectRequest) error

func (*Client) ModifyInstancesRenewFlag

func (c *Client) ModifyInstancesRenewFlag(req *ModifyInstancesRenewFlagRequest) error

func (*Client) ModifyKeyPairAttribute

func (c *Client) ModifyKeyPairAttribute(req *ModifyKeyPairAttributeRequest) error

func (*Client) ModifyScalingGroup

func (c *Client) ModifyScalingGroup(req *ModifyScalingGroupRequest) error

func (*Client) RebootInstances

func (c *Client) RebootInstances(req *RebootInstancesRequest) error

func (*Client) RenewInstances

func (c *Client) RenewInstances(req *RenewInstancesRequest) error

func (*Client) ResetInstance

func (c *Client) ResetInstance(req *ResetInstanceRequest) error

func (*Client) ResetInstancesInternetMaxBandwidth

func (c *Client) ResetInstancesInternetMaxBandwidth(req *ResetInstancesInternetMaxBandwidthRequest) error

func (*Client) ResetInstancesPassword

func (c *Client) ResetInstancesPassword(req *ResetInstancesPasswordRequest) error

func (*Client) ResetInstancesType

func (c *Client) ResetInstancesType(req *ResetInstancesTypeRequest) error

func (*Client) ResizeInstanceDisks

func (c *Client) ResizeInstanceDisks(req *ResizeInstanceDisksRequest) error

func (*Client) RunInstances

func (c *Client) RunInstances(req *RunInstancesRequest) (*RunInstancesResponse, error)

func (*Client) StartInstances

func (c *Client) StartInstances(req *StartInstancesRequest) error

func (*Client) StopInstances

func (c *Client) StopInstances(req *StopInstancesRequest) error

func (*Client) SyncImages

func (c *Client) SyncImages(req *SyncImagesRequest) error

func (*Client) TerminateInstances

func (c *Client) TerminateInstances(req *TerminateInstancesRequest) error

func (*Client) UpdateInstanceVpcConfig

func (c *Client) UpdateInstanceVpcConfig(req *UpdateInstanceVpcConfigRequest) error

type CreateImageRequest

type CreateImageRequest struct {
	InstanceId       string `json:",omitempty" url:",omitempty"`
	ImageName        string `json:",omitempty" url:",omitempty"`
	ImageDescription string `json:",omitempty" url:",omitempty"`
}

type CreateKeyPairRequest

type CreateKeyPairRequest struct {
	KeyName   string `json:",omitempty" url:",omitempty"`
	ProjectId int    `json:",omitempty" url:",omitempty"`
}

type CreateKeyPairResponse

type CreateKeyPairResponse struct {
	RequestId string  `json:",omitempty" url:",omitempty"`
	KeyPair   KeyPair `json:",omitempty" url:",omitempty,dotnumbered"`
}

type CreateScalingConfigurationRequest

type CreateScalingConfigurationRequest struct {
	ScalingConfigurationName string `json:"scalingConfigurationName" url:"scalingConfigurationName"`
	ImageId                  string `json:"imageId" url:"imageId"`
	CPU                      int    `json:"cpu" url:"cpu"`
	Memory                   int    `json:"mem" url:"mem"`
	StorageType              int    `json:"storageType" url:"storageType"`
	StorageSize              int    `json:"storageSize" url:"storageSize"`
	BandwidthType            string `json:"bandwidthType" url:"bandwidthType"`
	Bandwidth                int    `json:"bandwidth" url:"bandwidth"`
	ImageType                int    `json:"imageType" url:"imageType"`
	RootSize                 int    `json:"rootSize" url:"rootSize"`
	KeyId                    string `json:"keyId,omitempty" url:"keyId,omitempty"`
	Password                 string `json:"password,omitempty" url:"password,omitempty"`
	NeedMonitorAgent         int    `json:"needMonitorAgent" url:"needMonitorAgent"`
	NeedSecurityAgent        int    `json:"needSecurityAgent" url:"needSecurityAgent"`
	WanIp                    int    `json:"wanIp" url:"wanIp"`
	SgId                     string `json:"sgId,omitempty" url:"sgId,omitempty"`
	ProjectId                int    `json:"projectId,omitempty" url:"projectId,omitempty"`
	DataSnapshotId           string `json:"dataSnapshotId,omitempty" url:"dataSnapshotId,omitempty"`
	CvmType                  int    `json:"cvmType,omitempty" url:"cvmType,omitempty"`
	UserData                 string `json:"userdata,omitempty" url:"userdata,omitempty"`
}

it is *profoundly* annoying how similar-but-sufficiently-different this is to a ScalingConfiguration struct

type CreateScalingConfigurationResponse

type CreateScalingConfigurationResponse struct {
	Data CreateScalingConfigurationResponseData `json:"data" url:"data"`
}

type CreateScalingConfigurationResponseData

type CreateScalingConfigurationResponseData struct {
	ScalingConfigurationIdSet []string `json:"scalingConfigurationIdSet" url:"scalingConfigurationIdSet"`
}

type CreateScalingGroupRequest

type CreateScalingGroupRequest struct {
	ScalingConfigurationId string   `json:"scalingConfigurationId" url:"scalingConfigurationId"`
	ScalingGroupName       string   `json:"scalingGroupName" url:"scalingGroupName"`
	MinSize                int      `json:"minSize" url:"minSize"`
	MaxSize                int      `json:"maxSize" url:"maxSize"`
	RemovePolicy           string   `json:"removePolicy" url:"removePolicy"`
	VpcId                  string   `json:"vpcId" url:"vpcId,omitempty"`
	ZoneIds                []string `json:"zoneIds" url:"zoneIds,omitempty,dotnumbered"`
	LoadBalancerIds        []string `json:"loadBalancerIds" url:"loadBalancerIds,omitempty,dotnumbered"`
	SubnetIds              []string `json:"subnetIds" url:"subnetIds,omitempty,dotnumbered"`
	ProjectId              int      `json:"projectId" url:"projectId,omitempty"`
	DesiredCapacity        int      `json:"desiredCapacity" url:"desiredCapacity"`
}

it is *profoundly* annoying how similar-but-sufficiently-different this is to a ScalingGroup struct

type CreateScalingGroupResponse

type CreateScalingGroupResponse struct {
	Data CreateScalingGroupResponseData `json:"data" url:"data"`
}

type CreateScalingGroupResponseData

type CreateScalingGroupResponseData struct {
	ScalingGroupIdSet []string `json:"scalingGroupIdSet" url:"scalingGroupIdSet,dotnumbered"`
}

type DataDisk

type DataDisk struct {
	DiskType string
	DiskId   string
	DiskSize int
}

type DeleteImagesRequest

type DeleteImagesRequest struct {
	ImageIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DeleteKeyPairsRequest

type DeleteKeyPairsRequest struct {
	KeyIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DeleteScalingConfigurationRequest

type DeleteScalingConfigurationRequest struct {
	ScalingConfigurationId string `json:"scalingConfigurationId" url:"scalingConfigurationId"`
}

type DeleteScalingGroupRequest

type DeleteScalingGroupRequest struct {
	ScalingGroupId string `json:"scalingGroupId" url:"scalingGroupId"`
}

type DescribeImageSharePermissionRequest

type DescribeImageSharePermissionRequest struct {
	ImageId string `json:",omitempty" url:",omitempty"`
}

type DescribeImageSharePermissionResponse

type DescribeImageSharePermissionResponse struct {
	RequestId          string            `json:",omitempty" url:",omitempty"`
	SharePermissionSet []SharePermission `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DescribeImagesRequest

type DescribeImagesRequest struct {
	ImageIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	Filters  []Filter `json:",omitempty" url:",omitempty,dotnumbered"`
	Offset   int      `json:",omitempty" url:",omitempty"`
	Limit    int      `json:",omitempty" url:",omitempty"`
}

type DescribeImagesResponse

type DescribeImagesResponse struct {
	RequestId  string  `json:",omitempty" url:",omitempty"`
	ImageSet   []Image `json:",omitempty" url:",omitempty,dotnumbered"`
	TotalCount int     `json:",omitempty" url:",omitempty"`
}

type DescribeInstanceInternetBandwidthConfigsRequest

type DescribeInstanceInternetBandwidthConfigsRequest struct {
	InstanceId string `json:",omitempty" url:",omitempty"`
}

type DescribeInstanceInternetBandwidthConfigsResponse

type DescribeInstanceInternetBandwidthConfigsResponse struct {
	RequestId                  string                    `json:",omitempty" url:",omitempty"`
	InternetBandwidthConfigSet []InternetBandwidthConfig `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DescribeInstancesRequest

type DescribeInstancesRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	Filters     []Filter `json:",omitempty" url:",omitempty,dotnumbered"`
	Offset      int      `json:",omitempty" url:",omitempty"`
	Limit       int      `json:",omitempty" url:",omitempty"`
}

type DescribeInstancesResponse

type DescribeInstancesResponse struct {
	RequestId   string     `json:",omitempty" url:",omitempty"`
	TotalCount  int        `json:",omitempty" url:",omitempty"`
	InstanceSet []Instance `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DescribeInstancesStatusRequest

type DescribeInstancesStatusRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	Offset      int      `json:",omitempty" url:",omitempty"`
	Limit       int      `json:",omitempty" url:",omitempty"`
}

type DescribeInstancesStatusResponse

type DescribeInstancesStatusResponse struct {
	RequestId         string           `json:",omitempty" url:",omitempty"`
	TotalCount        int              `json:",omitempty" url:",omitempty"`
	InstanceStatusSet []InstanceStatus `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DescribeKeyPairsRequest

type DescribeKeyPairsRequest struct {
	KeyIds  []string `json:",omitempty" url:",omitempty,dotnumbered"`
	Filters []Filter `json:",omitempty" url:",omitempty,dotnumbered"`
	Offset  int      `json:",omitempty" url:",omitempty"`
	Limit   int      `json:",omitempty" url:",omitempty"`
}

type DescribeKeyPairsResponse

type DescribeKeyPairsResponse struct {
	RequestId  string    `json:",omitempty" url:",omitempty"`
	TotalCount int       `json:",omitempty" url:",omitempty"`
	KeyPairSet []KeyPair `json:",omitempty" url:",omitempty,dotnumbered"`
}

type DescribeScalingConfigurationRequest

type DescribeScalingConfigurationRequest struct {
	ScalingConfigurationIds  []string `json:"scalingConfigurationIds,omitempty" url:"scalingConfigurationIds,omitempty,dotnumbered"`
	ScalingConfigurationName string   `json:"scalingConfigurationName,omitempty" url:"scalingConfigurationName,omitempty"`
	Offset                   int      `json:"offset,omitempty" url:"offset,omitempty"`
	Limit                    int      `json:"limit,omitempty" url:"limit,omitempty"`
	ProjectId                int      `json:"projectId,omitempty" url:"projectId,omitempty"`
}

type DescribeScalingConfigurationResponse

type DescribeScalingConfigurationResponse struct {
	Data DescribeScalingConfigurationResponseData
}

type DescribeScalingConfigurationResponseData

type DescribeScalingConfigurationResponseData struct {
	TotalCount              int
	ScalingConfigurationSet []ScalingConfiguration `url:",dotnumbered"`
}

type DescribeScalingGroupRequest

type DescribeScalingGroupRequest struct {
	ScalingGroupIds        []string `json:"scalingGroupIds,omitempty" url:"scalingGroupIds,omitempty,dotnumbered"`
	ScalingGroupName       string   `json:"scalingGroupName,omitempty" url:"scalingGroupName,omitempty"`
	ScalingConfigurationId string   `json:"scalingConfigurationId,omitempty" url:"scalingConfigurationId,omitempty"`
	Offset                 int      `json:"offset,omitempty" url:"offset,omitempty"`
	Limit                  int      `json:"limit,omitempty" url:"limit,omitempty"`
	VpcId                  string   `json:"vpcId,omitempty" url:"vpcId,omitempty"`
	ProjectId              int      `json:"projectId,omitempty" url:"projectId,omitempty"`
}

type DescribeScalingGroupResponse

type DescribeScalingGroupResponse struct {
	Data DescribeScalingGroupResponseData
}

type DescribeScalingGroupResponseData

type DescribeScalingGroupResponseData struct {
	TotalCount      int
	ScalingGroupSet []ScalingGroup `url:",dotnumbered"`
}

type DescribeScalingInstanceRequest

type DescribeScalingInstanceRequest struct {
	ScalingGroupId string   `json:"scalingGroupId,omitempty" url:"scalingGroupId,omitempty"`
	InstanceIds    []string `json:"instanceIds,omitempty" url:"instanceIds,omitempty,dotnumbered"`
	CreationType   string   `json:"creationType,omitempty" url:"creationType,omitempty"`
	HealthStatus   string   `json:"healthStatus,omitempty" url:"healthStatus,omitempty"`
	Offset         int      `json:"offset,omitempty" url:"offset,omitempty"`
	Limit          int      `json:"limit,omitempty" url:"limit,omitempty"`
}

type DescribeScalingInstanceResponse

type DescribeScalingInstanceResponse struct {
	Data DescribeScalingInstanceResponseData
}

type DescribeScalingInstanceResponseData

type DescribeScalingInstanceResponseData struct {
	TotalCount          int
	ScalingInstancesSet []ScalingInstance `url:",dotnumbered"`
}

type DetachInstanceRequest

type DetachInstanceRequest struct {
	ScalingGroupId string   `json:"scalingGroupId,omitempty" url:"scalingGroupId,omitempty"`
	InstanceIds    []string `json:"instanceIds,omitempty" url:"instanceIds,omitempty,dotnumbered"`
	KeepInstance   int      `json:"keepInstance,omitempty" url:"keepInstance,omitempty"`
}

type DisassociateInstancesKeyPairsRequest

type DisassociateInstancesKeyPairsRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	KeyIds      []string `json:",omitempty" url:",omitempty,dotnumbered"`
	ForceStop   bool     `json:",omitempty" url:",omitempty"`
}

type EnhancedService

type EnhancedService struct {
	SecurityService RunSecurityServiceEnabled `url",dotnumbered"`
	MonitorService  RunMonitorServiceEnabled  `url",dotnumbered"`
}

type ErrorResponse

type ErrorResponse struct {
	Code     string
	CodeDesc string
	Message  string
}

type Filter

type Filter struct {
	Name   string
	Values []string `url",dotnumbered"`
}

type Image

type Image struct {
	ImageId          string
	OsName           string
	ImageSize        int
	ImageType        string
	CreatedTime      string
	ImageState       string
	ImageName        string
	ImageDescription string
	ImageSource      string
	ImageCreator     string
}

type ImageSharedAccount

type ImageSharedAccount struct {
	ImageId   string
	AccountId string
}

type ImportKeyPairRequest

type ImportKeyPairRequest struct {
	KeyName   string `json:",omitempty" url:",omitempty"`
	ProjectId int    `json:",omitempty" url:",omitempty"`
	PublicKey string `json:",omitempty" url:",omitempty"`
}

type ImportKeyPairResponse

type ImportKeyPairResponse struct {
	RequestId string `json:",omitempty" url:",omitempty"`
	KeyId     string `json:",omitempty" url:",omitempty"`
}

type InquiryPriceRenewInstancesResponse

type InquiryPriceRenewInstancesResponse struct {
	RequestId string `json:",omitempty" url:",omitempty"`
	Price     Price  `json:",omitempty" url:",omitempty,dotnumbered"`
}

type InquiryPriceResetInstanceResponse

type InquiryPriceResetInstanceResponse struct {
	RequestId string `json:",omitempty" url:",omitempty"`
	Price     Price  `json:",omitempty" url:",omitempty,dotnumbered"`
}

type InquiryPriceResetInstancesTypeResponse

type InquiryPriceResetInstancesTypeResponse struct {
	RequestId string `json:",omitempty" url:",omitempty"`
	Price     Price  `json:",omitempty" url:",omitempty,dotnumbered"`
}

type InquiryPriceResizeInstanceDisksResponse

type InquiryPriceResizeInstanceDisksResponse struct {
	RequestId string `json:",omitempty" url:",omitempty"`
	Price     Price  `json:",omitempty" url:",omitempty,dotnumbered"`
}

type InquiryPriceRunInstancesResponse

type InquiryPriceRunInstancesResponse struct {
	RequestId string `json:",omitempty" url:",omitempty"`
	Price     Price  `json:",omitempty" url:",omitempty,dotnumbered"`
}

type Instance

type Instance struct {
	Placement           Placement `url",dotnumbered"`
	InstanceId          string
	InstanceType        string
	CPU                 int
	Memory              int
	RestrictState       string
	InstanceName        string
	InstanceChargeType  string
	SystemDisk          SystemDisk          `url",dotnumbered"`
	DataDisks           []DataDisk          `url",dotnumbered"`
	PrivateIpAddresses  []string            `url",dotnumbered"`
	PublicIpAddresses   []string            `url",dotnumbered"`
	InternetAccessible  InternetAccessible  `url",dotnumbered"`
	VirtualPrivateCloud VirtualPrivateCloud `url",dotnumbered"`
	ImageId             string
	RenewFlag           string
	CreatedTime         string
	ExpiredTime         string
	InstanceState       string
	Tags                []Tag
}

type InstanceChargePrepaid

type InstanceChargePrepaid struct {
	Period    int
	RenewFlag string
}

type InstanceChargeTypeConfig

type InstanceChargeTypeConfig struct {
	InstanceChargeType string
	Description        string
}

type InstanceStatus

type InstanceStatus struct {
	InstanceId    string
	InstanceState string
}

type InstanceTypeConfig

type InstanceTypeConfig struct {
	Zone              string
	InstanceType      string
	InstanceFamily    string
	GPU               int
	CPU               int
	Memory            int
	CbsSupport        string
	InstanceTypeState string
}

type InternetAccessible

type InternetAccessible struct {
	InternetChargeType      string
	InternetMaxBandwidthOut int
	PublicIpAssigned        string
}

type InternetBandwidthConfig

type InternetBandwidthConfig struct {
	StartTime          string
	EndTime            string
	InternetAccessible InternetAccessible `url",dotnumbered"`
}

type InternetChargeTypeConfig

type InternetChargeTypeConfig struct {
	InternetChargeType string
	Description        string
}

type ItemPrice

type ItemPrice struct {
	UnitPrice     float32
	ChargeUnit    string
	OriginalPrice float32
	DiscountPrice float32
}

type KeyPair

type KeyPair struct {
	KeyId                 string
	KeyName               string
	ProjectId             int
	Description           string
	PublicKey             string
	PrivateKey            string
	AssociatedInstanceIds []string `url",dotnumbered"`
	CreatedTime           string
}

type KeyPairInstances

type KeyPairInstances struct {
	KeyId                   string
	AssociatedInstanceIdSet []string `url",dotnumbered"`
}

type LoadBalancerIdSet

type LoadBalancerIdSet struct {
	Status         int    `json:"status" url:"status"`
	LoadBalancerId string `json:"loadBalancerId" url:"loadBalancerId"`
	Owner          string `json:"owner" url:"owner"`
	ZoneId         int    `json:"zoneId" url:"zoneId"`
}

type LoginSettings

type LoginSettings struct {
	Password       string
	KeyIds         []string `url",dotnumbered"`
	KeepImageLogin string
}

type ModifyImageAttributeRequest

type ModifyImageAttributeRequest struct {
	ImageId          string `json:",omitempty" url:",omitempty"`
	ImageName        string `json:",omitempty" url:",omitempty"`
	ImageDescription string `json:",omitempty" url:",omitempty"`
}

type ModifyImageSharePermissionRequest

type ModifyImageSharePermissionRequest struct {
	ImageId    string   `json:",omitempty" url:",omitempty"`
	AccountIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	Permission string   `json:",omitempty" url:",omitempty"`
}

type ModifyInstancesAttributeRequest

type ModifyInstancesAttributeRequest struct {
	InstanceIds  []string `json:",omitempty" url:",omitempty,dotnumbered"`
	InstanceName string   `json:",omitempty" url:",omitempty"`
}

type ModifyInstancesProjectRequest

type ModifyInstancesProjectRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	ProjectId   int      `json:",omitempty" url:",omitempty"`
}

type ModifyInstancesRenewFlagRequest

type ModifyInstancesRenewFlagRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	RenewFlag   string   `json:",omitempty" url:",omitempty"`
}

type ModifyKeyPairAttributeRequest

type ModifyKeyPairAttributeRequest struct {
	KeyId       string `json:",omitempty" url:",omitempty"`
	KeyName     string `json:",omitempty" url:",omitempty"`
	Description string `json:",omitempty" url:",omitempty"`
}

type ModifyScalingGroupRequest

type ModifyScalingGroupRequest struct {
	ScalingGroupId         string `json:"scalingGroupId" url:"scalingGroupId"`
	MinSize                int    `json:"minSize" url:"minSize"`
	MaxSize                int    `json:"maxSize" url:"maxSize"`
	RemovePolicy           string `json:"removePolicy" url:"removePolicy"`
	ScalingGroupName       string `json:"scalingGroupName,omitempty" url:"scalingGroupName,omitempty"`
	ScalingConfigurationId string `json:"scalingConfigurationId,omitempty" url:"scalingConfigurationId,omitempty"`
	DesiredCapacity        int    `json:"desiredCapacity" url:"desiredCapacity"`
}

type OldErrorResponse

type OldErrorResponse struct {
	Code     int
	CodeDesc string
	Message  string
}

this is maddening, but i don't want to take the easy way out and interface{} this

type Placement

type Placement struct {
	Zone      string
	ProjectId int
	HostIds   []string `url",dotnumbered"`
}

type Price

type Price struct {
	InstancePrice  ItemPrice `url",dotnumbered"`
	BandwidthPrice ItemPrice `url",dotnumbered"`
}

type Quota

type Quota struct {
	QuotaId      string
	QuotaCurrent int
	QuotaLimit   int
}

type RebootInstancesRequest

type RebootInstancesRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	ForceReboot bool     `json:",omitempty" url:",omitempty"`
}

type RenewInstancesRequest

type RenewInstancesRequest struct {
	InstanceIds           []string              `json:",omitempty" url:",omitempty,dotnumbered"`
	InstanceChargePrepaid InstanceChargePrepaid `json:",omitempty" url:",omitempty,dotnumbered"`
}

type ResetInstanceRequest

type ResetInstanceRequest struct {
	InstanceId      string          `json:",omitempty" url:",omitempty"`
	ImageId         string          `json:",omitempty" url:",omitempty"`
	SystemDisk      SystemDisk      `json:",omitempty" url:",omitempty,dotnumbered"`
	LoginSettings   LoginSettings   `json:",omitempty" url:",omitempty,dotnumbered"`
	EnhancedService EnhancedService `json:",omitempty" url:",omitempty,dotnumbered"`
}

type ResetInstancesInternetMaxBandwidthRequest

type ResetInstancesInternetMaxBandwidthRequest struct {
	InstanceIds        []string           `json:",omitempty" url:",omitempty,dotnumbered"`
	InternetAccessible InternetAccessible `json:",omitempty" url:",omitempty,dotnumbered"`
	StartTime          bool               `json:",omitempty" url:",omitempty"`
	EndTime            bool               `json:",omitempty" url:",omitempty"`
}

type ResetInstancesPasswordRequest

type ResetInstancesPasswordRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	Password    string   `json:",omitempty" url:",omitempty"`
	UserName    string   `json:",omitempty" url:",omitempty"`
	ForceStop   bool     `json:",omitempty" url:",omitempty"`
}

type ResetInstancesTypeRequest

type ResetInstancesTypeRequest struct {
	InstanceIds  []string `json:",omitempty" url:",omitempty,dotnumbered"`
	InstanceType string   `json:",omitempty" url:",omitempty"`
	ForceStop    bool     `json:",omitempty" url:",omitempty"`
}

type ResizeInstanceDisksRequest

type ResizeInstanceDisksRequest struct {
	InstanceId string     `json:",omitempty" url:",omitempty"`
	DataDisks  []DataDisk `json:",omitempty" url:",omitempty,dotnumbered"`
	ForceStop  bool       `json:",omitempty" url:",omitempty"`
}

type RunInstancesRequest

type RunInstancesRequest struct {
	InstanceChargeType    string                `json:",omitempty" url:",omitempty"`
	InstanceChargePrepaid InstanceChargePrepaid `json:",omitempty" url:",omitempty,dotnumbered"`
	Placement             Placement             `json:",omitempty" url:",omitempty,dotnumbered"`
	InstanceType          string                `json:",omitempty" url:",omitempty"`
	ImageId               string                `json:",omitempty" url:",omitempty"`
	SystemDisk            SystemDisk            `json:",omitempty" url:",omitempty,dotnumbered"`
	DataDisks             []DataDisk            `json:",omitempty" url:",omitempty,dotnumbered"`
	VirtualPrivateCloud   VirtualPrivateCloud   `json:",omitempty" url:",omitempty,dotnumbered"`
	InternetAccessible    InternetAccessible    `json:",omitempty" url:",omitempty,dotnumbered"`
	InstanceCount         int                   `json:",omitempty" url:",omitempty"`
	InstanceName          string                `json:",omitempty" url:",omitempty"`
	LoginSettings         LoginSettings         `json:",omitempty" url:",omitempty,dotnumbered"`
	SecurityGroupIds      []string              `json:",omitempty" url:",omitempty,dotnumbered"`
	EnhancedService       EnhancedService       `json:",omitempty" url:",omitempty,dotnumbered"`
	ClientToken           string                `json:",omitempty" url:",omitempty"`
	UserData              string                `json:",omitempty" url:",omitempty"`
}

it is *profoundly* annoying how similar-but-sufficiently-different this is to an Instance struct

type RunInstancesResponse

type RunInstancesResponse struct {
	RequestId     string   `json:",omitempty" url:",omitempty"`
	InstanceIdSet []string `json:",omitempty" url:",omitempty,dotnumbered"`
}

type RunMonitorServiceEnabled

type RunMonitorServiceEnabled struct {
	Enabled string
}

type RunSecurityServiceEnabled

type RunSecurityServiceEnabled struct {
	Enabled string
}

type ScalingConfiguration

type ScalingConfiguration struct {
	ScalingConfigurationId   string              `json:"scalingConfigurationId,omitempty" url:"scalingConfigurationId,omitempty"`
	ScalingConfigurationName string              `json:"scalingConfigurationName" url:"scalingConfigurationName"`
	ScalingGroupIdSet        []ScalingGroupIdSet `json:"scalingGroupIdSet,omitempty" url:"scalingGroupIdSet,dotnumbered,omitempty"`
	CPU                      int                 `json:"cpu" url:"cpu"`
	Memory                   int                 `json:"mem" url:"mem"`
	ImageType                int                 `json:"imageType" url:"imageType"`
	ImageId                  string              `json:"imageId" url:"imageId"`
	StorageType              int                 `json:"storageType" url:"storageType"`
	StorageSize              int                 `json:"storageSize" url:"storageSize"`
	RootSize                 int                 `json:"rootSize" url:"rootSize"`
	BandwidthType            string              `json:"bandwidthType" url:"bandwidthType"`
	Bandwidth                int                 `json:"bandwidth" url:"bandwidth"`
	WanIp                    int                 `json:"wanIp" url:"wanIp"`
	KeyId                    string              `json:"keyId" url:"keyId"`
	Password                 string              `json:"password" url:"password"`
	SgSet                    []SecurityGroupSet  `json:"sgSet" url:"sgSet,dotnumbered"`
	NeedMonitorAgent         int                 `json:"needMonitorAgent" url:"needMonitorAgent"`
	NeedSecurityAgent        int                 `json:"needSecurityAgent" url:"needSecurityAgent"`
	CreateTime               string              `json:"createTime,omitempty" url:"createTime,omitempty"`
	ProjectId                int                 `json:"projectId" url:"projectId"`
	AscStatus                int                 `json:"ascStatus" url:"ascStatus"`
	DataSnapshotId           string              `json:"dataSnapshotId" url:"dataSnapshotId"`
	ItemId                   int                 `json:"itemId" url:"itemId"`
	KeepImageSetting         int                 `json:"keepImageSetting" url:"keepImageSetting"`
	Type                     string              `json:"type" url:"type"`
	UserData                 string              `json:"userdata" url:"userdata"`
}

type ScalingGroup

type ScalingGroup struct {
	ScalingGroupId           string              `json:"scalingGroupId,omitempty" url:"scalingGroupId,omitempty"`
	ScalingGroupName         string              `json:"scalingGroupName" url:"scalingGroupName"`
	ScalingConfigurationId   string              `json:"scalingConfigurationId" url:"scalingConfigurationId"`
	ScalingConfigurationName string              `json:"scalingConfigurationName,omitempty" url:"scalingConfigurationName,omitempty"`
	MinSize                  int                 `json:"minSize" url:"minSize"`
	MaxSize                  int                 `json:"maxSize" url:"maxSize"`
	CreateTime               string              `json:"createTime,omitempty" url:"createTime,omitempty"`
	InstanceNum              int                 `json:"instanceNum" url:"instanceNum"`
	RemovePolicy             string              `json:"removePolicy" url:"removePolicy"`
	LoadBalancerIdSet        []LoadBalancerIdSet `json:"loadBalancerIdSet" url:"loadBalancerIdSet,dotnumbered"`
	LoadBalancerIds          []string            `json:"loadBalancerIds,omitempty" url:"loadBalancerIds,omitempty,dotnumbered"`
	VpcId                    string              `json:"vpcId" url:"vpcId"`
	SubnetIdSet              []SubnetIdSet       `json:"subnetIdSet" url:"subnetIdSet,dotnumbered"`
	SubnetIds                []string            `json:"subnetIds,omitempty" url:"subnetIds,omitempty,dotnumbered"`
	ZoneIdSet                []ZoneIdSet         `json:"zoneIdSet" url:"zoneIdSet,dotnumbered"`
	ZoneIds                  []string            `json:"zoneIds,omitempty" url:"zoneIds,omitempty,dotnumbered"`
	ProjectId                int                 `json:"projectId" url:"projectId"`
	BInScalingActivity       int                 `json:"bInScalingActivity" url:"bInScalingActivity"`
	DesiredCapacity          int                 `json:"desiredCapacity" url:"desiredCapacity"`
}

type ScalingGroupIdSet

type ScalingGroupIdSet struct {
	ScalingGroupId   string `json:"scalingGroupId" url:"scalingGroupId"`
	ScalingGroupName string `json:"scalingGroupName" url:"scalingGroupName"`
}

type ScalingInstance

type ScalingInstance struct {
	InstanceId           string `json:"instanceId" url:"instanceId"`
	HealthStatus         string `json:"healthStatus" url:"healthStatus"`
	CreationType         string `json:"creationType" url:"creationType"`
	LifeCycleState       string `json:"lifeCycleState" url:"lifeCycleState"`
	ProtectedFromScaleIn int    `json:"protectedFromScaleIn" url:"protectedFromScaleIn"`
	AddTime              string `json:"addTime" url:"addTime"`
}

type SecurityGroupSet

type SecurityGroupSet struct {
	SgId string `json:"sgId" url:"sgId"`
}

type SharePermission

type SharePermission struct {
	CreatedTime string
	Account     string
}

type StartInstancesRequest

type StartInstancesRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
}

type StopInstancesRequest

type StopInstancesRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
	ForceStop   bool     `json:",omitempty" url:",omitempty"`
}

type SubnetIdSet

type SubnetIdSet struct {
	Status   int    `json:"status" url:"status"`
	SubnetId string `json:"subnetId" url:"subnetId"`
	Owner    string `json:"owner" url:"owner"`
	ZoneId   int    `json:"zoneId" url:"zoneId"`
}

type SyncImagesRequest

type SyncImagesRequest struct {
	ImageIds           []string `json:",omitempty" url:",omitempty,dotnumbered"`
	DestinationRegions []string `json:",omitempty" url:",omitempty,dotnumbered"`
}

type SystemDisk

type SystemDisk struct {
	DiskType string
	DiskId   string
	DiskSize int
}

type Tag

type Tag struct {
	Key   string
	Value string
}

type TerminateInstancesRequest

type TerminateInstancesRequest struct {
	InstanceIds []string `json:",omitempty" url:",omitempty,dotnumbered"`
}

type UpdateInstanceVpcConfigRequest

type UpdateInstanceVpcConfigRequest struct {
	InstanceId          string              `json:",omitempty" url:",omitempty"`
	VirtualPrivateCloud VirtualPrivateCloud `json:",omitempty" url:",omitempty,dotnumbered"`
	ForceStop           bool                `json:",omitempty" url:",omitempty"`
}

type V3BaseResponse

type V3BaseResponse struct {
	Response *json.RawMessage
}

type V3ErrorResponse

type V3ErrorResponse struct {
	Error ErrorResponse `url",dotnumbered"`
}

type VirtualPrivateCloud

type VirtualPrivateCloud struct {
	VpcId              string
	SubnetId           string
	AsVpcGateway       bool
	PrivateIpAddresses []string `url",dotnumbered"`
}

type ZoneIdSet

type ZoneIdSet struct {
	Status int    `json:"status" url:"status"`
	Owner  string `json:"owner" url:"owner"`
	ZoneId int    `json:"zoneId" url:"zoneId"`
}

Jump to

Keyboard shortcuts

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