Справочные материалы по Azure Developer CLI

В этой статье описаны синтаксис и параметры для различных команд Командной строки разработчика Azure.

azd

Интерфейс командной строки разработчика Azure (azd) — это средство с открытым кодом, которое помогает подключить приложение и управлять ими в Azure.

Параметры

  -C, --cwd string   Sets the current working directory.
      --debug        Enables debugging and diagnostics logging.
      --docs         Opens the documentation for azd in your web browser.
  -h, --help         Gets help for azd.
      --no-prompt    Accepts the default value instead of prompting, or it fails if there is no default.

См. также

  • azd auth: аутентификация с помощью Azure.
  • azd config: manage azd configurations (ex: default subscription, location).
  • azd deploy: развертывание кода приложения в Azure.
  • azd down: удаление ресурсов Azure для приложения.
  • azd env: Управление средами.
  • azd hooks: разработка, тестирование и запуск перехватчиков для приложения. (бета-версия)
  • azd init: инициализация нового приложения.
  • azd monitor: мониторинг развернутого приложения. (бета-версия)
  • azd package: упаковывать код приложения для развертывания в Azure. (бета-версия)
  • azd pipeline: Управление и настройка конвейеров развертывания. (бета-версия)
  • azd provision: подготовка ресурсов Azure для приложения.
  • azd restore: восстанавливает зависимости приложения. (бета-версия)
  • azd show: отображение сведений о приложении и его ресурсах.
  • azd template: Find and view template details. (бета-версия)
  • azd up: подготовка ресурсов Azure и развертывание проекта с помощью одной команды.
  • azd version: печать номера версии Azure Developer CLI.

azd auth

Проверка подлинности с помощью Azure.

Параметры

      --docs   Opens the documentation for azd auth in your web browser.
  -h, --help   Gets help for auth.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd auth login

Вход в Azure.

Краткие сведения

Вход в Azure.

При выполнении без каких-либо аргументов войдите в систему в интерактивном режиме с помощью браузера. Чтобы войти с помощью кода устройства, передайте код --use-device-code.

Чтобы войти в качестве субъекта-службы, передайте --client-id и --tenant-id, а также один из: --client-secret, --client-certificate или --федеративный-credential-provider.

azd auth login [flags]

Параметры

      --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.
      --docs                                   Opens the documentation for azd auth login in your web browser.
      --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.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd auth logout

Выйдите из Azure.

Краткие сведения

Выход из Azure

azd auth logout [flags]

Параметры

      --docs   Opens the documentation for azd auth logout in your web browser.
  -h, --help   Gets help for logout.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config

Управление конфигурациями azd (например, подписка Azure по умолчанию, расположение).

Краткие сведения

Управление конфигурацией пользователя Интерфейса командной строки разработчика Azure, которая включает в себя подписку и расположение Azure по умолчанию.

Доступно с момента azure-dev-cli_0.4.0-beta.1.

Самый простой способ настройки azd в первый раз — запуск azd init. Выбранная подписка и расположение будут храниться в config.json файле, расположенном в каталоге конфигурации. Чтобы настроить azd любое время после этого, вы будете использовать azd config set.

Значением по умолчанию каталога конфигурации является:

  • $HOME/.azd в Linux и macOS
  • %USERPROFILE%.azd в Windows

Каталог конфигурации можно переопределить, указав путь в переменной среды AZD_CONFIG_DIR.

Параметры

      --docs   Opens the documentation for azd config in your web browser.
  -h, --help   Gets help for config.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config get

Возвращает конфигурацию.

Краткие сведения

Возвращает конфигурацию в пути конфигурации.

Значением по умолчанию каталога конфигурации является:

  • $HOME/.azd в Linux и macOS
  • %USERPROFILE%\.azd в Windows

Каталог конфигурации можно переопределить, указав путь в переменной среды AZD_CONFIG_DIR.

azd config get <path> [flags]

Параметры

      --docs   Opens the documentation for azd config get in your web browser.
  -h, --help   Gets help for get.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config list-alpha

Отображение списка доступных функций на альфа-этапе.

azd config list-alpha [flags]

Параметры

      --docs   Opens the documentation for azd config list-alpha in your web browser.
  -h, --help   Gets help for list-alpha.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config reset

Сбрасывает конфигурацию по умолчанию.

Краткие сведения

Сбрасывает всю конфигурацию в пути конфигурации.

Значением по умолчанию каталога конфигурации является:

  • $HOME/.azd в Linux и macOS
  • %USERPROFILE%\.azd в Windows

Каталог конфигурации можно переопределить, указав путь в переменной среды AZD_CONFIG_DIR по умолчанию.

