Azure Developer CLI リファレンス

この記事では、さまざまな Azure Developer CLI コマンドの構文とパラメーターについて説明します。

azd

Azure Developer CLI (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: azd 構成を管理する (例: 既定の Azure サブスクリプション、場所)。
  • 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: テンプレートの詳細を検索して表示します。 (ベータ)
  • azd up: Azureリソースをプロビジョニングし、1 つのコマンドでプロジェクトをデプロイします。
  • 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、または --federated-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 Developer CLI ユーザー構成を管理します。これには既定の Azure サブスクリプションと場所が含まれます。

azure-dev-cli_0.4.0-beta.1 以降で使用できます。

azd を初めて構成する最も簡単な方法は、azd init を実行することです。 選択されたサブスクリプションと場所は、config ディレクトリにある config.json ファイルに格納されます。 azd を後からいつでも構成するには、azd config set を使用します。

config ディレクトリの既定値は次のとおりです。

  • Linux および macOS 上では $HOME/.azd
  • Windows 上では %USERPROFILE%.azd

構成ディレクトリは、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

構成を取得します。

構文

構成パス内の構成を取得します。

config ディレクトリの既定値は次のとおりです。

  • Linux と macOS の場合: $HOME/.azd
  • Windows の場合: %USERPROFILE%\.azd

構成ディレクトリは、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

構成を既定値にリセットします。

構文

構成パス内の全構成をリセットします。

config ディレクトリの既定値は次のとおりです。

  • Linux と macOS の場合: $HOME/.azd
  • Windows の場合: %USERPROFILE%\.azd

構成ディレクトリは、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

構成を設定します。

構文

構成パス内の構成を設定します。

config ディレクトリの既定値は次のとおりです。

  • Linux と macOS の場合: $HOME/.azd
  • Windows の場合: %USERPROFILE%\.azd

構成ディレクトリは、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

すべての構成値を表示します。

構文

構成パス内のすべての構成値を表示します。

config ディレクトリの既定値は次のとおりです。

  • Linux と macOS の場合: $HOME/.azd
  • Windows の場合: %USERPROFILE%\.azd

構成ディレクトリは、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

構成の設定を解除します。

構文

構成パス内の構成を削除します。

config ディレクトリの既定値は次のとおりです。

  • Linux と macOS の場合: $HOME/.azd
  • Windows の場合: %USERPROFILE%\.azd

構成ディレクトリは、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 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 <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 [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 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リソースをプロビジョニングし、1 つのコマンドでプロジェクトをデプロイします。

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 Developer CLI のバージョン番号を印刷します。

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.

関連項目