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)
| Flag | Short | Type | Description |
|---|---|---|---|
--activation-id | string | Online activation using a license activation ID | |
--license-file | string | Offline activation from license file (airgapped) | |
--license-data-file | string | JSON file with base64 license_data; highest precedence | |
--usage-based-id | string | Activation for usage-based licensing | |
--airgapped-usage-based-id | string | Activation for airgapped usage-based licensing |
Metadata
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name for this activation (stored as metadata) |
--uid | string | UID for this activation (optional metadata) |
File Input
| Flag | Short | Type | Description |
|---|---|---|---|
--file | -f | string | JSON/YAML file with complete LicenseActivateRequest |
--license-data-file | string | JSON file containing base64 license_data (overrides other activation methods) |
Get License Flags
Mode Selection
| Flag | Short | Type | Description |
|---|---|---|---|
--airgapped-usage | bool | Show airgapped license usage reports instead of license status |
Pagination (when --airgapped-usage)
| Flag | Short | Type | Description |
|---|---|---|---|
--max-objects | -m | uint64 | Maximum number of usage objects per page (>= 1) |
--object-index | -i | uint64 | Starting index for pagination (0-based) |
File Input
| Flag | Short | Type | Description |
|---|---|---|---|
--file | -f | string | JSON/YAML file with LicenseInspectRequest or LicenseUsageAirgappedRequest |
Update License Flags
Required
| Flag | Short | Type | Description |
|---|---|---|---|
--usage-based-id | string | New usage-based activation ID (required, optional with --file) |
Optional Metadata
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name for the license update |
--uid | string | UID for the license update |
File Input
| Flag | Short | Type | Description |
|---|---|---|---|
--file | -f | string | JSON/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-filehas highest precedence; then--file; then activation flags. - For get license: when
--airgapped-usageis set, pagination flags override values from--file. - For update: CLI flags override values from
--file.
- For activate:
- Validation:
- Get airgapped usage:
--max-objectsmust be >= 1. - Update requires
--usage-based-id.
- Get airgapped usage:
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)