RQL - Checking Tag.key's value

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

RQL - Checking Tag.key's value

L0 Member

Working to develop a query in prisma to check for a certain tag's value being older than 365 days. I can't seem to find any documentation on this. I have this rough draft but it fails and I am not sure why:

config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-volumes' AND json.rule = ((tags[?(@.key=='Retain' && '_DateTime.ageInDays(@.value) > 365')] size > 0) or (tags[*].key does not contain Retain))


Looking for any working examples of checking a tag's value or using the date functions. Any recommendations/tips are welcome

AWS Prisma Cloud 


L0 Member

These two query statements work indapendently but I cannot combine them into the same query:
json.rule = _DateTime.ageInDays(tags[?(@.key=='Retain')].value) > 365
json.rule = tags[*].key does not contain "Retain"
Need to be able to filter out resources that dont have a tag.key called 'Retain' OR the tag[Retain].value is older than 365 days

  • 1 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!