Using Rest API to delete an AWS Monitoring Definition in Panorama

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

Using Rest API to delete an AWS Monitoring Definition in Panorama

L1 Bithead

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></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></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


L1 Bithead

figured out how to delete the Monitoring Definition for an Account/Region




and how to delete all VPCs associated with an Account/Region



But still need to be able to delete an individual VPC member from the Monitoring Definition

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!