Commit 70a5633
Fix Azure Monitor API timespan format to use 'Z' for UTC (#1005)
Azure Monitor API requires timespan to use 'Z' suffix for UTC timezone
instead of '+00:00' offset. Changed from datetime.isoformat() to
strftime('%Y-%m-%dT%H:%M:%SZ') to match Azure's expected ISO 8601 format.
This fixes the BadRequest error: "Detected invalid time interval input"
that was occurring in instance_idle and unused_nat_gateway policies.
Files modified:
- cloud_governance/common/clouds/azure/monitor/monitor_management_operations.py
- cloud_governance/policy/helpers/azure/azure_policy_operations.py
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 0c99ac2 commit 70a5633
2 files changed
Lines changed: 4 additions & 4 deletions
File tree
- cloud_governance
- common/clouds/azure/monitor
- policy/helpers/azure
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
0 commit comments