Skip to content

Commit bfe3d8d

Browse files
tas50claude
andauthored
⭐ v13: Convert Azure Defender dict values into resources (#6694)
* ⭐ Convert Azure Defender dict fields to typed resources Replace all 10 untyped dict-returning defenderFor* fields with fully typed MQL resources, matching the existing defenderForApis and defenderCSPM pattern. Each resource exposes .enabled, .pricingTier, and common pricing metadata (subPlan, enforce, deprecated, freeTrialRemainingTime, enablementTime, inherited, inheritedFrom, replacedBy, resourcesCoverageStatus). Add typed extension sub-resources for both defenderCSPM and defenderForContainers with name, isEnabled, additionalProperties, operationStatusCode, and operationStatusMessage fields. Add isEnabled and phone fields to securityContact. Add unit tests for commonPricingArgs and argsFromContactProperties helper functions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Document lazy-loading behavior on extensions() methods Add comments to both DefenderCSPM and DefenderForContainers extensions() methods explaining the intentional re-fetch of pricing data for lazy loading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 🐛 Fix defenderForContainers extensions as computed field The extensions field was defined as a plain field instead of a computed field (missing `()`), so the hand-written extensions() method was never called. This matches the working defenderCSPM pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 🐛 Add nil guard for commonPricingArgs and simplify enablementTime - Add nil check for props parameter to prevent panic if Properties is nil - Simplify enablementTime assignment since llx.TimeDataPtr already handles nil - Remove unused time import - Add NilProperties test case for commonPricingArgs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add nil guards for Properties in extensions() methods Prevent nil-pointer panics when cloudPosturePricing.Properties or containersPricing.Properties is nil in the CSPM and Containers extensions() methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * 🐛 Fix extension __id path and simplify commonPricingArgs nil guard Use "/extension/" (singular) in buildExtensionResources to maintain backward compatibility with the pre-existing CSPM extension cache keys. Simplify the nil-props guard in commonPricingArgs by substituting an empty PricingProperties struct, so all nil-safe field checks handle it uniformly without duplicating zero-value assignments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 205fde0 commit bfe3d8d

File tree

5 files changed

+10723
-7559
lines changed

5 files changed

+10723
-7559
lines changed

0 commit comments

Comments
 (0)