Référence Azure Developer CLI

Cet article explique la syntaxe et les paramètres des différentes commandes AZURE Developer CLI.

azd

Azure Developer CLI (azd) est un outil open source qui permet d’intégrer et de gérer votre application sur Azure

Options

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

Voir aussi

  • azd auth : s’authentifier auprès d’Azure.
  • azd config : Gérer les configurations azd (par exemple , abonnement Azure par défaut, emplacement).
  • azd deploy : Deploy the application’s code to Azure.
  • azd down : Supprimez les ressources Azure pour une application.
  • azd env : Gérer les environnements.
  • azd hooks : Développer, tester et exécuter des hooks pour une application. (Bêta)
  • azd init : Initialiser une nouvelle application.
  • azd monitor : surveiller une application déployée. (Bêta)
  • package azd : empaquetage du code de l’application à déployer sur Azure. (Bêta)
  • azd pipeline : gérez et configurez vos pipelines de déploiement. (Bêta)
  • azd provision : provisionnez les ressources Azure pour une application.
  • azd restore : restaure les dépendances de l’application. (Bêta)
  • azd show : Afficher des informations sur votre application et ses ressources.
  • modèle azd : recherchez et affichez les détails du modèle. (Bêta)
  • azd up : Provisionner des ressources Azure et déployer votre projet avec une seule commande.
  • azd version : imprimez le numéro de version d’Azure Developer CLI.

azd auth

Authentifiez-vous auprès d’Azure.

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd auth login

Connectez-vous à Azure.

Synopsis

Connectez-vous à Azure.

Lors de l’exécution sans arguments, connectez-vous de manière interactive à l’aide d’un navigateur. Pour vous connecter à l’aide d’un code d’appareil, passez --use-device-code.

Pour vous connecter en tant que principal de service, passez --client-id et --tenant-id, ainsi que l’un des suivants : --client-secret, --client-certificate ou --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.
      --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.

Options héritées des commandes parentes

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

Voir aussi

azd auth logout

Déconnectez-vous d’Azure.

Synopsis

Se déconnecter d’Azure

