-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Aladdin] Parse generated examples into commands' _help.py (#11716)
- Loading branch information
Jianhui Harold
authored
Feb 13, 2020
1 parent
d3beab8
commit 800e711
Showing
8 changed files
with
762 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,8 @@ | |
short-summary: The short name of the action group | ||
examples: | ||
- name: Create a new action group (autogenerated) | ||
text: az monitor action-group create --action webhook https://alerts.contoso.com apiKey={APIKey} type=HighCPU --name MyActionGroup --resource-group MyResourceGroup | ||
text: | | ||
az monitor action-group create --action webhook https://alerts.contoso.com apiKey={APIKey} type=HighCPU --name MyActionGroup --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -82,7 +83,8 @@ | |
short-summary: Show the details of an action group | ||
examples: | ||
- name: Show the details of an action group (commonly used with --output and --query). (autogenerated) | ||
text: az monitor action-group show --name MyActionGroup --resource-group MyResourceGroup | ||
text: | | ||
az monitor action-group show --name MyActionGroup --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -133,7 +135,8 @@ | |
short-summary: Remove receivers from the action group. Accept space-separated list of receiver names. | ||
examples: | ||
- name: Update an action group (autogenerated) | ||
text: az monitor action-group update --name MyActionGroup --resource-group MyResourceGroup --set retentionPolicy.days=365 --subscription MySubscription | ||
text: | | ||
az monitor action-group update --name MyActionGroup --resource-group MyResourceGroup --set retentionPolicy.days=365 --subscription MySubscription | ||
crafted: true | ||
""" | ||
|
||
|
@@ -313,7 +316,8 @@ | |
text: > | ||
az monitor activity-log alert update -n {AlertName} -g {ResourceGroup} --enable false | ||
- name: Update the details of this activity log alert (autogenerated) | ||
text: az monitor activity-log alert update --enabled true --name MyActivityLogAlerts --resource-group MyResourceGroup --subscription MySubscription | ||
text: | | ||
az monitor activity-log alert update --enabled true --name MyActivityLogAlerts --resource-group MyResourceGroup --subscription MySubscription | ||
crafted: true | ||
""" | ||
|
||
|
@@ -405,7 +409,8 @@ | |
short-summary: Delete an alert rule. | ||
examples: | ||
- name: Delete an alert rule. (autogenerated) | ||
text: az monitor alert delete --name MyAlertRule --resource-group MyResourceGroup | ||
text: | | ||
az monitor alert delete --name MyAlertRule --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -414,7 +419,8 @@ | |
short-summary: List alert rules in a resource group. | ||
examples: | ||
- name: List alert rules in a resource group. (autogenerated) | ||
text: az monitor alert list --resource-group MyResourceGroup | ||
text: | | ||
az monitor alert list --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -423,7 +429,8 @@ | |
short-summary: List all incidents for an alert rule. | ||
examples: | ||
- name: List all incidents for an alert rule. (autogenerated) | ||
text: az monitor alert list-incidents --resource-group MyResourceGroup --rule-name MyRule | ||
text: | | ||
az monitor alert list-incidents --resource-group MyResourceGroup --rule-name MyRule | ||
crafted: true | ||
""" | ||
|
||
|
@@ -432,7 +439,8 @@ | |
short-summary: Show an alert rule. | ||
examples: | ||
- name: Show an alert rule. (autogenerated) | ||
text: az monitor alert show --name MyAlertRule --resource-group MyResourceGroup | ||
text: | | ||
az monitor alert show --name MyAlertRule --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -484,10 +492,12 @@ | |
Time span over which to apply --aggregation, in nDnHnMnS shorthand or full ISO8601 format. | ||
examples: | ||
- name: Update a classic metric-based alert rule. (autogenerated) | ||
text: az monitor alert update --email-service-owners true --name MyAlertRule --resource-group MyResourceGroup | ||
text: | | ||
az monitor alert update --email-service-owners true --name MyAlertRule --resource-group MyResourceGroup | ||
crafted: true | ||
- name: Update a classic metric-based alert rule. (autogenerated) | ||
text: az monitor alert update --name MyAlertRule --remove-action email [email protected] --resource-group MyResourceGroup | ||
text: | | ||
az monitor alert update --name MyAlertRule --remove-action email [email protected] --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -527,7 +537,8 @@ | |
text: > | ||
az monitor autoscale create -g {myrg} --resource {resource-id} --count 4 | ||
- name: Create new autoscale settings. (autogenerated) | ||
text: az monitor autoscale create --count 3 --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource myScaleSet --resource-group MyResourceGroup --resource-type Microsoft.Compute/virtualMachineScaleSets | ||
text: | | ||
az monitor autoscale create --count 3 --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource myScaleSet --resource-group MyResourceGroup --resource-type Microsoft.Compute/virtualMachineScaleSets | ||
crafted: true | ||
""" | ||
|
||
|
@@ -592,14 +603,19 @@ | |
az monitor autoscale profile create -g {myrg} --autoscale-name {name} -n weeekend \\ | ||
--copy-rules default --min-count 1 --count 2 --max-count 2 \\ | ||
--recurrence week sat sun --timezone "Pacific Standard Time" | ||
- name: Create a fixed or recurring autoscale profile. (autogenerated) | ||
text: | | ||
az monitor autoscale profile create --autoscale-name MyAutoscale --count 2 --end 2018-12-26 --name Christmas --recurrence week sat sun --resource-group MyResourceGroup --start 2018-12-24 --timezone "Pacific Standard Time" | ||
crafted: true | ||
""" | ||
|
||
helps['monitor autoscale profile delete'] = """ | ||
type: command | ||
short-summary: Delete an autoscale profile. | ||
examples: | ||
- name: Delete an autoscale profile. (autogenerated) | ||
text: az monitor autoscale profile delete --autoscale-name MyAutoscale --name MyAutoscaleProfile --resource-group MyResourceGroup | ||
text: | | ||
az monitor autoscale profile delete --autoscale-name MyAutoscale --name MyAutoscaleProfile --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -608,7 +624,8 @@ | |
short-summary: List autoscale profiles. | ||
examples: | ||
- name: List autoscale profiles. (autogenerated) | ||
text: az monitor autoscale profile list --autoscale-name MyAutoscale --resource-group MyResourceGroup | ||
text: | | ||
az monitor autoscale profile list --autoscale-name MyAutoscale --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -684,7 +701,8 @@ | |
short-summary: List autoscale rules for a profile. | ||
examples: | ||
- name: List autoscale rules for a profile. (autogenerated) | ||
text: az monitor autoscale rule list --autoscale-name MyAutoscale --profile-name MyProfile --resource-group MyResourceGroup | ||
text: | | ||
az monitor autoscale rule list --autoscale-name MyAutoscale --profile-name MyProfile --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -693,7 +711,8 @@ | |
short-summary: Show autoscale setting details. | ||
examples: | ||
- name: Show autoscale setting details. (autogenerated) | ||
text: az monitor autoscale show --name MyAutoscaleSettings --resource-group MyResourceGroup | ||
text: | | ||
az monitor autoscale show --name MyAutoscaleSettings --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -726,7 +745,8 @@ | |
az monitor autoscale update -g {myrg} -n {autoscale-name} \\ | ||
--remove-action email [email protected] | ||
- name: Update autoscale settings. (autogenerated) | ||
text: az monitor autoscale update --count 3 --email-administrator true --enabled true --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource-group MyResourceGroup --tags key[=value] | ||
text: | | ||
az monitor autoscale update --count 3 --email-administrator true --enabled true --max-count 5 --min-count 2 --name MyAutoscaleSettings --resource-group MyResourceGroup --tags key[=value] | ||
crafted: true | ||
""" | ||
|
||
|
@@ -740,7 +760,8 @@ | |
short-summary: Updates an autoscale setting. | ||
examples: | ||
- name: Updates an autoscale setting. (autogenerated) | ||
text: az monitor autoscale-settings update --name MyAutoscaleSetting --resource-group MyResourceGroup --set retentionPolicy.days=365 | ||
text: | | ||
az monitor autoscale-settings update --name MyAutoscaleSetting --resource-group MyResourceGroup --set retentionPolicy.days=365 | ||
crafted: true | ||
""" | ||
|
||
|
@@ -826,7 +847,8 @@ | |
short-summary: Update diagnostic settings. | ||
examples: | ||
- name: Update diagnostic settings. (autogenerated) | ||
text: az monitor diagnostic-settings update --name MyDiagnosticSetting --resource myScaleSet --set retentionPolicy.days=365 | ||
text: | | ||
az monitor diagnostic-settings update --name MyDiagnosticSetting --resource myScaleSet --set retentionPolicy.days=365 | ||
crafted: true | ||
""" | ||
|
||
|
@@ -851,6 +873,11 @@ | |
helps['monitor log-analytics workspace delete'] = """ | ||
type: command | ||
short-summary: Delete a workspace instance. | ||
examples: | ||
- name: Delete a workspace instance. (autogenerated) | ||
text: | | ||
az monitor log-analytics workspace delete --resource-group MyResourceGroup --workspace-name MyWorkspace | ||
crafted: true | ||
""" | ||
|
||
helps['monitor log-analytics workspace get-schema'] = """ | ||
|
@@ -859,11 +886,21 @@ | |
long-summary: > | ||
Schema represents the internal structure of the workspace, which can be used during the query. | ||
For more information, visit: https://docs.microsoft.com/en-us/rest/api/loganalytics/workspaces%202015-03-20/getschema | ||
examples: | ||
- name: Get the schema for a given workspace. (autogenerated) | ||
text: | | ||
az monitor log-analytics workspace get-schema --resource-group MyResourceGroup --workspace-name MyWorkspace | ||
crafted: true | ||
""" | ||
|
||
helps['monitor log-analytics workspace get-shared-keys'] = """ | ||
type: command | ||
short-summary: Get the shared keys for a workspace. | ||
examples: | ||
- name: Get the shared keys for a workspace. (autogenerated) | ||
text: | | ||
az monitor log-analytics workspace get-shared-keys --resource-group MyResourceGroup --workspace-name MyWorkspace | ||
crafted: true | ||
""" | ||
|
||
helps['monitor log-analytics workspace list'] = """ | ||
|
@@ -874,11 +911,21 @@ | |
helps['monitor log-analytics workspace list-management-groups'] = """ | ||
type: command | ||
short-summary: Get a list of management groups connected to a workspace. | ||
examples: | ||
- name: Get a list of management groups connected to a workspace. (autogenerated) | ||
text: | | ||
az monitor log-analytics workspace list-management-groups --resource-group MyResourceGroup --workspace-name MyWorkspace | ||
crafted: true | ||
""" | ||
|
||
helps['monitor log-analytics workspace list-usages'] = """ | ||
type: command | ||
short-summary: Get a list of usage metrics for a workspace. | ||
examples: | ||
- name: Get a list of usage metrics for a workspace. (autogenerated) | ||
text: | | ||
az monitor log-analytics workspace list-usages --resource-group MyResourceGroup --workspace-name MyWorkspace | ||
crafted: true | ||
""" | ||
|
||
helps['monitor log-analytics workspace pack'] = """ | ||
|
@@ -904,6 +951,11 @@ | |
helps['monitor log-analytics workspace show'] = """ | ||
type: command | ||
short-summary: Show a workspace instance. | ||
examples: | ||
- name: Show a workspace instance. (autogenerated) | ||
text: | | ||
az monitor log-analytics workspace show --resource-group MyResourceGroup --workspace-name MyWorkspace | ||
crafted: true | ||
""" | ||
|
||
helps['monitor log-analytics workspace update'] = """ | ||
|
@@ -946,7 +998,8 @@ | |
short-summary: Update a log profile. | ||
examples: | ||
- name: Update a log profile. (autogenerated) | ||
text: az monitor log-profiles update --name MyLogProfile --set retentionPolicy.days=365 | ||
text: | | ||
az monitor log-profiles update --name MyLogProfile --set retentionPolicy.days=365 | ||
crafted: true | ||
""" | ||
|
||
|
@@ -1006,7 +1059,8 @@ | |
short-summary: Delete a metrics-based alert rule. | ||
examples: | ||
- name: Delete a metrics-based alert rule. (autogenerated) | ||
text: az monitor metrics alert delete --name MyAlertRule --resource-group MyResourceGroup | ||
text: | | ||
az monitor metrics alert delete --name MyAlertRule --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -1015,7 +1069,8 @@ | |
short-summary: List metric-based alert rules. | ||
examples: | ||
- name: List metric-based alert rules. (autogenerated) | ||
text: az monitor metrics alert list --resource-group MyResourceGroup | ||
text: | | ||
az monitor metrics alert list --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -1024,7 +1079,8 @@ | |
short-summary: Show a metrics-based alert rule. | ||
examples: | ||
- name: Show a metrics-based alert rule. (autogenerated) | ||
text: az monitor metrics alert show --name MyAlertRule --resource-group MyResourceGroup | ||
text: | | ||
az monitor metrics alert show --name MyAlertRule --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -1056,7 +1112,8 @@ | |
short-summary: Space-separated list of action group names to remove. | ||
examples: | ||
- name: Update a metric-based alert rule. (autogenerated) | ||
text: az monitor metrics alert update --enabled true --name MyAlertRule --resource-group MyResourceGroup | ||
text: | | ||
az monitor metrics alert update --enabled true --name MyAlertRule --resource-group MyResourceGroup | ||
crafted: true | ||
""" | ||
|
||
|
@@ -1135,6 +1192,7 @@ | |
short-summary: Lists the metric definitions for the resource. | ||
examples: | ||
- name: Lists the metric definitions for the resource. (autogenerated) | ||
text: az monitor metrics list-definitions --resource /subscriptions/{subscriptionID}/resourceGroups/Space1999/providers/Microsoft.Network/networkSecurityGroups/ADDS-NSG | ||
text: | | ||
az monitor metrics list-definitions --resource /subscriptions/{subscriptionID}/resourceGroups/Space1999/providers/Microsoft.Network/networkSecurityGroups/ADDS-NSG | ||
crafted: true | ||
""" |
Oops, something went wrong.