mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
36 lines
1021 B
Plaintext
36 lines
1021 B
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * serverless/event_workflows/serverless-using-brokers.adoc
|
|
|
|
[id="kn-trigger-update_{context}"]
|
|
= Updating a trigger using `kn`
|
|
|
|
You can use the `kn trigger update` command with certain flags to update attributes for a trigger.
|
|
|
|
.Procedure
|
|
|
|
* Update a trigger:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ kn trigger update <trigger_name> --filter <key=value> --sink <sink_name> [flags]
|
|
----
|
|
** You can update a trigger to filter exact event attributes that match incoming events. For example, using the `type` attribute:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ kn trigger update <trigger_name> --filter type=knative.dev.event
|
|
----
|
|
** You can remove a filter attribute from a trigger. For example, you can remove the filter attribute with key `type`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ kn trigger update <trigger_name> --filter type-
|
|
----
|
|
** You can use the `--sink` parameter to change the event sink of a trigger:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ kn trigger update <trigger_name> --sink ksvc:my-event-sink
|
|
----
|