Documentation ¶
Index ¶
- func NewRequest(c KtCloudClient, request string, params url.Values) (interface{}, error)
- type AssociateIpAddressResponse
- type AssociatePublicIpReqInfo
- type CreateFirewallRuleReqInfo
- type CreateFirewallRuleResponse
- type CreatePortForwardingRuleReqInfo
- type CreatePortForwardingRuleResponse
- type CreateSshKeyPairResponse
- type CreateTags
- type CreateTagsResponse
- type DeleteFirewallRuleResponse
- type DeletePortForwardingRuleResponse
- type DeleteSshKeyPairResponse
- type DeleteTags
- type DeleteTagsResponse
- type DeployVMReqInfo
- type DeployVirtualMachineResponse
- type DestroyVirtualMachineResponse
- type DisassociateIpAddressResponse
- type FirewallRule
- type KeyPair
- type KtCloudClient
- func (c KtCloudClient) AssociateIpAddress(ipReqInfo AssociatePublicIpReqInfo) (AssociateIpAddressResponse, error)
- func (c KtCloudClient) CreateFirewallRule(filewallRuleCreateReqInfo CreateFirewallRuleReqInfo) (CreateFirewallRuleResponse, error)
- func (c KtCloudClient) CreatePortForwardingRule(portForwardingRuleCreateReqInfo CreatePortForwardingRuleReqInfo) (CreatePortForwardingRuleResponse, error)
- func (c KtCloudClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error)
- func (c KtCloudClient) CreateTags(options *CreateTags) (CreateTagsResponse, error)
- func (c KtCloudClient) DeleteFirewallRule(ruleId string) (DeleteFirewallRuleResponse, error)
- func (c KtCloudClient) DeletePortForwardingRule(ruleId string) (DeletePortForwardingRuleResponse, error)
- func (c KtCloudClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error)
- func (c KtCloudClient) DeleteTags(options *DeleteTags) (DeleteTagsResponse, error)
- func (c KtCloudClient) DeployVirtualMachine(vmReqInfo DeployVMReqInfo) (DeployVirtualMachineResponse, error)
- func (c KtCloudClient) DestroyVirtualMachine(vmId string) (DestroyVirtualMachineResponse, error)
- func (c KtCloudClient) DisassociateIpAddress(publicIpId string) (DisassociateIpAddressResponse, error)
- func (c KtCloudClient) ListAvailableProductTypes(zoneId string) (ListAvailableProductTypesResponse, error)
- func (c KtCloudClient) ListFirewallRules(filewallRuleListReqInfo ListFirewallRulesReqInfo) (ListFirewallRulesResponse, error)
- func (c KtCloudClient) ListPortForwardingRules(portForwardingRulesListReqInfo ListPortForwardingRulesReqInfo) (ListPortForwardingRulesResponse, error)
- func (c KtCloudClient) ListPublicIpAddresses(ipListReqInfo ListPublicIpReqInfo) (ListPublicIpAddressesResponse, error)
- func (c KtCloudClient) ListSSHKeyPairs(name string) (ListSshKeyPairsResponse, error)
- func (c KtCloudClient) ListTags(options *ListTags) (ListTagsResponse, error)
- func (c KtCloudClient) ListVirtualMachines(vmListReqInfo ListVMReqInfo) (ListVirtualMachinesResponse, error)
- func (c KtCloudClient) ListZones(isAvailable bool, domainId string, zoneId string, keyword string) (ListZonesResponse, error)
- func (ktcloud KtCloudClient) New(apiUrl string, apiKey string, secretKey string, insecureSkipVerify bool) *KtCloudClient
- func (c KtCloudClient) QueryAsyncJobResult(jobId string) (QueryAsyncJobResultResponse, error)
- func (c KtCloudClient) RebootVirtualMachine(vmId string) (RebootVirtualMachineResponse, error)
- func (c KtCloudClient) StartVirtualMachine(vmId string) (StartVirtualMachineResponse, error)
- func (c KtCloudClient) StopVirtualMachine(vmId string) (StopVirtualMachineResponse, error)
- func (c KtCloudClient) UpdateVirtualMachine(vmId string, displayname string, haenable string) (UpdateVirtualMachineResponse, error)
- func (c KtCloudClient) WaitForAsyncJob(jobId string, timeOut time.Duration) error
- func (c KtCloudClient) WaitForVirtualMachineState(zoneId string, vmId string, wantedState string, timeOut time.Duration) error
- type ListAvailableProductTypesResponse
- type ListFirewallRulesReqInfo
- type ListFirewallRulesResponse
- type ListPortForwardingRulesReqInfo
- type ListPortForwardingRulesResponse
- type ListPublicIpAddressesResponse
- type ListPublicIpReqInfo
- type ListSshKeyPairsResponse
- type ListTags
- type ListTagsResponse
- type ListVMReqInfo
- type ListVirtualMachinesResponse
- type ListZonesResponse
- type Nic
- type PortForwardingRule
- type ProductTypes
- type PublicIpAddress
- type QueryAsyncJobResultResponse
- type RebootVirtualMachineResponse
- type StartVirtualMachineResponse
- type StopVirtualMachineResponse
- type Tag
- type TagArg
- type UpdateVirtualMachineResponse
- type Virtualmachine
- type Zone
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequest ¶
func NewRequest(c KtCloudClient, request string, params url.Values) (interface{}, error)
Types ¶
type CreatePortForwardingRuleReqInfo ¶
type CreatePortForwardingRuleReqInfo struct { IpAddressId string PrivatePort string Protocol string //TCP or UDP PublicPort string //Port of the public IP Address VirtualmachineId string OpenFirewall bool //CidrList string // # Parameter cidrList is deprecated!! PrivateEndPort string PublicEndPort string }
type CreateSshKeyPairResponse ¶
type CreateSshKeyPairResponse struct { Createsshkeypairresponse struct { KeyPair KeyPair `json:"keypair"` } `json:"createsshkeypairresponse"` }
type CreateTags ¶
type CreateTagsResponse ¶
type CreateTagsResponse struct { string `json:"jobid"` } `json:"createtagsresponse"` }JobId
type DeleteFirewallRuleResponse ¶
type DeleteFirewallRuleResponse struct { Deletefirewallruleresponse struct { JobId string `json:"jobid"` } `json:"deletefirewallruleresponse"` }
type DeletePortForwardingRuleResponse ¶
type DeletePortForwardingRuleResponse struct { Deleteportforwardingruleresponse struct { JobId string `json:"jobid"` } `json:"deleteportforwardingruleresponse"` }
type DeleteSshKeyPairResponse ¶
type DeleteSshKeyPairResponse struct { Deletesshkeypairresponse struct { Success string `json:"success"` } `json:"deletesshkeypairresponse"` }
type DeleteTags ¶
type DeleteTagsResponse ¶
type DeleteTagsResponse struct { string `json:"jobid"` } `json:"deletetagsresponse"` }JobId
type DeployVMReqInfo ¶
type DeployVMReqInfo struct { ZoneId string ServiceOfferingId string // VMSpec ID TemplateId string // VMImage ID DiskOfferingId string ProductCode string VMHostName string DisplayName string UsagePlanType string RunSysPrep bool Account string DomainId string Group string Hypervisor string KeyPair string IPtoNetworkList []string Keyboard string NetworkIds []string ProjectId string UserData string }
type DestroyVirtualMachineResponse ¶
type DestroyVirtualMachineResponse struct { Destroyvirtualmachineresponse struct { JobId string `json:"jobid"` } `json:"destroyvirtualmachineresponse"` }
type DisassociateIpAddressResponse ¶
type DisassociateIpAddressResponse struct { Disassociateipaddressresponse struct { JobId string `json:"jobid"` } `json:"disassociateipaddressresponse"` }
type FirewallRule ¶
type FirewallRule struct { ID string `json:"id"` Protocol string `json:"protocol"` StartPort int `json:"startport"` // Caution!! (Parameter type) EndPort int `json:"endport"` // Caution!! (Parameter type) IpAddressId string `json:"ipaddressid"` NetworkId string `json:"networkid"` IpAddress string `json:"ipaddress"` State string `json:"state"` CidrList string `json:"cidrlist"` Tags []interface{} `json:"tags"` ForDisplay bool `json:"fordisplay"` }
type KtCloudClient ¶
type KtCloudClient struct { // The base URL of the API BaseURL string // Credentials APIKey string SecretKey string // contains filtered or unexported fields }
func (KtCloudClient) AssociateIpAddress ¶
func (c KtCloudClient) AssociateIpAddress(ipReqInfo AssociatePublicIpReqInfo) (AssociateIpAddressResponse, error)
func (KtCloudClient) CreateFirewallRule ¶
func (c KtCloudClient) CreateFirewallRule(filewallRuleCreateReqInfo CreateFirewallRuleReqInfo) (CreateFirewallRuleResponse, error)
func (KtCloudClient) CreatePortForwardingRule ¶
func (c KtCloudClient) CreatePortForwardingRule(portForwardingRuleCreateReqInfo CreatePortForwardingRuleReqInfo) (CreatePortForwardingRuleResponse, error)
Creates a PortForwardingRule
func (KtCloudClient) CreateSSHKeyPair ¶
func (c KtCloudClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error)
Create a SSH key pair
func (KtCloudClient) CreateTags ¶
func (c KtCloudClient) CreateTags(options *CreateTags) (CreateTagsResponse, error)
Add tags to specified resources
func (KtCloudClient) DeleteFirewallRule ¶
func (c KtCloudClient) DeleteFirewallRule(ruleId string) (DeleteFirewallRuleResponse, error)
func (KtCloudClient) DeletePortForwardingRule ¶
func (c KtCloudClient) DeletePortForwardingRule(ruleId string) (DeletePortForwardingRuleResponse, error)
Deletes a PortForwarding Rule by its ID.
func (KtCloudClient) DeleteSSHKeyPair ¶
func (c KtCloudClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error)
Deletes an SSH key pair
func (KtCloudClient) DeleteTags ¶
func (c KtCloudClient) DeleteTags(options *DeleteTags) (DeleteTagsResponse, error)
Remove tags from specified resources
func (KtCloudClient) DeployVirtualMachine ¶
func (c KtCloudClient) DeployVirtualMachine(vmReqInfo DeployVMReqInfo) (DeployVirtualMachineResponse, error)
Deploys a Virtual Machine and returns it's id
func (KtCloudClient) DestroyVirtualMachine ¶
func (c KtCloudClient) DestroyVirtualMachine(vmId string) (DestroyVirtualMachineResponse, error)
Destroys a Virtual Machine
func (KtCloudClient) DisassociateIpAddress ¶
func (c KtCloudClient) DisassociateIpAddress(publicIpId string) (DisassociateIpAddressResponse, error)
func (KtCloudClient) ListAvailableProductTypes ¶
func (c KtCloudClient) ListAvailableProductTypes(zoneId string) (ListAvailableProductTypesResponse, error)
func (KtCloudClient) ListFirewallRules ¶
func (c KtCloudClient) ListFirewallRules(filewallRuleListReqInfo ListFirewallRulesReqInfo) (ListFirewallRulesResponse, error)
func (KtCloudClient) ListPortForwardingRules ¶
func (c KtCloudClient) ListPortForwardingRules(portForwardingRulesListReqInfo ListPortForwardingRulesReqInfo) (ListPortForwardingRulesResponse, error)
Returns all available templates
func (KtCloudClient) ListPublicIpAddresses ¶
func (c KtCloudClient) ListPublicIpAddresses(ipListReqInfo ListPublicIpReqInfo) (ListPublicIpAddressesResponse, error)
func (KtCloudClient) ListSSHKeyPairs ¶
func (c KtCloudClient) ListSSHKeyPairs(name string) (ListSshKeyPairsResponse, error)
List SSH keypairs
func (KtCloudClient) ListTags ¶
func (c KtCloudClient) ListTags(options *ListTags) (ListTagsResponse, error)
Returns all items with a particular tag
func (KtCloudClient) ListVirtualMachines ¶
func (c KtCloudClient) ListVirtualMachines(vmListReqInfo ListVMReqInfo) (ListVirtualMachinesResponse, error)
func (KtCloudClient) ListZones ¶
func (c KtCloudClient) ListZones(isAvailable bool, domainId string, zoneId string, keyword string) (ListZonesResponse, error)
func (KtCloudClient) New ¶
func (ktcloud KtCloudClient) New(apiUrl string, apiKey string, secretKey string, insecureSkipVerify bool) *KtCloudClient
Creates a new client for communicating with KT Cloud
func (KtCloudClient) QueryAsyncJobResult ¶
func (c KtCloudClient) QueryAsyncJobResult(jobId string) (QueryAsyncJobResultResponse, error)
Query KT Cloud for the state of a scheduled job
func (KtCloudClient) RebootVirtualMachine ¶
func (c KtCloudClient) RebootVirtualMachine(vmId string) (RebootVirtualMachineResponse, error)
Reboot a Virtual Machine
func (KtCloudClient) StartVirtualMachine ¶
func (c KtCloudClient) StartVirtualMachine(vmId string) (StartVirtualMachineResponse, error)
Start a Virtual Machine
func (KtCloudClient) StopVirtualMachine ¶
func (c KtCloudClient) StopVirtualMachine(vmId string) (StopVirtualMachineResponse, error)
Stops a Virtual Machine
func (KtCloudClient) UpdateVirtualMachine ¶
func (c KtCloudClient) UpdateVirtualMachine(vmId string, displayname string, haenable string) (UpdateVirtualMachineResponse, error)
KT Cloud > Computing > Server Management > 'Server : 부가 정보 변경'
func (KtCloudClient) WaitForAsyncJob ¶
func (c KtCloudClient) WaitForAsyncJob(jobId string, timeOut time.Duration) error
Blocks until the the asynchronous job has executed or has timed out. time.Duration unit => 1 nanosecond. timeOut * 1,000,000,000 => 1 second
func (KtCloudClient) WaitForVirtualMachineState ¶
func (c KtCloudClient) WaitForVirtualMachineState(zoneId string, vmId string, wantedState string, timeOut time.Duration) error
WaitForVirtualMachineState simply blocks until the virtual machine is in the specified state.
type ListAvailableProductTypesResponse ¶
type ListAvailableProductTypesResponse struct { Listavailableproducttypesresponse struct { Count int `json:"count"` ProductTypes []ProductTypes `json:"producttypes"` } `json:"listavailableproducttypesresponse"` }
type ListFirewallRulesResponse ¶
type ListFirewallRulesResponse struct { Listfirewallrulesresponse struct { Count int `json:"count"` FirewallRule []FirewallRule `json:"firewallrule"` } `json:"listfirewallrulesresponse"` }
type ListPortForwardingRulesResponse ¶
type ListPortForwardingRulesResponse struct { Listportforwardingrulesresponse struct { PortForwardingRule []PortForwardingRule `json:"portforwardingrule"` } `json:"listportforwardingrulesresponse"` }
type ListPublicIpAddressesResponse ¶
type ListPublicIpAddressesResponse struct { Listpublicipaddressesresponse struct { Count int `json:"count"` PublicIpAddress []PublicIpAddress `json:"publicipaddress"` } `json:"listpublicipaddressesresponse"` }
type ListPublicIpReqInfo ¶
type ListPublicIpReqInfo struct { ID string // PublicIP ID VLanId string IpAddress string Account string DomainId string IsRecursive bool Keyword string Page string PageSize string ZoneId string IsSourceNat bool IsStaticNat bool AssociatedNetworkId string PhysicalNetworkId string ForVirtualNetwork string AllocatedOnly string ListAll bool }
type ListSshKeyPairsResponse ¶
type ListTagsResponse ¶
type ListVMReqInfo ¶
type ListVirtualMachinesResponse ¶
type ListVirtualMachinesResponse struct { Listvirtualmachinesresponse struct { Count float64 `json:"count"` Virtualmachine []Virtualmachine `json:"virtualmachine"` } `json:"listvirtualmachinesresponse"` }
type ListZonesResponse ¶
type Nic ¶
type Nic struct { ID string `json:"id"` NetworkId string `json:"networkid"` NetworkName string `json:"networkname"` Netmask string `json:"netmask"` Gateway string `json:"gateway"` IpAddress string `json:"ipaddress"` IsolationUri string `json:"isolationuri"` BroadcastUri string `json:"broadcasturi"` TrafficType string `json:"traffictype"` Type string `json:"type"` IsDefault bool `json:"isdefault"` MacAddress string `json:"macaddress"` SecondaryIp string `json:"secondaryip"` }
type PortForwardingRule ¶
type PortForwardingRule struct { ID string `json:"id"` PrivatePort string `json:"privateport"` PrivateEndPort string `json:"privateendport"` Protocol string `json:"protocol"` PublicPort string `json:"publicport"` PublicEndPort string `json:"publicendport"` VirtualmachineId string `json:"virtualmachineid"` VirtualmachineName string `json:"virtualmachinename"` VirtualmachineDisplayName string `json:"virtualmachinedisplayname"` IpAddressId string `json:"ipaddressid"` IpAddress string `json:"ipaddress"` State string `json:"state"` CidrList string `json:"cidrlist"` Tags []interface{} `json:"tags"` VmGuestIp string `json:"vmguestip"` NetworkId string `json:"networkid"` ForDisplay bool `json:"fordisplay"` }
type ProductTypes ¶
type ProductTypes struct { DiskOfferingDesc string `json:"diskofferingdesc"` DiskOfferingId string `json:"diskofferingid"` Product string `json:"product"` ProductId string `json:"productid"` ProductState string `json:"productstate"` ServiceOfferingDesc string `json:"serviceofferingdesc"` ServiceOfferingId string `json:"serviceofferingid"` TemplateDesc string `json:"templatedesc"` TemplateId string `json:"templateid"` ZoneDesc string `json:"zonedesc"` ZoneId string `json:"zoneid"` }
type PublicIpAddress ¶
type PublicIpAddress struct { ID string `json:"id"` IpAddress string `json:"ipaddress"` Allocated string `json:"allocated"` ZoneId string `json:"zoneid"` ZoneName string `json:"zonename"` IsSourcenat bool `json:"issourcenat"` Account string `json:"account"` DomainId string `json:"domainid"` Domain string `json:"domain"` ForVirtualNetwork string `json:"forvirtualnetwork"` IsStaticNat bool `json:"isstaticnat"` IsSystem bool `json:"issystem"` AssociatedNetworkId string `json:"associatednetworkid"` AssociatedNetworkName string `json:"associatednetworkname"` NetworktId string `json:"networkid"` State string `json:"state"` PhysicalNetworkId string `json:"physicalnetworkid"` Tags []interface{} `json:"tags"` IsPortable bool `json:"isportable"` UsagePlanType string `json:"usageplantype"` Desc string `json:"desc"` }
type QueryAsyncJobResultResponse ¶
type QueryAsyncJobResultResponse struct { Queryasyncjobresultresponse struct { AccountId string `json:"accountid"` UserId string `json:"userid"` Cmd string `json:"cmd"` JobStatus int `json:"jobstatus"` JobProcStatus int `json:"jobprocstatus"` JobResultCode int `json:"jobresultcode"` JobResultType string `json:"jobresulttype"` State string `json:"state"` JobResult json.RawMessage `json:"jobresult"` JobInstanceType string `json:"jobinstancetype"` JobInstanceId string `json:"jobinstanceid"` Created string `json:"created"` JobId string `json:"jobid"` } `json:"queryasyncjobresultresponse"` }
type RebootVirtualMachineResponse ¶
type RebootVirtualMachineResponse struct { Rebootvirtualmachineresponse struct { JobId string `json:"jobid"` } `json:"rebootvirtualmachineresponse"` }
type StartVirtualMachineResponse ¶
type StartVirtualMachineResponse struct { Startvirtualmachineresponse struct { JobId string `json:"jobid"` } `json:"startvirtualmachineresponse"` }
type StopVirtualMachineResponse ¶
type StopVirtualMachineResponse struct { Stopvirtualmachineresponse struct { JobId string `json:"jobid"` } `json:"stopvirtualmachineresponse"` }
type UpdateVirtualMachineResponse ¶
type UpdateVirtualMachineResponse struct { Updatevirtualmachineresponse struct { Virtualmachine []Virtualmachine `json:"virtualmachine"` } `json:"updatevirtualmachineresponse"` }
type Virtualmachine ¶
type Virtualmachine struct { ID string `json:"id"` Name string `json:"name"` DisplayName string `json:"displayname"` Account string `json:"account"` UserId string `json:"userid"` UserName string `json:"username"` DomainId string `json:"domainid"` Domain string `json:"domain"` Created string `json:"created"` State string `json:"state"` Haenable bool `json:"haenable"` ZoneId string `json:"zoneid"` ZoneName string `json:"zonename"` TemplateId string `json:"templateid"` // VMImage ID TemplateName string `json:"templatename"` TemplateDisplayText string `json:"templatedisplaytext"` PasswordEnabled bool `json:"passwordenabled"` ServiceOfferingId string `json:"serviceofferingid"` // VMSpec ID ServiceOfferingName string `json:"serviceofferingname"` CpuNumber float64 `json:"cpunumber"` CpuSpeed float64 `json:"cpuspeed"` Memory float64 `json:"memory"` GuestOsId string `json:"guestosid"` RootDeviceId float64 `json:"rootdeviceid"` RootDeviceType string `json:"rootdevicetype"` SecurityGroup []interface{} `json:"securitygroup"` Password string `json:"password"` // KT Cloud API로는 지원하지 않는다고함.(Blank) Nic []Nic `json:"nic"` Hypervisor string `json:"hypervisor"` KeyPair string `json:"keypair"` // ### Manual에는 parameter가 없으나 response 값 존재 AffinityGroup string `json:"affinitygroup"` IsDynamicallyScalable string `json:"isdynamicallyscalable"` // VM의 cpu 와 memory 에 대한 Scale up/down을 지원하기 위한 tools 포함 여부 OsTypeId string `json:"ostypeid"` Tags []interface{} `json:"tags"` }
type Zone ¶
type Zone struct { ID string `json:"id"` NetworkType string `json:"networktype"` SecurityGroupsEnabled bool `json:"securitygroupsenabled"` AllocationState string `json:"allocationstate"` DhcpProvider string `json:"dhcpprovider"` LocalStorageEnabled bool `json:"localstorageenabled"` Tags []interface{} `json:"tags"` Name string `json:"name"` }