DEPRECATED: This repository is DEPRECATED. Switch to official SDK https://github.com/nifcloud/nifcloud-sdk-go
nifcloud-sdk-go-v2 is the Developer Preview for the v2 of the NIFCLOUD SDK for the Go programming language.
go get -u github.com/aokumasan/nifcloud-sdk-go-v2
package main
import (
"fmt"
"context"
"github.com/aokumasan/nifcloud-sdk-go-v2/nifcloud"
"github.com/aokumasan/nifcloud-sdk-go-v2/nifcloud/endpoints"
"github.com/aokumasan/nifcloud-sdk-go-v2/service/computing"
)
func main() {
// Create config with credentials and region.
cfg := nifcloud.NewConfig(
"YOUR_ACCESS_KEY_ID",
"YOUR_SECRET_ACCESS_KEY",
endpoints.JpEast1RegionID,
)
// Create the Computing client with Config value.
svc := computing.New(cfg)
req := svc.DescribeInstancesRequest(nil)
// Send the request
resp, err := req.Send(context.TODO())
if err != nil {
panic(err)
}
fmt.Println(resp)
}