I have the following response from an API and I need to get the resourceName if it consists the keywords -ecs-cloudwatch-policy. How can this be achieved in rego?
{
'resourceId': 'ABCDEF12345',
'resourceName': 'IAM-ctf-109-ecs-cloudwatch-policy',
'resourceType': 'AWS: :IAM: :Policy',
'name': 'Is attached to Policy'
},
{ 'resourceId': 'ABCDEF54321',
'resourceName': 'IAM-KMS-Policy-115',
'resourceType': 'AWS: :IAM: :Policy',
'name': 'Is attached to CustomerPolicy'
}