influxdb3 create token --admin
Create a named administrator token.
Operator tokens in InfluxDB 3 Cloud
InfluxData manages the operator token for your InfluxDB 3 Cloud instance. The operator token never expires and cannot be edited or deleted.
Usage
influxdb3 create token --admin [OPTIONS]Options
| Option | Description |
|---|---|
--name | Name of the token |
--expiry | Expires in duration–for example, 10d for 10 days or 1y for 1 year |
--host | The host URL of the running InfluxDB 3 server [env: INFLUXDB3_HOST_URL=] [default: http://127.0.0.1:8181] |
--token | An existing administrator token for the InfluxDB 3 server |
--tls-ca | An optional arg to use a custom CA for useful for testing with self-signed certs |
--format | Output format for token [possible values: json, text] |
-h, --help | Print help information |
--help-all | Print more detailed help information |
Examples
Create a named administrator token
Use an existing administrator token to create a named administrator token.
influxdb3 create token \
--admin \
--token ADMIN_TOKEN \
--name TOKEN_NAME \
--expiry DURATIONReplace the following:
ADMIN_TOKEN: Your InfluxDB administrator tokenTOKEN_NAME: Name for your new administrator tokenDURATION: Duration for the token to remain valid, in humantime format (for example,10dfor 10 days or1yfor 1 year).
Use the token to create a database
influxdb3 create database \
--token ADMIN_TOKEN \
DATABASE_NAMEReplace the following:
ADMIN_TOKEN: Your InfluxDB administrator tokenDATABASE_NAME: Name for your new database
Use CLI environment variables
Set the token as an environment variable to simplify repeated CLI commands:
export INFLUXDB3_AUTH_TOKEN=ADMIN_TOKENWas this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB 3 Cloud and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.