text:
I can´t Use tag --subnet when I am creating a new LoadBalancer

Describe the bug
When I try to create a new load balancer and specifically use the tag "subnet" i get the error "incorrect usage: --subnet NAME"
Related command
#CreatingTheResourceGroup
$Location="westus2"
$ResourceGroup="WebSiteUS"
az group create --location $Location --name $ResourceGroup

#Creating the VNET
az network vnet create --name "VNET" --resource-group $ResourceGroup --location $Location --enable-encryption false --ddos-protection false --subnet-name "Predeterminado" --subnet-prefixes "10.0.0.0/24"
az network vnet subnet create --name "AzureBastionSubnet"  --resource-group $ResourceGroup --vnet-name "VNET" --address-prefixes "10.0.1.0/26"

#Creating the NIC
az network public-ip create --name "VM" --resource-group $ResourceGroup --location $Location --version "Ipv4" --sku "Standard" --zone 1 --tier "Regional" --dns-name "mio" --dns-name-scope "NoReuse" --ddos-protection-mode "Disabled"
az network nic create --name "NIC" --resource-group $ResourceGroup --vnet-name "VNET" --subnet "Predeterminado" --location $Location --private-ip-address-version "IPv4" --private-ip-address "10.0.0.4" --public-ip-address "VM"

#Creating the NSG and athaching to VNET and NIC
az network nsg create --name "NSG" --resource-group $ResourceGroup --location $Location

az network nsg rule create --name "AllowAnyRDPInbound" --nsg-name "NSG" --resource-group $ResourceGroup --source-port-ranges "" --destination-port-ranges 3389 --protocol "Tcp" --access "Allow" --priority 100
az network nsg rule create --name "AllowAnyHTTPInbound" --nsg-name "NSG" --resource-group $ResourceGroup --source-port-ranges "" --destination-port-ranges 80 --protocol "Tcp" --access "Allow" --priority 110
az network nic update --name "NIC" --resource-group $ResourceGroup --network-security-group "NSG"
az network vnet subnet update --vnet-name "VNET" --name "Predeterminado" --resource-group $ResourceGroup --network-security-group "NSG"

#Creating the NAT
az network public-ip create --name "NAT" --resource-group $ResourceGroup --location $Location --version "Ipv4" --sku "Standard" --zone 1 --tier "Regional" --dns-name "mio" --dns-name-scope "NoReuse" --ddos-protection-mode "Disabled"
az network nat gateway create --name "NAT" --resource-group $ResourceGroup --location $Location --public-ip-addresses "NAT" --zone 1

#Creating the LoadBalancer
az network public-ip create --name "BalancerIP" --resource-group $ResourceGroup --location $Location --version "Ipv4" --sku "Standard" --zone 1 --tier "Regional" --dns-name "mio" --dns-name-scope "NoReuse" --ddos-protection-mode "Disabled"
az network lb create --name "Balancer" --resource-group $ResourceGroup --location $Location --sku "Standard" --frontend-ip-name "IpConfFront" --private-ip-address-version "IPv4" --public-ip-address "BalancerIP" --vnet-name "VNET" --subnet "Predeterminado"

Errors
incorrect usage: --subnet NAME --vnet-name NAME | --subnet ID | --public-ip-address NAME_OR_ID

