Reference

Accounts

Read the cloud accounts connected to LevelFour, what each one can do, the modules your organization has, and the work tools it is connected to, and disconnect a work tool.

The accounts methods read what is connected to your organization: cloud accounts, what LevelFour can do in each, the modules you have, and the work tools you have linked. Reads take any key. Disconnecting a work tool takes a read-write key. The examples show the Go SDK and plain HTTP.

Connecting a cloud account or a work tool happens in the dashboard, because each one ends in the provider's own consent screen. Connect Providers and Integrations walk through them.

Methods

MethodReturns
List connected accountsEvery cloud account connected to your organization
List connectionsWhat LevelFour can do in each account
List modulesThe modules your organization has, and their state
Work tool connectionsConnected GitHub, GitLab, Jira and Slack, and disconnecting one

List connected accounts

Returns the cloud accounts connected to your organization, paginated. page_size goes up to 200 and defaults to 50.

accounts, err := client.Accounts.ListConnectedAccounts(ctx,
    &levelfour.ListConnectedAccountsAPIV1AccountsGetRequest{
        PageSize: levelfour.Int(200),
    },
)

Each AWS account also reports its detailed cost data state: whether the export is active, where it delivers, and when LevelFour last read it.

List connections

Returns, for each connected account, which LevelFour capabilities are ready. A capability reads true when it is on, false when it needs setup, and null when LevelFour could not tell. One that needs setup carries the link that sets it up, such as the stack for Automated Savings.

connections, err := client.Accounts.ListConnections(ctx)

List modules

Returns the modules your organization has, with each one's state (inactive, trial, active, past_due, revoked or beta), plan tier and dates. A module you do not have is why a page or a method is missing for you.

modules, err := client.Accounts.ListCustomerModules(ctx)

Work tool connections

List the work tools connected to your organization. GitHub reports its App installations, and the others their connections.

github, err := client.Accounts.ListGithubInstallations(ctx)
gitlab, err := client.Accounts.ListGitlabConnections(ctx)
jira, err := client.Accounts.ListJiraConnections(ctx)
slack, err := client.Accounts.ListSlackConnections(ctx)

Disconnecting a GitLab, Jira or Slack connection takes its id from the list. Disconnecting GitLab also removes the webhook LevelFour added, and disconnecting Slack stops every channel subscription the workspace had.

_, err := client.Accounts.DisconnectSlackConnection(ctx, "connection_id")

A GitHub App is removed from GitHub itself. GitHub has the steps.

Next

  • Providers lists the providers you have connected, with provider-scoped reads
  • Integrations files a task in a connected work tool, such as a Jira issue from a saving
  • API reference is every parameter and response field

On this page

Ask the FinOps Agent about your cloud spend