Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/azure-cli/azure/cli/command_modules/monitor/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,15 +1303,15 @@
short-summary: Create a saved search for a given workspace.
examples:
- name: Create a saved search for a given workspace.
text: az monitor log-analytics workspace saved-search create -g MyRG --workspace-name MyWS -n MySavedSearch --category Test1 --display-name TestSavedSearch -q "AzureActivity | summarize count() by bin(timestamp, 1h)" --fa myfun --fp "a:string = value"
text: az monitor log-analytics workspace saved-search create -g MyRG --workspace-name MyWS -n MySavedSearch --category Test1 --display-name TestSavedSearch -q "AzureActivity | summarize count() by bin(TimeGenerated, 1h)" --fa myfun --fp "a:string = value"
"""

helps['monitor log-analytics workspace saved-search update'] = """
type: command
short-summary: Update a saved search for a given workspace.
examples:
- name: Update a saved search for a given workspace.
text: az monitor log-analytics workspace saved-search update -g MyRG --workspace-name MyWS -n MySavedSearch --category Test1 --display-name TestSavedSearch -q "AzureActivity | summarize count() by bin(timestamp, 1h)" --fa myfun --fp "a:string = value"
text: az monitor log-analytics workspace saved-search update -g MyRG --workspace-name MyWS -n MySavedSearch --category Test1 --display-name TestSavedSearch -q "AzureActivity | summarize count() by bin(TimeGenerated, 1h)" --fa myfun --fp "a:string = value"
"""

helps['monitor log-analytics workspace saved-search list'] = """
Expand All @@ -1337,6 +1337,14 @@
helps['monitor log-analytics workspace data-export create'] = """
type: command
short-summary: Create a data export rule for a given workspace.
long-summary: |
For more information, see
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/logs-data-export.
parameters:
- name: --tables -t
short-summary: An array of tables to export.
populator-commands:
- "`az monitor log-analytics workspace table list`"
examples:
- name: Create a data export rule for a given workspace.
text: az monitor log-analytics workspace data-export create -g MyRG --workspace-name MyWS -n MyDataExport --destination {sa_id_1} --enable -t {table_name}
Expand All @@ -1345,6 +1353,14 @@
helps['monitor log-analytics workspace data-export update'] = """
type: command
short-summary: Update a data export rule for a given workspace.
long-summary: |
For more information, see
https://docs.microsoft.com/en-us/azure/azure-monitor/platform/logs-data-export.
parameters:
- name: --tables -t
short-summary: An array of tables to export.
populator-commands:
- "`az monitor log-analytics workspace table list`"
examples:
- name: Update a data export rule for a given workspace.
text: az monitor log-analytics workspace data-export update -g MyRG --workspace-name MyWS -n MyDataExport --destination {namespace_id} -t {table_name} --enable false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def load_arguments(self, _):
c.argument('data_export_name', options_list=['--name', '-n'], help="Name of the data export rule")
c.argument('workspace_name', options_list='--workspace-name')
c.argument('table_names', nargs='+', options_list=['--tables', '-t'],
help='An array of tables to export. if --export-all-tables is true, this argument should not be provided.')
help='An array of tables to export.')
c.argument('destination', validator=process_workspace_data_export_destination,
help='The destination resource ID. It should be a storage account, an event hub namespace or an event hub. '
'If event hub namespace is provided, event hub would be created for each table automatically.')
Expand Down
Loading