From a4bee19f6cbe261c36faf3e7595e2b0a98d7e9f9 Mon Sep 17 00:00:00 2001 From: Kiran Kulkarni Date: Wed, 19 Sep 2018 10:55:25 -0700 Subject: [PATCH 1/2] Add swagger spec for "Microsoft.Authorization/denyAssignments" --- .../authorization-DenyAssignmentGetCalls.json | 494 ++++++++++++++++++ .../examples/GetAllDenyAssignments.json | 52 ++ .../examples/GetDenyAssignmentById.json | 47 ++ .../examples/GetDenyAssignmentByNameId.json | 48 ++ .../examples/GetDenyAssignmentByScope.json | 52 ++ .../GetDenyAssignmentsForResource.json | 57 ++ .../GetDenyAssignmentsForResourceGroup.json | 53 ++ .../authorization/resource-manager/readme.md | 14 +- 8 files changed, 816 insertions(+), 1 deletion(-) create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json new file mode 100644 index 000000000000..3ad8bd8edf3a --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json @@ -0,0 +1,494 @@ +{ + "swagger": "2.0", + "info": { + "title": "AuthorizationManagementClient", + "version": "2018-07-01-preview", + "description": "Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to get deny assignments. A deny assignment describes the set of actions on resources that are denied for Azure Active Directory users." + }, + "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": { + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/denyAssignments": { + "get": { + "tags": [ + "DenyAssignments" + ], + "operationId": "DenyAssignments_ListForResource", + "description": "Gets deny assignments for a resource.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the resource.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to get deny assignments for." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deny assignments.", + "schema": { + "$ref": "#/definitions/DenyAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DenyAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetDenyAssignmentsForResource.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/denyAssignments": { + "get": { + "tags": [ + "DenyAssignments" + ], + "operationId": "DenyAssignments_ListForResourceGroup", + "description": "Gets deny assignments for a resource group.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deny assignments.", + "schema": { + "$ref": "#/definitions/DenyAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DenyAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetDenyAssignmentsForResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/denyAssignments": { + "get": { + "tags": [ + "DenyAssignments" + ], + "operationId": "DenyAssignments_List", + "description": "Gets all deny assignments for the subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deny assignments.", + "schema": { + "$ref": "#/definitions/DenyAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DenyAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetAllDenyAssignments.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}": { + "get": { + "tags": [ + "DenyAssignments" + ], + "operationId": "DenyAssignments_Get", + "description": "Get the specified deny assignment.", + "parameters": [ + { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the deny assignment.", + "x-ms-skip-url-encoding": true + }, + { + "name": "denyAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the deny assignment to get." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the deny assignment.", + "schema": { + "$ref": "#/definitions/DenyAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetDenyAssignmentByNameId.json" + } + } + } + }, + "/{denyAssignmentId}": { + "get": { + "tags": [ + "DenyAssignments" + ], + "operationId": "DenyAssignments_GetById", + "description": "Gets a deny assignment by ID.", + "parameters": [ + { + "name": "denyAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified deny assignment ID. For example, use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for subscription level deny assignments, or /providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} for tenant level deny assignments.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the deny assignment.", + "schema": { + "$ref": "#/definitions/DenyAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetDenyAssignmentById.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Authorization/denyAssignments": { + "get": { + "tags": [ + "DenyAssignments" + ], + "operationId": "DenyAssignments_ListForScope", + "description": "Gets deny assignments for a scope.", + "parameters": [ + { + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the deny assignments.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/FilterParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of deny assignments.", + "schema": { + "$ref": "#/definitions/DenyAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/DenyAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetDenyAssignmentByScope.json" + } + } + } + } + }, + "definitions": { + "DenyAssignmentFilter": { + "properties": { + "denyAssignmentName": { + "type": "string", + "description": "Return deny assignment with specified name." + }, + "principalId": { + "type": "string", + "description": "Return all deny assignments where the specified principal is listed in the principals list of deny assignments." + }, + "gdprExportPrincipalId": { + "type": "string", + "description": "Return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments." + } + }, + "description": "Deny Assignments filter" + }, + "DenyAssignmentProperties": { + "properties": { + "denyAssignmentName": { + "type": "string", + "description": "The display name of the deny assignment." + }, + "description": { + "type": "string", + "description": "The description of the deny assignment." + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/definitions/DenyAssignmentPermission" + }, + "description": "An array of permissions that are denied by the deny assignment." + }, + "scope": { + "type": "string", + "description": "The deny assignment scope." + }, + "doNotApplyToChildScopes": { + "type": "boolean", + "description": "Determines if the deny assignment applies to child scopes. Default value is false." + }, + "principals": { + "type": "array", + "items": { + "$ref": "#/definitions/Principal" + }, + "description": "Array of principals to which the deny assignment applies." + }, + "excludePrincipals": { + "type": "array", + "items": { + "$ref": "#/definitions/Principal" + }, + "description": "Array of principals to which the deny assignment does not apply." + }, + "isSystemProtected": { + "type": "boolean", + "description": "Specifies whether this deny assignment was created by Azure and cannot be edited or deleted." + } + }, + "description": "Deny assignment properties." + }, + "DenyAssignment": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The deny assignment ID." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The deny assignment name." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "The deny assignment type." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DenyAssignmentProperties", + "description": "Deny assignment properties." + } + }, + "description": "Deny Assignment" + }, + "DenyAssignmentListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/DenyAssignment" + }, + "description": "Deny assignment list." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "Deny assignment list operation result." + }, + "DenyAssignmentPermission": { + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions to which the deny assignment does not grant access." + }, + "notActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions to exclude from that the deny assignment does not grant access." + }, + "dataActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Data actions to which the deny assignment does not grant access." + }, + "notDataActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Data actions to exclude from that the deny assignment does not grant access." + } + }, + "description": "Deny assignment permissions." + }, + "Principal": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Object ID of the Azure AD principal (user, group, or service principal) to which the deny assignment applies. An empty guid '00000000-0000-0000-0000-000000000000' as principal id and principal type as 'Everyone' represents all users, groups and service principals." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of object represented by principal id (user, group, or service principal). An empty guid '00000000-0000-0000-0000-000000000000' as principal id and principal type as 'Everyone' represents all users, groups and service principals." + } + }, + "description": "Deny assignment principal." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription." + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ResourceProviderNamespaceParameter": { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider.", + "x-ms-parameter-location": "method" + }, + "FilterParameter": { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json new file mode 100644 index 000000000000..b0d77d84d5b0 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "subId", + "api-version": "2018-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "denyAssignmentName": "Deny assignment name", + "description": "Deny assignment description", + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + ], + "dataActions": [ + "action" + ], + "notDataActions": [ + ] + } + ], + "scope": "/subscriptions/subId", + "doNotApplyToChildScopes": false, + "principals": [ + { + "Id": "principalId1", + "Type": "principalType1" + } + ], + "excludePrincipals": [ + { + "Id": "principalId2", + "Type": "principalType2" + } + ], + "isSystemProtected": true + }, + "id": "/subscriptions/subId/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "name": "denyAssignmentId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json new file mode 100644 index 000000000000..c918759c833a --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "denyAssignmentId": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId", + "api-version": "2018-07-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "denyAssignmentName": "Deny assignment name", + "description": "Deny assignment description", + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + ], + "dataActions": [ + ], + "notDataActions": [ + ] + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname", + "doNotApplyToChildScopes": false, + "principals": [ + { + "Id": "principalId1", + "Type": "principalType1" + } + ], + "excludePrincipals": [ + { + "Id": "principalId2", + "Type": "principalType2" + } + ], + "isSystemProtected": true + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId", + "type": "Microsoft.Authorization/denyAssignments", + "name": "daId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json new file mode 100644 index 000000000000..b6f708d1250b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "scope": "/subscriptions/subId/resourcegroups/rgname", + "denyAssignmentId": "denyAssignmentId", + "api-version": "2018-07-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "denyAssignmentName": "Deny assignment name", + "description": "Deny assignment description", + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + ], + "dataActions": [ + ], + "notDataActions": [ + ] + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname", + "doNotApplyToChildScopes": false, + "principals": [ + { + "Id": "principalId1", + "Type": "principalType1" + } + ], + "excludePrincipals": [ + { + "Id": "principalId2", + "Type": "principalType2" + } + ], + "isSystemProtected": true + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "name": "denyAssignmentId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json new file mode 100644 index 000000000000..14b23d4f559b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "scope": "/subscriptions/subId", + "api-version": "2018-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "denyAssignmentName": "Deny assignment name", + "description": "Deny assignment description", + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + ], + "dataActions": [ + "action" + ], + "notDataActions": [ + ] + } + ], + "scope": "/subscriptions/subId", + "doNotApplyToChildScopes": false, + "principals": [ + { + "Id": "principalId1", + "Type": "principalType1" + } + ], + "excludePrincipals": [ + { + "Id": "principalId2", + "Type": "principalType2" + } + ], + "isSystemProtected": true + }, + "id": "/subscriptions/subId/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "name": "denyAssignmentId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json new file mode 100644 index 000000000000..c690f623edd7 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "subscriptionId": "subId", + "resourceGroupName": "rgname", + "resourceProviderNamespace": "resourceProviderNamespace", + "parentResourcePath": "parentResourcePath", + "resourceType": "resourceType", + "resourceName": "resourceName", + "api-version": "2018-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "denyAssignmentName": "Deny assignment name", + "description": "Deny assignment description", + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + ], + "dataActions": [ + "action" + ], + "notDataActions": [ + ] + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName", + "doNotApplyToChildScopes": false, + "principals": [ + { + "Id": "principalId1", + "Type": "principalType1" + } + ], + "excludePrincipals": [ + { + "Id": "principalId2", + "Type": "principalType2" + } + ], + "isSystemProtected": true + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "name": "denyAssignmentId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json new file mode 100644 index 000000000000..a93d33f16616 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "subId", + "resourceGroupName": "rgname", + "api-version": "2018-07-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "denyAssignmentName": "Deny assignment name", + "description": "Deny assignment description", + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + ], + "dataActions": [ + "action" + ], + "notDataActions": [ + ] + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname", + "doNotApplyToChildScopes": false, + "principals": [ + { + "Id": "principalId1", + "Type": "principalType1" + } + ], + "excludePrincipals": [ + { + "Id": "principalId2", + "Type": "principalType2" + } + ], + "isSystemProtected": true + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "name": "denyAssignmentId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index f57a468e0340..277ce8ac828e 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -26,7 +26,7 @@ These are the global settings for the Authorization API. ``` yaml openapi-type: arm -tag: package-2018-09-01-preview +tag: package-2018-07-01-preview ``` ## Suppression @@ -115,6 +115,17 @@ input-file: - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json ``` +### Tag: package-2018-07-01-preview + +These settings apply only when `--tag=package-2018-07-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-07-01-preview' +input-file: +- Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +- Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json +``` + ### Tag: package-2018-09-01-preview These settings apply only when `--tag=package-2018-09-01-preview` is specified on the command line. @@ -123,6 +134,7 @@ These settings apply only when `--tag=package-2018-09-01-preview` is specified o input-file: - Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json - Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleBasedCalls.json +- Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json ``` --- From 70ff2c2e6d809f29d2323407b9bd58afea9658f7 Mon Sep 17 00:00:00 2001 From: Kiran Kulkarni Date: Mon, 24 Sep 2018 10:57:16 -0700 Subject: [PATCH 2/2] Update swagger examples to fix validation errors from oav tool --- .../examples/GetAllDenyAssignments.json | 8 ++++---- .../examples/GetDenyAssignmentById.json | 10 +++++----- .../examples/GetDenyAssignmentByNameId.json | 10 +++++----- .../examples/GetDenyAssignmentByScope.json | 10 +++++----- .../examples/GetDenyAssignmentsForResource.json | 8 ++++---- .../examples/GetDenyAssignmentsForResourceGroup.json | 8 ++++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json index b0d77d84d5b0..e0cf49d45040 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetAllDenyAssignments.json @@ -29,14 +29,14 @@ "doNotApplyToChildScopes": false, "principals": [ { - "Id": "principalId1", - "Type": "principalType1" + "id": "principalId1", + "type": "principalType1" } ], "excludePrincipals": [ { - "Id": "principalId2", - "Type": "principalType2" + "id": "principalId2", + "type": "principalType2" } ], "isSystemProtected": true diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json index c918759c833a..abdfc7531bbb 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentById.json @@ -1,6 +1,6 @@ { "parameters": { - "denyAssignmentId": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId", + "denyAssignmentId": "subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/daId", "api-version": "2018-07-01-preview" }, "responses": { @@ -26,14 +26,14 @@ "doNotApplyToChildScopes": false, "principals": [ { - "Id": "principalId1", - "Type": "principalType1" + "id": "principalId1", + "type": "principalType1" } ], "excludePrincipals": [ { - "Id": "principalId2", - "Type": "principalType2" + "id": "principalId2", + "type": "principalType2" } ], "isSystemProtected": true diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json index b6f708d1250b..f3095215cda9 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByNameId.json @@ -1,6 +1,6 @@ { "parameters": { - "scope": "/subscriptions/subId/resourcegroups/rgname", + "scope": "subscriptions/subId/resourcegroups/rgname", "denyAssignmentId": "denyAssignmentId", "api-version": "2018-07-01-preview" }, @@ -27,14 +27,14 @@ "doNotApplyToChildScopes": false, "principals": [ { - "Id": "principalId1", - "Type": "principalType1" + "id": "principalId1", + "type": "principalType1" } ], "excludePrincipals": [ { - "Id": "principalId2", - "Type": "principalType2" + "id": "principalId2", + "type": "principalType2" } ], "isSystemProtected": true diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json index 14b23d4f559b..71b60821c22c 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentByScope.json @@ -1,6 +1,6 @@ { "parameters": { - "scope": "/subscriptions/subId", + "scope": "subscriptions/subId", "api-version": "2018-07-01-preview" }, "responses": { @@ -29,14 +29,14 @@ "doNotApplyToChildScopes": false, "principals": [ { - "Id": "principalId1", - "Type": "principalType1" + "id": "principalId1", + "type": "principalType1" } ], "excludePrincipals": [ { - "Id": "principalId2", - "Type": "principalType2" + "id": "principalId2", + "type": "principalType2" } ], "isSystemProtected": true diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json index c690f623edd7..4a305764e569 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResource.json @@ -34,14 +34,14 @@ "doNotApplyToChildScopes": false, "principals": [ { - "Id": "principalId1", - "Type": "principalType1" + "id": "principalId1", + "type": "principalType1" } ], "excludePrincipals": [ { - "Id": "principalId2", - "Type": "principalType2" + "id": "principalId2", + "type": "principalType2" } ], "isSystemProtected": true diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json index a93d33f16616..cd02e75beb1a 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-07-01-preview/examples/GetDenyAssignmentsForResourceGroup.json @@ -30,14 +30,14 @@ "doNotApplyToChildScopes": false, "principals": [ { - "Id": "principalId1", - "Type": "principalType1" + "id": "principalId1", + "type": "principalType1" } ], "excludePrincipals": [ { - "Id": "principalId2", - "Type": "principalType2" + "id": "principalId2", + "type": "principalType2" } ], "isSystemProtected": true