Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 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
31 changes: 24 additions & 7 deletions src/azure-cli/azure/cli/command_modules/monitor/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,10 @@
- name: --reset
short-summary: Remove all the existing scopes before add new scopes.
examples:
- name: Add three levels of scopes into activity-log alert.
text: >
az monitor activity-log alert scope add -n {AlertName} -g {ResourceGroup} -s /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \\
/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG \\
/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/Microsoft.KeyVault/vaults/mykey
- name: Add scopes to this activity log alert. (autogenerated)
text: |
az monitor activity-log alert scope add --name MyActivityLogAlerts --resource-group MyResourceGroup --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myRG/Microsoft.KeyVault/vaults/mykey
crafted: true
"""

helps['monitor activity-log alert scope remove'] = """
Expand Down Expand Up @@ -499,6 +498,10 @@
text: |
az monitor alert update --name MyAlertRule --remove-action email [email protected] --resource-group MyResourceGroup
crafted: true
- name: Update a classic metric-based alert rule. (autogenerated)
text: |
az monitor alert update --name MyAlertRule --resource-group MyResourceGroup --set retentionPolicy.days=365
crafted: true
"""

helps['monitor autoscale'] = """
Expand Down Expand Up @@ -605,7 +608,11 @@
--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"
az monitor autoscale profile create --autoscale-name MyAutoscale --copy-rules default --count 2 --end 2018-12-26 --max-count 10 --min-count 1 --name Christmas --recurrence week sat sun --resource-group MyResourceGroup --start 2018-12-24 --timezone "Pacific Standard Time"
crafted: true
- name: Create a fixed or recurring autoscale profile. (autogenerated)
text: |
az monitor autoscale profile create --autoscale-name MyAutoscale --count 2 --max-count 10 --min-count 1 --name Christmas --recurrence week sat sun --resource-group MyResourceGroup --start 2018-12-24 --subscription MySubscription --timezone "Pacific Standard Time"
crafted: true
"""

Expand Down Expand Up @@ -929,7 +936,7 @@
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
az monitor log-analytics workspace list-usages --resource-group MyResourceGroup --subscription MySubscription --workspace-name MyWorkspace
crafted: true
"""

Expand All @@ -946,11 +953,21 @@
helps['monitor log-analytics workspace pack enable'] = """
type: command
short-summary: Enable an intelligence pack for a given workspace.
examples:
- name: Enable an intelligence pack for a given workspace. (autogenerated)
text: |
az monitor log-analytics workspace pack enable --name MyIntelligencePack --resource-group MyResourceGroup --workspace-name MyWorkspace
crafted: true
"""

helps['monitor log-analytics workspace pack list'] = """
type: command
short-summary: List all the intelligence packs possible and whether they are enabled or disabled for a given workspace.
examples:
- name: List all the intelligence packs possible and whether they are enabled or disabled for a given workspace. (autogenerated)
text: |
az monitor log-analytics workspace pack list --resource-group MyResourceGroup --workspace-name MyWorkspace
crafted: true
"""

helps['monitor log-analytics workspace show'] = """
Expand Down
64 changes: 54 additions & 10 deletions src/azure-cli/azure/cli/command_modules/network/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
text: az network application-gateway frontend-ip update -g MyResourceGroup --gateway-name MyAppGateway \\ -n MyFrontendIp --public-ip-address MyNewPublicIpAddress
- name: Update a frontend IP address. (autogenerated)
text: |
az network application-gateway frontend-ip update --gateway-name MyAppGateway --name MyFrontendIp --resource-group MyResourceGroup --set useRemoteGateways=true
az network application-gateway frontend-ip update --gateway-name MyAppGateway --name MyFrontendIp --private-ip-address 10.10.10.50 --resource-group MyResourceGroup
crafted: true
"""

Expand Down Expand Up @@ -403,6 +403,10 @@
examples:
- name: Delete a probe.
text: az network application-gateway probe delete -g MyResourceGroup --gateway-name MyAppGateway -n MyProbe
- name: Delete a probe. (autogenerated)
text: |
az network application-gateway probe delete --gateway-name MyAppGateway --name MyProbe --resource-group MyResourceGroup --subscription MySubscription
crafted: true
"""

helps['network application-gateway probe list'] = """
Expand Down Expand Up @@ -1122,6 +1126,11 @@
helps['network application-gateway waf-policy list'] = """
type: command
short-summary: List application gateway WAF policies.
examples:
- name: List application gateway WAF policies. (autogenerated)
text: |
az network application-gateway waf-policy list --resource-group MyResourceGroup
crafted: true
"""

