Skip to content

phoenixnap/go-sdk-bmc

Repository files navigation


phoenixnap Bare Metal Cloud
Go SDK for Bare Metal Cloud

This SDK allows you to provision and manage Bare Metal Cloud servers via API with Go.

Bare Metal CloudAPIDevelopers PortalKnowledge BaseSupport

Requirements

Creating a Bare Metal Cloud account

  1. Go to the Bare Metal Cloud signup page.
  2. Follow the prompts to set up your account.
  3. Use your credentials to log in to Bare Metal Cloud portal.

▶️ Video tutorial: How to Create a Bare Metal Cloud Account in Minutes

▶️ Video tutorial: How to Deploy a Bare Metal Server in a Minute

SDK Usage Example

Bare Metal Cloud Go SDK provides a library of resources and APIs that can be used to interact with the platform. Below is a sample code to create dependancy:

package main

import (
	"context"

	bmcapiclient "github.com/phoenixnap/go-sdk-bmc/bmcapi"
	"golang.org/x/oauth2/clientcredentials"
)

func main() {

	configuration := bmcapiclient.NewConfiguration()

	config := clientcredentials.Config{
		ClientID:     "<Client ID>",
		ClientSecret: "<Client Secret>",
		TokenURL:     "<Token URL>",
		Scopes:       []string{"bmc", "bmc.read"},
	}

	configuration.HTTPClient = config.Client(context.Background())

	api_client := bmcapiclient.NewAPIClient(configuration)

	resp, r, err := api_client.ServersApi.ServersGet(context.Background()).Execute()

💡 For each submodule, API-specific documentation is available as follows:

  • Audit Logs API: read audit log entries and track API calls and activities in the BMC Portal
  • Billing API: automate infrastructure billing, reserve server instances, retrieve your servers' rated usage, and enable or disable auto-renewals.
  • BMC API: create, power on, power off, reset, reboot or shut down your servers. Deprovision your servers, get SSH keys, and more.
  • Network API: create, list, edit, and delete private networks.
  • Network Storage API: Create, list, edit, and delete storage networks.
  • Rancher solutions API: deploy Kubernetes clusters faster using BMC integration with Rancher.
  • Tag API: assign tags to relevant resources in your BMC portal to group and categorize them.
  • IP API: request and delete IP Blocks.

Bare Metal Cloud community

Become part of the Bare Metal Cloud community to get updates on new features, help us improve the platform, and engage with developers and other users.

Resources

Documentation

Contact phoenixNAP

Get in touch with us if you have questions or need help with Bare Metal Cloud.

TwitterFacebookLinkedInInstagramYouTubeEmail


phoenixnap Bare Metal Cloud