#Erzeuge Cosmos DB Instanz
az cosmosdb create -g rg-pictureanalysis-practice -n cosmospicana180719

#Erzeuge Datenbank
az cosmosdb database create -g rg-pictureanalysis-practice -n cosmospicana180719 --db-name imagesdb

#Erzeuge Collection
az cosmosdb collection create -g rg-pictureanalysis-practice -n cosmospicana180719 --db-name imagesdb --collection-name images --throughput 400

#Erzeuge Cognitive Service Instanz
az cognitiveservices account create -g rg-pictureanalysis-practice -n cogpicana150918 --kind ComputerVision --sku F0 -l westeurope

#Setup Function App setting for CogSvc connection
export COMP_VISION_KEY=$(az cognitiveservices account keys list -g rg-pictureanalysis-practice -n cogpicana150918 --query key1 --output tsv)
export COMP_VISION_URL=$(az cognitiveservices account show -g rg-pictureanalysis-practice -n cogpicana150918 --query endpoint --output tsv)
az functionapp config appsettings set -n fun-picana1107ku -g rg-pictureanalysis-practice --settings COMP_VISION_KEY=$COMP_VISION_KEY COMP_VISION_URL=$COMP_VISION_URL -o table