azd config reset [flags]

Параметры

      --docs    Opens the documentation for azd config reset in your web browser.
  -f, --force   Force reset without confirmation.
  -h, --help    Gets help for reset.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config set

Задает конфигурацию.

Краткие сведения

Задает конфигурацию в пути конфигурации.

Значением по умолчанию каталога конфигурации является:

  • $HOME/.azd в Linux и macOS
  • %USERPROFILE%\.azd в Windows

Каталог конфигурации можно переопределить, указав путь в переменной среды AZD_CONFIG_DIR.

azd config set <path> <value> [flags]

Примеры

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

Параметры

      --docs   Opens the documentation for azd config set in your web browser.
  -h, --help   Gets help for set.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config show

Отображение всех значений конфигурации.

Краткие сведения

Отображение всех значений конфигурации в пути конфигурации.

Значением по умолчанию каталога конфигурации является:

  • $HOME/.azd в Linux и macOS
  • %USERPROFILE%\.azd в Windows

Каталог конфигурации можно переопределить, указав путь в переменной среды AZD_CONFIG_DIR.

azd config show [flags]

Параметры

      --docs   Opens the documentation for azd config show in your web browser.
  -h, --help   Gets help for show.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd config unset

Отменяет настройку.

Краткие сведения

Удаляет конфигурацию в пути конфигурации.

Значением по умолчанию каталога конфигурации является:

  • $HOME/.azd в Linux и macOS
  • %USERPROFILE%\.azd в Windows

Каталог конфигурации можно переопределить, указав путь в переменной среды AZD_CONFIG_DIR.

azd config unset <path> [flags]

Примеры

azd config unset defaults.location

Параметры

      --docs   Opens the documentation for azd config unset in your web browser.
  -h, --help   Gets help for unset.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd deploy

Разверните код приложения в Azure.

azd deploy <service> [flags]

Параметры

      --all                   Deploys all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd deploy in your web browser.
  -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.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd down

Удаление ресурсов Azure для приложения.

azd down [flags]

Параметры

      --docs                 Opens the documentation for azd down in your web browser.
  -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).

Параметры, наследуемые от родительских команд

  -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.

См. также

azd env

Управление средами.

Параметры

      --docs   Opens the documentation for azd env in your web browser.
  -h, --help   Gets help for env.

Параметры, наследуемые от родительских команд

  -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.

См. также

  • azd env get-values: получение всех значений среды.
  • azd env list: List environments.
  • azd env new: создайте новую среду и задайте ее в качестве значения по умолчанию.
  • azd env refresh: обновление параметров среды с помощью сведений из предыдущей подготовки инфраструктуры.
  • azd env select: задайте среду по умолчанию.
  • azd env set: управление параметрами среды.
  • Вверх

azd env get-values

Получение всех значений среды.

azd env get-values [flags]

Параметры

      --docs                 Opens the documentation for azd env get-values in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for get-values.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd env list

Вывод списка сред.

azd env list [flags]

Параметры

      --docs   Opens the documentation for azd env list in your web browser.
  -h, --help   Gets help for list.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd env new

Создайте новую среду и задайте ее в качестве значения по умолчанию.

azd env new <environment> [flags]

Параметры

      --docs                  Opens the documentation for azd env new in your web browser.
  -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

Параметры, наследуемые от родительских команд

  -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.

См. также

azd env refresh

Обновите параметры среды с помощью сведений из предыдущей подготовки инфраструктуры.

azd env refresh <environment> [flags]

Параметры

      --docs                 Opens the documentation for azd env refresh in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for refresh.
      --hint string          Hint to help identify the environment to refresh

Параметры, наследуемые от родительских команд

  -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.

См. также

azd env select

Задайте среду по умолчанию.

azd env select <environment> [flags]

Параметры

      --docs   Opens the documentation for azd env select in your web browser.
  -h, --help   Gets help for select.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd env set

Управление параметрами среды.

azd env set <key> <value> [flags]

Параметры

      --docs                 Opens the documentation for azd env set in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for set.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd hooks

Разработка, тестирование и запуск перехватчиков для приложения. (бета-версия)

Параметры

      --docs   Opens the documentation for azd hooks in your web browser.
  -h, --help   Gets help for hooks.

Параметры, наследуемые от родительских команд

  -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.

См. также

  • azd hooks run: запускает указанный перехватчик для проекта и служб
  • Вверх

azd hooks run

Запускает указанный перехватчик для проекта и служб

azd hooks run <name> [flags]

Параметры

      --docs                 Opens the documentation for azd hooks run in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for run.
      --platform string      Forces hooks to run for the specified platform.
      --service string       Only runs hooks for the specified service.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd init

