Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Using Rest API to delete an AWS Monitoring Definition in Panorama

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

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

1 REPLY 1

L1 Bithead

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

  • 1801 Views
  • 1 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!