- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
04-07-2021 06:06 AM
I am trying to automate the addition/deletion of AWS Monitoring Definitions for the AWS Plug in for Panorama. I am able to add Monitoring Definitions using the following in Postman:
https://{{panorama}}/api?key={{key}}&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/plugins/aws/monitoring-definition&element=<entry name='BobbyTest'><vpc-ids><member>vpc-xxxxxxxxxxx</member></vpc-ids><role-arn>arn:aws:iam::111111111111:role/panorama</role-arn><iam-role>panorama-ec2-RO</iam-role><description>gatewayTESTTESTTEST</description><endpoint-url>ec2.eu-west-1.amazonaws.com</endpoint-url><notify-group>Inspection_Firewall_DGs</notify-group><enable>yes</enable></entry>
But when I try to delete an individual VPC from a monitoring definition or delete a definition for a specific Account/Region, the API deletes ALL the monitoring definitions. The Postman URL I am trying to use is:
https://{{panorama}}/api?key={{key}}&type=config&action=delete&xpath=/config/devices/entry[@name='localhost.localdomain']/plugins/aws/monitoring-definition&element=<entry name='BobbyTest'><vpc-ids><member>vpc-xxxxxxxxxxx</member></vpc-ids><role-arn>arn:aws:iam::111111111111:role/panorama</role-arn><iam-role>panorama-ec2-RO</iam-role><description>gatewayTESTTESTTEST</description><endpoint-url>ec2.eu-west-1.amazonaws.com</endpoint-url><notify-group>Inspection_Firewall_DGs</notify-group><enable>yes</enable></entry>
But is seems that no matter what information I provide in the "element", the action deletes all the definitions.
How do I delete a VPC from the list of VPCs in a specific Account/Region definition?
How do I delete a specific Account/Region definition?
Thanks in advance, Bobby
04-07-2021 07:20 AM
figured out how to delete the Monitoring Definition for an Account/Region
https://{{panorama}}/api?key={{key}}&type=config&action=delete&xpath=/config/devices/entry[@name='localhost.localdomain']/plugins/aws/monitoring-definition/entry[@name='BobbyTest']
and how to delete all VPCs associated with an Account/Region
https://{{panorama}}/api?key={{key}}&type=config&action=delete&xpath=/config/devices/entry[@name='localhost.localdomain']/plugins/aws/monitoring-definition/entry[@name='BobbyTest']/vpc-ids/member
But still need to be able to delete an individual VPC member from the Monitoring Definition
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!