RQL - how to filter tags in addcolumn section

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

RQL - how to filter tags in addcolumn section

L0 Member
Hi, I'm looking for help with a query.
 
config from cloud.resource where cloud.type = 'aws' AND cloud.service = 'Amazon Elastic Load Balancing' AND json.rule = scheme equals "internet-facing" addcolumn tags
 
This adds a new column with all of the resources tags but I want to filter the tags k=v pairs for (say) resource-owner and asset-id
 
{
"tags": [
{
"key": "Name",
"value": "resourcename"
},
{
"key": "asset-id",
"value": "2445566"

},
{
"key": "environment",
"value": "dev"
},
{
"key": "resource-owner",
"value": "bill@company.com"

}
],
 
Is this possible?
3 REPLIES 3

L4 Transporter

Greetings PDawson,

 

I hope that this note finds you well! I know that it has been a while since you had posted this question but I wanted to see if you still potentially needed any help. Thank you for your time and I hope that you have a good remainder of your day.

 

Kind Regards,

J. Avery King

J. Avery King | Prisma Cloud | Customer Success Engineer

What was the answer for this question? I have a similar request for this type of filtering.

L2 Linker

hello Pdawson

 

You can use the below RQL example to meet the requirement.

 

config from cloud.resource where cloud.type = 'aws' AND cloud.service = 'Amazon Elastic Load Balancing' AND api.name = 'aws-elb-describe-load-balancers' AND json.rule = scheme equals "internet-facing" and tags[*].key equals "resource-owner" or tags[*].key equals "asset-id"

 

Please let me know if you have additional questions.

  • 2917 Views
  • 3 replies
  • 0 Likes
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!