nifcloud-sdk-go

module
Version: v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2022 License: Apache-2.0

README

NIFCLOUD SDK for Go

build Github stars Github top language Github license

nifcloud-sdk-go is data-driven SDK for the Go programming language. It works by feeding AWS-SDK-compatible model JSONs to github.com/aws/aws-sdk-go-v2.

Features

  • ✔️ Support for NIFCLOUD Computing / RDB / NAS / Script / Hatoba / ESS / DNS APIs
  • ✔️ AWS-SDK-compatible data-driven architecture

Getting started

Requirements

  • Go 1.17 or later.

Installing

go get -u github.com/nifcloud/nifcloud-sdk-go

Example

This example shows DescribeInstances.

package main

import (
        "fmt"
        "context"

        "github.com/nifcloud/nifcloud-sdk-go/nifcloud"
        "github.com/nifcloud/nifcloud-sdk-go/service/computing"
)

func main() {
    // Create config with credentials and region.
    cfg := nifcloud.NewConfig(
            "YOUR_ACCESS_KEY_ID",
            "YOUR_SECRET_ACCESS_KEY",
            "jp-east-1",
    )

    // Create the Computing client with Config value.
    svc := computing.NewFromConfig(cfg)

    // Send the request
    resp, err := svc.DescribeInstances(context.TODO(), nil)
    if err != nil {
            panic(err)
    }
    
    fmt.Println("Instances:")
    for _, reservationSet := range resp.ReservationSet {
        for _, instancesSet := range reservationSet.InstancesSet {
            fmt.Println(nifcloud.ToString(instancesSet.InstanceId))
        }
    }
}

Resources

LICENCES

See LICENSE.

Directories

Path Synopsis
Package nifcloud provides core functionality for making requests to NIFCLOUD services.
Package nifcloud provides core functionality for making requests to NIFCLOUD services.
service
computing
Package computing provides the API client, operations, and parameter types for the API.
Package computing provides the API client, operations, and parameter types for the API.
dns
Package dns provides the API client, operations, and parameter types for the API.
Package dns provides the API client, operations, and parameter types for the API.
ess
Package ess provides the API client, operations, and parameter types for the API.
Package ess provides the API client, operations, and parameter types for the API.
hatoba
Package hatoba provides the API client, operations, and parameter types for the API.
Package hatoba provides the API client, operations, and parameter types for the API.
nas
Package nas provides the API client, operations, and parameter types for the API.
Package nas provides the API client, operations, and parameter types for the API.
rdb
Package rdb provides the API client, operations, and parameter types for the API.
Package rdb provides the API client, operations, and parameter types for the API.
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL