Azure CLI용 Azure Sphere 확장 개요

Azure Sphere 연결된 디바이스 및 클라우드 배포를 관리하기 위한 명령줄 도구는 Azure CLI 확장으로 배포됩니다.

Azure CLI 및 Azure Sphere 확장 설치

Azure CLI용 Azure Sphere 확장을 가져오려면 다음을 수행합니다.

  1. 아직 설치하지 않은 경우 Azure CLI를 설치합니다.

  2. Azure Sphere 확장을 추가하려면 다음 명령을 실행합니다.

    az extension add --name azure-sphere
    

Azure Sphere 디바이스를 관리하는 데 사용하려는 Azure 구독에 로그인하려면 Azure CLI로 로그인 해야 합니다.

확장이 설치되면 해당 위치는 셸 변수 값 $AZURE_EXTENSION_DIR 아래에 있습니다. 이 변수가 설정되지 않은 경우 기본적으로 값은 $HOME/.azure/cliextensions Linux 및 macOS 및 %USERPROFILE%\.azure\cliextensions Windows에 있습니다.

로그인하면 Azure 계정과 연결된 구독 목록이 표시됩니다. Azure Sphere 확장이 올바르게 작동하려면 명령을 사용하여 az account set 필요한 권한이 있는 구독을 선택해야 합니다. 구독 선택에 대한 자세한 내용은 여러 Azure 구독 사용을 참조하세요.

Azure Sphere 확장 관리

설치된 버전의 Azure CLI 확장을 보려면 다음 명령을 사용합니다.

az version

Azure Sphere 확장을 최신 버전으로 업데이트하려면 다음을 사용합니다.

az extension update --name azure-sphere

Azure Sphere 확장을 제거하려면 다음을 사용합니다.

az extension remove --name azure-sphere

일반적인 Azure Sphere CLI 명령

Windows 명령 프롬프트 또는 PowerShell에서 를 입력하여 az sphere Azure Sphere 명령을 사용할 수 있습니다. Linux에서 CLI(명령줄 인터페이스)를 사용할 수 있습니다. CLI에는 bash 셸 아래의 명령에 대한 전체 탭 완성이 있습니다.

이 표에는 몇 가지 일반적인 Azure Sphere 명령과 참조 설명서에 대한 링크가 나열되어 있습니다.

명령 설명
az sphere catalog 카탈로그를 관리합니다.
az sphere ca-certificate 카탈로그에서 인증서를 관리합니다.
az sphere deployment 카탈로그에서 배포를 관리합니다.
az sphere device Azure Sphere 디바이스를 관리합니다.
az sphere device-group 카탈로그에서 디바이스 그룹을 관리합니다.
az sphere image 카탈로그에서 이미지를 관리합니다.
az sphere product 카탈로그에서 제품을 관리합니다.
az sphere get-support-data 시스템, 클라우드 및 디바이스 구성에 대한 진단 데이터를 수집합니다.

Azure CLI를 사용하면 , --subscription또는 --catalog와 같은 --resource-group매개 변수에 대한 기본값을 제공하여 Azure Sphere CLI 명령 사용을 간소화하는 구성 옵션을 설정할 수 있습니다.

디바이스 종속 명령

이 명령은 로컬로 연결된 Azure Sphere 디바이스에서 작동합니다. 디바이스가 연결되지 않은 상태에서 명령을 시도하면 오류가 발생합니다. 디바이스 명령에 대한 자세한 내용은 az sphere device를 참조하세요.

  • az sphere device claim
  • az sphere device recover
  • az sphere device restart
  • az sphere device show-attached
  • az sphere device show-os-version
  • az sphere device app show-memory-status
  • az sphere device app show-quota
  • az sphere device app show-status
  • az sphere device app start
  • az sphere device app stop
  • az sphere device capability show-attached
  • az sphere device capability update
  • az sphere device certificate add
  • az sphere device certificate delete
  • az sphere device certificate list
  • az sphere device certificate show
  • az sphere device certificate show-quota
  • az sphere device image list-installed
  • az sphere image-package show
  • az sphere device manufacturing-state show
  • az sphere device manufacturing-state update
  • az sphere device network proxy apply
  • az sphere device network proxy delete
  • az sphere device network proxy show
  • az sphere device network disable
  • az sphere device network enable
  • az sphere device network list-firewall-rules
  • az sphere device network list-interfaces
  • az sphere device network show-diagnostics
  • az sphere device network show-status
  • az sphere device network update-interface
  • az sphere device sideload delete
  • az sphere device sideload deploy
  • az sphere device wifi add
  • az sphere device wifi disable
  • az sphere device wifi enable
  • az sphere device wifi forget
  • az sphere device wifi list
  • az sphere device wifi reload-config
  • az sphere device wifi scan
  • az sphere device wifi show
  • az sphere device wifi show-status

전역적으로 사용 가능한 인수

Azure Sphere 확장에 사용할 수 있는 전역 매개 변수는 다음과 같습니다.

매개 변수 설명
--debug 로깅 세부 정보를 늘려 모든 디버그 로그를 표시합니다.
--help -h 도움말 메시지를 표시합니다.
--only-show-errors 경고를 표시하지 않고 오류만 표시합니다.
--output -o 출력 형식입니다. 허용되는 값: json, , jsoncnone, table, tsv, , yaml, yamlc. 기본값: json.
--query JMESPath 쿼리 문자열입니다. 자세한 내용 및 예제는 를 참조 http://jmespath.org/ 하세요.
--subscription : 구독의 이름 또는 ID입니다. 를 사용하여 az account set -s NAME_OR_ID기본 구독을 구성할 수 있습니다.
--verbose 로깅 세부 정보를 늘립니다. 전체 디버그 로그에 사용합니다 --debug .