helps['network application-gateway waf-policy policy-setting'] = """
Expand All @@ -1132,6 +1141,11 @@
helps['network application-gateway waf-policy policy-setting update'] = """
type: command
short-summary: Update properties of a web application firewall global configuration.
examples:
- name: Update properties of a web application firewall global configuration. (autogenerated)
text: |
az network application-gateway waf-policy policy-setting update --mode Prevention --policy-name MyPolicy --resource-group MyResourceGroup
crafted: true
"""

helps['network application-gateway waf-policy policy-setting list'] = """
Expand Down Expand Up @@ -1207,6 +1221,11 @@
helps['network application-gateway waf-policy custom-rule update'] = """
type: command
short-summary: Update an application gateway WAF policy custom rule.
examples:
- name: Update an application gateway WAF policy custom rule. (autogenerated)
text: |
az network application-gateway waf-policy custom-rule update --name MyWAFPolicyRule --policy-name MyPolicy --resource-group MyResourceGroup --set useRemoteGateways=true
crafted: true
"""

helps['network application-gateway waf-policy managed-rule'] = """
Expand Down Expand Up @@ -1243,7 +1262,6 @@
- name: Remove a managed rule set by rule set group name if rule_group_name is specified. Otherwise, remove all rule set.
text: |
az network application-gateway waf-policy managed-rule rule-set remove --policy-name MyPolicy --resource-group MyResourceGroup --type Permanent --version IPv4
crafted: true
"""

helps['network application-gateway waf-policy managed-rule rule-set list'] = """
Expand Down Expand Up @@ -1289,10 +1307,6 @@
text: |
az network application-gateway waf-policy update --add communities='12076:5010' --name MyApplicationGatewayWAFPolicy --resource-group MyResourceGroup
crafted: true
- name: Update an application gateway WAF policy. (autogenerated)
text: |
az network application-gateway waf-policy update --name MyApplicationGatewayWAFPolicy --remove tags.no_80 --resource-group MyResourceGroup
crafted: true
Copy link
Contributor

@haroldrandom haroldrandom Mar 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aladdin observed that usage pattern changed over time. So delete this.

"""

helps['network application-gateway waf-policy wait'] = """
Expand Down Expand Up @@ -1423,6 +1437,10 @@
examples:
- name: Add a Vnet to a DDoS protection plan in the same subscription.
text: az network ddos-protection update -g MyResourceGroup -n MyDdosPlan --vnets MyVnet
- name: Update a DDoS protection plan. (autogenerated)
text: |
az network ddos-protection update --name MyDdosPlan --remove tags.no_80 --resource-group MyResourceGroup
crafted: true
"""

helps['network dns'] = """
Expand Down Expand Up @@ -1758,6 +1776,10 @@
examples:
- name: Create an empty MX record set.
text: az network dns record-set mx create -g MyResourceGroup -z www.mysite.com -n MyRecordSet
- name: Create an empty MX record set. (autogenerated)
text: |
az network dns record-set mx create --name MyRecordSet --resource-group MyResourceGroup --ttl 30 --zone-name www.mysite.com
crafted: true
Comment on lines 1777 to +1782
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commands in the autogenerated document has a few more parameters. Could the name describe these parameters more, so as to be different from the above name.

"""

helps['network dns record-set mx delete'] = """
Expand Down Expand Up @@ -2638,6 +2660,11 @@
helps['network express-route port update'] = """
type: command
short-summary: Update settings of an ExpressRoute port.
examples:
- name: Update settings of an ExpressRoute port (autogenerated)
text: |
az network express-route port update --name MyExpressRoutePort --resource-group MyResourceGroup
crafted: true
"""

helps['network express-route port identity'] = """
Expand Down Expand Up @@ -2883,6 +2910,10 @@
text: |
az network lb inbound-nat-pool update --backend-port 8080 --enable-tcp-reset true --frontend-port-range-end 89 --frontend-port-range-start 80 --lb-name MyLb --name MyNatPool --resource-group MyResourceGroup
crafted: true
- name: Update an inbound NAT address pool. (autogenerated)
text: |
az network lb inbound-nat-pool update --enable-tcp-reset true --lb-name MyLb --name MyNatPool --protocol Udp --resource-group MyResourceGroup
crafted: true
"""

helps['network lb inbound-nat-rule'] = """
Expand Down Expand Up @@ -3007,10 +3038,6 @@
text: |
az network lb outbound-rule update --lb-name MyLb --name MyOutboundRule --outbound-ports 10000 --resource-group MyResourceGroup
crafted: true
- name: Update an outbound-rule. (autogenerated)
text: |
az network lb outbound-rule update --frontend-ip-configs myfrontendoutbound --lb-name MyLb --name MyOutboundRule --resource-group MyResourceGroup
crafted: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aladdin observed that usage pattern changed over time. So delete this

