Skip to main content

px pxb share

Share resources with users and groups

note

The following commands support a set of global flags that apply to all px pxb commands. For details, see the Global Flags section.

px pxb share backup​

Update backup sharing permissions for specific users and groups.

This command allows you to grant or revoke different levels of access to backups:

  • View: Read-only access to backup information
  • Restorable: View access plus ability to restore from the backup
  • FullAccess: Complete administrative access including delete and modify operations

The command supports both CLI flags and JSON file input for complex configurations.

Examples:

# Add groups with different access levels
pxb share backup --name my-backup --uid backup-12345 --add-groups "team1=View,team2=Restorable,admin-team=FullAccess"

# Add collaborators with access levels
pxb share backup --name my-backup --uid backup-12345 --add-collaborators "user-123=View,user-456=FullAccess"

# Remove specific groups and collaborators
pxb share backup --name my-backup --uid backup-12345 --remove-groups team1,team2 --remove-collaborators user-123

# Update from JSON configuration file
pxb share backup --file /path/to/backup-share-config.json

# Comprehensive sharing update
pxb share backup --name my-backup --uid backup-12345 --add-groups "devops=FullAccess" --add-collaborators "admin-user-789=FullAccess" --remove-groups old-team

Flags

FlagInput typeDescriptionDefaultRequired
--add-collaboratorsstringToStringAdd collaborators with access levels (format: user-123=View,user-456=FullAccess)[]Optional
--add-groupsstringToStringAdd groups with access levels (format: group1=View,group2=Restorable,group3=FullAccess)[]Optional
--authtokenstringoidc auth token-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--filestringPath to YAML/JSON file containing backup share configuration-Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--name, -nstringName of the backup (required, optional with --file)-Yes
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--remove-collaboratorsstringSliceRemove collaborators from backup access (list of user IDs)[]Optional
--remove-groupsstringSliceRemove groups from backup access (list of group IDs)[]Optional
--tls-certificatestringtls certificate-Optional
--uid, -ustringUID of the backup-Optional

px pxb share cluster​

Share a cluster with users and groups, optionally including cluster backups.

Examples:

# Share cluster with users
pxb share cluster --cluster my-cluster --cluster-uid cluster-123 --users user-123,user-456

# Share cluster with groups
pxb share cluster --cluster my-cluster --cluster-uid cluster-123 --groups team1,team2

# Share cluster with users and groups, including backups
pxb share cluster --cluster my-cluster --cluster-uid cluster-123 --users user-123 --groups team1 --share-cluster-backups

# Share cluster from JSON file
pxb share cluster --file cluster-share-config.json

Flags

FlagInput typeDescriptionDefaultRequired
--authtokenstringoidc auth token-Optional
--cluster, -cstringName of the cluster-Optional
--cluster-uid, -ustringUID of the cluster (optional)-Optional
--dry-runboolSimulate the operation without making any changesfalseOptional
--endpoint, -estringThe endpoint of the server-Optional
--file, -fstringYAML/JSON file containing cluster share configuration-Optional
--groupsstringSliceGroup IDs to share the cluster with (comma-separated)[]Optional
--labels, -lstringComma separated list of labels as key-value pairs: 'k1=v1,k2=v2'-Optional
--orgIDstringThe org id for which to query the objectdefaultOptional
--output, -ostringOutput format. One of: table|json|yaml|nametableOptional
--share-cluster-backupsboolAlso share existing backups on this cluster with the users/groupsfalseOptional
--tls-certificatestringtls certificate-Optional
--usersstringSliceUser IDs to share the cluster with (comma-separated)[]Optional
In this topic: