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
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Receiver name (required, optional with --file) |
--type | -t | string | Receiver type: email (alias: smtp) |
--from | -f | string | Sender email address |
--host | string | SMTP server host | |
--port | string | SMTP server port | |
--encryption-ssl | bool | Enable SSL | |
--encryption-starttls | bool | Enable StartTLS | |
--authentication | bool | Enable SMTP auth | |
--auth-username | string | SMTP username | |
--auth-password | string | SMTP password | |
--allow-custom-certificate | bool | Allow custom TLS certificates | |
--ca-cert-file | string | Path to CA cert | |
--cert-file | string | Path to client cert | |
--key-file | string | Path to client private key | |
--uid | string | UID for the receiver (optional) | |
--label-selectors | map | Labels for the receiver (key=value) | |
--file | string | YAML/JSON file with complete receiver spec | |
--labels-file | string | YAML/JSON file for labels |
Get Receiver Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name of receiver to inspect (required for inspect; omit to list) |
--uid | string | UID of receiver (optional; used with --name) | |
--include-secrets | bool | Include sensitive values in output | |
--type | -t | string | Filter by type when listing (email) |
--max-objects | uint | Maximum items to return (client-side) | |
--sort-by | string | Sort field (client-side): name, creation-time | |
--sort-order | string | Sort order: ascending or descending | |
--file | string | YAML/JSON file with get configuration |
Update Receiver Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name of receiver to update (required, optional with --file) |
--uid | string | UID of receiver to update (optional) | |
--type | -t | string | Receiver type: email (alias: smtp) |
--from | -f | string | Sender email address |
--host | string | SMTP server host | |
--port | string | SMTP server port | |
--encryption-ssl | bool | Enable SSL | |
--encryption-starttls | bool | Enable StartTLS | |
--authentication | bool | Enable SMTP auth | |
--auth-username | string | SMTP username | |
--auth-password | string | SMTP password | |
--allow-custom-certificate | bool | Allow custom TLS certificates | |
--ca-cert-file | string | Path to CA cert | |
--cert-file | string | Path to client cert | |
--key-file | string | Path to client private key | |
--label-selectors | map | Updated labels (key=value) | |
--file | string | YAML/JSON file with full update spec | |
--labels-file | string | YAML/JSON file for labels |
Delete Receiver Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name of receiver to delete (required, optional with --file) |
--uid | string | UID of receiver to delete (optional) | |
--file | -f | string | YAML/JSON file with delete configuration |
Create Recipient Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Recipient name (required, optional with --file) |
--receiver-name | string | Name of associated receiver (required, optional with --file) | |
--receiver-uid | string | UID of associated receiver (optional) | |
--type | -t | string | Recipient type: email |
--severity | string | Severity filter: UNKNOWN, CRITICAL, WARNING | |
--active | bool | Recipient active state (default true) | |
--recipient-ids | list | Comma-separated IDs (e.g., emails) | |
--recipient-ids-file | string | YAML/JSON file with array of IDs | |
--uid | string | UID for the recipient (optional) | |
--label-selectors | map | Labels for the recipient (key=value) | |
--file | -f | string | YAML/JSON file with complete recipient spec |
--labels-file | string | YAML/JSON file for labels |
Get Recipient Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name of recipient to inspect (required for inspect; omit to list) |
--uid | string | UID of recipient (optional; used with --name) | |
--type | -t | string | Filter by type when listing (email) |
--max-objects | uint | Maximum items to return (client-side) | |
--sort-by | string | Sort field (client-side): name, creation-time | |
--sort-order | string | Sort order: ascending or descending | |
--file | -f | string | YAML/JSON file with get configuration |
Update Recipient Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name of recipient to update (optional with --file, required otherwise) |
--uid | string | UID of recipient to update (optional) | |
--receiver-name | string | Associate with receiver by name | |
--receiver-uid | string | Associate with receiver by UID | |
--type | -t | string | Recipient type: email |
--severity | string | Severity filter: UNKNOWN, CRITICAL, WARNING | |
--active | bool | Set active state | |
--recipient-ids | list | Replace recipient IDs | |
--recipient-ids-file | string | YAML/JSON file with array of IDs | |
--label-selectors | map | Updated labels (key=value) | |
--file | -f | string | YAML/JSON file with full update spec |
--labels-file | string | YAML/JSON file for labels |
Delete Recipient Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--name | -n | string | Name of recipient to delete (optional with --file, required otherwise) |
--uid | string | UID of recipient to delete (optional) | |
--file | -f | string | YAML/JSON file with delete configuration |
Notes
- For all Get (Inspect) operations,
--nameis required;--uidis optional for disambiguation. - File vs CLI precedence: when
--fileis provided, it supplies the full request; avoid combining with other content flags. - Receiver Get supports
--include-secretsto 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.