"""

helps['network lb probe'] = """
Expand Down Expand Up @@ -3683,6 +3710,11 @@
helps['network private-link-service delete'] = """
type: command
short-summary: Delete a private link service.
examples:
- name: Delete a private link service. (autogenerated)
text: |
az network private-link-service delete --name MyPrivateLinkService --resource-group MyResourceGroup
crafted: true
"""

helps['network private-link-service list'] = """
Expand Down Expand Up @@ -4300,6 +4332,10 @@
examples:
- name: Update a traffic manager profile to change the TTL to 300.
text: az network traffic-manager profile update -g MyResourceGroup -n MyTmProfile --ttl 300
- name: Update a traffic manager profile. (autogenerated)
text: |
az network traffic-manager profile update --name MyTmProfile --resource-group MyResourceGroup --status Enabled
crafted: true
"""

helps['network vnet'] = """
Expand Down Expand Up @@ -5489,6 +5525,10 @@
examples:
- name: Delete a packet capture session. This only deletes the session and not the capture file.
text: az network watcher packet-capture delete -n packetCaptureName -l westcentralus
- name: Delete a packet capture session. (autogenerated)
text: |
az network watcher packet-capture delete --location westcentralus --name packetCaptureName --subscription MySubscription
crafted: true
"""

helps['network watcher packet-capture list'] = """
Expand All @@ -5497,6 +5537,10 @@
examples:
- name: List all packet capture sessions within a region.
text: az network watcher packet-capture list -l westus
- name: List all packet capture sessions within a resource group (autogenerated)
text: |
az network watcher packet-capture list --location westus --subscription MySubscription
crafted: true
"""

helps['network watcher packet-capture show'] = """
Expand Down
4 changes: 2 additions & 2 deletions src/azure-cli/azure/cli/command_modules/privatedns/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
- name: Update a virtual network link properties to enable registration.
text: >
az network private-dns link vnet update -g MyResourceGroup -n MyLinkName -z www.mysite.com -e True
- name: Update a virtual network link's properties. Does not modify virtual network within the link. (autogenerated)
- name: Update a virtual network link's properties (autogenerated)
text: |
az network private-dns link vnet update --name MyLinkName --registration-enabled true --resource-group MyResourceGroup --tags CostCenter=Marketing --zone-name www.mysite.com
crafted: true
Expand Down Expand Up @@ -169,7 +169,7 @@
-z www.mysite.com --metadata owner=WebTeam
- name: Update an A record set. (autogenerated)
text: |
az network private-dns record-set a update --name MyRecordSet --resource-group MyResourceGroup --set useRemoteGateways=true --zone-name www.mysite.com
az network private-dns record-set a update --name MyRecordSet --resource-group MyResourceGroup --set useRemoteGateways=true --subscription MySubscription --zone-name www.mysite.com
crafted: true
"""

Expand Down
10 changes: 5 additions & 5 deletions src/azure-cli/azure/cli/command_modules/resource/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@
examples:
- name: Show a policy assignment's managed identity. (autogenerated)
text: |
az policy assignment identity show --name MyPolicyAssignment
az policy assignment identity show --name MyPolicyAssignment --scope '/providers/Microsoft.Management/managementGroups/MyManagementGroup'
crafted: true
"""

Expand Down Expand Up @@ -1644,6 +1644,10 @@
- name: Delete a resource level lock on a vnet using a vnet id.
text: >
az resource lock delete -n lockName --resource /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VMName}
- name: Delete a resource-level lock. (autogenerated)
text: |
az resource lock delete --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp}
crafted: true
"""

