Scaleway is a simple way to build, deploy and scale your infrastructure in the cloud. We help thousands of developers and businesses to run their infrastructures without any issue.
- Godoc
- Developers website (API documentation)
go get github.com/scaleway/scaleway-sdk-go
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 credentials at https://console.scaleway.com/account/credentials
scw.WithDefaultOrganizationID("ORGANISATION_ID"),
scw.WithAuth("ACCESS_KEY", "SECRET_KEY"),
)
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)
}
}
You can find additional examples in the GoDoc.
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.
We love feedback. Feel free to reach us on Scaleway Slack community, we are waiting for you on #opensource.