From 2b379715bcc7dfa2f634cff16be5b5edae63a999 Mon Sep 17 00:00:00 2001 From: Robert Gao Date: Wed, 27 Oct 2021 18:54:41 -0700 Subject: [PATCH] Revert "Robga/policy (#16255)" (#16537) This reverts commit 780a637142214a458a74db73a230dd0b1384eb2a. --- .../createOrUpdatePolicyExemption.json | 79 --- .../examples/createOrUpdatePolicyPricing.json | 54 -- .../examples/deletePolicyExemption.json | 15 - .../examples/deletePolicyPricing.json | 21 - .../examples/getPolicyExemption.json | 37 -- .../2021-07-01/examples/getPolicyPricing.json | 29 - ...istPolicyExemptionsForManagementGroup.json | 63 -- .../listPolicyExemptionsForResource.json | 67 --- .../listPolicyExemptionsForResourceGroup.json | 64 -- .../listPolicyExemptionsForSubscription.json | 63 -- .../listPolicyPricingsForManagementGroup.json | 49 -- .../listPolicyPricingsForSubscription.json | 49 -- .../stable/2021-07-01/policyExemptions.json | 564 ------------------ .../stable/2021-07-01/policyPricings.json | 430 ------------- .../resources/resource-manager/readme.go.md | 11 - .../resources/resource-manager/readme.java.md | 19 - .../resources/resource-manager/readme.md | 32 +- .../resource-manager/readme.python.md | 11 - 18 files changed, 1 insertion(+), 1656 deletions(-) delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyExemption.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyPricing.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyExemption.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyPricing.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyExemption.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyPricing.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForManagementGroup.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResource.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResourceGroup.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForSubscription.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForManagementGroup.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForSubscription.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyExemptions.json delete mode 100644 specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyPricings.json diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyExemption.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyExemption.json deleted file mode 100644 index c98a998c2647..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyExemption.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "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" - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyPricing.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyPricing.json deleted file mode 100644 index 2552462b8770..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/createOrUpdatePolicyPricing.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "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" - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyExemption.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyExemption.json deleted file mode 100644 index 0f2792cb723d..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyExemption.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "scope": "subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/resourceGroups/demoCluster", - "policyExemptionName": "DemoExpensiveVM", - "api-version": "2021-07-01" - }, - "responses": { - "200": { - "headers": {} - }, - "204": { - "headers": {} - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyPricing.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyPricing.json deleted file mode 100644 index 4919ee1f8ecd..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/deletePolicyPricing.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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": {} - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyExemption.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyExemption.json deleted file mode 100644 index 3b90fd327d96..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyExemption.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "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" - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyPricing.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyPricing.json deleted file mode 100644 index 968c1d9e4b06..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/getPolicyPricing.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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" - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForManagementGroup.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForManagementGroup.json deleted file mode 100644 index bd5c7c40aba9..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForManagementGroup.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "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" - } - ] - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResource.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResource.json deleted file mode 100644 index 176bc9bfd18f..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResource.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "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" - } - ] - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResourceGroup.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResourceGroup.json deleted file mode 100644 index c9402a0245bc..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForResourceGroup.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "parameters": { - "subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2", - "resourceGroupName": "TestResourceGroup", - "api-version": "2021-07-01", - "$filter": "atScope()" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "value": [ - { - "properties": { - "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/DevOrg/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/providers/Microsoft.Authorization/policyExemptions/TestVMSub", - "type": "Microsoft.Authorization/policyExemptions", - "name": "TestVMSub" - }, - { - "properties": { - "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/DevOrg/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.Authorization/policyExemptions/TestVNetRG", - "type": "Microsoft.Authorization/policyExemptions", - "name": "TestVNetRG" - } - ] - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForSubscription.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForSubscription.json deleted file mode 100644 index 26269d06f7de..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyExemptionsForSubscription.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "parameters": { - "subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2", - "api-version": "2021-07-01", - "$filter": "atScope()" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "value": [ - { - "properties": { - "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/DevOrg/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/providers/Microsoft.Authorization/policyExemptions/TestVMSub", - "type": "Microsoft.Authorization/policyExemptions", - "name": "TestVMSub" - }, - { - "properties": { - "policyAssignmentId": "/providers/Microsoft.Management/managementGroups/DevOrg/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/providers/Microsoft.Authorization/policyExemptions/TestVNetSub", - "type": "Microsoft.Authorization/policyExemptions", - "name": "TestVNetSub" - } - ] - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForManagementGroup.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForManagementGroup.json deleted file mode 100644 index c3ed0a510988..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForManagementGroup.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "managementGroupId": "DevOrg", - "api-version": "2021-07-01" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "value": [ - { - "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": "/providers/Microsoft.Management/managementGroups/HardwareDivision/providers/Microsoft.Authorization/policyPricings/Advanced", - "type": "Microsoft.Authorization/policyPricings", - "name": "Advanced" - }, - { - "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": "/providers/Microsoft.Management/managementGroups/DevOrg/providers/Microsoft.Authorization/policyPricings/Advanced", - "type": "Microsoft.Authorization/policyPricings", - "name": "Advanced" - } - ] - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForSubscription.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForSubscription.json deleted file mode 100644 index ae6bfb20388a..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/examples/listPolicyPricingsForSubscription.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "subscriptionId": "ae640e6b-ba3e-4256-9d62-2993eecfa6f2", - "api-version": "2021-07-01" - }, - "responses": { - "200": { - "headers": {}, - "body": { - "value": [ - { - "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": "/providers/Microsoft.Management/managementGroups/DevOrg/providers/Microsoft.Authorization/policyPricings/Advanced", - "type": "Microsoft.Authorization/policyPricings", - "name": "Advanced" - }, - { - "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" - } - ] - } - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyExemptions.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyExemptions.json deleted file mode 100644 index b8b7c56591fe..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyExemptions.json +++ /dev/null @@ -1,564 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "PolicyClient", - "version": "2021-07-01", - "description": "To exempt your resources from policy evaluation and non-compliance state, you can create an exemption at a scope." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/{scope}/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}": { - "delete": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_Delete", - "summary": "Deletes a policy exemption.", - "description": "This operation deletes a policy exemption, given its name and the scope it was created in. The scope of a policy exemption is the part of its ID preceding '/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}'.", - "x-ms-examples": { - "Delete a policy exemption": { - "$ref": "./examples/deletePolicyExemption.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/PolicyExemptionScopeParameter" - }, - { - "$ref": "#/parameters/PolicyExemptionNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK" - }, - "204": { - "description": "No Content - the policy exemption doesn't exist." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - }, - "put": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_CreateOrUpdate", - "summary": "Creates or updates a policy exemption.", - "description": " This operation creates or updates a policy exemption with the given scope and name. Policy exemptions apply to all resources contained within their scope. For example, when you create a policy exemption at resource group scope for a policy assignment at the same or above level, the exemption exempts to all applicable resources in the resource group.", - "x-ms-examples": { - "Create or update a policy exemption": { - "$ref": "./examples/createOrUpdatePolicyExemption.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/PolicyExemptionScopeParameter" - }, - { - "$ref": "#/parameters/PolicyExemptionNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PolicyExemption" - }, - "description": "Parameters for the policy exemption." - } - ], - "responses": { - "200": { - "description": "OK - Returns information about the updated policy exemption.", - "schema": { - "$ref": "#/definitions/PolicyExemption" - } - }, - "201": { - "description": "Created - Returns information about the new policy exemption.", - "schema": { - "$ref": "#/definitions/PolicyExemption" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - }, - "get": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_Get", - "summary": "Retrieves a policy exemption.", - "description": "This operation retrieves a single policy exemption, given its name and the scope it was created at.", - "x-ms-examples": { - "Retrieve a policy exemption": { - "$ref": "./examples/getPolicyExemption.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/PolicyExemptionScopeParameter" - }, - { - "$ref": "#/parameters/PolicyExemptionNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns information about the policy exemption.", - "schema": { - "$ref": "#/definitions/PolicyExemption" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyExemptions": { - "get": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_List", - "summary": "Retrieves all policy exemptions that apply to a subscription.", - "description": "This operation retrieves the list of all policy exemptions associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription.", - "x-ms-examples": { - "List policy exemptions that apply to a subscription": { - "$ref": "./examples/listPolicyExemptionsForSubscription.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/PolicyExemptionFilterParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of policy exemptions.", - "schema": { - "$ref": "#/definitions/PolicyExemptionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/policyExemptions": { - "get": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_ListForResourceGroup", - "summary": "Retrieves all policy exemptions that apply to a resource group.", - "description": "This operation retrieves the list of all policy exemptions associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group.", - "x-ms-examples": { - "List policy exemptions that apply to a resource group": { - "$ref": "./examples/listPolicyExemptionsForResourceGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/PolicyExemptionFilterParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of policy exemptions.", - "schema": { - "$ref": "#/definitions/PolicyExemptionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyExemptions": { - "get": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_ListForResource", - "summary": "Retrieves all policy exemptions that apply to a resource.", - "description": "This operation retrieves the list of all policy exemptions associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').", - "x-ms-examples": { - "List all policy exemptions that apply to a resource": { - "$ref": "./examples/listPolicyExemptionsForResource.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ResourceGroupNameParameter" - }, - { - "name": "resourceProviderNamespace", - "in": "path", - "required": true, - "type": "string", - "description": "The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines)" - }, - { - "name": "parentResourcePath", - "in": "path", - "required": true, - "type": "string", - "description": "The parent resource path. Use empty string if there is none.", - "x-ms-skip-url-encoding": true - }, - { - "name": "resourceType", - "in": "path", - "required": true, - "type": "string", - "description": "The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).", - "x-ms-skip-url-encoding": true - }, - { - "name": "resourceName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource." - }, - { - "$ref": "#/parameters/PolicyExemptionFilterParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of policy exemptions.", - "schema": { - "$ref": "#/definitions/PolicyExemptionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyExemptions": { - "get": { - "tags": [ - "PolicyExemptions" - ], - "operationId": "PolicyExemptions_ListForManagementGroup", - "summary": "Retrieves all policy exemptions that apply to a management group.", - "description": "This operation retrieves the list of all policy exemptions applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy exemptions that are assigned to the management group or the management group's ancestors.", - "x-ms-examples": { - "List policy exemptions that apply to a management group": { - "$ref": "./examples/listPolicyExemptionsForManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ManagementGroupIdParameter" - }, - { - "$ref": "#/parameters/PolicyExemptionFilterParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of policy exemptions.", - "schema": { - "$ref": "#/definitions/PolicyExemptionListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "CloudError": { - "x-ms-external": true, - "properties": { - "error": { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" - } - }, - "description": "An error response from a policy operation." - }, - "PolicyExemptionProperties": { - "type": "object", - "required": [ - "policyAssignmentId", - "exemptionCategory" - ], - "properties": { - "policyAssignmentId": { - "type": "string", - "description": "The ID of the policy assignment that is being exempted." - }, - "policyDefinitionReferenceIds": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition." - }, - "exemptionCategory": { - "type": "string", - "description": "The policy exemption category. Possible values are Waiver and Mitigated.", - "enum": [ - "Waiver", - "Mitigated" - ], - "x-ms-enum": { - "name": "exemptionCategory", - "modelAsString": true, - "values": [ - { - "value": "Waiver", - "description": "This category of exemptions usually means the scope is not applicable for the policy." - }, - { - "value": "Mitigated", - "description": "This category of exemptions usually means the mitigation actions have been applied to the scope." - } - ] - } - }, - "expiresOn": { - "type": "string", - "format": "date-time", - "description": "The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption." - }, - "displayName": { - "type": "string", - "description": "The display name of the policy exemption." - }, - "description": { - "type": "string", - "description": "The description of the policy exemption." - }, - "metadata": { - "type": "object", - "description": "The policy exemption metadata. Metadata is an open ended object and is typically a collection of key value pairs." - } - }, - "description": "The policy exemption properties." - }, - "PolicyExemption": { - "type": "object", - "required": [ - "properties" - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PolicyExemptionProperties", - "description": "Properties for the policy exemption." - }, - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - }, - "id": { - "readOnly": true, - "type": "string", - "description": "The ID of the policy exemption." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the policy exemption." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource (Microsoft.Authorization/policyExemptions)." - } - }, - "description": "The policy exemption.", - "x-ms-azure-resource": true - }, - "PolicyExemptionListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/PolicyExemption" - }, - "description": "An array of policy exemptions." - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URL to use for getting the next set of results." - } - }, - "description": "List of policy exemptions." - } - }, - "parameters": { - "PolicyExemptionNameParameter": { - "name": "policyExemptionName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the policy exemption.", - "x-ms-parameter-location": "method" - }, - "PolicyExemptionScopeParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope of the policy exemption. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription." - }, - "ResourceGroupNameParameter": { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group containing the resource.", - "pattern": "^[-\\w\\._\\(\\)]+$", - "minLength": 1, - "maxLength": 90, - "x-ms-parameter-location": "method" - }, - "ManagementGroupIdParameter": { - "name": "managementGroupId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the management group.", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for the operation.", - "x-ms-parameter-location": "client" - }, - "PolicyExemptionFilterParameter": { - "name": "$filter", - "in": "query", - "required": false, - "type": "string", - "description": "The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the scope, including those that apply directly or apply from containing scopes. If $filter=atScope() is provided, the returned list only includes all policy exemptions that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy exemptions that at the given scope. If $filter=excludeExpired() is provided, the returned list only includes all policy exemptions that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq '{value}' is provided. the returned list only includes all policy exemptions that are associated with the give policyAssignmentId.", - "x-ms-skip-url-encoding": true, - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyPricings.json b/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyPricings.json deleted file mode 100644 index 5410e7c8f3ae..000000000000 --- a/specification/resources/resource-manager/Microsoft.Authorization/stable/2021-07-01/policyPricings.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "PolicyClient", - "version": "2021-07-01", - "description": "To enable policy Advanced tier feature, you can create the policy pricing at a subscription scope or a management group scope." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/{scope}/providers/Microsoft.Authorization/policyPricings/{policyPricingName}": { - "delete": { - "tags": [ - "PolicyPricings" - ], - "operationId": "PolicyPricings_Delete", - "summary": "Deletes a policy pricing.", - "description": "This operation deletes a policy pricing, given its name and the scope it was created in. The scope of a policy pricing is the part of its ID preceding '/providers/Microsoft.Authorization/policyPricings/{policyPricingName}'.", - "x-ms-examples": { - "Delete a policy pricing": { - "$ref": "./examples/deletePolicyPricing.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/PolicyPricingScopeParameter" - }, - { - "$ref": "#/parameters/PolicyPricingNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK" - }, - "202": { - "description": "Accepted", - "headers": { - "Location": { - "type": "string", - "description": "URL to get status of this long-running operation." - }, - "Retry-After": { - "type": "string", - "description": "Number of seconds to wait before polling for status." - } - } - }, - "204": { - "description": "No Content - the policy pricing doesn't exist." - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": true - }, - "put": { - "tags": [ - "PolicyPricings" - ], - "operationId": "PolicyPricings_CreateOrUpdate", - "summary": "Creates or updates a policy pricing.", - "description": " This operation creates or updates a policy pricing with the given scope and name.", - "x-ms-examples": { - "Create or update a policy pricing": { - "$ref": "./examples/createOrUpdatePolicyPricing.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/PolicyPricingScopeParameter" - }, - { - "$ref": "#/parameters/PolicyPricingNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PolicyPricing" - }, - "description": "Parameters for the policy pricing." - } - ], - "responses": { - "200": { - "description": "OK - Returns information about the updated policy pricing.", - "schema": { - "$ref": "#/definitions/PolicyPricing" - } - }, - "201": { - "description": "Created - Returns information about the new policy pricing.", - "schema": { - "$ref": "#/definitions/PolicyPricing" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-long-running-operation": true - }, - "get": { - "tags": [ - "PolicyPricings" - ], - "operationId": "PolicyPricings_Get", - "summary": "Retrieves a policy pricing.", - "description": "This operation retrieves a single policy pricing, given its name and the scope it was created at.", - "x-ms-examples": { - "Retrieve a policy pricing": { - "$ref": "./examples/getPolicyPricing.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/PolicyPricingScopeParameter" - }, - { - "$ref": "#/parameters/PolicyPricingNameParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns information about the policy pricing.", - "schema": { - "$ref": "#/definitions/PolicyPricing" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - } - } - }, - "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyPricings": { - "get": { - "tags": [ - "PolicyPricings" - ], - "operationId": "PolicyPricings_List", - "summary": "Retrieves all policy pricings that apply to a subscription.", - "description": "This operation retrieves the list of all policy pricings associated with the given subscription and the management group ancestors.", - "x-ms-examples": { - "List policy pricings that apply to a subscription": { - "$ref": "./examples/listPolicyPricingsForSubscription.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of policy pricings.", - "schema": { - "$ref": "#/definitions/PolicyPricingListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Authorization/policyPricings": { - "get": { - "tags": [ - "PolicyPricings" - ], - "operationId": "PolicyPricings_ListForManagementGroup", - "summary": "Retrieves all policy pricings that apply to a management group.", - "description": "This operation retrieves the list of all policy pricings associated with the given subscription and the management group ancestors.", - "x-ms-examples": { - "List policy pricings that apply to a management group": { - "$ref": "./examples/listPolicyPricingsForManagementGroup.json" - } - }, - "parameters": [ - { - "$ref": "#/parameters/ManagementGroupIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of policy pricings.", - "schema": { - "$ref": "#/definitions/PolicyPricingListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/CloudError" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "definitions": { - "CloudError": { - "x-ms-external": true, - "properties": { - "error": { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse" - } - }, - "description": "An error response from a policy operation." - }, - "PolicyPricingProperties": { - "type": "object", - "required": [ - "pricingTier" - ], - "properties": { - "pricingTier": { - "type": "string", - "description": "The policy pricing tier. Possible values are Advanced and Defender.", - "enum": [ - "Advanced", - "Defender" - ], - "x-ms-enum": { - "name": "pricingTier", - "modelAsString": true, - "values": [ - { - "value": "Advanced", - "description": "The pricing tier gives the user ability to use policy exemption feature." - }, - { - "value": "Defender", - "description": "The pricing tier gives the user ability to use policy exemption feature. This pricing tier is managed by Azure Security Center." - } - ] - } - }, - "provisioningState": { - "type": "string", - "description": "The provisioning state of the policy pricing resource.", - "readOnly": true, - "enum": [ - "Accepted", - "Succeeded", - "Deleting" - ], - "x-ms-enum": { - "name": "ProvisioningState", - "modelAsString": true, - "values": [ - { - "value": "Accepted", - "description": "When creating policy pricing at the management group level, the provisioning state will be accepted initially." - }, - { - "value": "Succeeded", - "description": "The policy pricing is provisioned." - }, - { - "value": "Deleting", - "description": "When deleting policy pricing at the management group level, the provisioning state will be deleting." - } - ] - } - } - }, - "description": "The policy pricing properties." - }, - "PolicyPricing": { - "type": "object", - "required": [ - "properties" - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PolicyPricingProperties", - "description": "Properties for the policy pricing." - }, - "systemData": { - "readOnly": true, - "type": "object", - "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" - }, - "id": { - "readOnly": true, - "type": "string", - "description": "The ID of the policy pricing." - }, - "name": { - "readOnly": true, - "type": "string", - "description": "The name of the policy pricing." - }, - "type": { - "readOnly": true, - "type": "string", - "description": "The type of the resource (Microsoft.Authorization/policyPricings)." - } - }, - "description": "The policy pricing.", - "x-ms-azure-resource": true - }, - "PolicyPricingListResult": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/PolicyPricing" - }, - "description": "An array of policy pricings." - }, - "nextLink": { - "readOnly": true, - "type": "string", - "description": "The URL to use for getting the next set of results." - } - }, - "description": "List of policy pricings." - } - }, - "parameters": { - "PolicyPricingNameParameter": { - "name": "policyPricingName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the policy pricing.", - "x-ms-parameter-location": "method" - }, - "PolicyPricingScopeParameter": { - "name": "scope", - "in": "path", - "required": true, - "type": "string", - "description": "The scope of the policy pricing. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroupId}') or subscription (format: '/subscriptions/{subscriptionId}')", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription." - }, - "ManagementGroupIdParameter": { - "name": "managementGroupId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the management group.", - "x-ms-parameter-location": "method" - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for the operation.", - "x-ms-parameter-location": "client" - } - } -} diff --git a/specification/resources/resource-manager/readme.go.md b/specification/resources/resource-manager/readme.go.md index 43a901b3c4af..82c8b1f71de4 100644 --- a/specification/resources/resource-manager/readme.go.md +++ b/specification/resources/resource-manager/readme.go.md @@ -35,7 +35,6 @@ batch: - tag: package-features-2021-07 - tag: package-locks-2016-09 - tag: package-locks-2015-01 - - tag: package-policy-2021-07 - tag: package-policy-2021-06 - tag: package-policy-2020-09 - tag: package-policy-2020-03 @@ -135,16 +134,6 @@ namespace: locks output-folder: $(go-sdk-folder)/services/resources/mgmt/2015-01-01/locks ``` -### Tag: package-policy-2021-07 and go - -These settings apply only when `--tag=package-policy-2021-07 --go` is specified on the command line. -Please also specify `--go-sdk-folder=`. - -``` yaml $(tag) == 'package-policy-2021-07' && $(go) -namespace: policy -output-folder: $(go-sdk-folder)/services/resources/mgmt/2021-07-01/policy -``` - ### Tag: package-policy-2021-06 and go These settings apply only when `--tag=package-policy-2021-06 --go` is specified on the command line. diff --git a/specification/resources/resource-manager/readme.java.md b/specification/resources/resource-manager/readme.java.md index e86a77ccec90..3028cce811ae 100644 --- a/specification/resources/resource-manager/readme.java.md +++ b/specification/resources/resource-manager/readme.java.md @@ -54,7 +54,6 @@ batch: - tag: package-features-2021-07 - tag: package-locks-2016-09 - tag: package-managedapplications-2019-07 - - tag: package-policy-2021-07 - tag: package-policy-2021-06 - tag: package-policy-2020-09 - tag: package-policy-2019-09 @@ -134,24 +133,6 @@ generate-interface: true fconfig: '{"moduleName": "ManagedApplications"}' ``` -### Tag: package-policy-2021-07 and java - -These settings apply only when `--tag=package-policy-2021-07 --java` is specified on the command line. -Please also specify `--azure-libraries-for-java-folder=`. - -``` yaml $(tag) == 'package-policy-2021-07' && $(java) && $(multiapi) -java: - namespace: com.microsoft.azure.management.policy.v2021_07_01 - output-folder: $(azure-libraries-for-java-folder)/sdk/policy/mgmt-v2021_07_01 -regenerate-manager: true -generate-interface: true -fconfig: '{"moduleName": "Policy"}' -directive: - from: policyAssignments.json - where: $.definitions.PolicyAssignmentProperties.properties.scope - transform: $['x-ms-client-name'] = 'scopeProperty' -``` - ### Tag: package-policy-2021-06 and java These settings apply only when `--tag=package-policy-2021-06 --java` is specified on the command line. diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index 06e05d84ef9e..dc31314e2441 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -37,7 +37,7 @@ tag: package-locks-2020-05 ``` ``` yaml $(package-policy) -tag: package-policy-2021-07 +tag: package-policy-2021-06 ``` ``` yaml $(package-resources) @@ -64,24 +64,6 @@ tag: package-deploymentscripts-2020-10 tag: package-templatespecs-2021-05 ``` -### Tag: package-policy-2021-07 - -These settings apply only when `--tag=package-policy-2021-07` is specified on the command line. - -``` yaml $(tag) == 'package-policy-2021-07' -input-file: -- Microsoft.Authorization/stable/2020-09-01/dataPolicyManifests.json -- Microsoft.Authorization/stable/2021-06-01/policyAssignments.json -- Microsoft.Authorization/stable/2021-06-01/policyDefinitions.json -- Microsoft.Authorization/stable/2021-06-01/policySetDefinitions.json -- Microsoft.Authorization/stable/2021-07-01/policyExemptions.json -- Microsoft.Authorization/stable/2021-07-01/policyPricings.json - -# Needed when there is more than one input file -override-info: - title: PolicyClient -``` - ### Tag: package-policy-2021-06 These settings apply only when `--tag=package-policy-2021-06` is specified on the command line. @@ -688,10 +670,6 @@ directive: from: policyExemptions.json where: $.paths reason: policy exemption under an extension resource with Microsoft.Management - - suppress: UniqueResourcePaths - from: policyPricings.json - where: $.paths - reason: policy pricing under an extension resource with Microsoft.Management - suppress: OperationsAPIImplementation from: policyAssignments.json where: $.paths @@ -712,18 +690,10 @@ directive: from: policyExemptions.json where: $.paths reason: operation APIs for Microsoft.Authorization are to be defined in RBAC swagger - - suppress: OperationsAPIImplementation - from: policyPricings.json - where: $.paths - reason: operation APIs for Microsoft.Authorization are to be defined in RBAC swagger - suppress: BodyTopLevelProperties from: policyExemptions.json where: $.definitions.PolicyExemption.properties reason: Currently systemData is not allowed - - suppress: BodyTopLevelProperties - from: policyPricings.json - where: $.definitions.PolicyPricing.properties - reason: Currently systemData is not allowed - suppress: BodyTopLevelProperties from: resources.json where: $.definitions.ResourceGroup.properties diff --git a/specification/resources/resource-manager/readme.python.md b/specification/resources/resource-manager/readme.python.md index 111708603d2a..db2cdbd2033a 100644 --- a/specification/resources/resource-manager/readme.python.md +++ b/specification/resources/resource-manager/readme.python.md @@ -27,7 +27,6 @@ batch: - tag: package-locks-2015-01 - multiapiscript-locks: true - tag: package-managedapplications-2018-06 - - tag: package-policy-2021-07 - tag: package-policy-2021-06 - tag: package-policy-2020-09 - tag: package-policy-2019-09 @@ -200,16 +199,6 @@ namespace: azure.mgmt.resource.managedapplications output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/managedapplications ``` -### Tag: package-policy-2021-07 and python - -These settings apply only when `--tag=package-policy-2021-07 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-policy-2021-07' -namespace: azure.mgmt.resource.policy.v2021_07_01 -output-folder: $(python-sdks-folder)/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2021_07_01 -``` - ### Tag: package-policy-2021-06 and python These settings apply only when `--tag=package-policy-2021-06 --python` is specified on the command line.