-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Microsoft.Authorization/policy* entities 2019-09-01 (#7380)
* Copy 2019-06-01 to 2019-09-01 * Api-version 2019-09-01 of policy entities * Allow multiple groups * Explicitly model parameter definitions and values
- Loading branch information
Showing
43 changed files
with
4,680 additions
and
1 deletion.
There are no files selected for viewing
90 changes: 90 additions & 0 deletions
90
...er/Microsoft.Authorization/stable/2019-09-01/examples/createOrUpdatePolicyDefinition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2", | ||
"policyDefinitionName": "ResourceNaming", | ||
"api-version": "2019-09-01", | ||
"parameters": { | ||
"properties": { | ||
"mode": "All", | ||
"displayName": "Enforce resource naming convention", | ||
"description": "Force resource names to begin with given 'prefix' and/or end with given 'suffix'", | ||
"metadata": { | ||
"category": "Naming" | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"not": { | ||
"field": "name", | ||
"like": "[concat(parameters('prefix'), '*', parameters('suffix'))]" | ||
} | ||
}, | ||
"then": { | ||
"effect": "deny" | ||
} | ||
}, | ||
"parameters": { | ||
"prefix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Prefix", | ||
"description": "Resource name prefix" | ||
} | ||
}, | ||
"suffix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Suffix", | ||
"description": "Resource name suffix" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming", | ||
"type": "Microsoft.Authorization/policyDefinitions", | ||
"name": "ResourceNaming", | ||
"properties": { | ||
"mode": "All", | ||
"displayName": "Naming Convention", | ||
"description": "Force resource names to begin with 'prefix' and end with 'suffix'", | ||
"metadata": { | ||
"category": "Naming" | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"not": { | ||
"field": "name", | ||
"like": "[concat(parameters('prefix'), '*', parameters('suffix'))]" | ||
} | ||
}, | ||
"then": { | ||
"effect": "deny" | ||
} | ||
}, | ||
"parameters": { | ||
"prefix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Prefix", | ||
"description": "Resource name prefix" | ||
} | ||
}, | ||
"suffix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Suffix", | ||
"description": "Resource name suffix" | ||
} | ||
} | ||
}, | ||
"policyType": "Custom" | ||
} | ||
} | ||
} | ||
} | ||
} |
90 changes: 90 additions & 0 deletions
90
...orization/stable/2019-09-01/examples/createOrUpdatePolicyDefinitionAtManagementGroup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"parameters": { | ||
"managementGroupId": "MyManagementGroup", | ||
"policyDefinitionName": "ResourceNaming", | ||
"api-version": "2019-09-01", | ||
"parameters": { | ||
"properties": { | ||
"mode": "All", | ||
"displayName": "Enforce resource naming convention", | ||
"description": "Force resource names to begin with given 'prefix' and/or end with given 'suffix'", | ||
"metadata": { | ||
"category": "Naming" | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"not": { | ||
"field": "name", | ||
"like": "[concat(parameters('prefix'), '*', parameters('suffix'))]" | ||
} | ||
}, | ||
"then": { | ||
"effect": "deny" | ||
} | ||
}, | ||
"parameters": { | ||
"prefix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Prefix", | ||
"description": "Resource name prefix" | ||
} | ||
}, | ||
"suffix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Suffix", | ||
"description": "Resource name suffix" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/providers/Microsoft.Management/managementgroups/MyManagementGroup/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming", | ||
"type": "Microsoft.Authorization/policyDefinitions", | ||
"name": "ResourceNaming", | ||
"properties": { | ||
"mode": "All", | ||
"displayName": "Naming Convention", | ||
"description": "Force resource names to begin with 'prefix' and end with 'suffix'", | ||
"metadata": { | ||
"category": "Naming" | ||
}, | ||
"policyRule": { | ||
"if": { | ||
"not": { | ||
"field": "name", | ||
"like": "[concat(parameters('prefix'), '*', parameters('suffix'))]" | ||
} | ||
}, | ||
"then": { | ||
"effect": "deny" | ||
} | ||
}, | ||
"parameters": { | ||
"prefix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Prefix", | ||
"description": "Resource name prefix" | ||
} | ||
}, | ||
"suffix": { | ||
"type": "String", | ||
"metadata": { | ||
"displayName": "Suffix", | ||
"description": "Resource name suffix" | ||
} | ||
} | ||
}, | ||
"policyType": "Custom" | ||
} | ||
} | ||
} | ||
} | ||
} |
153 changes: 153 additions & 0 deletions
153
...Microsoft.Authorization/stable/2019-09-01/examples/createOrUpdatePolicySetDefinition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2", | ||
"policySetDefinitionName": "CostManagement", | ||
"api-version": "2019-09-01", | ||
"parameters": { | ||
"properties": { | ||
"displayName": "Cost Management", | ||
"description": "Policies to enforce low cost storage SKUs", | ||
"metadata": { | ||
"category": "Cost Management" | ||
}, | ||
"parameters": { | ||
"namePrefix": { | ||
"type": "String", | ||
"defaultValue": "myPrefix", | ||
"metadata": { | ||
"displayName": "Prefix to enforce on resource names" | ||
} | ||
} | ||
}, | ||
"policyDefinitions": [ | ||
{ | ||
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", | ||
"policyDefinitionReferenceId": "Limit_Skus", | ||
"parameters": { | ||
"listOfAllowedSKUs": { | ||
"value": [ | ||
"Standard_GRS", | ||
"Standard_LRS" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming", | ||
"policyDefinitionReferenceId": "Resource_Naming", | ||
"parameters": { | ||
"prefix": { | ||
"value": "[parameters('namePrefix')]" | ||
}, | ||
"suffix": { | ||
"value": "-LC" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement", | ||
"type": "Microsoft.Authorization/policySetDefinitions", | ||
"name": "CostManagement", | ||
"properties": { | ||
"displayName": "Cost Management", | ||
"description": "Policies to enforce low cost storage SKUs", | ||
"metadata": { | ||
"category": "Cost Management" | ||
}, | ||
"parameters": { | ||
"namePrefix": { | ||
"type": "String", | ||
"defaultValue": "myPrefix", | ||
"metadata": { | ||
"displayName": "Prefix to enforce on resource names" | ||
} | ||
} | ||
}, | ||
"policyDefinitions": [ | ||
{ | ||
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", | ||
"policyDefinitionReferenceId": "Limit_Skus", | ||
"parameters": { | ||
"listOfAllowedSKUs": { | ||
"value": [ | ||
"Standard_GRS", | ||
"Standard_LRS" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming", | ||
"policyDefinitionReferenceId": "Resource_Naming", | ||
"parameters": { | ||
"prefix": { | ||
"value": "[parameters('namePrefix')]" | ||
}, | ||
"suffix": { | ||
"value": "-LC" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policySetDefinitions/CostManagement", | ||
"type": "Microsoft.Authorization/policySetDefinitions", | ||
"name": "CostManagement", | ||
"properties": { | ||
"displayName": "Cost Management", | ||
"description": "Policies to enforce low cost storage SKUs", | ||
"metadata": { | ||
"category": "Cost Management" | ||
}, | ||
"parameters": { | ||
"namePrefix": { | ||
"type": "String", | ||
"defaultValue": "myPrefix", | ||
"metadata": { | ||
"displayName": "Prefix to enforce on resource names" | ||
} | ||
} | ||
}, | ||
"policyDefinitions": [ | ||
{ | ||
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/7433c107-6db4-4ad1-b57a-a76dce0154a1", | ||
"policyDefinitionReferenceId": "Limit_Skus", | ||
"parameters": { | ||
"listOfAllowedSKUs": { | ||
"value": [ | ||
"Standard_GRS", | ||
"Standard_LRS" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"policyDefinitionId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyDefinitions/ResourceNaming", | ||
"policyDefinitionReferenceId": "Resource_Naming", | ||
"parameters": { | ||
"prefix": { | ||
"value": "[parameters('namePrefix')]" | ||
}, | ||
"suffix": { | ||
"value": "-LC" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.