azd auth logout [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config

Gérer les configurations azd (par exemple l’abonnement Azure par défaut, l’emplacement).

Synopsis

Gérez la configuration utilisateur azure Developer CLI, qui inclut votre abonnement Azure et votre emplacement par défaut.

Disponible depuis azure-dev-cli_0.4.0-beta.1.

Le moyen le plus simple de configurer azd pour la première fois est d’exécuter azd init. L’abonnement et l’emplacement que vous sélectionnez sont stockés dans le config.json fichier situé dans le répertoire de configuration. Pour configurer azd à tout moment par la suite, vous allez utiliser azd config set.

La valeur par défaut du répertoire de configuration est la suivante :

  • $HOME/.azd sur Linux et macOS
  • %USERPROFILE%.azd sur Windows

Le répertoire de configuration peut être remplacé en spécifiant un chemin d’accès dans la variable d’environnement AZD_CONFIG_DIR.

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config get

Obtient une configuration.

Synopsis

Obtient une configuration dans le chemin de configuration.

La valeur par défaut du répertoire de configuration est la suivante :

  • $HOME/.azd sur Linux et macOS
  • %USERPROFILE%\.azd sur Windows

Le répertoire de configuration peut être remplacé en spécifiant un chemin d’accès dans la variable d’environnement AZD_CONFIG_DIR.

azd config get <path> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config list-alpha

Affichez la liste des fonctionnalités disponibles en phase alpha.

azd config list-alpha [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config reset

Réinitialise la configuration par défaut.

Synopsis

Réinitialise toute la configuration dans le chemin de configuration.

La valeur par défaut du répertoire de configuration est la suivante :

  • $HOME/.azd sur Linux et macOS
  • %USERPROFILE%\.azd sur Windows

Le répertoire de configuration peut être substitué en spécifiant un chemin d’accès dans la variable d’environnement AZD_CONFIG_DIR par défaut.

azd config reset [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config set

Définit une configuration.

Synopsis

Définit une configuration dans le chemin de configuration.

La valeur par défaut du répertoire de configuration est la suivante :

  • $HOME/.azd sur Linux et macOS
  • %USERPROFILE%\.azd sur Windows

Le répertoire de configuration peut être remplacé en spécifiant un chemin d’accès dans la variable d’environnement AZD_CONFIG_DIR.

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

Exemples

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

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config show

Afficher toutes les valeurs de configuration.

Synopsis

Affichez toutes les valeurs de configuration dans le chemin de configuration.

La valeur par défaut du répertoire de configuration est la suivante :

  • $HOME/.azd sur Linux et macOS
  • %USERPROFILE%\.azd sur Windows

Le répertoire de configuration peut être remplacé en spécifiant un chemin d’accès dans la variable d’environnement AZD_CONFIG_DIR.

azd config show [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd config unset

Annule une configuration.

Synopsis

Supprime une configuration dans le chemin de configuration.

La valeur par défaut du répertoire de configuration est la suivante :

  • $HOME/.azd sur Linux et macOS
  • %USERPROFILE%\.azd sur Windows

Le répertoire de configuration peut être remplacé en spécifiant un chemin d’accès dans la variable d’environnement AZD_CONFIG_DIR.

azd config unset <path> [flags]

Exemples

azd config unset defaults.location

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd deploy

Déployez le code de l’application sur Azure.

azd deploy <service> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd down

Supprimez des ressources Azure pour une application.

azd down [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env

Gérer les environnements.

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env get-values

Obtenez toutes les valeurs d’environnement.

azd env get-values [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env list

Répertorier les environnements.

azd env list [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env new

Créez un environnement et définissez-le comme valeur par défaut.

azd env new <environment> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env refresh

Actualisez les paramètres d’environnement à l’aide d’informations d’une configuration d’infrastructure précédente.

azd env refresh <environment> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env select

Définissez l’environnement par défaut.

azd env select <environment> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd env set

Gérez vos paramètres d’environnement.

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

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd hooks

Développez, testez et exécutez des hooks pour une application. (Bêta)

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd hooks s’exécutent

Exécute le hook spécifié pour le projet et les services

azd hooks run <name> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd init

Initialisez une nouvelle application.

azd init [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd monitor

Surveillez une application déployée. (Bêta)

azd monitor [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd package

Empaquette le code de l’application à déployer sur Azure. (Bêta)

azd package <service> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd pipeline

Gérez et configurez vos pipelines de déploiement. (Bêta)

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd pipeline config

Configurez votre pipeline de déploiement pour vous connecter en toute sécurité à Azure. (Bêta)

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

Options héritées des commandes parentes

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

Voir aussi

azd provision

Provisionnez les ressources Azure pour une application.

azd provision [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd restore

Restaure les dépendances de l’application. (Bêta)

azd restore <service> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd show

Affichez des informations sur votre application et ses ressources.

azd show [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template

Recherchez et affichez les détails du modèle. (Bêta)

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template list

Afficher la liste des exemples de modèles azd. (Bêta)

azd template list [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template show

Afficher les détails d’un modèle donné. (Bêta)

azd template show <template> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template source

Affichez et gérez les sources de modèle. (Bêta)

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template source add

Ajoute une source de modèle azd à la clé spécifiée (bêta)

azd template source add <key> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template source list

Répertorie les sources de modèle azd configurées. (Bêta)

azd template source list [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd template source remove

Supprime la source de modèle azd spécifiée (bêta)

azd template source remove <key> [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd up

Provisionnez des ressources Azure et déployez votre projet avec une seule commande.

azd up [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi

azd version

Imprimez le numéro de version d’Azure Developer CLI.

azd version [flags]

Options

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

Options héritées des commandes parentes

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

Voir aussi