Need a example policy file for Email notification with Azure logic app #9843
Unanswered
pruthvibs16
asked this question in
Azure
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a requirement, where we need to fetch the cost of the every keyvaults in our organization and then send a outlook email about the cost usage. Used c7-org to run the policy against multiple subscriptions. We are planning to use logicapp webhook to trigger the email.
Problem is: we have around 250 keyvaults and policy file and logic app triggerring 100 emails. We need to consolidate them into a single email. Please help to create a custodian policy file to list the Azure keyvaults with associated costs and notify through a single email using logic app webhook. This policy have to consolidate multiple keyvault details into single payload sent to the logicAPP, which can then process and send a single email.
Policy file which triggere multiple emails:
`policies:
description: |
Get the usage cost of the keyvaults for 1 day.
resource: azure.keyvault
filters:
timeframe: 1
op: gt
value: 0
actions:
url: https://prod-42.eastus.logic.azure.com:443/workflows/46244c002d1e408b9a26293cc504b7f8/triggers/When_a_HTTP_request_is_received/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2FWhen_a_HTTP_request_is_received%2Frun&sv=1.0&sig=or035Fxzzr5kCkg--aM5NsqUvt_799zmnM-h8sqNP8U
body: >
{
PolicyName: policy.name,
PolicyDescription: policy.description,
resources: resource.
{
ID: id,
Name: name,
Type: type,
Location: location
}
}`
Beta Was this translation helpful? Give feedback.
All reactions