Gallery › Attestation › Azure Community Policy
Manual Policy per subscription
Converted Policy Disabled Manual Mode All Version 1.0.0
need to add description
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONazurepolicy.json · 39 lines
{
"name": "45cbca17-bd6d-49c7-8ef8-b7649d32f6c0",
"type": "Microsoft.Authorization/policyDefinitions",
"properties": {
"displayName": "Manual Policy per subscription",
"description": "need to add description",
"metadata": {
"version": "1.0.0",
"category": "Attestation"
},
"mode": "All",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Manual or Disabled the execution of the Policy"
},
"allowedValues": [
"Manual",
"Disabled"
],
"defaultValue": "Manual"
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Resources/subscriptions"
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"defaultState": "Unknown"
}
}
}
}
}Bylaw45cbca17-bd6d-49c7-8ef8-b7649d32f6c0.bylaw.ps1 · 22 lines
# Converted from azurepolicy.json by ConvertTo-Bylaw.
Policy '45cbca17-bd6d-49c7-8ef8-b7649d32f6c0' {
Properties @{
DisplayName = 'Manual Policy per subscription'
Description = 'need to add description'
Version = '1.0.0'
Category = 'Attestation'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Manual', 'Disabled')
Default = 'Manual'
DisplayName = 'Effect'
Description = 'Manual or Disabled the execution of the Policy'
}
Resource 'Microsoft.Resources/subscriptions'
Manual -DefaultState Unknown -Effect (Param Effect)
}Source: policyDefinitions/Attestation/manual-policy-per-subscription/azurepolicy.json in Azure/Community-Policy, under the MIT licence.
Bylaw