nifcloud-sdk-go

module
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 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 / ESS / DNS / ObjectStorageService / ServiceActivity / DevOps with GitLab 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
internal
sdk
v4a
Package nifcloud provides core functionality for making requests to NIFCLOUD services.
Package nifcloud provides core functionality for making requests to NIFCLOUD services.
nrn
Package nrn provides a parser for interacting with NIFCLOUD Resource Names.
Package nrn provides a parser for interacting with NIFCLOUD Resource Names.
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.
devops
Package devops provides the API client, operations, and parameter types for the API.
Package devops provides the API client, operations, and parameter types for the API.
devopsrunner
Package devopsrunner provides the API client, operations, and parameter types for the API.
Package devopsrunner 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.
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.
serviceactivity
Package serviceactivity provides the API client, operations, and parameter types for the API.
Package serviceactivity provides the API client, operations, and parameter types for the API.
storage
Package storage provides the API client, operations, and parameter types for the API.
Package storage provides the API client, operations, and parameter types for the API.

Jump to

Keyboard shortcuts

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