mc table share token create

The mc table share token create command generates a new access token for a Delta Sharing configuration.

Tokens allow external consumers to access shared tables using the Delta Sharing protocol.

The following command creates a token for the analytics-share with a 90-day expiration:

mc table share token create myaistor/analytics-share --expires 90d

The command has the following syntax:

mc [GLOBALFLAGS] table share token create     \
                 ALIAS/SHARE                  \
                 [--expires DURATION]         \
                 [--description "STRING"]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

Required

The alias of a MinIO AIStor cluster.

SHARE

Required

The name of the share for which to create a token.

--description

Optional

A description for the token to help identify its purpose or recipient.

--expires

Optional

Token expiration duration. Accepts values in the following formats:

  • Days: 365d, 90d, 30d
  • Hours: 24h, 12h
  • Minutes: 30m

If not specified, the token does not expire.

Global flags

This command supports any of the global flags.

Examples

Create a token with expiration

Use mc table share token create to generate a token that expires:

mc table share token create ALIAS/SHARE --expires DURATION
  • Replace ALIAS with the alias of the MinIO AIStor cluster.
  • Replace SHARE with the name of the share.
  • Replace DURATION with the expiration period.

Create a token with description

Use the --description flag to document the token purpose:

mc table share token create myaistor/analytics-share \
    --expires 90d \
    --description "BI Team Q1 Access"

Create a non-expiring token

Omit the --expires flag to create a token that never expires:

mc table share token create myaistor/analytics-share \
    --description "Production integration"

Save the token value securely after creation. The full token value is only displayed once and cannot be retrieved later.

On this page