Documentation

usage.limits() function

Flux 0.114.0+

The usage.limits() function is experimental and subject to change at any time. By using this function, you accept the risks of experimental functions.

The usage.limits() function returns a record containing usage limits for an InfluxDB Cloud organization.

import "experimental/usage"

usage.limits(
  host: "",
  orgID: "",
  token: ""
)

View example usage limits record

Parameters

host

InfluxDB Cloud region URL (Required if executed outside of your InfluxDB Cloud organization or region). Default is "".

orgID

InfluxDB Cloud organization ID (Required if executed outside of your InfluxDB Cloud organization or region). Default is "".

token

InfluxDB Cloud API token (Required if executed outside of your InfluxDB Cloud organization or region). Default is "".

Examples

Get rate limits for your InfluxDB Cloud organization
import "experimental/usage"

usage.limits()
Get rate limits for a different InfluxDB Cloud organization
import "experimental/usage"
import "influxdata/influxdb/secrets"

token = secrets.get(key: "INFLUX_TOKEN")

usage.limits(
  host: "https://cloud2.influxdata.com",
  orgID: "x000X0x0xx0X00x0",
  token: token
)

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.