Forum Discussion

RCDevops777's avatar
RCDevops777
Copper Contributor
Jan 25, 2019
Solved

OMS Log Analytics query Function/alias creation via ARM template

Hi All,    I have created ARM templates for creating OMS Log Analytics Searches. I am trying to see if you can help me creating a function in via ARM template. Bascially  we want to create/update t...
  • Hi,

    For creating function you actually use the saved searches API.

    https://docs.microsoft.com/en-us/rest/api/loganalytics/savedsearches/createorupdate

    There is a slight change in the properties of the call.

    "properties": {
        "category": " Saved Search Test Category",
        "displayName": "Create or Update Saved Search Test",
        "query": "* | measure Count() by Computer",
    "FunctionAlias" : "AllComputers",
        "version": 2
      }

    With that you create function.

    And it is just Log Analytics now. We do not use OMS anymore.

Resources