Issue script & Debug output
cli.knack.cli: Command arguments: ['network', 'lb', 'create', '--name', 'Balancer', '--resource-group', 'WebSiteUS', '--location', 'westus2', '--sku', 'Standard', '--frontend-ip-name', 'IpConfFront', '--private-ip-address-version', 'IPv4', '--public-ip-address', 'BalancerIP', '--vnet-name', 'VNET', '--subnet', 'Predeterminado', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x020519D8>, <function OutputProducer.on_global_arguments at 0x02193578>, <function CLIQuery.on_global_arguments at 0x02199078>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'network': ['azure.cli.command_modules.network', 'azure.cli.command_modules.privatedns']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: network                   0.925       124       486
cli.azure.cli.core: privatedns                0.036        14        60
cli.azure.cli.core: Total (2)                 0.960       138       546
cli.azure.cli.core: Loaded 137 groups, 546 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : network lb create
cli.azure.cli.core: Command table: network lb create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04129348>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\JohnMayorga18.azure\commands\2024-12-23.21-08-53.network_lb_create.9960.log'.
az_command_data_logger: command args: network lb create --name {} --resource-group {} --location {} --sku {} --frontend-ip-name {} --private-ip-address-version {} --public-ip-address {} --vnet-name {} --subnet {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x04150028>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x04150078>, <function register_cache_arguments..add_cache_arguments at 0x041780C8>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x04178118>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x021935C8>, <function CLIQuery.handle_query_parameter at 0x021990C8>, <function register_ids_argument..parse_ids_arguments at 0x04178078>]
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/invocation.py", line 111, in _validation
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 911, in _validate_cmd_level
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/network/_validators.py", line 560, in process_lb_create_namespace
ValueError: incorrect usage: --subnet NAME --vnet-name NAME | --subnet ID | --public-ip-address NAME_OR_ID
cli.azure.cli.core.azclierror: incorrect usage: --subnet NAME --vnet-name NAME | --subnet ID | --public-ip-address NAME_OR_ID
az_command_data_logger: incorrect usage: --subnet NAME --vnet-name NAME | --subnet ID | --public-ip-address NAME_OR_ID
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04129488>]
az_command_data_logger: exit code: 2
cli.main: Command ran in 1.447 seconds (init: 0.403, invoke: 1.044)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3919 in cache file under C:\Users\JohnMayorga18.azure\telemetry\20241223210853457
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\JohnMayorga18.azure C:\Users\JohnMayorga18.azure\telemetry\20241223210853457"
telemetry.process: Return from creating process 12164
telemetry.main: Finish creating telemetry upload process.
Expected behavior
The expected behavior is creating a new LoadBalancer using AzCLI and atach that LoadBalancer to the Subnet on the created VNET.
Environment Summary
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Windows\system32> az --version
azure-cli                         2.67.0
core                              2.67.0
telemetry                          1.1.0
Dependencies:
msal                              1.31.0
azure-mgmt-resource               23.1.1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\JohnMayorga18.azure\cliextensions'
Python (Windows) 3.12.7 (tags/v3.12.7:0b05ead, Oct  1 2024, 02:44:45) [MSC v.1941 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
There is not an error if I quit the tag "--subnet", the command is executed successfully.
But I tried to use the AzureID for that subnet and I get the same error and I have verified that the VNET and Subnet on that VNET has on the same region and I checked the names 3 times.
So on that documentation  says when I use the parameter --subnet I must to reference to VNET and FrontIP

Thank you for opening this issue, we will look into it.

the error msg means we cannot input --subnet and --public-ip-address at the same time

Yes u r right so, I think that the MicrosoftDocs or the error message may specify that recommendation.
If I see the tag  --subnet I suppose to reference the subnet on that VNET on any space I dont see that advice.
It would be useful to agree this on the MsDocs or changing the error message.

authors: JohnMayorga18 necusjz yonzhan


text:
issue in trying to logged in in azure container registry (acr)

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az acr login
Errors:
('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
Traceback (most recent call last):
pip-install-v0p8dbpk\urllib3\urllib3\connectionpool.py, ln 600, in urlopen
pip-install-v0p8dbpk\urllib3\urllib3\connectionpool.py, ln 384, in _make_request
<string>, ln 2, in raise_from
pip-install-v0p8dbpk\urllib3\urllib3\connectionpool.py, ln 380, in _make_request
CLI2\lib\http\client.py, ln 1331, in getresponse
    response.begin()
CLI2\lib\http\client.py, ln 297, in begin
    version, status, reason = self._read_status()
CLI2\lib\http\client.py, ln 266, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

...

pip-install-wl9gly17\requests\requests\sessions.py, ln 646, in send
pip-install-wl9gly17\requests\requests\adapters.py, ln 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az acr login --name {}

Expected Behavior
Environment Summary
Windows-10-10.0.17763-SP0
Python 3.6.6
Shell: cmd.exe

azure-cli 2.0.67

Additional Context

issue solved, just try to re run the command

source: gharchive/issue

repo: Azure/azure-cli

license: MIT

license_type: permissive

license_source: github-api


text:
fix typo trandfer -> transfer

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

add to S173

source: gharchive/pull-request

authors: basnijholt yonzhan


text:
[Network] az network application-gateway waf-policy create: support version and type

Description

Fix #14499
Fix #14360
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

Network

authors: MyronFanQiu yonzhan


text:
Improvements to context/cloud commands

Log info on the current active cloud to --debug.
Add known clouds to config file as well.
Show logger messages when switching cloud.
Handle cloud switching in more user friendly way.
Set cloud with CLI commands or AZURE_CLOUD_NAME env var.
New commands ’az cloud set —name ’ and az cloud update (closes https://github.com/Azure/azure-cli/issues/1712)
Remove context.
Remove configuration support for each context.
Remove context options from ‘az configure’.
Remove azure-cli-context command module.
Blacklist the ‘context’ module to prevent it from being loaded.

Closes https://github.com/Azure/azure-cli/issues/1633

New command help:
$ az cloud set --help

Command
    az cloud set

Arguments
    --name -n [Required]: Name of the registered cloud.

$ az cloud update --help

Command
    az cloud update

Arguments
    --cloud-config
    --default-subscription                                    : Name or id of the default
                                                                subscription to be used when
                                                                switching cloud.
    --endpoint-active-directory
    --endpoint-active-directory-graph-resource-id
    --endpoint-active-directory-resource-id
    --endpoint-gallery
    --endpoint-management
    --endpoint-resource-manager
    --endpoint-sql-management
    --name -n                                                 : Name of the registered cloud. If not
                                                                specified, we use the current active
                                                                cloud.
    --suffix-azure-datalake-analytics-catalog-and-job-endpoint
    --suffix-azure-datalake-store-file-system-endpoint
    --suffix-keyvault-dns
    --suffix-sql-server-hostname
    --suffix-storage-endpoint

EXAMPLES OF USE
Log in to China Cloud.
$ az cloud set -n AzureChinaCloud
Switched active cloud to AzureChinaCloud.
Use 'az login' if not logged in to this cloud.
Use 'az account set' to switch the active subscription.

$ az login
To sign in, use a web browser to open the page https://aka.ms/deviceloginchina and enter the code ... to authenticate.

$ az resource list
[...]

Switch back to Public Azure:
$ az cloud set -n AzureCloud
Switched active cloud to AzureCloud.
Active subscription switched to '0b1f6471-1bf0-4dda-aec3-cb9272f09590'.

$ az resource list
[...]

Switch to a cloud with an environment variable:
$ export AZURE_CLOUD_NAME=AzureChinaCloud
$ az account set --subscription <china-cloud-subscription>
$ az resource list

If there are multiple subscriptions available for a cloud, specify the --default-subscription to use when switching to that cloud:
$ az cloud update --default-subscription <my-main-subscription>
$ az cloud set -n AzureCloud
Switched active cloud to AzureCloud.
Active subscription switched to '<my-main-subscription>'.

Marked as do not merge whilst I remove the default-subscription.

Will open a new PR so there isn't confusion with the old comments I posted.


text:
[App Service] az webapp config ssl upload: Fix #14729

Related command

az webapp config ssl upload
Description

Fixes #14729. Raises a more helpful error message if the user passes in the wrong password for their certificate.
Testing Guide

az webapp config ssl upload -n <site-name> -g <rg> --certificate-file <path-to-pfx> --certificate-password <wrong-password>
History Notes

This checklist is used to make sure that common guidelines for a pull request are followed.

[X] The PR title and description has followed the guideline in Submitting Pull Requests.

[X] I adhere to the Command Guidelines.

[X] I adhere to the Error Handling Guidelines.

App Service

authors: StrawnSC yonzhan


text:
{CI} Put the cloud module at the end of the serial execution to avoid affecting other tests.

Related command

Description

Now the test is to dynamically allocate the modules that need to be tested for each instance.
PR #26785  adds a module graphservices. Due to the adjustment of dynamic allocation, on instance 7, we will test the cloud and acr modules in turn. There is a test test_get_docker_credentials in acr that will fail, and the error is as follows:
E ValueError: OIDC Discovery failed on https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration. HTTP status: 400, Error: {"error":"invalid_tenant","error_description":"AADSTS900021: Requested tenant identifier '00000000-0000-0000-0000-000000000000' is not valid. Tenant identifiers may not be an empty GUID.\r\nTrace ID: 4f691ff2-1fd0-4261-ab70-e1bf37b54600\r\nCorrelation ID: 5ee5b4ef-52f7-48d6-8e24-351d067c7bac\r\nTimestamp: 2023-07-05 08:16:30Z","error_codes":[900021],"timestamp":"2023-07-05 08:16:30Z","trace_id":"4f691ff2-1fd0-4261-ab70-e1bf37b54600","correlation_id":"5ee5b4ef-52f7-48d6-8e24-351d067c7bac"}

During handling of the above exception, another exception occurred:
E ValueError: Unable to get authority configuration for https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000. Authority would typically be in a format of https://login.microsoftonline.com/your_tenant Also please double check your tenant name or GUID is correct.

The reason is that after the cloud test is completed, some changes have been made and are not restored in tearDown. Since the specific reason is not yet determined, the workaround is to put the cloud module at the end for testing to eliminate the impact.
Test screenshot:

TODO:
Find the root cause of the failure and modify the relevant test code.
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

CI

/azp run

The error is caused by performing tenant discovery on mock tenant 00000000-0000-0000-0000-000000000000 by calling https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration
https://github.com/Azure/azure-cli/blob/30216d0268f3491b8af2aa060d90a9e1f94f9b3c/src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/const.py#L8
My gut feeling tells me this may not be caused by cloud command module, but I need to know where the error is raised. However, it seems the full call stack has been redacted from the CI output by the current testing framework:
https://dev.azure.com/azclitools/public/_build/results?buildId=69514&view=logs&j=1e2e30e3-4bd9-5efc-001c-b6595870bcf5&t=6acccfdf-22ef-5935-fc1e-7a7302be73cb&l=1920
"Content": "|Type|Test Case|Error Message|Line|\n|---|---|---|---|\n|Failed|test_get_docker_credentials|E   ValueError: OIDC Discovery failed on https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration. HTTP status: 400, Error: {\"error\":\"invalid_tenant\",\"error_description\":\"AADSTS900021: Requested tenant identifier '00000000-0000-0000-0000-000000000000' is not valid. Tenant identifiers may not be an empty GUID.\\r\\nTrace ID: 4f691ff2-1fd0-4261-ab70-e1bf37b54600\\r\\nCorrelation ID: 5ee5b4ef-52f7-48d6-8e24-351d067c7bac\\r\\nTimestamp: 2023-07-05 08:16:30Z\",\"error_codes\":[900021],\"timestamp\":\"2023-07-05 08:16:30Z\",\"trace_id\":\"4f691ff2-1fd0-4261-ab70-e1bf37b54600\",\"correlation_id\":\"5ee5b4ef-52f7-48d6-8e24-351d067c7bac\"}

During handling of the above exception, another exception occurred:
E   ValueError: Unable to get authority configuration for https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000. Authority would typically be in a format of https://login.microsoftonline.com/your_tenant Also please double check your tenant name or GUID is correct.|azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py:1141|\n"

Can we get the full call stack back?

The error is caused by performing tenant discovery on mock tenant 00000000-0000-0000-0000-000000000000 by calling https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration
https://github.com/Azure/azure-cli/blob/30216d0268f3491b8af2aa060d90a9e1f94f9b3c/src/azure-cli-testsdk/azure/cli/testsdk/scenario_tests/const.py#L8
My gut feeling tells me this may not be caused by cloud command module, but I need to know where the error is raised. However, it seems the full call stack has been redacted from the CI output by the current testing framework:
https://dev.azure.com/azclitools/public/_build/results?buildId=69514&view=logs&j=1e2e30e3-4bd9-5efc-001c-b6595870bcf5&t=6acccfdf-22ef-5935-fc1e-7a7302be73cb&l=1920
"Content": "|Type|Test Case|Error Message|Line|\n|---|---|---|---|\n|Failed|test_get_docker_credentials|E   ValueError: OIDC Discovery failed on https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration. HTTP status: 400, Error: {\"error\":\"invalid_tenant\",\"error_description\":\"AADSTS900021: Requested tenant identifier '00000000-0000-0000-0000-000000000000' is not valid. Tenant identifiers may not be an empty GUID.\\r\\nTrace ID: 4f691ff2-1fd0-4261-ab70-e1bf37b54600\\r\\nCorrelation ID: 5ee5b4ef-52f7-48d6-8e24-351d067c7bac\\r\\nTimestamp: 2023-07-05 08:16:30Z\",\"error_codes\":[900021],\"timestamp\":\"2023-07-05 08:16:30Z\",\"trace_id\":\"4f691ff2-1fd0-4261-ab70-e1bf37b54600\",\"correlation_id\":\"5ee5b4ef-52f7-48d6-8e24-351d067c7bac\"}

During handling of the above exception, another exception occurred:
E   ValueError: Unable to get authority configuration for https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000. Authority would typically be in a format of https://login.microsoftonline.com/your_tenant Also please double check your tenant name or GUID is correct.|azure/cli/command_modules/acr/tests/latest/test_acr_commands_mock.py:1141|\n"

Can we get the full call stack back?

I test in this PR, If don't test it with cloud module, ci won't report an error.
Full call stack

authors: jiasli jsntcy wangzelin007 yonzhan


text:
[App Service] az webapp deploy and az webapp deployment using local file: Added checksum header to check file integrity in service, for linux app service

Related command
az webapp deploy
az webapp deployment source config-zip
Description
For Linux app service, we have been seeing multiple customer issues where the service side logs indicate that the file sent in the deployment request is corrupt. But we do not know the source of these errors - client, network or service.
Adding file checksum to the request header and matching that with the checksum computed on the service side would enable us to identify the root cause of these errors.
This change is only for linux app service.
Testing Guide
Tested the following scenarios using args in launch.json

az webapp deploy -g sumali-prod-test-2023 -n dotnet-8-3108 --src-path D:\test\net8.0.zip
az webapp deployment source config-zip -g sumali-prod-test-2023 -n dotnet-8-3108 --src D:\test\net8.0.zip

History Notes

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

App Service

please fix the style check issue: https://dev.azure.com/azclitools/public/_build/results?buildId=176994&view=logs&j=36dd4138-4d53-5e46-00d9-e5cd9744be05&t=1cf3879c-0a42-5ccd-7693-7a4781d739d8

please fix the style check issue: https://dev.azure.com/azclitools/public/_build/results?buildId=176994&view=logs&j=36dd4138-4d53-5e46-00d9-e5cd9744be05&t=1cf3879c-0a42-5ccd-7693-7a4781d739d8

Fixed

authors: ShilpiRachna1 yanzhudd yonzhan


text:
Fixes #2950 : Support for browse to command to launch the custom domain URL if present

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[ ] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

Command Guidelines

[ ] Each command and parameter has a meaningful description.
[ ] Each new command has a test.

(see Authoring Command Modules)

View a preview at https://prompt.ws/r/Azure/azure-cli/5022
This is an experimental preview for @microsoft.com users.
(It may take a minute or two for your instance to be ready)
Email feedback to 'azfeedback' with subject 'Prompt Feedback'.

To merge after knack conversion.

authors: azuresdkci panchagnula yugangw-msft


text:
test: use declarator to enable large payload response

//CC: @tjprescott  @troydai @lmazuel
Another way to support scenario tests playback with large response

I keep the #5568 open so we can compare the pros and cons
The current LargeResponseProcessor only works for non-json payload, which is why storage test works, but every json payload based test will NOT work as the tweaking causes invalid json content. Hence I suggest, for big json payload, we just raise in the LargeResponseProcessor and tell users to use the new flag to opt-in big size, for other types we will still tweak like we are doing now, so storage tests continue work with shrunken recordings

Since this has no end user impacts, I don't have strong opinions towards either options, so just tell me which one you prefer
General Guidelines

[na] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

Command Guidelines

[na] Each command and parameter has a meaningful description.
[na] Each new command has a test.

(see Authoring Command Modules)

View a preview at https://prompt.ws/r/Azure/azure-cli/5588
This is an experimental preview for @microsoft users.

Fixes #4127.

Actually... one more comment.  This should really be in devtools.  If you plan on making a change in devtools that fails the recording if a large response body is encountered with JSON... then it can't direct them to a fix that only exists in the CLI.  That fix would also need to be in devtools.

Close it and i am moving the change to devtools https://github.com/Azure/azure-python-devtools/pull/38

authors: promptws tjprescott yugangw-msft


text:
[NPM] default deny all and yet have DNS resolution

Is this a request for help?:
Yes

Is this an ISSUE or FEATURE REQUEST? (choose one):
No

Which release version?:
1.27 or later

Which component (CNI/IPAM/CNM/CNS):
NPM

Which Operating System (Linux/Windows):
Linux

For Linux: Include Distro and kernel version using "uname -a"

For windows: provide output of "$(Get-ItemProperty -Path "C:\windows\system32\hal.dll").VersionInfo.FileVersion"

Which Orchestrator and version (e.g. Kubernetes, Docker)
Kubernetes (AKS)

What happened:
just trying to understand whether the following code is appending by default access to kube-system (I'm particuraly interested in CoreDNS): https://github.com/Azure/azure-container-networking/commit/36f188cfc9d9947f58a8399b50ec07b471b8f170#diff-60fb2faa40c1933d596fafaa23977f04R102-R126

What you expected to happen:
If above assumption is correct, I'd have expected this not to happen and being blocked to access CoreDNS.

How to reproduce it (as minimally and precisely as possible):
Create a basic aks with azure plugin + azure policy and create a default-deny-all rule. You shoul not be able to access CoreDNS.

Anything else we need to know:
Is this officially documented?

Fixed in https://github.com/Azure/azure-container-networking/pull/449

thanks for this @jaer-tsun just wanted to mention that it looks like a breaking change for Azure Network Policy Manager, the expected behavior based on my understand though.

authors: ferantivero jaer-tsun

repo: Azure/azure-container-networking


text:
Update dns-getstarted-create-dnszone.md to remove feature registration step

Remove 'Sign up to the Azure DNS Public Preview' section since we are turning off the need to register to use this service.

@jtuliani - Are these the same changes that Joao pushed through from the private repo? Note this pull request has a merge conflict now, probably due to changes coming from both private and public. Closing for now, let me know if it needs to be reopened.

authors: jtuliani tysonn

repo: Azure/azure-content


text:
Fix broken link

Need to add the missing .md to the link in the TIP section:
Change link from
[Check it out](remoteapp-image-on-azurevm)
to
[Check it out](remoteapp-image-on-azurevm.md)

Hi @tpconroy, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

authors: azurecla tpconroy


text:
Would it be possible to add [DataContract] to the spatial classes

Service Fabric does not natively support Json serialization. It would be really helpful if the spatial classes were marked with DataContract so they could be more easily passed around by Service Fabric services and actors.

@jackbond Is this a blocker in your current project? We have this in the roadmap but if you are blocked we can take that into account to prioritize.

Well I could say it was a blocker, but at this point it's really just an inconvenience. The reality is, the Service Fabric guys have provided a means to write custom serializers for their actor and service calls, but it's full of gotchyas. For example, we wrote one so that we could pass our objects that have a property of DocumentDb.Spatial.Point, but then that messed up the serialization of Exceptions (which I haven't had the time to figure out if there is a workaround.)
Fundamentally, I don't know how much work it would take for you guys to support DataContract, but it does seem that two core Azure services should play a little nicer together. :)

I agree. We'll keep it in the roadmap for GA to support this scenario :)

Are you guys planning another preview? The lack of spatial support in the existing preview makes it rather difficult to experiment with. Thanks.

Hi @jackbond ,
We are planning do to another release soon. After that release we will move to using this repository as the actual source control.

authors: ealsur j82w jackbond


text:
FakeItEasy mock samples

Not an exhaustive list but covers core groups of related types.
For *Properties.[Etag]/[LastModified] used reflection, which is a gap and documented in the helper.

/AzurePipelines run

Lets chat more tomorrow.

UT vs Samples/Usage
Naming

Lets move these two samples/usage.

i see this was last worked on Aug 15, it has since been approved, but has not yet been merged. Could we please get this merged as these samples would be VERY useful for everyone working with this SDK.

i see this was last worked on Aug 15, it has since been approved, but has not yet been merged. Could we please get this merged as these samples would be VERY useful for everyone working with this SDK.

Cosmos DB SDK Team: Please bring some attention back to this 🙏🏼

Closing since there has been no update for over 30 days. Please re-open if necessary.

Closing since there has been no update for over 30 days. Please re-open if necessary.

authors: SarahSexton j82w kirankumarkolli ryancrawcour


text:
[Issue] The azd feature doesn't work for some dev containers

[X] Make sure you've installed the latest version using instructions in the wiki

Output from azd version
Whatever version is used by the azd feature.
Describe the bug
We are trying to add the azd feature to our repo, but we get a bug upon building.
Here's a snippet from the logs:
[2023-07-17T17:22:12.587Z]  => ERROR [internal] load metadata for docker.io/library/dev_container_fe  2.3s
 => CANCELED [internal] load metadata for docker.io/library/python:3.11    2.3s
 => [auth] library/python:pull token for registry-1.docker.io              0.0s
 => [auth] library/dev_container_feature_content_temp:pull token for regi  0.0s
------
 > [internal] load metadata for docker.io/library/dev_container_feature_content_temp:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
[2023-07-17T17:22:12.605Z] Stop (2925 ms): Run: docker-compose --project-name azure-django-postgres-aca-fork -f /Users/pamelafox/azure-django-postgres-aca-fork/docker-compose.yml -f /Users/pamelafox/azure-django-postgres-aca-fork/.devcontainer/docker-compose_dev.yml -f /Users/pamelafox/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1689614529680.yml build
[2023-07-17T17:22:12.605Z] Error: Command failed: docker-compose --project-name azure-django-postgres-aca-fork -f /Users/pamelafox/azure-django-postgres-aca-fork/docker-compose.yml -f /Users/pamelafox/azure-django-postgres-aca-fork/.devcontainer/docker-compose_dev.yml -f /Users/pamelafox/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1689614529680.yml build
[2023-07-17T17:22:12.606Z]     at fC (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:1995:412)
[2023-07-17T17:22:12.606Z]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-07-17T17:22:12.606Z]     at async qte (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:1995:2381)
[2023-07-17T17:22:12.606Z]     at async Ute (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:1977:3170)
[2023-07-17T17:22:12.606Z]     at async hre (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:2047:3833)
[2023-07-17T17:22:12.606Z]     at async Zf (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:2047:4775)
[2023-07-17T17:22:12.606Z]     at async Bne (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:2179:12193)
[2023-07-17T17:22:12.606Z]     at async Rne (/Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js:2179:11934)
[2023-07-17T17:22:12.612Z] Stop (9785 ms): Run: /Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node /Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/pamelafox/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-7cfebeec-52da-40ef-b12c-9e02da1584741689614521551 --workspace-folder /Users/pamelafox/azure-django-postgres-aca-fork --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/pamelafox/azure-django-postgres-aca-fork --id-label devcontainer.config_file=/Users/pamelafox/azure-django-postgres-aca-fork/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/pamelafox/azure-django-postgres-aca-fork/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-07-17T17:22:12.612Z] Exit code 1
[2023-07-17T17:22:12.616Z] Command failed: /Applications/Visual Studio Code - Insiders.app/Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/MacOS/Code - Insiders Helper (Plugin) --ms-enable-electron-run-as-node /Users/pamelafox/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.301.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/pamelafox/Library/Application Support/Code - Insiders/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-7cfebeec-52da-40ef-b12c-9e02da1584741689614521551 --workspace-folder /Users/pamelafox/azure-django-postgres-aca-fork --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/pamelafox/azure-django-postgres-aca-fork --id-label devcontainer.config_file=/Users/pamelafox/azure-django-postgres-aca-fork/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/pamelafox/azure-django-postgres-aca-fork/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-07-17T17:22:12.616Z] Exit code 1

To Reproduce
Git checkout this branch:
https://github.com/Azure-Samples/azure-django-postgres-aca/compare/main...pamelafox:azure-django-postgres-aca-fork:add-azd-feat?expand=1
Try to open in a dev container in VS Code on Mac M1.
Environment
Information on your environment:
Version: 1.80.0-insider (Universal)
Commit: 39efe30bfc8e196f5be2119479092bd9eb83e174
Date: 2023-06-30T14:34:06.522Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.5.0
Docker version:
"You're currently on version 4.17.0 (99724). The latest version is 4.20.1 (110738)."

cc @kjaymiller

Just to confirm something I think you mentioned internally, @pamelafox, you've only ever seen this when using docker-compose, right?  When using just a single container for the devcontainer which doesn't involve compose things work as expected?

Yes, and actually, even my simpler docker-compose ones are working fine with the new feature, like https://github.com/pamelafox/django-quiz-app
This one is more complex as it references multiple docker-compose files that are merged together. Not sure if thats the issue or if there's another aspect of the devcontainer.json that's throwing it off.

@hemarina can you investigate on this?

@pamelafox Does it work if we remove this line in docker-compose.yml, to run the local application in arm64 mode? I tested this change with @hemarina today, and it seems to work on my M1 laptop. I think this is what I'd do for software I write as well. The app will still be deployed to ACA cross-compiled for amd64, but locally it runs with arm64.
What we suspect was happening is that the multiple layers of docker build wasn't working well when the base image was using arm64, but one of the compose images was using amd64.

Ah, that was it! Sorry I missed that line, that makes sense.

authors: ellismg pamelafox rajeshkamal5050 weikanglim

repo: Azure/azure-dev


text:
Provide a sugesstion for an environment name during init

This change provides a suggessting for the initial environment name that the user needs to create during azd init.  The suggestion is based on the name of the current directory, suffixed with -main.
In addition, some help text is added to help give users some idea as to what this value is used for.
I had hoped that we would be able to default this value to something like main and simply not ask the question to the user, but that is more difficult than expected, given how azd is used today. Most existing azd templates assume that AZURE_ENV_NAME is going to be used in a way that forces it to be unique across the user's subscription (since it is used to both create the name of the resource group we provision resources into and used to generate the resource suffix that we append to most resources to get unique names)
In addition, even when starting from scratch, our system wants you to tag your resource groups and resources with an azd-env-name tag so that other parts of azd can discover these resources. So even if we hid the concept during init, you'd have to learn about an azd environment as soon as you start interacting with your IaC.
Given that, the best we can do to ease the pain for folks getting started is to provide a reasonable default, and using the name of the current directory (suffixed with something like -main since there can be multiple environments per project) feels reasonable.
Fixes #335

Ends up looking like this in terminal:

You can either hit enter here to accept the default in parens, or start typing your own.  If you hit question mark and enter, you see this help:

Azure Dev CLI Install Instructions
Install scripts
MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134 --version '' --verbose --skip-verify

pwsh:
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134' -Version '' -SkipVerify -Verbose

Windows
PowerShell install
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134' -Version '' -SkipVerify -Verbose;"

MSI install
powershell -c "irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-windows-amd64.msi' -OutFile azd-windows-amd64.msi; msiexec /i azd-windows-amd64.msi /qn"

Standalone Binary

Linux -

x86_64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-linux-amd64.tar.gz
ARM64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-linux-arm64.tar.gz

MacOS -

x86_64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-darwin-amd64.zip
ARM64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-darwin-arm64.zip

Windows - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-windows-amd64.zip

MSI

https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-windows-amd64.msi

Container
docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-2134

Documentation

learn.microsoft.com documentation

title: Azure Developer CLI reference (preview)
description: This article explains the syntax and parameters for the various Azure Developer CLI Preview commands.
author: alexwolftmsft
ms.author: alexwolf
ms.date: 05/08/2023
ms.service: azure-dev-cli
ms.topic: conceptual
ms.custom: devx-track-azdevcli
Azure Developer CLI reference (preview)
This article explains the syntax and parameters for the various Azure Developer CLI Preview commands.
azd
The Azure Developer CLI (azd) is an open-source tool that helps onboard and manage your application on Azure
Options
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
  -h, --help         Gets help for azd.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth: Authenticate with Azure.
azd config: Manage azd configurations (ex: default Azure subscription, location).
azd deploy: Deploy the application's code to Azure.
azd down: Delete Azure resources for an application.
azd env: Manage environments.
azd init: Initialize a new application.
azd monitor: Monitor a deployed application.
azd package: Packages the application's code to be deployed to Azure. (Beta)
azd pipeline: Manage and configure your deployment pipelines.
azd provision: Provision the Azure resources for an application.
azd restore: Restores the application's dependencies.
azd template: Find and view template details.
azd up: Provision Azure resources, and deploy your project with a single command.
azd version: Print the version number of Azure Developer CLI.

azd auth
Authenticate with Azure.
Options
  -h, --help   Gets help for auth.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth login: Log in to Azure.
azd auth logout: Log out of Azure.
Back to top

azd auth login
Log in to Azure.
Synopsis
Log in to Azure.
When run without any arguments, log in interactively using a browser. To log in using a device code, pass
--use-device-code.
To log in as a service principal, pass --client-id and --tenant-id as well as one of: --client-secret,
--client-certificate, or --federated-credential-provider.
azd auth login [flags]

Options
      --check-status                           Checks the log-in status instead of logging in.
      --client-certificate string              The path to the client certificate for the service principal to authenticate with.
      --client-id string                       The client id for the service principal to authenticate with.
      --client-secret string                   The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
      --federated-credential-provider string   The provider to use to acquire a federated token to authenticate with.
  -h, --help                                   Gets help for login.
      --redirect-port int                      Choose the port to be used as part of the redirect URI during interactive login.
      --tenant-id string                       The tenant id or domain name to authenticate with.
      --use-device-code[=true]                 When true, log in by using a device code instead of a browser.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth: Authenticate with Azure.
Back to top

azd auth logout
Log out of Azure.
Synopsis
Log out of Azure
azd auth logout [flags]

Options
  -h, --help   Gets help for logout.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth: Authenticate with Azure.
Back to top

azd config
Manage azd configurations (ex: default Azure subscription, location).
Synopsis
Manage the Azure Developer CLI user configuration, which includes your default Azure subscription and location.
Available since azure-dev-cli_0.4.0-beta.1.
The easiest way to configure azd for the first time is to run azd init. The subscription and location you select will be stored in the config.json file located in the config directory. To configure azd anytime afterwards, you'll use azd config set.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
Options
  -h, --help   Gets help for config.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config get: Gets a configuration.
azd config list: Lists all configuration values.
azd config list-alpha: Display the list of available features in alpha stage.
azd config reset: Resets configuration to default.
azd config set: Sets a configuration.
azd config unset: Unsets a configuration.
Back to top

azd config get
Gets a configuration.
Synopsis
Gets a configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config get <path> [flags]

Options
  -h, --help   Gets help for get.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config list
Lists all configuration values.
Synopsis
Lists all configuration values in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config list [flags]

Options
  -h, --help   Gets help for list.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config list-alpha
Display the list of available features in alpha stage.
azd config list-alpha [flags]

Options
  -h, --help   Gets help for list-alpha.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config reset
Resets configuration to default.
Synopsis
Resets all configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable to the default.
azd config reset [flags]

Options
  -h, --help   Gets help for reset.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config set
Sets a configuration.
Synopsis
Sets a configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config set <path> <value> [flags]

Examples
azd config set defaults.subscription <yourSubscriptionID>
azd config set defaults.location eastus

Options
  -h, --help   Gets help for set.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config unset
Unsets a configuration.
Synopsis
Removes a configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config unset <path> [flags]

Examples
azd config unset defaults.location

Options
  -h, --help   Gets help for unset.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd deploy
Deploy the application's code to Azure.
azd deploy <service> [flags]

Options
      --all                   Deploys all services that are listed in azure.yaml
  -e, --environment string    The name of the environment to use.
      --from-package string   Deploys the application from an existing package.
  -h, --help                  Gets help for deploy.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd down
Delete Azure resources for an application.
azd down [flags]

Options
  -e, --environment string   The name of the environment to use.
      --force                Does not require confirmation before it deletes resources.
  -h, --help                 Gets help for down.
      --purge                Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd env
Manage environments.
Options
  -h, --help   Gets help for env.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env get-values: Get all environment values.
azd env list: List environments.
azd env new: Create a new environment.
azd env refresh: Refresh environment settings by using information from a previous infrastructure provision.
azd env select: Set the default environment.
azd env set: Manage your environment settings.
Back to top

azd env get-values
Get all environment values.
azd env get-values [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-values.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env list
List environments.
azd env list [flags]

Options
  -h, --help   Gets help for list.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env new
Create a new environment.
azd env new <environment> [flags]

Options
  -h, --help                  Gets help for new.
  -l, --location string       Azure location for the new environment
      --subscription string   Name or ID of an Azure subscription to use for the new environment

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env refresh
Refresh environment settings by using information from a previous infrastructure provision.
azd env refresh [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for refresh.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env select
Set the default environment.
azd env select <environment> [flags]

Options
  -h, --help   Gets help for select.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env set
Manage your environment settings.
azd env set <key> <value> [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd init
Initialize a new application.
azd init [flags]

Options
  -b, --branch string         The template branch to initialize from.
  -e, --environment string    The name of the environment to use.
  -h, --help                  Gets help for init.
  -l, --location string       Azure location for the new environment
      --subscription string   Name or ID of an Azure subscription to use for the new environment
  -t, --template string       The template to use when you initialize the project. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd monitor
Monitor a deployed application.
azd monitor [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for monitor.
      --live                 Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps.
      --logs                 Open a browser to Application Insights Logs.
      --overview             Open a browser to Application Insights Overview Dashboard.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd package
Packages the application's code to be deployed to Azure. (Beta)
azd package <service> [flags]

Options
      --all                  Deploys all services that are listed in azure.yaml
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for package.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd pipeline
Manage and configure your deployment pipelines.
Options
  -h, --help   Gets help for pipeline.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd pipeline config: Create and configure your deployment pipeline by using GitHub or Azure Pipelines.
Back to top

azd pipeline config
Create and configure your deployment pipeline by using GitHub or Azure Pipelines.
azd pipeline config [flags]

Options
      --auth-type string        The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider). Valid values: federated, client-credentials.
  -e, --environment string      The name of the environment to use.
  -h, --help                    Gets help for config.
      --principal-name string   The name of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-role string   The role to assign to the service principal. (default "contributor")
      --provider string         The pipeline provider to use (github for Github Actions and azdo for Azure Pipelines).
      --remote-name string      The name of the git remote to configure the pipeline to run on. (default "origin")

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd pipeline: Manage and configure your deployment pipelines.
Back to top

azd provision
Provision the Azure resources for an application.
Synopsis
Provision the Azure resources for an application.
The command prompts you for the following values:

Environment name: The name of your environment.
Azure location: The Azure location where your resources will be deployed.
Azure subscription: The Azure subscription where your resources will be deployed.

Depending on what Azure resources are created, running this command might take a while. To view progress, go to the Azure portal and search for the resource group that contains your environment name.
azd provision [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for provision.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd restore
Restores the application's dependencies.
azd restore <service> [flags]

Options
      --all                  Restores all services that are listed in azure.yaml
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for restore.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd template
Find and view template details.
Options
  -h, --help   Gets help for template.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template list: Show list of sample azd templates.
azd template show: Show details for a given template.
Back to top

azd template list
Show list of sample azd templates.
azd template list [flags]

Options
  -h, --help   Gets help for list.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template: Find and view template details.
Back to top

azd template show
Show details for a given template.
azd template show <template> [flags]

Options
  -h, --help   Gets help for show.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template: Find and view template details.
Back to top

azd up
Provision Azure resources, and deploy your project with a single command.
azd up [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for up.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd version
Print the version number of Azure Developer CLI.
azd version [flags]

Options
  -h, --help   Gets help for version.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

Azure Dev CLI Install Instructions
Install scripts
MacOS/Linux

May elevate using sudo on some platforms and configurations

bash:
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/uninstall-azd.sh | bash;
curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/install-azd.sh | bash -s -- --base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134 --version '' --verbose --skip-verify

pwsh:
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/uninstall-azd.ps1' -OutFile uninstall-azd.ps1; ./uninstall-azd.ps1
Invoke-RestMethod 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/install-azd.ps1' -OutFile install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134' -Version '' -SkipVerify -Verbose

Windows
PowerShell install
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/uninstall-azd.ps1' > uninstall-azd.ps1; ./uninstall-azd.ps1;"
powershell -c "Set-ExecutionPolicy Bypass Process; irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/install-azd.ps1' > install-azd.ps1; ./install-azd.ps1 -BaseUrl 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134' -Version '' -SkipVerify -Verbose;"

MSI install
powershell -c "irm 'https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-windows-amd64.msi' -OutFile azd-windows-amd64.msi; msiexec /i azd-windows-amd64.msi /qn"

Standalone Binary

Linux -

x86_64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-linux-amd64.tar.gz
ARM64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-linux-arm64.tar.gz

MacOS -

x86_64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-darwin-amd64.zip
ARM64 - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-darwin-arm64.zip

Windows - https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-windows-amd64.zip

MSI

https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/2134/azd-windows-amd64.msi

Container
docker run -it azdevcliextacr.azurecr.io/azure-dev:pr-2134

Documentation

learn.microsoft.com documentation

title: Azure Developer CLI reference (preview)
description: This article explains the syntax and parameters for the various Azure Developer CLI Preview commands.
author: alexwolftmsft
ms.author: alexwolf
ms.date: 05/10/2023
ms.service: azure-dev-cli
ms.topic: conceptual
ms.custom: devx-track-azdevcli
Azure Developer CLI reference (preview)
This article explains the syntax and parameters for the various Azure Developer CLI Preview commands.
azd
The Azure Developer CLI (azd) is an open-source tool that helps onboard and manage your application on Azure
Options
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
  -h, --help         Gets help for azd.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth: Authenticate with Azure.
azd config: Manage azd configurations (ex: default Azure subscription, location).
azd deploy: Deploy the application's code to Azure.
azd down: Delete Azure resources for an application.
azd env: Manage environments.
azd init: Initialize a new application.
azd monitor: Monitor a deployed application.
azd package: Packages the application's code to be deployed to Azure. (Beta)
azd pipeline: Manage and configure your deployment pipelines.
azd provision: Provision the Azure resources for an application.
azd restore: Restores the application's dependencies.
azd template: Find and view template details.
azd up: Provision Azure resources, and deploy your project with a single command.
azd version: Print the version number of Azure Developer CLI.

azd auth
Authenticate with Azure.
Options
  -h, --help   Gets help for auth.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth login: Log in to Azure.
azd auth logout: Log out of Azure.
Back to top

azd auth login
Log in to Azure.
Synopsis
Log in to Azure.
When run without any arguments, log in interactively using a browser. To log in using a device code, pass
--use-device-code.
To log in as a service principal, pass --client-id and --tenant-id as well as one of: --client-secret,
--client-certificate, or --federated-credential-provider.
azd auth login [flags]

Options
      --check-status                           Checks the log-in status instead of logging in.
      --client-certificate string              The path to the client certificate for the service principal to authenticate with.
      --client-id string                       The client id for the service principal to authenticate with.
      --client-secret string                   The client secret for the service principal to authenticate with. Set to the empty string to read the value from the console.
      --federated-credential-provider string   The provider to use to acquire a federated token to authenticate with.
  -h, --help                                   Gets help for login.
      --redirect-port int                      Choose the port to be used as part of the redirect URI during interactive login.
      --tenant-id string                       The tenant id or domain name to authenticate with.
      --use-device-code[=true]                 When true, log in by using a device code instead of a browser.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth: Authenticate with Azure.
Back to top

azd auth logout
Log out of Azure.
Synopsis
Log out of Azure
azd auth logout [flags]

Options
  -h, --help   Gets help for logout.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd auth: Authenticate with Azure.
Back to top

azd config
Manage azd configurations (ex: default Azure subscription, location).
Synopsis
Manage the Azure Developer CLI user configuration, which includes your default Azure subscription and location.
Available since azure-dev-cli_0.4.0-beta.1.
The easiest way to configure azd for the first time is to run azd init. The subscription and location you select will be stored in the config.json file located in the config directory. To configure azd anytime afterwards, you'll use azd config set.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
Options
  -h, --help   Gets help for config.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config get: Gets a configuration.
azd config list: Lists all configuration values.
azd config list-alpha: Display the list of available features in alpha stage.
azd config reset: Resets configuration to default.
azd config set: Sets a configuration.
azd config unset: Unsets a configuration.
Back to top

azd config get
Gets a configuration.
Synopsis
Gets a configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config get <path> [flags]

Options
  -h, --help   Gets help for get.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config list
Lists all configuration values.
Synopsis
Lists all configuration values in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config list [flags]

Options
  -h, --help   Gets help for list.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config list-alpha
Display the list of available features in alpha stage.
azd config list-alpha [flags]

Options
  -h, --help   Gets help for list-alpha.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config reset
Resets configuration to default.
Synopsis
Resets all configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable to the default.
azd config reset [flags]

Options
  -h, --help   Gets help for reset.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config set
Sets a configuration.
Synopsis
Sets a configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config set <path> <value> [flags]

Examples
azd config set defaults.subscription <yourSubscriptionID>
azd config set defaults.location eastus

Options
  -h, --help   Gets help for set.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd config unset
Unsets a configuration.
Synopsis
Removes a configuration in the configuration path.
The default value of the config directory is:

$HOME/.azd on Linux and macOS
%USERPROFILE%\.azd on Windows

The configuration directory can be overridden by specifying a path in the AZD_CONFIG_DIR environment variable.
azd config unset <path> [flags]

Examples
azd config unset defaults.location

Options
  -h, --help   Gets help for unset.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd config: Manage azd configurations (ex: default Azure subscription, location).
Back to top

azd deploy
Deploy the application's code to Azure.
azd deploy <service> [flags]

Options
      --all                   Deploys all services that are listed in azure.yaml
  -e, --environment string    The name of the environment to use.
      --from-package string   Deploys the application from an existing package.
  -h, --help                  Gets help for deploy.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd down
Delete Azure resources for an application.
azd down [flags]

Options
  -e, --environment string   The name of the environment to use.
      --force                Does not require confirmation before it deletes resources.
  -h, --help                 Gets help for down.
      --purge                Does not require confirmation before it permanently deletes resources that are soft-deleted by default (for example, key vaults).

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd env
Manage environments.
Options
  -h, --help   Gets help for env.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env get-values: Get all environment values.
azd env list: List environments.
azd env new: Create a new environment.
azd env refresh: Refresh environment settings by using information from a previous infrastructure provision.
azd env select: Set the default environment.
azd env set: Manage your environment settings.
Back to top

azd env get-values
Get all environment values.
azd env get-values [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-values.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env list
List environments.
azd env list [flags]

Options
  -h, --help   Gets help for list.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env new
Create a new environment.
azd env new <environment> [flags]

Options
  -h, --help                  Gets help for new.
  -l, --location string       Azure location for the new environment
      --subscription string   Name or ID of an Azure subscription to use for the new environment

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env refresh
Refresh environment settings by using information from a previous infrastructure provision.
azd env refresh [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for refresh.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env select
Set the default environment.
azd env select <environment> [flags]

Options
  -h, --help   Gets help for select.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd env set
Manage your environment settings.
azd env set <key> <value> [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd env: Manage environments.
Back to top

azd init
Initialize a new application.
azd init [flags]

Options
  -b, --branch string         The template branch to initialize from.
  -e, --environment string    The name of the environment to use.
  -h, --help                  Gets help for init.
  -l, --location string       Azure location for the new environment
      --subscription string   Name or ID of an Azure subscription to use for the new environment
  -t, --template string       The template to use when you initialize the project. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd monitor
Monitor a deployed application.
azd monitor [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for monitor.
      --live                 Open a browser to Application Insights Live Metrics. Live Metrics is currently not supported for Python apps.
      --logs                 Open a browser to Application Insights Logs.
      --overview             Open a browser to Application Insights Overview Dashboard.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd package
Packages the application's code to be deployed to Azure. (Beta)
azd package <service> [flags]

Options
      --all                  Deploys all services that are listed in azure.yaml
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for package.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd pipeline
Manage and configure your deployment pipelines.
Options
  -h, --help   Gets help for pipeline.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd pipeline config: Create and configure your deployment pipeline by using GitHub or Azure Pipelines.
Back to top

azd pipeline config
Create and configure your deployment pipeline by using GitHub or Azure Pipelines.
azd pipeline config [flags]

Options
      --auth-type string        The authentication type used between the pipeline provider and Azure for deployment (Only valid for GitHub provider). Valid values: federated, client-credentials.
  -e, --environment string      The name of the environment to use.
  -h, --help                    Gets help for config.
      --principal-name string   The name of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-role string   The role to assign to the service principal. (default "contributor")
      --provider string         The pipeline provider to use (github for Github Actions and azdo for Azure Pipelines).
      --remote-name string      The name of the git remote to configure the pipeline to run on. (default "origin")

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd pipeline: Manage and configure your deployment pipelines.
Back to top

azd provision
Provision the Azure resources for an application.
Synopsis
Provision the Azure resources for an application.
The command prompts you for the following values:

Environment name: The name of your environment.
Azure location: The Azure location where your resources will be deployed.
Azure subscription: The Azure subscription where your resources will be deployed.

Depending on what Azure resources are created, running this command might take a while. To view progress, go to the Azure portal and search for the resource group that contains your environment name.
azd provision [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for provision.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd restore
Restores the application's dependencies.
azd restore <service> [flags]

Options
      --all                  Restores all services that are listed in azure.yaml
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for restore.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd template
Find and view template details.
Options
  -h, --help   Gets help for template.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template list: Show list of sample azd templates.
azd template show: Show details for a given template.
Back to top

azd template list
Show list of sample azd templates.
azd template list [flags]

Options
  -h, --help   Gets help for list.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template: Find and view template details.
Back to top

azd template show
Show details for a given template.
azd template show <template> [flags]

Options
  -h, --help   Gets help for show.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

azd template: Find and view template details.
Back to top

azd up
Provision Azure resources, and deploy your project with a single command.
azd up [flags]

Options
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for up.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

azd version
Print the version number of Azure Developer CLI.
azd version [flags]

Options
  -h, --help   Gets help for version.

Options inherited from parent commands
  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

See also

Back to top

I just want to 👏 for this one! Long time coming, nice work @ellismg!

authors: azure-sdk ellismg savannahostrowski


text:
Docs.MS Release Updates for azure-communication-common

Update docs metadata and targeting for release of azure-communication-common

Docs Build status updates of commit e484432:
:warning: Validation status: warnings

File
Status
Preview URL
Details

docs-ref-services/preview/communication-common-readme.md
:warning:Warning
View (azure-java-preview)
Details

package.json
:white_check_mark:Succeeded

docs-ref-services/preview/communication-common-readme.md

Line 2, Column 1: [Warning-ms-prod-and-service] Only one of the following attributes can exist: 'ms.prod', 'ms.service'. Use ms.prod for on-premise products, or ms.service for cloud services.
Line 9, Column 16: [Warning-ms-prod-technology-invalid] Invalid value for 'ms.technology': 'azure' is not valid with 'ms.prod' value 'azure'.
Line 11, Column 13: [Warning-ms-service-subservice-invalid] Invalid value for 'ms.service': 'communication'.
Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.
Line 25, Column 3: [Suggestion-preserve-view-not-set] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable. Otherwise, remove the view parameter.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

repo: Azure/azure-docs-sdk-java


text:
Fire and forget in Azure Function

I need to build the Azure Function with Http Trigger, which will just fire some asynchronous method and proceed with returning response. The trick is that I want to run this asynchronous function until it will be completed, like in this example.
Investigative information
Please provide the following:

Timestamp: 2020-03-12T13:12:37+00:00
Function App name: testasyncaga
Function name(s) (as appropriate): TestAsync
Core Tools version:

Repro steps
When I have run this code:
import logging
import asyncio

import azure.functions as func

async def test_async(test):
    logging.info(test)
    await asyncio.sleep(5)
    logging.info("end")

async def main(req: func.HttpRequest) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')
    name = "Test"
    logging.info(name)
    asyncio.ensure_future(test_async(name))
    await asyncio.sleep(2)
    logging.info("Test 2")
    return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

    # Let's also finish all running tasks:
    pending = asyncio.Task.all_tasks()
    loop.run_until_complete(asyncio.gather(*pending))

The Function has not waited till the async function will finish.
But when I have change it to this:
import logging
import asyncio

import azure.functions as func

loop = asyncio.get_event_loop()
# Let's also finish all running tasks:
pending = asyncio.Task.all_tasks()
loop.run_until_complete(asyncio.gather(*pending))

async def test_async(test):
    logging.info(test)
    await asyncio.sleep(5)
    logging.info("end")

async def main(req: func.HttpRequest) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')
    name = "Test"
    logging.info(name)
    asyncio.ensure_future(test_async(name))
    await asyncio.sleep(2)
    logging.info("Test 2")
    return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")

I got an error:
2020-03-12T13:07:51.637 [Error] Executed 'Functions.TestAsync' (Failed, Id=cf89795d-32c9-47e1-bfcf-70c79ac2aa88) Result: Failure Exception: RuntimeError: This event loop is already running Stack: File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/dispatcher.py", line 242, in _handle__function_load_request func_request.metadata.entry_point) File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/loader.py", line 66, in load_function mod = importlib.import_module(fullmodname) File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 941, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/site/wwwroot/TestAsync/__init__.py", line 10, in <module> loop.run_until_complete(asyncio.gather(*pending)) File "/usr/local/lib/python3.6/asyncio/base_events.py", line 475, in run_until_complete self.run_forever() File "/usr/local/lib/python3.6/asyncio/base_events.py", line 429, in run_forever raise RuntimeError('This event loop is already running')

Expected behavior
The async method is completed even if the main function has finished.
Actual behavior
Function doesn't wait for the async method to be completed or throws and error
Known workarounds
None
Contents of the requirements.txt file:
azure-functions
asyncio

I have decided to leave that approach and go some other way, so please ignore this issue.

repo: Azure/azure-functions-python-worker