The encapsulation of Aliyun
HTTP API
Version 0.1.0(beta)
Here to read more about ECS API.
Implemented ECS API
- Instance
- Disk
- Snapshot
- Image
- Network
- Security Group
- Region
- Monitor
- Other
- Vpc
- VRouter
- VSwitch
- Route
go get -u github.com/jiangshengwu/aliyun-sdk-for-go
// 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]interface{}{
"RegionId": "cn-beijing",
"SecurityGroupId": "sg-25rh80j7f",
})
if err != nil {
log.Error(err)
return
}
log.Info(result)