Coder Social home page Coder Social logo

[ ENHANCEMENT ] Add ParameterSet to `Invoke-FalconAlertAction` and `Invoke-FalconIncidentAction` to allow for multiple actions in one API query about psfalcon HOT 4 CLOSED

datorr2 avatar datorr2 commented on May 29, 2024
[ ENHANCEMENT ] Add ParameterSet to `Invoke-FalconAlertAction` and `Invoke-FalconIncidentAction` to allow for multiple actions in one API query

from psfalcon.

Comments (4)

datorr2 avatar datorr2 commented on May 29, 2024 1

Looks fine and makes sense to me.

For the record: A single hashtable with multiple action/values would be simpler for the user, but I just figured the array of hashtables would be most consistent with how the API works and would require the least amount of work to the module code.

from psfalcon.

bk-cs avatar bk-cs commented on May 29, 2024 1

Thanks for the suggestion and your feedback! I have added the Action parameter to both Invoke-FalconAlertAction and Invoke-FalconIncidentAction, along with a supporting private function (Test-ActionParameter) that is used to validate user input.

These changes will be available in the next PSFalcon release.

from psfalcon.

bk-cs avatar bk-cs commented on May 29, 2024

Thanks! I'm out of the office but I will take a look at this next week.

from psfalcon.

bk-cs avatar bk-cs commented on May 29, 2024

@datorr2

I've implemented a draft of your suggestion that uses an array of Hashtable values to supply the name and value. Example:

Invoke-FalconIncidentAction -Action @{ add_tag = 'example_tag' },@{ update_status = 'closed' } -Id <id>,<id>

You can also supply the proper integer value for update_status like so:

Invoke-FalconIncidentAction -Action @{ add_tag = 'example_tag' },@{ update_status = 40 } -Id <id>,<id>
  • How do you feel about that?
  • Do you think that is self-explanatory and easy to use?

I chose [hashtable[]] because I've seen it used in other PowerShell commands, so it fit PowerShell style and was a bit easier for me to validate.

from psfalcon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.