smartmz / aliyun-sdk-for-go

mz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aliyun SDK for Go

The encapsulation of Aliyun HTTP API

Build Status

Travis CI

Version 0.1.0(beta)

Progress

Here to read more about ECS API.

Implemented ECS API

  • Instance
  • Disk
  • Snapshot
  • Image
  • Network
  • Security Group
  • Region
  • Monitor
  • Other

TO DO

  • Vpc
  • VRouter
  • VSwitch
  • Route

Install:

go get -u github.com/jiangshengwu/aliyun-sdk-for-go

ECS Client Usage:

// Initialize client
cli := ecs.NewClient(
    "Your Access Key Id",
    "Your Access Key Secret",
    "ResourceOwnerAccount", // optional, set to empty string if it's no need for you
)

// Perform request
result, err := cli.SecurityGroup.DescribeSecurityGroupAttribute(map[string]string{
    "RegionId":        "cn-beijing",
    "SecurityGroupId": "sg-25rh80j7f",
})

if err != nil {
    log.Error(err)
    return
}
log.Info(result)

About

mz

License:MIT License


Languages

Language:Go 99.0%Language:Shell 1.0%