Use the ably apps rules update command to update an existing channel rule for an Ably application.
Synopsis
ably apps rules update <rule-name-or-id> [options]Arguments
rule-name-or-id Required
The name or ID of the channel rule to update.
Options
--app
The app ID that owns the rule to update. Uses the currently selected app if not specified.
--persisted
Enable message persistence for matching channels.
--push-enabled
Enable push notifications for matching channels.
--authenticated
Require authentication for operations on matching channels.
--tls-only
Restrict matching channels to TLS connections only.
--persist-last
Persist only the last message on matching channels.
--populate-channel-registry
Populate the channel registry for matching channels, enabling channel enumeration.
--mutable-messages
Enable message update and delete functionality on matching channels. Enabling this option automatically enables message persistence.
--batching-enabled
Enable message batching for matching channels.
--batching-interval
The batching interval in milliseconds for matching channels. Only applicable when --batching-enabled is set.
--conflation-enabled
Enable message conflation for matching channels.
--conflation-interval
The conflation interval in milliseconds for matching channels. Only applicable when --conflation-enabled is set.
--conflation-key
The conflation key for matching channels. Only applicable when --conflation-enabled is set.
--json
Output results as compact JSON. Mutually exclusive with --pretty-json.
--pretty-json
Output results in formatted JSON. Mutually exclusive with --json.
--verbose | -v
Enable verbose logging. Can be combined with --json or --pretty-json.
Examples
Enable message persistence on a channel rule:
ably apps rules update "chat" --persistedDisable push notifications on a channel rule:
ably apps rules update "alerts" --no-push-enabledUpdate a channel rule and output the result as JSON:
ably apps rules update "chat" --persisted --jsonEnable mutable messages on a channel rule:
ably apps rules update "chat" --mutable-messagesUpdate a channel rule with multiple options for a specific app:
ably apps rules update "notifications" --persisted --push-enabled --app "My App"See also
- Apps — Explore all
ably appscommands. - CLI reference — Full list of available commands.