Can a value of condition under PolicyRule be retrieved from a REST API?
Thanks!
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@husamhilal Policy doesn't currently report the evaluated results of individual value entries in a policy definition, but does report compliance on the entire policy's evaluation. Through the portal, you can see Causes for non-compliance, but the reason information isn't available via API. If this is a feature you'd like, please post it on UserVoice so the team can evaluate it and prioritize it. Thanks for the question!
@MicrosoftDocs/azure-cxp-triage Please label 'product-question' and #please-close
@DCtheGeek Thanks for the super quick response. :+1:
@DCtheGeek Thanks a lot for your quick response. 👍
Just to be specific. I'm trying to provide the value attribute with an input from a REST API.
For example, something similar to this: [get('https://endpointurl/datainput')]
Azure Policy supports most, but not all of the Resource Manager template functions. For the list of Policy supported functions, see Policy functions. I don't believe there is a Resource Manager template function similar to get. For that, I'd recommend posting the request to Resource Manager's UserVoice.
Your alternative would be to parameterize that value in the policy definition to set it during policy assignment, then replace the assignment when the value you want to use is changed. Hope that helps!