Referencia de Azure Developer CLI

En este artículo se explican la sintaxis y los parámetros de los distintos comandos de la CLI para desarrolladores de Azure.

azd

La CLI para desarrolladores de Azure (azd) es una herramienta de código abierto que ayuda a incorporar y administrar la aplicación en Azure.

Opciones

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

Consulte también

  • azd auth: autenticación con Azure.
  • azd config: administre las configuraciones de azd (por ejemplo: suscripción predeterminada de Azure, ubicación).
  • azd deploy: implemente el código de la aplicación en Azure.
  • azd down: elimine los recursos de Azure de una aplicación.
  • azd env: administrar entornos.
  • azd hooks: desarrolle, pruebe y ejecute enlaces para una aplicación. (Beta)
  • azd init: inicialice una nueva aplicación.
  • azd monitor: supervise una aplicación implementada. (Beta)
  • azd package: empaqueta el código de la aplicación que se va a implementar en Azure. (Beta)
  • azd pipeline: administre y configure las canalizaciones de implementación. (Beta)
  • azd provision: aprovisione los recursos de Azure para una aplicación.
  • azd restore: restaura las dependencias de la aplicación. (Beta)
  • azd show: muestra información sobre la aplicación y sus recursos.
  • azd template: buscar y ver los detalles de la plantilla. (Beta)
  • azd up: aprovisione recursos de Azure e implemente el proyecto con un solo comando.
  • azd version: imprima el número de versión de la CLI para desarrolladores de Azure.

azd auth

Autenticación con Azure.

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd auth login

Inicie sesión en Azure.

Sinopsis

Inicie sesión en Azure.

Cuando se ejecuta sin ningún argumento, inicie sesión de forma interactiva mediante un explorador. Para iniciar sesión con un código de dispositivo, pase --use-device-code.

Para iniciar sesión como entidad de servicio, pase --client-id y --tenant-id, así como uno de: --client-secret, --client-certificate o --federated-credential-provider.

azd auth login [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd auth logout

Cierre la sesión de Azure.

Sinopsis

Cerrar sesión en Azure

azd auth logout [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config

Administre las configuraciones de azd (por ejemplo: suscripción predeterminada de Azure, ubicación).

Sinopsis

Administre la configuración de usuario de la CLI para desarrolladores de Azure, que incluye la suscripción y la ubicación predeterminadas de Azure.

Disponible desde la versión azure-dev-cli_0.4.0-beta.1.

La manera más fácil de configurar azd por primera vez es ejecutar azd init. La suscripción y la ubicación que seleccione se almacenarán en el config.json archivo ubicado en el directorio de configuración. Para configurar azd en cualquier momento después, usará azd config set.

El valor predeterminado del directorio de configuración es:

  • $HOME/.azd en Linux y macOS
  • %USERPROFILE%.azd en Windows

El directorio de configuración se puede invalidar especificando una ruta de acceso en la variable de entorno AZD_CONFIG_DIR.

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config get

Obtiene una configuración.

Sinopsis

Obtiene una configuración en la ruta de acceso de configuración.

El valor predeterminado del directorio de configuración es:

  • $HOME/.azd en Linux y macOS
  • %USERPROFILE%\.azd en Windows

El directorio de configuración se puede invalidar especificando una ruta de acceso en la variable de entorno AZD_CONFIG_DIR.

azd config get <path> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config list-alpha

Muestra la lista de características disponibles en la fase alfa.

azd config list-alpha [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config reset

Restablece la configuración al valor predeterminado.

Sinopsis

Restablece toda la configuración en la ruta de acceso de configuración.

El valor predeterminado del directorio de configuración es:

  • $HOME/.azd en Linux y macOS
  • %USERPROFILE%\.azd en Windows

El directorio de configuración se puede invalidar especificando una ruta de acceso en la variable de entorno AZD_CONFIG_DIR al valor predeterminado.

azd config reset [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config set

Establece una configuración.

Sinopsis

Establece una configuración en la ruta de acceso de configuración.

El valor predeterminado del directorio de configuración es:

  • $HOME/.azd en Linux y macOS
  • %USERPROFILE%\.azd en Windows

El directorio de configuración se puede invalidar especificando una ruta de acceso en la variable de entorno AZD_CONFIG_DIR.

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

Ejemplos

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

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config show

Muestra todos los valores de configuración.

Sinopsis

Mostrar todos los valores de configuración en la ruta de acceso de configuración.

El valor predeterminado del directorio de configuración es:

  • $HOME/.azd en Linux y macOS
  • %USERPROFILE%\.azd en Windows

El directorio de configuración se puede invalidar especificando una ruta de acceso en la variable de entorno AZD_CONFIG_DIR.

azd config show [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd config unset

Anula la configuración.

Sinopsis

Quita una configuración en la ruta de acceso de configuración.

El valor predeterminado del directorio de configuración es:

  • $HOME/.azd en Linux y macOS
  • %USERPROFILE%\.azd en Windows

El directorio de configuración se puede invalidar especificando una ruta de acceso en la variable de entorno AZD_CONFIG_DIR.

azd config unset <path> [flags]

Ejemplos

azd config unset defaults.location

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd deploy

Implemente el código de la aplicación en Azure.

azd deploy <service> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd down

Elimine los recursos de Azure de una aplicación.

azd down [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env

Administrar entornos.

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env get-values

Obtenga todos los valores de entorno.

azd env get-values [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env list

Enumerar entornos.

azd env list [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env new

Cree un nuevo entorno y establézcalo como predeterminado.

azd env new <environment> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env refresh

Actualice la configuración del entorno mediante la información de una aprovisionamiento de infraestructura anterior.

azd env refresh <environment> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env select

Establezca el entorno predeterminado.

azd env select <environment> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd env set

Administrar la configuración del entorno.

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

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd hooks

Desarrolle, pruebe y ejecute enlaces para una aplicación. (Beta)

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd hooks run

Ejecuta el enlace especificado para el proyecto y los servicios

azd hooks run <name> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd init

Inicialice una nueva aplicación.

azd init [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd monitor

Supervise una aplicación implementada. (Beta)

azd monitor [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd package

Empaqueta el código de la aplicación que se va a implementar en Azure. (Beta)

azd package <service> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd pipeline

Administre y configure las canalizaciones de implementación. (Beta)

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd pipeline config

Configure la canalización de implementación para conectarse de forma segura a Azure. (Beta)

azd pipeline config [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd provision

Aprovisione los recursos de Azure para una aplicación.

azd provision [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd restore

Restaura las dependencias de la aplicación. (Beta)

azd restore <service> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd show

Muestra información sobre la aplicación y sus recursos.

azd show [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template

Busque y vea los detalles de la plantilla. (Beta)

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template list

Mostrar lista de plantillas azd de ejemplo. (Beta)

azd template list [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template show

Mostrar los detalles de una plantilla determinada. (Beta)

azd template show <template> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template source

Ver y administrar orígenes de plantilla. (Beta)

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template source add

Agrega un origen de plantilla azd en la clave especificada (Beta)

azd template source add <key> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template source list

Enumera los orígenes de plantilla azd configurados. (Beta)

azd template source list [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd template source remove

Quita el origen de plantilla azd especificado (Beta)

azd template source remove <key> [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd up

Aprovisione recursos de Azure e implemente el proyecto con un solo comando.

azd up [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también

azd version

Imprima el número de versión de la CLI para desarrolladores de Azure.

azd version [flags]

Opciones

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

Opciones heredadas de comandos primarios

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

Consulte también