Categorygithub.com/dreamcodeman/qcloud-sdk
repository
0.0.0-20180608071910-6d4355af4346
Repository: https://github.com/dreamcodeman/qcloud-sdk.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

qcloudapi-sdk-go

This is an unofficial Go SDK for QCloud Services. You are welcome for contribution.

安装使用


安装

go get -u github.com/dreamCodeMan/qcloud-sdk

使用

package main

import (
	"log"

	"github.com/dreamCodeMan/qcloud-sdk/cvm"
)

func main() {
	client := cvm.NewClient("YOUR_SECRET_ID", "YOUR_SECRET_KEY", "ap-guangzhou")
	client.Debug = true

	argss := cvm.DescribeInstancesArgs{
		Offset:      0,
		Limit:       10,
		InstanceIds: &[]string{"ins-hzxtfkpw"},
		//		Filters: &[]cvm.Filter{
		//			cvm.NewFilter("zone", "ap-guangzhou-4"),
		//		},
	}
	response, err := client.DescribeInstances(argss)
	log.Println(response, err)
}

功能概述

CVM

*地域相关接口所有功能完备;实例相关接口所有功能完备

地域相关接口

是否完成接口名称接口功能
DescribeRegions查询地域列表
DescribeZones查询可用区列表

实例相关接口

是否完成接口名称接口功能
ColdMigrateInstance冷迁移实例
DescribeInstanceFamilyConfigs查询所支持的实例机型族信息
DescribeInstanceInternetBandwidthConfigs查询实例带宽配置
DescribeInstanceOperationLogs查询实例操作记录
DescribeInstanceTypeConfigs查询实例机型列表
DescribeInstances查看实例列表
DescribeInstancesStatus查看实例状态列表
DescribeInternetChargeTypeConfigs查询网络计费类型
ImportSnapshot导入数据盘快照
InquiryPriceRenewInstances续费实例询价
InquiryPriceResetInstance重装实例询价
InquiryPriceResetInstancesInternetMaxBandwidth调整实例带宽上限询价
InquiryPriceResetInstancesType调整实例配置询价
InquiryPriceResizeInstanceDisks扩容实例磁盘询价
InquiryPriceRunInstances创建实例询价
ModifyInstancesAttribute修改实例的属性
ModifyInstancesProject修改实例所属项目
ModifyInstancesRenewFlag修改实例续费标识
QueryMigrateTask查询迁移任务进度
RebootInstances重启实例
RenewInstances续费实例
ResetInstance重装实例
ResetInstancesInternetMaxBandwidth调整实例带宽上限
ResetInstancesPassword重置实例密码
ResetInstancesType调整实例配置
ResizeInstanceDisks扩容实例磁盘
RunInstances创建实例
StartInstances启动实例
StopInstances关闭实例
TerminateInstances退还实例
UpdateInstanceVpcConfig修改实例vpc属性

专用宿主机相关接口

是否完成接口名称接口功能
AllocateHosts创建CDH实例
DescribeHosts查看CDH实例列表
ModifyHostsAttribute修改CDH实例的属性
RenewHosts续费CDH实例

密钥相关接口

是否完成接口名称接口功能
AssociateInstancesKeyPairs绑定密钥对
CreateKeyPair创建密钥对
DeleteKeyPairs删除密钥对
DescribeKeyPairs查询密钥对列表
DisassociateInstancesKeyPairs解绑密钥对
ImportKeyPair导入密钥对
ModifyKeyPairAttribute修改密钥对属性

镜像相关接口

是否完成接口名称接口功能
CreateImage创建镜像
DeleteImages删除镜像
DescribeImageQuota查询镜像配额上限
DescribeImageSharePermission查看镜像分享信息
DescribeImages查看镜像列表
DescribeImportImageOs查询外部导入镜像支持的OS列表
ImportImage外部镜像导入
ModifyImageAttribute修改镜像属性
ModifyImageSharePermission修改镜像分享信息
SyncImages同步镜像

License

This library is distributed under the Apache License found in the LICENSE file.