Dela via


Referens för Azure Developer CLI

I den här artikeln beskrivs syntaxen och parametrarna för de olika Azure Developer CLI-kommandona.

azd

Azure Developer CLI (azd) är ett verktyg med öppen källkod som hjälper dig att registrera och hantera ditt projekt i Azure

Alternativ

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

Se även

  • azd add: Lägg till en komponent i projektet.
  • azd auth: Autentisera med Azure.
  • azd completion: Generera skript för shell-slutförande.
  • azd config: Hantera azd-konfigurationer (till exempel azure-standardprenumeration, plats).
  • azd deploy: Distribuera din projektkod till Azure.
  • azd down: Ta bort projektets Azure-resurser.
  • azd env: Hantera miljöer (till exempel standardmiljö, miljövariabler).
  • azd extension: Hantera azd-tillägg.
  • azd hooks: Utveckla, testa och köra krokar för ett projekt.
  • azd infra: Hantera din infrastruktur som kod (IaC).
  • azd init: Initiera ett nytt program.
  • azd mcp: Hantera MCP-servern (Model Context Protocol). (Alfa)
  • azd monitor: Övervaka ett distribuerat projekt.
  • azd-paket: Paketera projektets kod som ska distribueras till Azure.
  • azd pipeline: Hantera och konfigurera dina distributionspipelines.
  • azd provision: Etablera Azure-resurser för projektet.
  • azd publish: Publicera en tjänst till ett containerregister.
  • azd restore: Återställer projektets beroenden.
  • azd show: Visa information om projektet och dess resurser.
  • azd template: Hitta och visa mallinformation.
  • azd up: Etablera och distribuera projektet till Azure med ett enda kommando.
  • azd version: Skriv ut versionsnumret för Azure Developer CLI.

azd lägg till

Lägg till en komponent i projektet.

