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
8 changes: 4 additions & 4 deletions src/azure-cli/azure/cli/command_modules/util/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
type: command
short-summary: Invoke a custom request.
long-summary: >
This command automatically authenticates using the credential logged in: If Authorization header is not set, it
This command automatically authenticates using the logged-in credential: If Authorization header is not set, it
attaches header `Authorization: Bearer <token>`, where `<token>` is retrieved from AAD. The target resource of the
token is derived from --url if --url starts with an endpoint from `az cloud show --query endpoints`. You may also
use --resource for a custom resource.
Expand All @@ -21,16 +21,16 @@
examples:
- name: Get Audit log through Microsoft Graph
text: >
az rest --method get --uri https://graph.microsoft.com/beta/auditLogs/directoryAudits
az rest --method get --url https://graph.microsoft.com/beta/auditLogs/directoryAudits
- name: Update a Azure Active Directory Graph User's display name
text: >
az rest --method patch --uri "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body "{\\"displayName\\": \\"jondoe2\\"}"
az rest --method patch --url "https://graph.microsoft.com/v1.0/users/johndoe@azuresdkteam.onmicrosoft.com" --body "{\\"displayName\\": \\"jondoe2\\"}"
- name: Get a virtual machine
text: >
az rest --method get --uri /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}?api-version=2019-03-01
- name: Create a public IP address from body.json file
text: >
az rest --method put --uri https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}?api-version=2019-09-01 --body @body.json
az rest --method put --url https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}?api-version=2019-09-01 --body @body.json
"""

Copy link
Contributor

Choose a reason for hiding this comment

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

--uri /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}?api-version=2019-03-01
--url https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}?api-version=2019-09-01

So our current specification is that if it's a URL parameter we should use --url, and if it's not a URL parameter we should use --uri, right?

helps['version'] = """
Expand Down
Loading