Skip to content

grrtrr/clcv2

Repository files navigation

CenturyLink Cloud v2 API

This is a Go implementation of the CLC v2 API.

It requires go >= 1.6 (since this package supports context in combination with client timeout).

Getting started

Download from inside your $GOPATH:

> go get -d  github.com/grrtrr/clcv2

Try some of the examples in the examples/ folder. These illustrate individual API calls.

Environment and login

Most examples have help screens (-h). The library supports debug output via -d.

Credentials can be passed in one of two forms:

  1. Via commandline flags:
  • -u <your CLC-Portal-Username>,
  • -p <your CLC-Portal-Password>.
  1. Using environment variables:
  • CLC_USER=<CLC-Portal-Username>,
  • CLC_PASSWORD=<CLC-Portal-Password>.

If you are using a CLC sub-account, override the default Account Alias via one of

  • Flag: -a <AccountAlias> or
  • Environment: CLC_ACCOUNT=<AccountAlias>

Likewise, to set a Default Data Centre (e.g. wa1), use one of

  • Flag: -l <your Default DataCentre> or
  • Environment: CLC_LOCATION=<your default DataCentre>

Caveat: Be very careful with the credentials. Using 3 times the wrong username and/or password will cause the account to be locked.

Releases

No releases published

Packages

No packages published

Languages