azd add [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd auth

Autentisera med Azure.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd auth login

Logga in på Azure.

Sammanfattning

Logga in på Azure.

När du kör utan argument loggar du in interaktivt med hjälp av en webbläsare. Om du vill logga in med en enhetskod skickar du --use-device-code.

Om du vill logga in som tjänstens huvudnamn skickar du --client-id och --tenant-id samt ett av: --client-secret, --client-certificate eller --federated-credential-provider.

Om du vill logga in med en hanterad identitet skickar du --managed-identity, som använder den systemtilldelade hanterade identiteten. Om du vill använda en användartilldelad hanterad identitet skickar du --client-id utöver --managed-identity med klient-ID:t för den användartilldelade hanterade identiteten som du vill använda.

azd auth login [flags]

Alternativ

      --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. Supported values: github, azure-pipelines, oidc
  -h, --help                                   Gets help for login.
      --managed-identity                       Use a managed identity to authenticate.
      --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.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd auth-utloggning

Logga ut från Azure.

Sammanfattning

Logga ut från Azure

azd auth logout [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd komplettering

Generera skript för shell-slutförande.

Sammanfattning

Generera skript för slutförande i shell för azd.

Med slutförandekommandot kan du generera skript för automatisk komplettering för gränssnittet, som för närvarande stöder bash, zsh, fish och PowerShell.

Mer information om hur du använder det genererade skriptet finns i hjälpen för varje underkommando.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd completion bash

Generera bash-slutförandeskript.

azd completion bash

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd completion fish

Generera fish-kommandoslutskript.

azd completion fish

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd slutföring för PowerShell

Generera PowerShell-slutförandeskript.

azd completion powershell

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd completion zsh

Generera zsh-slutförandeskript.

azd completion zsh

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd config

Hantera azd-konfigurationer (till exempel azure-standardprenumeration, plats).

Sammanfattning

Hantera Azure Developer CLI-användarkonfigurationen, som innehåller din standardprenumeration och plats för Azure.

Tillgänglig sedan azure-dev-cli_0.4.0-beta.1.

Det enklaste sättet att konfigurera azd för första gången är att köra azd init. Den prenumeration och plats som du väljer lagras i config.json filen som finns i konfigurationskatalogen. Om du vill konfigurera azd när som helst efteråt använder azd config setdu .

Standardvärdet för konfigurationskatalogen är:

  • $HOME/.azd på Linux och macOS
  • %USERPROFILE%.azd på Windows

Konfigurationskatalogen kan åsidosättas genom att ange en sökväg i AZD_CONFIG_DIR miljövariabeln.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd config get

Hämtar en konfiguration.

Sammanfattning

Hämtar en konfiguration i konfigurationssökvägen.

Standardvärdet för konfigurationskatalogen är:

  • $HOME/.azd på Linux och macOS
  • %USERPROFILE%\.azd i Windows

Konfigurationskatalogen kan åsidosättas genom att ange en sökväg i AZD_CONFIG_DIR miljövariabeln.

azd config get <path> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd config list-alpha

Visa listan över tillgängliga funktioner i alfasteget.

azd config list-alpha [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd konfiguration återställ

Återställer konfigurationen till standard.

Sammanfattning

Återställer all konfiguration i konfigurationssökvägen.

Standardvärdet för konfigurationskatalogen är:

  • $HOME/.azd på Linux och macOS
  • %USERPROFILE%\.azd i Windows

Konfigurationskatalogen kan åsidosättas genom att ange en sökväg i AZD_CONFIG_DIR miljövariabeln som standard.

azd config reset [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd config set

Anger en konfiguration.

Sammanfattning

Anger en konfiguration i konfigurationssökvägen.

Standardvärdet för konfigurationskatalogen är:

  • $HOME/.azd på Linux och macOS
  • %USERPROFILE%\.azd i Windows

Konfigurationskatalogen kan åsidosättas genom att ange en sökväg i AZD_CONFIG_DIR miljövariabeln.

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

Exempel

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

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd config show

Visa alla konfigurationsvärden.

Sammanfattning

Visa alla konfigurationsvärden i konfigurationssökvägen.

Standardvärdet för konfigurationskatalogen är:

  • $HOME/.azd på Linux och macOS
  • %USERPROFILE%\.azd i Windows

Konfigurationskatalogen kan åsidosättas genom att ange en sökväg i AZD_CONFIG_DIR miljövariabeln.

azd config show [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd config unset (ta bort konfiguration)

Tar bort en konfiguration.

Sammanfattning

Tar bort en konfiguration i konfigurationssökvägen.

Standardvärdet för konfigurationskatalogen är:

  • $HOME/.azd på Linux och macOS
  • %USERPROFILE%\.azd i Windows

Konfigurationskatalogen kan åsidosättas genom att ange en sökväg i AZD_CONFIG_DIR miljövariabeln.

azd config unset <path> [flags]

Exempel

azd config unset defaults.location

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd deploy

Distribuera din projektkod till Azure.

azd deploy <service> [flags]

Alternativ

      --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 packaged service located at the provided path. Supports zipped file packages (file path) or container images (image tag).
  -h, --help                  Gets help for deploy.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd down

Ta bort projektets Azure-resurser.

azd down [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env

Hantera miljöer (till exempel standardmiljö, miljövariabler).

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env get-value

Hämta ett specifikt miljövärde.

azd env get-value <keyName> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env get-values

Hämta alla miljövärden.

azd env get-values [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env list

Lista miljöer.

azd env list [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env new

Skapa en ny miljö och ange den som standard.

azd env new <environment> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env refresh

Uppdatera miljövärden med hjälp av information från en tidigare infrastrukturetablering.

azd env refresh <environment> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env välj

Ange standardmiljön.

azd env select <environment> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd env set

Ange ett eller flera miljövärden.

Sammanfattning

Ange ett eller flera miljövärden med nyckel/värde-par eller genom att läsa in från en .env-formaterad fil.

azd env set [<key> <value>] | [<key>=<value> ...] | [--file <filepath>] [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

Använd kommandot `azd env set-secret` för att ställa in en hemlighet i miljön.

Ange ett namn som referens till en Key Vault-hemlighet i miljön.

Sammanfattning

Du kan antingen skapa en ny Key Vault-hemlighet eller välja en befintlig. Det angivna namnet är nyckeln för .env-filen som innehåller den hemliga referensen till Key Vault-hemligheten.

azd env set-secret <name> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd-tillägg

Hantera azd-tillägg.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd-tilläggsinstallation

Installerar angivna tillägg.

azd extension install <extension-name> [flags]

Alternativ

      --docs             Opens the documentation for azd extension install in your web browser.
  -f, --force            Force installation even if it would downgrade the current version
  -h, --help             Gets help for install.
  -s, --source string    The extension source to use for installs
  -v, --version string   The version of the extension to install

Alternativ som ärvs från överordnade kommandon

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

Se även

azd extension list

Lista tillgängliga tillägg.

azd extension list [--installed] [flags]

Alternativ

      --docs            Opens the documentation for azd extension list in your web browser.
  -h, --help            Gets help for list.
      --installed       List installed extensions
      --source string   Filter extensions by source
      --tags strings    Filter extensions by tags

Alternativ som ärvs från överordnade kommandon

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

Se även

Kommandot azd extension show

Visa information om ett specifikt tillägg.

azd extension show <extension-name> [flags]

Alternativ

      --docs            Opens the documentation for azd extension show in your web browser.
  -h, --help            Gets help for show.
  -s, --source string   The extension source to use.

Alternativ som ärvs från överordnade kommandon

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

Se även

källa för azd-tillägg

Visa och hantera tilläggskällor

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd lägg till tilläggskälla

Lägg till en tilläggskälla med det angivna namnet

azd extension source add [flags]

Alternativ

      --docs              Opens the documentation for azd extension source add in your web browser.
  -h, --help              Gets help for add.
  -l, --location string   The location of the extension source
  -n, --name string       The name of the extension source
  -t, --type string       The type of the extension source. Supported types are 'file' and 'url'

Alternativ som ärvs från överordnade kommandon

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

Se även

azd-förlängningskällistor

Lista tilläggskällor

azd extension source list [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd extension source remove

Ta bort en tilläggskälla med det angivna namnet

azd extension source remove <name> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd tillägg avinstallera

Avinstallera angivna tillägg.

azd extension uninstall <extension-name> [flags]

Alternativ

      --all    Uninstall all installed extensions
      --docs   Opens the documentation for azd extension uninstall in your web browser.
  -h, --help   Gets help for uninstall.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd-tilläggsuppgradering

Uppgradera angivna tillägg.

azd extension upgrade <extension-name> [flags]

Alternativ

      --all              Upgrade all installed extensions
      --docs             Opens the documentation for azd extension upgrade in your web browser.
  -h, --help             Gets help for upgrade.
  -s, --source string    The extension source to use for upgrades
  -v, --version string   The version of the extension to upgrade to

Alternativ som ärvs från överordnade kommandon

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

Se även

azd hooks

Utveckla, testa och köra krokar för ett projekt.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd hooks run

Kör den angivna kroken för projektet och tjänsterna

azd hooks run <name> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd infra

Hantera din infrastruktur som kod (IaC).

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd infra generate

Skriv IaC för projektet till disk så att du kan hantera det manuellt.

azd infra generate [flags]

Alternativ

      --docs                 Opens the documentation for azd infra generate in your web browser.
  -e, --environment string   The name of the environment to use.
      --force                Overwrite any existing files without prompting
  -h, --help                 Gets help for generate.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd init

Initiera ett nytt program.

azd init [flags]

Alternativ

  -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.
  -f, --filter strings        The tag(s) used to filter template results. Supports comma-separated values.
      --from-code             Initializes a new application from your existing code.
  -h, --help                  Gets help for init.
  -l, --location string       Azure location for the new environment
  -m, --minimal               Initializes a minimal project.
  -s, --subscription string   Name or ID of an Azure subscription to use for the new environment
  -t, --template string       Initializes a new application from a template. You can use Full URI, <owner>/<repository>, or <repository> if it's part of the azure-samples organization.
      --up                    Provision and deploy to Azure after initializing the project from a template.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd mcp

Hantera MCP-servern (Model Context Protocol). (Alfa)

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

Hantera MCP-verktygsmedgivande.

Sammanfattning

Hantera medgivanderegler för MCP-verktygskörning.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

Bevilja förtroenderegler för medgivande.

Sammanfattning

Bevilja förtroenderegler för MCP-verktyg och -servrar.

Det här kommandot skapar medgivanderegler som gör att MCP-verktyg kan köras utan att fråga efter behörighet. Du kan ange olika behörighetsnivåer och omfång för reglerna.

azd mcp consent grant [flags]

Examples:

Ge alltid behörighet till alla verktyg globalt:

azd mcp consent grant --global --permission always

Bevilja projektbehörighet till ett specifikt verktyg med skrivskyddad åtkomstnivå.

azd mcp consent grant --server my-server --tool my-tool --permission project --scope read-only

Alternativ

      --action string       Action type: 'all' or 'readonly' (default "all")
      --docs                Opens the documentation for azd mcp consent grant in your web browser.
      --global              Apply globally to all servers
  -h, --help                Gets help for grant.
      --operation string    Operation type: 'tool' or 'sampling' (default "tool")
      --permission string   Permission: 'allow', 'deny', or 'prompt' (default "allow")
      --scope string        Rule scope: 'global', or 'project' (default "global")
      --server string       Server name
      --tool string         Specific tool name (requires --server)

Alternativ som ärvs från överordnade kommandon

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

Se även

Lista medgivandereglerna.

Sammanfattning

Lista alla medgivanderegler för MCP-verktyg.

azd mcp consent list [flags]

Alternativ

      --action string       Action type to filter by (readonly, any)
      --docs                Opens the documentation for azd mcp consent list in your web browser.
  -h, --help                Gets help for list.
      --operation string    Operation to filter by (tool, sampling)
      --permission string   Permission to filter by (allow, deny, prompt)
      --scope string        Consent scope to filter by (global, project). If not specified, lists rules from all scopes.
      --target string       Specific target to operate on (server/tool format)

Alternativ som ärvs från överordnade kommandon

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

Se även

Återkalla medgivanderegler.

Sammanfattning

Återkalla medgivanderegler för MCP-verktyg.

azd mcp consent revoke [flags]

Alternativ

      --action string       Action type to filter by (readonly, any)
      --docs                Opens the documentation for azd mcp consent revoke in your web browser.
  -h, --help                Gets help for revoke.
      --operation string    Operation to filter by (tool, sampling)
      --permission string   Permission to filter by (allow, deny, prompt)
      --scope string        Consent scope to filter by (global, project). If not specified, revokes rules from all scopes.
      --target string       Specific target to operate on (server/tool format)

Alternativ som ärvs från överordnade kommandon

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

Se även

azd mcp start

Startar MCP-servern.

Sammanfattning

Startar MCP-servern (Model Context Protocol).

Det här kommandot startar en MCP-server som kan användas av MCP-klienter för att få åtkomst till azd-funktioner via gränssnittet För modellkontextprotokoll.

azd mcp start [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd övervaka

Övervaka ett distribuerat projekt.

azd monitor [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd-paket

Paketeras projektets kod som ska distribueras till Azure.

azd package <service> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd pipeline

Hantera och konfigurera dina distributionspipelines.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd pipeline-konfiguration

Konfigurera distributionspipelinen så att den ansluter säkert till Azure. (Beta)

azd pipeline config [flags]

Alternativ

  -m, --applicationServiceManagementReference string   Service Management Reference. References application or service contact information from a Service or Asset Management database. This value must be a Universally Unique Identifier (UUID). You can set this value globally by running azd config set pipeline.config.applicationServiceManagementReference <UUID>.
      --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")

Alternativ som ärvs från överordnade kommandon

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

Se även

azd bestämmelse

Etablera Azure-resurser för projektet.

azd provision [flags]

Alternativ

      --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             (Bicep only) Forces a fresh deployment based on current Bicep template files, ignoring any stored deployment state.
      --preview              Preview changes to Azure resources.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd publish

Publicera en tjänst till ett containerregister.

azd publish <service> [flags]

Alternativ

      --all                   Publishes all services that are listed in azure.yaml
      --docs                  Opens the documentation for azd publish in your web browser.
  -e, --environment string    The name of the environment to use.
      --from-package string   Publishes the service from a container image (image tag).
  -h, --help                  Gets help for publish.
      --to string             The target container image in the form '[registry/]repository[:tag]' to publish to.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd återställ

Återställer projektets beroenden.

azd restore <service> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd show

Visa information om projektet och dess resurser.

azd show [resource name or ID] [flags]

Alternativ

      --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.
      --show-secrets         Unmask secrets in output.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd-mall

Hitta och visa mallinformation.

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd malllista

Visa en lista över azd-exempelmallar. (Beta)

azd template list [flags]

Alternativ

      --docs             Opens the documentation for azd template list in your web browser.
  -f, --filter strings   The tag(s) used to filter template results. Supports comma-separated values.
  -h, --help             Gets help for list.
  -s, --source string    Filters templates by source.

Alternativ som ärvs från överordnade kommandon

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

Se även

azd template show

Visa information för en viss mall. (Beta)

azd template show <template> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd mallkälla

Visa och hantera mallkällor. (Beta)

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd mallkälla lägg till

Lägger till en azd-mallkälla med den angivna nyckeln. (Beta)

Sammanfattning

Nyckeln kan vara valfritt värde som unikt identifierar mallkällan, med välkända värden: .standard: Standardmallar :awesome-azd: Mallar från https://aka.ms/awesome-azd

azd template source add <key> [flags]

Alternativ

      --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. Required when using type flag.
  -n, --name string       Display name of the template source.
  -t, --type string       Kind of the template source. Supported types are 'file', 'url' and 'gh'.

Alternativ som ärvs från överordnade kommandon

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

Se även

lista över azd-mallkällor

Visar en lista över de konfigurerade azd-mallkällorna. (Beta)

azd template source list [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd mallkälla ta bort

Tar bort den angivna azd-mallkällan (Beta)

azd template source remove <key> [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd up

Etablera och distribuera projektet till Azure med ett enda kommando.

azd up [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även

azd version

Skriv ut versionsnumret för Azure Developer CLI.

azd version [flags]

Alternativ

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

Alternativ som ärvs från överordnade kommandon

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

Se även