The CLI allows you to create, delete and update the Audit channel. The commands for these actions are shown in the table below.
create
delete
update
lenses-cli auditchannels
lenses-cli auditchannels --details
lenses-cli auditchannels \ --page=1 \ --pageSize=10 \ --sortField="name" \ --sortOrder="asc" \ --templateName=[TEMPLATE_NAME] \ --channelName=[CHANNEL_NAME]
When creating audit channels, one of existing predefined channel templates needs to be used.
Such a command lists all available audit channel templates:
lenses-cli auditchannel-templates
To get all details, use JSON format:
lenses-cli auditchannel-templates --output JSON
lenses-cli auditchannels create \ --name "my-audit-channel-1" \ --connectionName=[CONECTION_NAME] \ --templateName=[TEMPLATE_NAME] \ --properties='[{"key":"body","value":"payload1-created"},{"key":"insecure","value":true},{"key":"method","value":"GET"}]'
Create new audit channel using a YAML file:
name: "my-audit-channel-2" templateName: [TEMPLATE_NAME] connectionName: [CONECTION_NAME] properties: - key: "body" value: "body-payload" - key: "insecure" value: true - key: "method" value: "GET"
lenses-cli auditchannels create audit_channel.yml
lenses-cli auditchannels update \ --id [ID_OF_THE_CHANNEL_TO_BE_UPDATED] \ --name "my-audit-channel-2-updated" \ --connectionName=[CONNECTION_NAME] \ --templateName=[TEMPLATE_NAME] \ --properties='[{"key":"body","value":"payload1-created"},{"key":"insecure","value":true},{"key":"method","value":"GET"}]'
lenses-cli auditchannels delete \ --channelID=[ID_OF_THE_CHANNEL_TO_BE_UPDATED]
On this page