helps['resource lock list'] = """
Expand Down Expand Up @@ -1704,10 +1708,6 @@
- name: Tag a web app with the key 'vmlist' and value 'vm1', using a resource identifier.
text: >
az resource tag --tags vmlist=vm1 --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp}
- name: Tag a resource. (autogenerated)
text: |
az resource tag --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp} --tags vmlist=vm1
crafted: true
"""

helps['resource update'] = """
Expand Down
24 changes: 8 additions & 16 deletions src/azure-cli/azure/cli/command_modules/storage/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
examples:
- name: Show the storage blob delete-policy. (autogenerated)
text: |
az storage blob service-properties delete-policy show --account-name mystorageccount --account-key 00000000
az storage blob service-properties delete-policy show --account-name mystorageccount
crafted: true
"""

Expand All @@ -620,7 +620,7 @@
examples:
- name: Update the storage blob delete-policy. (autogenerated)
text: |
az storage blob service-properties delete-policy update --account-name mystorageccount --account-key 00000000 --days-retained 7 --enable true
az storage blob service-properties delete-policy update --account-name mystorageccount --days-retained 7 --enable true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you revert here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all reverted

crafted: true
"""

Expand All @@ -630,7 +630,7 @@
examples:
- name: Update storage blob service properties. (autogenerated)
text: |
az storage blob service-properties update --404-document error.html --account-name mystorageccount --account-key 00000000 --index-document index.html --static-website true
az storage blob service-properties update --404-document error.html --account-name mystorageccount --index-document index.html --static-website true
crafted: true
"""

Expand Down Expand Up @@ -662,7 +662,7 @@
text: az storage blob show -c MyContainer -n MyBlob
- name: Get the details of a blob (autogenerated)
text: |
az storage blob show --account-name mystorageccount --account-key 00000000 --container-name MyContainer --name MyBlob
az storage blob show --account-name mystorageccount --container-name MyContainer --name MyBlob
crafted: true
"""

Expand Down Expand Up @@ -752,7 +752,7 @@
crafted: true
- name: Create the url to access a blob (autogenerated)
text: |
az storage blob url --account-name storageacct --account-key 00000000 --container-name container1 --name blob1
az storage blob url --account-name storageacct --container-name container1 --name blob1
crafted: true
"""

Expand Down Expand Up @@ -799,7 +799,7 @@
examples:
- name: Check for the existence of a storage container. (autogenerated)
text: |
az storage container exists --account-name mystorageccount --account-key 00000000 --name mycontainer
az storage container exists --account-name mystorageccount --name mycontainer
crafted: true
"""

Expand All @@ -812,7 +812,7 @@
end=`date -u -d "30 minutes" '+%Y-%m-%dT%H:%MZ'`
sas=`az storage container generate-sas -n mycontainer --https-only --permissions dlrw --expiry $end -o tsv`
az storage blob upload -n MyBlob -c mycontainer -f file.txt --sas-token $sas
- name: Generates a shared access signature for the container (autogenerated)
- name: Generate a shared access signature for the container (autogenerated)
text: |
az storage container generate-sas --account-key 00000000 --account-name mystorageaccount --expiry 2020-01-01 --name mycontainer --permissions dlrw
crafted: true
Expand Down Expand Up @@ -998,7 +998,7 @@
examples:
- name: List directories in a share. (autogenerated)
text: |
az storage directory list --account-name MyAccount --share-name MyShare
az storage directory list --account-key 00000000 --account-name MyAccount --share-name MyShare
crafted: true
"""

Expand Down Expand Up @@ -1179,10 +1179,6 @@
text: |
az storage file download-batch --account-key 00000000 --account-name MyAccount --destination . --no-progress --source /path/to/file
crafted: true
- name: Download files from an Azure Storage File Share to a local directory in a batch operation. (autogenerated)
text: |
az storage file download-batch --destination . --pattern *.py --source /path/to/file
crafted: true
"""

helps['storage file exists'] = """
Expand Down Expand Up @@ -1564,10 +1560,6 @@
text: |
az storage share url --account-key 00000000 --account-name MyAccount --name MyFileShare
crafted: true
- name: Create a URI to access a file share. (autogenerated)
text: |
az storage share url --connection-string $connectionString --name MyFileShare
crafted: true
"""

helps['storage table'] = """
Expand Down
Loading