We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use EventGrid to subscribe to blob created events. The current process is involved. Basically I want to script these steps:
FUNCTION="name_of_my_function_app" FUNCTION_RG="function_resource_group" STORAGE_ACCT="storage_acct_to_subscribe_to" STORAGE_ACCT_ID=$(az storage account show -n $STORAGE_ACCT --query id -o tsv) FUNCTION_USERNAME=$(az webapp deployment list-publishing-profiles -n $FUNCTION -g $FUNCTION_RG --query "[?publishMethod=='MSDeploy'].userName" -o tsv) FUNCTION_PASS=$(az webapp deployment list-publishing-profiles -n $FUNCTION -g $FUNCTION_RG --query "[?publishMethod=='MSDeploy'].userPWD" -o tsv) FUNCTION_TOKEN=$(curl -s -u ${FUNCTION_USERNAME}:${FUNCTION_PASS} -X GET https://$FUNCTION.scm.azurewebsites.net/api/functions/admin/token | jq -r .) MASTER_KEY=$(curl -s -H "Authorization: Bearer $FUNCTION_TOKEN" -X GET https://$FUNCTION.azurewebsites.net/admin/host/systemkeys/_master | jq -r .value) az eventgrid event-subscription create --resource-id $STORAGE_ACCT_ID --name mycontainer --included-event-types 'Microsoft.Storage.BlobCreated' --endpoint "https://$FUNCTION.azurewebsites.net/runtime/webhooks/eventgrid?functionName=MyFunctionName&code=$MASTER_KEY"
Update - slightly less hacky steps:
ARM_TOKEN=$(az account get-access-token --query accessToken -o tsv) SYSTEM_KEY=$(curl -s -H "Authorization: Bearer $ARM_TOKEN" "https://management.azure.com$FUNCTION_ID/hostruntime/admin/host/systemkeys/eventgrid_extension?api-version=2018-02-01" | jq -r .value) az eventgrid event-subscription create --resource-id $STORAGE_ACCT_ID --name custodianlogs --included-event-types 'Microsoft.Storage.BlobCreated' --subject-ends-with 'resources.json.gz' --endpoint "https://$FUNCTION.azurewebsites.net/runtime/webhooks/eventgrid?functionName=TransformCustodianLogs&code=$SYSTEM_KEY"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to use EventGrid to subscribe to blob created events. The current process is involved. Basically I want to script these steps:
Update - slightly less hacky steps:
The text was updated successfully, but these errors were encountered: