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

Do multiple tags in one Maintenance Window

sundried
Newcomer

Hi,

 

I'm currently using the maintenance windows API to create maintenance windows and it's all good when only one tag is needed, but when I need to do multiple tags in 1 window I can't seem to find a good way to do it.

 

Here is the code for the tag I'm using

 

"scope": {
"entities": [],
"matches": [
  {
    "type": null,
    "managementZoneId": null,
    "mzId": null,
    "tags": [
      {
         "context": "CONTEXTLESS",
         "key": "Application",
         "value": "${APPLICATION}"
     }
    ],
    "tagCombination": "OR"
    }
    ]
},
 

 

 

When there is one tag, the ${APPLICATION} variable reads it just fine. However, when I need to do multiple tags, I've found the only way is to duplicate this code with "tagCombination": "AND". My question is if it's possible to do this in just 1 variable, as sometimes the window will use just 1 application tag, other times more.

1 REPLY 1

ChadTurner
DynaMight Legend
DynaMight Legend

You must use a new line item for the same Tag Key Value Pair. So for Key=Environment, you have to add an "And" in there and list another tag entity being Key=Environment and the value: 

 

ChadTurner_0-1630696562762.png

 

You can put in a RFE to expand this functionality if you'd like

 

-Chad

Featured Posts