Skip to content

scaleway-bot/scaleway-sdk-go

This branch is 3 commits behind scaleway/scaleway-sdk-go:master.

Folders and files

NameName
Last commit message
Last commit date
Mar 3, 2025
Mar 4, 2025
Apr 2, 2024
Sep 10, 2024
Dec 24, 2024
Aug 27, 2024
Sep 10, 2024
Sep 12, 2024
Sep 10, 2024
Aug 3, 2023
Jan 31, 2025
Aug 27, 2024
Jun 23, 2020
Oct 17, 2019
Aug 28, 2024
Jul 2, 2024
Oct 7, 2020
May 15, 2019
Jan 29, 2020
Apr 24, 2019
Dec 9, 2019
Apr 2, 2024
Aug 27, 2024
Oct 17, 2024
Feb 5, 2025
Feb 5, 2025
Nov 25, 2024

Repository files navigation

PkgGoDev GitHub Actions GoReportCard

Scaleway GO SDK

⚠️ This is an early release, keep in mind that the API can break

Scaleway is a single way to create, deploy and scale your infrastructure in the cloud. We help thousands of businesses to run their infrastructures easily.

Documentation

Installation

go get github.com/scaleway/scaleway-sdk-go

Getting Started

package main

import (
	"fmt"

	"github.com/scaleway/scaleway-sdk-go/api/instance/v1"
	"github.com/scaleway/scaleway-sdk-go/scw"
	"github.com/scaleway/scaleway-sdk-go/utils"
)

func main() {

	// Create a Scaleway client
	client, err := scw.NewClient(
		// Get your organization ID at https://console.scaleway.com/organization/settings
		scw.WithDefaultOrganizationID("SCW_DEFAULT_ORGANIZATION_ID"),
		// Get your credentials at https://console.scaleway.com/iam/api-keys
		scw.WithAuth("SCW_ACCESS_KEY", "SCW_SECRET_KEY"),
		// Get more about our availability zones at https://www.scaleway.com/en/docs/console/my-account/reference-content/products-availability/
		scw.WithDefaultRegion("SCW_REGION"),
	)
	if err != nil {
		panic(err)
	}

	// Create SDK objects for Scaleway Instance product
	instanceApi := instance.NewAPI(client)

	// Call the ListServers method on the Instance SDK
	response, err := instanceApi.ListServers(&instance.ListServersRequest{
		Zone: scw.ZoneFrPar1,
	})
	if err != nil {
		panic(err)
	}

	// Do something with the response...
	for _, server := range response.Servers {
		fmt.Println("Server", server.ID, server.Name)
	}

}

Examples

You can find additional examples in the GoDoc.

Development

This repository is at its early stage and is still in active development. If you are looking for a way to contribute please read CONTRIBUTING.md.

Reach us

We love feedback. Feel free to reach us on Scaleway Slack community, we are waiting for you on #opensource.

About

(BETA) Integrate Scaleway with your Go application

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.9%
  • Shell 0.1%