This SDK allows you to provision and manage Bare Metal Cloud servers via API with Go.
Bare Metal Cloud • API • Developers Portal • Knowledge Base • Support
- Bare Metal Cloud account
- Go
- Go to the Bare Metal Cloud signup page.
- Follow the prompts to set up your account.
- Use your credentials to log in to Bare Metal Cloud portal.
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.
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.
- Follow @phoenixNAP on Twitter
- Join the official Slack channel
- Sign up for our Developers Monthly newsletter
Get in touch with us if you have questions or need help with Bare Metal Cloud.