Skip to content

Commit

Permalink
Robga/policy (Azure#16255)
Browse files Browse the repository at this point in the history
* copy previous version

* Add policyPricings
  • Loading branch information
robga authored Oct 4, 2021
1 parent cd92e4a commit 780a637
Show file tree
Hide file tree
Showing 18 changed files with 1,656 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"parameters": {
"scope": "subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
"policyExemptionName": "DemoExpensiveVM",
"api-version": "2021-07-01",
"parameters": {
"properties": {
"policyAssignmentId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"policyDefinitionReferenceIds": [
"Limit_Skus"
],
"exemptionCategory": "Waiver",
"displayName": "Exempt demo cluster",
"description": "Exempt demo cluster from limit sku",
"metadata": {
"reason": "Temporary exemption for a expensive VM demo"
}
}
}
},
"responses": {
"201": {
"headers": {},
"body": {
"properties": {
"policyAssignmentId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"policyDefinitionReferenceIds": [
"Limit_Skus"
],
"exemptionCategory": "Waiver",
"displayName": "Exempt demo cluster",
"description": "Exempt demo cluster from limit sku",
"metadata": {
"reason": "Temporary exemption for a expensive VM demo"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T01:01:01.1075056Z"
},
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster/providers/Microsoft.Authorization/policyExemptions/DemoExpensiveVM",
"type": "Microsoft.Authorization/policyExemptions",
"name": "DemoExpensiveVM"
}
},
"200": {
"headers": {},
"body": {
"properties": {
"policyAssignmentId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"policyDefinitionReferenceIds": [
"Limit_Skus"
],
"exemptionCategory": "Waiver",
"displayName": "Exempt demo cluster",
"description": "Exempt demo cluster from limit sku",
"metadata": {
"reason": "Temporary exemption for a expensive VM demo"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster/providers/Microsoft.Authorization/policyExemptions/DemoExpensiveVM",
"type": "Microsoft.Authorization/policyExemptions",
"name": "DemoExpensiveVM"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"scope": "providers/Microsoft.Management/managementGroups/HardwareDivision",
"policyPricingName": "Advanced",
"api-version": "2021-07-01",
"parameters": {
"properties": {
"pricingTier": "Advanced"
}
}
},
"responses": {
"201": {
"headers": {},
"body": {
"properties": {
"pricingTier": "Advanced",
"provisioningState": "Accepted"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T01:01:01.1075056Z"
},
"id": "/providers/Microsoft.Management/managementGroups/HardwareDivision/providers/Microsoft.Authorization/policyPricings/Advanced",
"type": "Microsoft.Authorization/policyPricings",
"name": "Advanced"
}
},
"200": {
"headers": {},
"body": {
"properties": {
"pricingTier": "Advanced",
"provisioningState": "Succeeded"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/providers/Microsoft.Management/managementGroups/HardwareDivision/providers/Microsoft.Authorization/policyPricings/Advanced",
"type": "Microsoft.Authorization/policyPricings",
"name": "Advanced"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"scope": "subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
"policyExemptionName": "DemoExpensiveVM",
"api-version": "2021-07-01"
},
"responses": {
"200": {
"headers": {}
},
"204": {
"headers": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"scope": "providers/Microsoft.Management/managementGroups/HardwareDivision",
"policyPricingName": "Advanced",
"api-version": "2021-07-01"
},
"responses": {
"200": {
"headers": {}
},
"202": {
"headers": {
"location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/HardwareDivision/providers/Microsoft.Authorization/policyPricingOperationResults/c9bbccf4-e16a-4eb7-befb-2e2e5195c347?api-version=2021-07-01",
"retry-after": "30"
}
},
"204": {
"headers": {}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parameters": {
"scope": "subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster",
"policyExemptionName": "DemoExpensiveVM",
"api-version": "2021-07-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"policyAssignmentId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"policyDefinitionReferenceIds": [
"Limit_Skus"
],
"exemptionCategory": "Waiver",
"displayName": "Exempt demo cluster",
"description": "Exempt demo cluster from limit sku",
"metadata": {
"reason": "Temporary exemption for a expensive VM demo"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster/providers/Microsoft.Authorization/policyExemptions/DemoExpensiveVM",
"type": "Microsoft.Authorization/policyExemptions",
"name": "DemoExpensiveVM"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parameters": {
"scope": "subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2",
"policyPricingName": "Advanced",
"api-version": "2021-07-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"properties": {
"pricingTier": "Advanced",
"provisioningState": "Succeeded"
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T01:01:01.1075056Z"
},
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyPricings/Advanced",
"type": "Microsoft.Authorization/policyPricings",
"name": "Advanced"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"managementGroupId": "DevOrg",
"api-version": "2021-07-01",
"$filter": "atScope()"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"properties": {
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/HardwareDivision/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"policyDefinitionReferenceIds": [
"Limit_Skus"
],
"exemptionCategory": "Waiver",
"displayName": "Exempt demo cluster",
"description": "Exempt demo cluster from limit sku",
"metadata": {
"reason": "Temporary exemption for a expensive VM demo"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/providers/Microsoft.Management/managementGroups/DevOrg/providers/Microsoft.Authorization/policyExemptions/ResearchBudgetExemption",
"type": "Microsoft.Authorization/policyExemptions",
"name": "ResearchBudgetExemption"
},
{
"properties": {
"policyAssignmentId": "/providers/Microsoft.Management/managementGroups/HardwareDivision/providers/Microsoft.Authorization/policyAssignments/LimitPorts",
"exemptionCategory": "Mitigated",
"displayName": "Exempt jump box open ports",
"description": "Exempt jump box open ports from limit ports policy",
"metadata": {
"reason": "Need to open RDP port to corp net"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/providers/Microsoft.Management/managementGroups/DevOrg/providers/Microsoft.Authorization/policyExemptions/VNetIsMonitored",
"type": "Microsoft.Authorization/policyExemptions",
"name": "VNetIsMonitored"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"parameters": {
"subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2",
"resourceGroupName": "TestResourceGroup",
"resourceProviderNamespace": "Microsoft.Compute",
"parentResourcePath": "virtualMachines/MyTestVm",
"resourceType": "domainNames",
"resourceName": "MyTestComputer.cloudapp.net",
"api-version": "2021-07-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"properties": {
"policyAssignmentId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/CostManagement",
"policyDefinitionReferenceIds": [
"Limit_Skus"
],
"exemptionCategory": "Waiver",
"displayName": "Exempt demo cluster",
"description": "Exempt demo cluster from limit sku",
"metadata": {
"reason": "Temporary exemption for a expensive VM demo"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup/providers/Microsoft.Authorization/policyExemptions/DemoExpensiveVMGroup",
"type": "Microsoft.Authorization/policyExemptions",
"name": "DemoExpensiveVMGroup"
},
{
"properties": {
"policyAssignmentId": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/providers/Microsoft.Authorization/policyAssignments/LimitPorts",
"exemptionCategory": "Mitigated",
"displayName": "Exempt jump box open ports",
"description": "Exempt jump box open ports from limit ports policy",
"metadata": {
"reason": "Need to open RDP port to corp net"
}
},
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-07-01T01:01:01.1075056Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-07-01T02:01:01.1075056Z"
},
"id": "/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/TestResourceGroup/providers/Microsoft.Compute/virtualMachines/MyTestVm/providers/Microsoft.Authorization/policyExemptions/jumpBoxExemption",
"type": "Microsoft.Authorization/policyExemptions",
"name": "jumpBoxExemption"
}
]
}
}
}
}
Loading

0 comments on commit 780a637

Please sign in to comment.