Dear Team,
I am trying to create custom effect for an azure policy set definition so that each of the policy can have its own effect. To do this, i have to change the below set of json.
“parameters”: {
“effectA”: {
“type”: “String”,
“metadata”: {
“displayName”: “Effect”,
“description”: “Enable or disable the execution of the policy”
},
“allowedValues”: [
“Audit”,
“Deny”,
“Disabled”
],
“defaultValue”: “Audit”
},
“effectB”: {
“type”: “String”,
“metadata”: {
“displayName”: “Effect”,
“description”: “Enable or disable the execution of the policy”
},
“allowedValues”: [
“Audit”,
“Deny”,
“Disabled”
],
“defaultValue”: “Audit”
}
}
Generally It should be something like below
“parameters”: {
“effectA”: {
“type”: “String”,
“metadata”: {
“displayName”: “EffectA_some_custom_id”,
“description”: “Enable or disable the execution of the policy”
},
“allowedValues”: [
“Audit”,
“Deny”,
“Disabled”
],
“defaultValue”: “Audit”
},
“effectB”: {
“type”: “String”,
“metadata”: {
“displayName”: “EffectB_some_custom_id”,
“description”: “Enable or disable the execution of the policy”
},
“allowedValues”: [
“Audit”,
“Deny”,
“Disabled”
],
“defaultValue”: “Audit”
}
}
so that the value for “displayName”: “EffectA” gets changed to “displayName”:“EffectA_policyName” , with the rest of json stay intact.
Can someone help me in achieving this please ?