Инициализация нового приложения.

azd init [flags]

Параметры

  -b, --branch string         The template branch to initialize from. Must be used with a template argument (--template or -t).
      --docs                  Opens the documentation for azd init in your web browser.
  -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
  -s, --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.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd monitor

Мониторинг развернутого приложения. (бета-версия)

azd monitor [flags]

Параметры

      --docs                 Opens the documentation for azd monitor in your web browser.
  -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.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd package

Пакеты кода приложения для развертывания в Azure. (бета-версия)

azd package <service> [flags]

Параметры

      --all                  Packages all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd package in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for package.
      --output-path string   File or folder path where the generated packages will be saved.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd pipeline

Управление и настройка конвейеров развертывания. (бета-версия)

Параметры

      --docs   Opens the documentation for azd pipeline in your web browser.
  -h, --help   Gets help for pipeline.

Параметры, наследуемые от родительских команд

  -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.

См. также

  • azd pipeline config: настройте конвейер развертывания для безопасного подключения к Azure. (бета-версия)
  • Вверх

azd pipeline config

Настройте конвейер развертывания для безопасного подключения к Azure. (бета-версия)

azd pipeline config [flags]

Параметры

      --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.
      --docs                         Opens the documentation for azd pipeline config in your web browser.
  -e, --environment string           The name of the environment to use.
  -h, --help                         Gets help for config.
      --principal-id string          The client id of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-name string        The name of the service principal to use to grant access to Azure resources as part of the pipeline.
      --principal-role stringArray   The roles to assign to the service principal. By default the service principal will be granted the Contributor and User Access Administrator roles. (default [Contributor,User Access Administrator])
      --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")

Параметры, наследуемые от родительских команд

  -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.

См. также

  • azd pipeline: Управление и настройка конвейеров развертывания. (бета-версия)
  • Вверх

azd provision

Подготовка ресурсов Azure для приложения.

azd provision [flags]

Параметры

      --docs                 Opens the documentation for azd provision in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for provision.
      --no-state             Do not use latest Deployment State (bicep only).
      --preview              Preview changes to Azure resources.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd restore

Восстанавливает зависимости приложения. (бета-версия)

azd restore <service> [flags]

Параметры

      --all                  Restores all services that are listed in azure.yaml
      --docs                 Opens the documentation for azd restore in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for restore.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd show

Отображение сведений о приложении и его ресурсах.

azd show [flags]

Параметры

      --docs                 Opens the documentation for azd show in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for show.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template

Поиск и просмотр сведений о шаблоне. (бета-версия)

Параметры

      --docs   Opens the documentation for azd template in your web browser.
  -h, --help   Gets help for template.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template list

Показать список примеров шаблонов azd. (бета-версия)

azd template list [flags]

Параметры

      --docs            Opens the documentation for azd template list in your web browser.
  -h, --help            Gets help for list.
  -s, --source string   Filters templates by source.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template show

Отображение сведений для заданного шаблона. (бета-версия)

azd template show <template> [flags]

Параметры

      --docs   Opens the documentation for azd template show in your web browser.
  -h, --help   Gets help for show.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template source

Просмотр источников шаблонов и управление ими. (бета-версия)

Параметры

      --docs   Opens the documentation for azd template source in your web browser.
  -h, --help   Gets help for source.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template source add

Добавляет источник шаблона azd по указанному ключу (бета-версия)

azd template source add <key> [flags]

Параметры

      --docs              Opens the documentation for azd template source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   Location of the template source.
  -n, --name string       Display name of the template source.
  -t, --type string       Kind of the template source.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template source list

Выводит список настроенных источников шаблона azd. (бета-версия)

azd template source list [flags]

Параметры

      --docs   Opens the documentation for azd template source list in your web browser.
  -h, --help   Gets help for list.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd template source remove

Удаляет указанный источник шаблона azd (бета-версия)

azd template source remove <key> [flags]

Параметры

      --docs   Opens the documentation for azd template source remove in your web browser.
  -h, --help   Gets help for remove.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd up

Подготовка ресурсов Azure и развертывание проекта с помощью одной команды.

azd up [flags]

Параметры

      --docs                 Opens the documentation for azd up in your web browser.
  -e, --environment string   The name of the environment to use.
  -h, --help                 Gets help for up.

Параметры, наследуемые от родительских команд

  -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.

См. также

azd version

Распечатайте номер версии Интерфейса командной строки разработчика Azure.

azd version [flags]

Параметры

      --docs   Opens the documentation for azd version in your web browser.
  -h, --help   Gets help for version.

Параметры, наследуемые от родительских команд

  -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.

См. также