Skip to main content

Receiver and Recipient

Description

Manage alert notification plumbing:

  • Receiver: outbound delivery configuration (e.g., SMTP/email) used to send alerts
  • Recipient: who gets alerts from a receiver, with severity filters and activation state

This guide covers both resources and follows the same structure as backup.md.

Usage

Create Receiver

px pxb create receiver --name <name> [flags]

Get Receiver (Inspect)

px pxb get receiver --name <name> [--uid <uid>] [flags]

Get Receiver (List All)

px pxb get receiver [flags]

Update Receiver

px pxb update receiver --name <name> [--uid <uid>] [flags]

Delete Receiver

px pxb delete receiver --name <name> [--uid <uid>] [flags]

Create Recipient

px pxb create recipient --name <name> [flags]

Get Recipient (Inspect)

px pxb get recipient --name <name> [--uid <uid>] [flags]

Get Recipient (List All)

px pxb get recipient [flags]

Update Recipient

px pxb update recipient --name <name> [--uid <uid>] [flags]

Delete Recipient

px pxb delete recipient --name <name> [--uid <uid>] [flags]

Examples

Receiver

# Create SMTP/email receiver
px pxb create receiver \
--name smtp-alerts \
--type email \
--from noreply@example.com \
--host smtp.example.com \
--port 587 \
--authentication \
--auth-username smtp-user \
--auth-password secret \
--encryption-starttls

# Inspect by name
px pxb get receiver --name smtp-alerts

# List all receivers (JSON)
px pxb get receiver --output json

# Update TLS certs and enable SSL
px pxb update receiver \
--name smtp-alerts \
--allow-custom-certificate \
--ca-cert-file /path/to/ca.crt \
--encryption-ssl

# Delete receiver
px pxb delete receiver --name deprecated-receiver

Recipient

# Create an email recipient bound to a receiver
px pxb create recipient \
--name critical-alerts \
--receiver-name smtp-alerts \
--type email \
--recipient-ids "admin@example.com,ops@example.com" \
--severity CRITICAL

# Inspect by name
px pxb get recipient --name critical-alerts

# List all recipients (table default)
px pxb get recipient

# Update recipient IDs and deactivate temporarily
px pxb update recipient \
--name critical-alerts \
--recipient-ids "siteops@example.com" \
--active=false

# Delete recipient
px pxb delete recipient --name critical-alerts

Flags for commands and sub-commands

Create Receiver Flags

FlagShortTypeDescription
--name-nstringReceiver name (required, optional with --file)
--type-tstringReceiver type: email (alias: smtp)
--from-fstringSender email address
--hoststringSMTP server host
--portstringSMTP server port
--encryption-sslboolEnable SSL
--encryption-starttlsboolEnable StartTLS
--authenticationboolEnable SMTP auth
--auth-usernamestringSMTP username
--auth-passwordstringSMTP password
--allow-custom-certificateboolAllow custom TLS certificates
--ca-cert-filestringPath to CA cert
--cert-filestringPath to client cert
--key-filestringPath to client private key
--uidstringUID for the receiver (optional)
--label-selectorsmapLabels for the receiver (key=value)
--filestringYAML/JSON file with complete receiver spec
--labels-filestringYAML/JSON file for labels

Get Receiver Flags

FlagShortTypeDescription
--name-nstringName of receiver to inspect (required for inspect; omit to list)
--uidstringUID of receiver (optional; used with --name)
--include-secretsboolInclude sensitive values in output
--type-tstringFilter by type when listing (email)
--max-objectsuintMaximum items to return (client-side)
--sort-bystringSort field (client-side): name, creation-time
--sort-orderstringSort order: ascending or descending
--filestringYAML/JSON file with get configuration

Update Receiver Flags

FlagShortTypeDescription
--name-nstringName of receiver to update (required, optional with --file)
--uidstringUID of receiver to update (optional)
--type-tstringReceiver type: email (alias: smtp)
--from-fstringSender email address
--hoststringSMTP server host
--portstringSMTP server port
--encryption-sslboolEnable SSL
--encryption-starttlsboolEnable StartTLS
--authenticationboolEnable SMTP auth
--auth-usernamestringSMTP username
--auth-passwordstringSMTP password
--allow-custom-certificateboolAllow custom TLS certificates
--ca-cert-filestringPath to CA cert
--cert-filestringPath to client cert
--key-filestringPath to client private key
--label-selectorsmapUpdated labels (key=value)
--filestringYAML/JSON file with full update spec
--labels-filestringYAML/JSON file for labels

Delete Receiver Flags

FlagShortTypeDescription
--name-nstringName of receiver to delete (required, optional with --file)
--uidstringUID of receiver to delete (optional)
--file-fstringYAML/JSON file with delete configuration

Create Recipient Flags

FlagShortTypeDescription
--name-nstringRecipient name (required, optional with --file)
--receiver-namestringName of associated receiver (required, optional with --file)
--receiver-uidstringUID of associated receiver (optional)
--type-tstringRecipient type: email
--severitystringSeverity filter: UNKNOWN, CRITICAL, WARNING
--activeboolRecipient active state (default true)
--recipient-idslistComma-separated IDs (e.g., emails)
--recipient-ids-filestringYAML/JSON file with array of IDs
--uidstringUID for the recipient (optional)
--label-selectorsmapLabels for the recipient (key=value)
--file-fstringYAML/JSON file with complete recipient spec
--labels-filestringYAML/JSON file for labels

Get Recipient Flags

FlagShortTypeDescription
--name-nstringName of recipient to inspect (required for inspect; omit to list)
--uidstringUID of recipient (optional; used with --name)
--type-tstringFilter by type when listing (email)
--max-objectsuintMaximum items to return (client-side)
--sort-bystringSort field (client-side): name, creation-time
--sort-orderstringSort order: ascending or descending
--file-fstringYAML/JSON file with get configuration

Update Recipient Flags

FlagShortTypeDescription
--name-nstringName of recipient to update (optional with --file, required otherwise)
--uidstringUID of recipient to update (optional)
--receiver-namestringAssociate with receiver by name
--receiver-uidstringAssociate with receiver by UID
--type-tstringRecipient type: email
--severitystringSeverity filter: UNKNOWN, CRITICAL, WARNING
--activeboolSet active state
--recipient-idslistReplace recipient IDs
--recipient-ids-filestringYAML/JSON file with array of IDs
--label-selectorsmapUpdated labels (key=value)
--file-fstringYAML/JSON file with full update spec
--labels-filestringYAML/JSON file for labels

Delete Recipient Flags

FlagShortTypeDescription
--name-nstringName of recipient to delete (optional with --file, required otherwise)
--uidstringUID of recipient to delete (optional)
--file-fstringYAML/JSON file with delete configuration

Notes

  • For all Get (Inspect) operations, --name is required; --uid is optional for disambiguation.
  • File vs CLI precedence: when --file is provided, it supplies the full request; avoid combining with other content flags.
  • Receiver Get supports --include-secrets to reveal sensitive fields when needed.
  • Client-side filtering/sorting and pagination flags are best-effort on the CLI side.
  • Create/Update commands honor validation rules (e.g., SMTP authentication fields, TLS options).
  • Commands honor global options (e.g., --dry-run), consistent with other resources.

Output Format Support

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

Authentication and Context

  • Uses the current organization and auth context from your configuration.
  • Ensure you are logged in and have permission to manage receivers/recipients. See login-logout.md for authentication steps.