{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.5",
  "body": [
    { "type": "TextBlock", "text": "Approval needed: Azure cost change", "weight": "Bolder", "size": "Large", "wrap": true },
    { "type": "TextBlock", "text": "${payload.title}", "spacing": "Small", "wrap": true },
    { "type": "FactSet", "facts": [
      { "title": "Estimated savings", "value": "${est_monthly_savings_text} a month (estimate)" },
      { "title": "Risk score", "value": "${risk_score} of 100 (${payload.risk_level})" },
      { "title": "Resource", "value": "${payload.resource_name}" },
      { "title": "Resource group", "value": "${payload.resource_group}" },
      { "title": "Resource ID", "value": "${resource_id}" },
      { "title": "Change", "value": "${payload.action}" },
      { "title": "Rollback", "value": "${payload.rollback}" },
      { "title": "Fix script", "value": "${payload.fix_script} (sha256 ${fix_sha_short})" },
      { "title": "Rollback script", "value": "${payload.rollback_script} (sha256 ${rollback_sha_short})" },
      { "title": "Change hash", "value": "${change_hash_short}" },
      { "title": "Expires", "value": "${expires_at}" }
    ] },
    { "type": "TextBlock", "text": "Savings are an estimate (${payload.savings_basis}). Approving records a decision only. Nothing changes in Azure until your team runs the fix script with the approval id.", "isSubtle": true, "size": "Small", "wrap": true }
  ],
  "actions": [
    { "type": "Action.Execute", "title": "Approve", "verb": "approve", "style": "positive", "data": { "a": "${approval_id}", "d": "approve", "h": "${change_hash}" } },
    { "type": "Action.Execute", "title": "Reject", "verb": "reject", "style": "destructive", "data": { "a": "${approval_id}", "d": "reject", "h": "${change_hash}" } }
  ]
}
