Skip to main content

License

Description

The px pxb license commands manage Portworx Backup licensing: activate a license using multiple methods, retrieve license status and airgapped usage reports, and update the usage-based activation ID. Commands support JSON/YAML file input and global output formats.

Usage

Activate License

px pxb activate license [--activation-id <id> | --license-file </path/to/file.lic> \
| --license-data-file </path/to/license-activate-data.json> | --usage-based-id <id> \
| --airgapped-usage-based-id <id>] [flags]

Get License

px pxb get license [--airgapped-usage] [flags]

Update License (Usage-based ID)

px pxb update license --usage-based-id <new-id> [flags]

Examples

Activate license using different methods

# Online activation with activation ID
px pxb activate license --activation-id "ABCD-1234-EFGH-5678"

# Offline activation with license file (airgapped)
px pxb activate license --license-file /path/to/license.lic

# Activation with base64 license data from JSON file
# JSON file example contains: { "license_data": "<base64>" }
px pxb activate license --license-data-file /path/to/license-activate-data.json

# Usage-based activation
px pxb activate license --usage-based-id "usage-12345-abcde"

# Airgapped usage-based activation
px pxb activate license --airgapped-usage-based-id "airgapped-67890-fghij"

# Provide name/uid metadata and labels from context
px pxb activate license --activation-id "ABCD-1234" --name "production-license"

Get license information and airgapped usage

# Get license info (table output)
px pxb get license

# JSON/YAML output
px pxb get license --output json
px pxb get license --output yaml

# Get airgapped usage reports (default pagination)
px pxb get license --airgapped-usage

# Airgapped usage with pagination
px pxb get license --airgapped-usage --max-objects 50 --object-index 100

# Load configuration from file
px pxb get license --file /path/to/license-inspect.json
px pxb get license --airgapped-usage --file /path/to/license-usage-airgapped.json

Update usage-based ID

# Update usage-based ID (required flag)
px pxb update license --usage-based-id "new-usage-12345-abcde"

# With optional metadata or from file
px pxb update license --usage-based-id "new-usage-12345" --name "updated-license"
px pxb update license --file /path/to/license-update.json

Flags for commands and sub-commands

Activate License Flags

Activation Method (choose exactly one)

FlagShortTypeDescription
--activation-idstringOnline activation using a license activation ID
--license-filestringOffline activation from license file (airgapped)
--license-data-filestringJSON file with base64 license_data; highest precedence
--usage-based-idstringActivation for usage-based licensing
--airgapped-usage-based-idstringActivation for airgapped usage-based licensing

Metadata

FlagShortTypeDescription
--name-nstringName for this activation (stored as metadata)
--uidstringUID for this activation (optional metadata)

File Input

FlagShortTypeDescription
--file-fstringJSON/YAML file with complete LicenseActivateRequest
--license-data-filestringJSON file containing base64 license_data (overrides other activation methods)

Get License Flags

Mode Selection

FlagShortTypeDescription
--airgapped-usageboolShow airgapped license usage reports instead of license status

Pagination (when --airgapped-usage)

FlagShortTypeDescription
--max-objects-muint64Maximum number of usage objects per page (>= 1)
--object-index-iuint64Starting index for pagination (0-based)

File Input

FlagShortTypeDescription
--file-fstringJSON/YAML file with LicenseInspectRequest or LicenseUsageAirgappedRequest

Update License Flags

Required

FlagShortTypeDescription
--usage-based-idstringNew usage-based activation ID (required, optional with --file)

Optional Metadata

FlagShortTypeDescription
--name-nstringName for the license update
--uidstringUID for the license update

File Input

FlagShortTypeDescription
--file-fstringJSON/YAML file with LicenseUpdateRequest

Notes

  • Activate: exactly one activation method must be provided (one of: --activation-id, --license-file, --license-data-file, --usage-based-id, --airgapped-usage-based-id). Using more than one is invalid.
  • File vs CLI precedence:
    • For activate: --license-data-file has highest precedence; then --file; then activation flags.
    • For get license: when --airgapped-usage is set, pagination flags override values from --file.
    • For update: CLI flags override values from --file.
  • Validation:
    • Get airgapped usage: --max-objects must be >= 1.
    • Update requires --usage-based-id.

Output Format Support

  • --output table (default)
  • --output json
  • --output yaml
  • --output name (for get)

Authentication and Context

  • Uses organization ID and auth token from current context
  • Labels from context are included when applicable (e.g., activation metadata)