Azure IoT Hub 메시지 라우팅
5419 단어 AzureIoTHub

사전 준비

상술한 빨간색에 관해서는 다른 투고를 참조하시오.
Raspberry Pi(Python)에서 Azure IoT Hub로 감지 측정 전송
Azure IoT Hub 메시지 라우팅
정보 정의
resourceGroupName={ResourceGroupName}
iotHubName={IoTHubName}
ioteviceName={IoTDeviceName}
storageAccountName={StorageAccountName}
containerName={ContainerName}
endpointName={EndpointName}
endpointType={EndpointType}
routeName={RouteName}
정보 얻기subscriptionID=$(az account show --query id)
Storage Acount 제작az storage account create \
--name $storageAccountName \
--resource-group $resourceGroup \
--location $location \
--sku Standard_LRS
Storage Acount 키 가져오기storageAccountKey=$(az storage account keys list \
--resource-group $resourceGroup \
--account-name $storageAccountName \
--query "[0].value" | tr -d '"')
Storage Acount 컨테이너 제작az storage container create --name $containerName \
--account-name $storageAccountName \
--account-key $storageAccountKey \
--public-access off
Storage Acount 접속 정보 보기storageConnectionString=$(az storage account show-connection-string \
--name $storageAccountName \
--query connectionString \
-o tsv)
IoT Hub의 끝점 작성az iot hub routing-endpoint create \
--connection-string $storageConnectionString \
--endpoint-name $endpointName \
--endpoint-resource-group $resourceGroup \
--endpoint-subscription-id $subscriptionID \
--endpoint-type $endpointType \
--hub-name $iotHubName \
--container $containerName \
--resource-group $resourceGroup \
--encoding json
IoT Hub 메시징 라우팅az iot hub route create \
--name $routeName \
--hub-name $iotHubName \
--source devicemessages \
--resource-group $resourceGroup \
--endpoint-name $endpointName \
--enabled
https://docs.microsoft.com/en-us/azure/iot-hub/tutorial-routing
Reference
이 문제에 관하여(Azure IoT Hub 메시지 라우팅), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/motoJinC25/items/cc6e76f2b73000410b60텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)