From 25bc2cc307dac326bc098f27e88893a2e561cd55 Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Thu, 25 Jan 2018 11:21:12 -0800 Subject: [PATCH 1/9] add 2018 preview version --- .../authorization-AuthorizationCalls.json | 1048 +++++++++++++++++ .../2018-01-01-preview/authorization.json | 329 ++++++ .../examples/DeleteRoleAssignmentById.json | 22 + .../examples/DeleteRoleAssignmentByName.json | 22 + .../examples/DeleteRoleDefinition.json | 40 + .../examples/GetAllProviderOperations.json | 31 + .../examples/GetAllRoleAssignments.json | 25 + .../examples/GetClassicAdministrators.json | 32 + .../examples/GetPermissions.json | 30 + .../examples/GetProviderOperationsRP.json | 28 + .../examples/GetResourcePermissions.json | 27 + .../examples/GetRoleAssignmentById.json | 21 + .../examples/GetRoleAssignmentByName.json | 23 + .../examples/GetRoleAssignmentByScope.json | 25 + .../GetRoleAssignmentsForResource.json | 30 + .../GetRoleAssignmentsForResourceGroup.json | 26 + .../examples/GetRoleDefinitionAtScope.json | 43 + .../examples/GetRoleDefinitionById.json | 39 + .../examples/GetRoleDefinitionByName.json | 40 + .../examples/PutRoleAssignment.json | 29 + .../examples/PutRoleAssignmentById.json | 29 + .../examples/PutRoleDefinition.json | 71 ++ .../authorization/resource-manager/readme.md | 20 +- 23 files changed, 2029 insertions(+), 1 deletion(-) create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentByName.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleDefinition.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllRoleAssignments.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetClassicAdministrators.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetPermissions.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetResourcePermissions.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByName.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByScope.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResource.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResourceGroup.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionAtScope.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionByName.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignment.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleDefinition.json diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json new file mode 100644 index 000000000000..96bf74325b22 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json @@ -0,0 +1,1048 @@ +{ + "swagger": "2.0", + "info": { + "title": "AuthorizationManagementClient", + "version": "2018-01-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 manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to 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/Microsoft.Authorization/permissions": { + "get": { + "tags": [ + "Permissions" + ], + "operationId": "Permissions_ListForResourceGroup", + "description": "Gets all permissions the caller has for a resource group.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group to get the permissions for. The name is case insensitive." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of permissions.", + "schema": { + "$ref": "#/definitions/PermissionGetResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetPermissions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions": { + "get": { + "tags": [ + "Permissions" + ], + "operationId": "Permissions_ListForResource", + "description": "Gets all permissions the caller has for a resource.", + "parameters": [ + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group containing the resource. The name is case insensitive." + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "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 the permissions for." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of permissions.", + "schema": { + "$ref": "#/definitions/PermissionGetResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetResourcePermissions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/roleAssignments": { + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_ListForResource", + "description": "Gets role assignments for a resource.", + "parameters": [{ + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "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 role assignments for." + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of role assignments.", + "schema": { + "$ref": "#/definitions/RoleAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RoleAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleAssignmentsForResource.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/roleAssignments": { + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_ListForResourceGroup", + "description": "Gets role assignments for a resource group.", + "parameters": [{ + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group." + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of role assignments.", + "schema": { + "$ref": "#/definitions/RoleAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RoleAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleAssignmentsForResourceGroup.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}": { + "delete": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_Delete", + "description": "Deletes a role assignment.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role assignment to delete.", + "x-ms-skip-url-encoding": true + }, + { + "name": "roleAssignmentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the role assignment to delete." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role assignment.", + "schema": { + "$ref": "#/definitions/RoleAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/DeleteRoleAssignmentByName.json" + } + } + }, + "put": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_Create", + "description": "Creates a role assignment.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.", + "x-ms-skip-url-encoding": true + }, + { + "name": "roleAssignmentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the role assignment to create. It can be any valid GUID." + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RoleAssignmentCreateParameters" + }, + "description": "Parameters for the role assignment." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "Created - Returns information about the role assignment.", + "schema": { + "$ref": "#/definitions/RoleAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/PutRoleAssignment.json" + } + } + }, + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_Get", + "description": "Get the specified role assignment.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role assignment.", + "x-ms-skip-url-encoding": true + }, + { + "name": "roleAssignmentName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the role assignment to get." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role assignment.", + "schema": { + "$ref": "#/definitions/RoleAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleAssignmentByName.json" + } + } + } + }, + "/{roleAssignmentId}": { + "delete": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_DeleteById", + "description": "Deletes a role assignment.", + "parameters": [{ + "name": "roleAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role assignment to delete.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role assignment.", + "schema": { + "$ref": "#/definitions/RoleAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/DeleteRoleAssignmentById.json" + } + } + }, + "put": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_CreateById", + "description": "Creates a role assignment by ID.", + "parameters": [{ + "name": "roleAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role assignment to create.", + "x-ms-skip-url-encoding": true + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RoleAssignmentCreateParameters" + }, + "description": "Parameters for the role assignment." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "Created - Returns the role assignment.", + "schema": { + "$ref": "#/definitions/RoleAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/PutRoleAssignmentById.json" + } + } + }, + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_GetById", + "description": "Gets a role assignment by ID.", + "parameters": [{ + "name": "roleAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role assignment to get.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns the role assignment.", + "schema": { + "$ref": "#/definitions/RoleAssignment" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleAssignmentById.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments": { + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_List", + "description": "Gets all role assignments for the subscription.", + "parameters": [{ + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of role assignments.", + "schema": { + "$ref": "#/definitions/RoleAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RoleAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetAllRoleAssignments.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Authorization/roleAssignments": { + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_ListForScope", + "description": "Gets role assignments for a scope.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role assignments.", + "x-ms-skip-url-encoding": true + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of role assignments.", + "schema": { + "$ref": "#/definitions/RoleAssignmentListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RoleAssignmentFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleAssignmentByScope.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}": { + "delete": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_Delete", + "description": "Deletes a role definition.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role definition.", + "x-ms-skip-url-encoding": true + }, + { + "name": "roleDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role definition to delete." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role definition.", + "schema": { + "$ref": "#/definitions/RoleDefinition" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/DeleteRoleDefinition.json" + } + } + }, + "get": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_Get", + "description": "Get role definition by name (GUID).", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role definition.", + "x-ms-skip-url-encoding": true + }, + { + "name": "roleDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role definition." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role definition.", + "schema": { + "$ref": "#/definitions/RoleDefinition" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleDefinitionByName.json" + } + } + }, + "put": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_CreateOrUpdate", + "description": "Creates or updates a role definition.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role definition.", + "x-ms-skip-url-encoding": true + }, + { + "name": "roleDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role definition." + }, + { + "name": "roleDefinition", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RoleDefinition" + }, + "description": "The values for the role definition." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "201": { + "description": "OK - Returns information about the role definition.", + "schema": { + "$ref": "#/definitions/RoleDefinition" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/PutRoleDefinition.json" + } + } + } + }, + "/{roleDefinitionId}": { + "get": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_GetById", + "description": "Gets a role definition by ID.", + "parameters": [{ + "name": "roleDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role definition.", + "schema": { + "$ref": "#/definitions/RoleDefinition" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleDefinitionById.json" + } + } + } + }, + "/{scope}/providers/Microsoft.Authorization/roleDefinitions": { + "get": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_List", + "description": "Get all role definitions that are applicable at scope and above.", + "parameters": [{ + "name": "scope", + "in": "path", + "required": true, + "type": "string", + "description": "The scope of the role definition.", + "x-ms-skip-url-encoding": true + }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well." + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of role definitions.", + "schema": { + "$ref": "#/definitions/RoleDefinitionListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RoleDefinitionFilter", + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleDefinitionAtScope.json" + } + } + } + } + }, + "definitions": { + "PermissionGetResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Permission" + }, + "description": "An array of permissions." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "Permissions information." + }, + "RoleDefinitionFilter": { + "properties": { + "roleName": { + "type": "string", + "description": "Returns role definition with the specific name." + } + }, + "description": "Role Definitions filter" + }, + "RoleDefinitionProperties": { + "properties": { + "roleName": { + "type": "string", + "description": "The role name." + }, + "description": { + "type": "string", + "description": "The role definition description." + }, + "type": { + "type": "string", + "description": "The role type.", + "x-ms-client-name": "roleType" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/definitions/Permission" + }, + "description": "Role definition permissions." + }, + "assignableScopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Role definition assignable scopes." + } + }, + "description": "Role definition properties." + }, + "RoleDefinition": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The role definition ID." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The role definition name." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "The role definition type." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RoleDefinitionProperties", + "description": "Role definition properties." + } + }, + "description": "Role definition." + }, + "RoleDefinitionListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RoleDefinition" + }, + "description": "Role definition list." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "Role definition list operation result." + }, + "RoleAssignmentFilter": { + "properties": { + "principalId": { + "type": "string", + "description": "Returns role assignment of the specific principal." + }, + "canDelegate": { + "type": "boolean", + "description": "The Delegation flag for the roleassignment" + } + }, + "description": "Role Assignments filter" + }, + "RoleAssignmentPropertiesWithScope": { + "properties": { + "scope": { + "type": "string", + "description": "The role assignment scope." + }, + "roleDefinitionId": { + "type": "string", + "description": "The role definition ID." + }, + "principalId": { + "type": "string", + "description": "The principal ID." + }, + "canDelegate": { + "type": "boolean", + "description": "The Delegation flag for the roleassignment" + } + }, + "description": "Role assignment properties with scope." + }, + "RoleAssignment": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "The role assignment ID." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The role assignment name." + }, + "type": { + "type": "string", + "readOnly": true, + "description": "The role assignment type." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RoleAssignmentPropertiesWithScope", + "description": "Role assignment properties." + } + }, + "description": "Role Assignments" + }, + "RoleAssignmentListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/RoleAssignment" + }, + "description": "Role assignment list." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "Role assignment list operation result." + }, + "RoleAssignmentProperties": { + "properties": { + "roleDefinitionId": { + "type": "string", + "description": "The role definition ID used in the role assignment." + }, + "principalId": { + "type": "string", + "description": "The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group." + }, + "canDelegate": { + "type": "boolean", + "description": "The delgation flag used for creating a role assignment" + } + }, + "description": "Role assignment properties." + }, + "RoleAssignmentCreateParameters": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/RoleAssignmentProperties", + "description": "Role assignment properties." + } + }, + "description": "Role assignment create parameters." + }, + "Permission": { + "properties": { + "actions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed actions." + }, + "notActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Denied actions." + }, + "dataActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Allowed Data actions." + }, + "notDataActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Denied Data actions." + } + }, + "description": "Role definition permissions." + } + }, + "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." + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json new file mode 100644 index 000000000000..5ae9f8dad073 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json @@ -0,0 +1,329 @@ +{ + "swagger": "2.0", + "info": { + "title": "AuthorizationManagementClient", + "version": "2015-07-01", + "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 manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to 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}/providers/Microsoft.Authorization/classicAdministrators": { + "get": { + "tags": [ + "ClassicAdministrators" + ], + "operationId": "ClassicAdministrators_List", + "description": "Gets service administrator, account administrator, and co-administrators for the subscription.", + "parameters": [ + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Returns an array of administrators.", + "schema": { + "$ref": "#/definitions/ClassicAdministratorListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetClassicAdministrators.json" + } + } + } + }, + "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}": { + "get": { + "tags": [ + "ProviderOperationsMetadata" + ], + "operationId": "ProviderOperationsMetadata_Get", + "description": "Gets provider operations metadata for the specified resource provider.", + "parameters": [ + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "default": "resourceTypes", + "description": "Specifies whether to expand the values." + } + ], + "responses": { + "200": { + "description": "OK - Returns the operations metadata.", + "schema": { + "$ref": "#/definitions/ProviderOperationsMetadata" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetProviderOperationsRP.json" + } + } + } + }, + "/providers/Microsoft.Authorization/providerOperations": { + "get": { + "tags": [ + "ProviderOperationsMetadata" + ], + "operationId": "ProviderOperationsMetadata_List", + "description": "Gets provider operations metadata for all resource providers.", + "parameters": [ + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "default": "resourceTypes", + "description": "Specifies whether to expand the values." + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of the operations metadata.", + "schema": { + "$ref": "#/definitions/ProviderOperationsMetadataListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetAllProviderOperations.json" + } + } + } + } + }, + "definitions": { + "ClassicAdministratorProperties": { + "properties": { + "emailAddress": { + "type": "string", + "description": "The email address of the administrator." + }, + "role": { + "type": "string", + "description": "The role of the administrator." + } + }, + "description": "Classic Administrator properties." + }, + "ClassicAdministrator": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the administrator." + }, + "name": { + "type": "string", + "description": "The name of the administrator." + }, + "type": { + "type": "string", + "description": "The type of the administrator." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ClassicAdministratorProperties", + "description": "Properties for the classic administrator." + } + }, + "description": "Classic Administrators" + }, + "ClassicAdministratorListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ClassicAdministrator" + }, + "description": "An array of administrators." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "ClassicAdministrator list result information." + }, + "ProviderOperation": { + "properties": { + "name": { + "type": "string", + "description": "The operation name." + }, + "displayName": { + "type": "string", + "description": "The operation display name." + }, + "description": { + "type": "string", + "description": "The operation description." + }, + "origin": { + "type": "string", + "description": "The operation origin." + }, + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The operation properties." + } + }, + "description": "Operation" + }, + "ResourceType": { + "properties": { + "name": { + "type": "string", + "description": "The resource type name." + }, + "displayName": { + "type": "string", + "description": "The resource type display name." + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderOperation" + }, + "description": "The resource type operations." + } + }, + "description": "Resource Type" + }, + "ProviderOperationsMetadata": { + "properties": { + "id": { + "type": "string", + "description": "The provider id." + }, + "name": { + "type": "string", + "description": "The provider name." + }, + "type": { + "type": "string", + "description": "The provider type." + }, + "displayName": { + "type": "string", + "description": "The provider display name." + }, + "resourceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceType" + }, + "description": "The provider resource types" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderOperation" + }, + "description": "The provider operations." + } + }, + "description": "Provider Operations metadata" + }, + "ProviderOperationsMetadataListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderOperationsMetadata" + }, + "description": "The list of providers." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "Provider operations metadata list" + } + }, + "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." + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json new file mode 100644 index 000000000000..5fb4ef8ce22f --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentId": "roleAssignmentId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentByName.json new file mode 100644 index 000000000000..3a1fb741d45b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentByName.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleDefinition.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleDefinition.json new file mode 100644 index 000000000000..8ec65dbf2526 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleDefinition.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleName": "Role name", + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + + ], + "dataActions": [ + "dataAction" + ], + "notDataActions": [ + + ] + } + ] + }, + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "name": "roleDefinitionId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json new file mode 100644 index 000000000000..802928ab074c --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2015-07-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "id", + "name": "name", + "type": "type", + "displayName": "displayName", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [ + + ] + } + ], + "operations": [ + + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllRoleAssignments.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllRoleAssignments.json new file mode 100644 index 000000000000..735d379511b5 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllRoleAssignments.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "subId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetClassicAdministrators.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetClassicAdministrators.json new file mode 100644 index 000000000000..c920724db459 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetClassicAdministrators.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "subId", + "api-version": "2015-07-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "emailAddress": "test@test.com", + "role": "ServiceAdministrator;AccountAdministrator" + }, + "id": "/subscriptions/subId/providers/Microsoft.Authorization/classicAdministrators/classicadminid", + "type": "Microsoft.Authorization/classicAdministrators", + "name": "classicadminid" + }, + { + "properties": { + "emailAddress": "coadmin@test.com", + "role": "CoAdministrator" + }, + "id": "/subscriptions/subId/providers/Microsoft.Authorization/classicAdministrators/classicadminid2", + "type": "Microsoft.Authorization/classicAdministrators", + "name": "classicadminid2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetPermissions.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetPermissions.json new file mode 100644 index 000000000000..bfca93490cac --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetPermissions.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "subscriptionId": "subID", + "api-version": "2015-07-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [ + + ], + "notActions": [ + + ], + "dataActions": [ + + ], + "notDataActions": [ + + ] + } + ], + "nextLink": "nextlink" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json new file mode 100644 index 000000000000..e74cc452347a --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "resourceProviderNamespace": "resourceProviderNamespace", + "api-version": "2015-07-01" + }, + "responses": { + "200": { + "body": { + "id": "id", + "name": "name", + "type": "type", + "displayName": "displayName", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [ + + ] + } + ], + "operations": [ + + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetResourcePermissions.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetResourcePermissions.json new file mode 100644 index 000000000000..6b736cf8e837 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetResourcePermissions.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "subId", + "resourceGroupName": "rgname", + "resourceProviderNamespace": "rpnamespace", + "parentResourcePath": "parentResourcePath", + "resourceType": "resourceType", + "resourceName": "resourceName", + "api-version": "2015-07-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [ + + ], + "notActions": [ + + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json new file mode 100644 index 000000000000..475894b1eddf --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "roleAssignmentId": "roleassignmentId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByName.json new file mode 100644 index 000000000000..c9762294b5ac --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByName.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "subscriptionId": "subId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByScope.json new file mode 100644 index 000000000000..9b19462acb1d --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentByScope.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "scope": "scope", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResource.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResource.json new file mode 100644 index 000000000000..a3d6f0c24088 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResource.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "resourceProviderNamespace": "resourceProviderNamespace", + "parentResourcePath": "parentResourcePath", + "resourceType": "resourceType", + "resourceName": "resourceName", + "subscriptionId": "subId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResourceGroup.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResourceGroup.json new file mode 100644 index 000000000000..ac8faea0d549 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentsForResourceGroup.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "subscriptionId": "subId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionAtScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionAtScope.json new file mode 100644 index 000000000000..40bc07f6730b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionAtScope.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "scope": "scope", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleName": "Role name", + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + + ], + "dataActions": [ + "dataAction" + ], + "notDataActions": [ + + ] + } + ] + }, + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "name": "roleDefinitionId" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json new file mode 100644 index 000000000000..90d46d6b9d59 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "roleDefinitionId": "roleDefinitionId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleName": "Role name", + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + + ], + "dataActions": [ + "dataAction" + ], + "notDataActions": [ + + ] + } + ] + }, + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "name": "roleDefinitionId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionByName.json new file mode 100644 index 000000000000..8ec65dbf2526 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionByName.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "api-version": "2018-01-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleName": "Role name", + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + + ], + "dataActions": [ + "dataAction" + ], + "notDataActions": [ + + ] + } + ] + }, + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "name": "roleDefinitionId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignment.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignment.json new file mode 100644 index 000000000000..ce3c127d155d --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignment.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "parameters": { + "properties": { + "roleDefinitionId": "/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772", + "principalId": "d93a38bc-d029-4160-bfb0-fbda779ac214", + "canDelegate":false + } + }, + "api-version": "2018-01-01-preview" + }, + "responses": { + "201": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json new file mode 100644 index 000000000000..189cb1f8e2cb --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentId": "roleAssignmentId", + "parameters": { + "properties": { + "roleDefinitionId": "/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772", + "principalId": "d93a38bc-d029-4160-bfb0-fbda779ac214", + "canDelegate":false + } + }, + "api-version": "2018-01-01-preview" + }, + "responses": { + "201": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate":false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleDefinition.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleDefinition.json new file mode 100644 index 000000000000..5e97fe21d2d5 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleDefinition.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "roleDefinition": { + + }, + "body": { + "roleDefinition": { + "roleName": "Role name", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + + ], + "dataActions": [ + "dataAction" + ], + "notDataActions": [ + + ] + } + ], + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "name": "roleDefinitionId" + } + }, + "api-version": "2018-01-01-preview" + }, + "responses": { + "201": { + "body": { + "properties": { + "roleName": "Role name", + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "notActions": [ + + ], + "dataActions": [ + "dataAction" + ], + "notDataActions": [ + + ] + } + ] + }, + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "name": "roleDefinitionId" + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index 82e0018c8875..81aa53b52c13 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-2017-10-01-preview +tag: package-2018-01-01-preview ``` ## Suppression @@ -58,6 +58,15 @@ input-file: - Microsoft.Authorization/preview/2017-10-01-preview/authorization-RACalls.json ``` +### Tag: package-2018-01-01-preview + +These settings apply only when `--tag=package-2018-01-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-01-01-preview' +input-file: +- Microsoft.Authorization/preview/2018-01-01-preview/authorization.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json +``` --- # Code Generation @@ -151,4 +160,13 @@ Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-01-01-preview' && $(go) +output-folder: $(go-sdk-folder)/services/authorization/mgmt/2018-01-01-preview/authorization ``` \ No newline at end of file From 4340b78882b30d95f36a32017df9fda2ac53d86e Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Thu, 25 Jan 2018 13:04:52 -0800 Subject: [PATCH 2/9] update calls with new versions --- .../authorization-ClassicAdminCalls.json | 144 ++++++++++++++++++ ...authorization-ProviderOperationCalls.json} | 94 +----------- ...json => authorization-RoleBasedCalls.json} | 0 .../examples/GetAllProviderOperations.json | 2 +- .../examples/GetProviderOperationsRP.json | 2 +- .../authorization/resource-manager/readme.md | 5 +- 6 files changed, 154 insertions(+), 93 deletions(-) create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json rename specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/{authorization.json => authorization-ProviderOperationCalls.json} (71%) rename specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/{authorization-AuthorizationCalls.json => authorization-RoleBasedCalls.json} (100%) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json new file mode 100644 index 000000000000..85f21f4e070a --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json @@ -0,0 +1,144 @@ +{ + "swagger": "2.0", + "info": { + "title": "AuthorizationManagementClient", + "version": "2015-07-01", + "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 manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to 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}/providers/Microsoft.Authorization/classicAdministrators": { + "get": { + "tags": [ + "ClassicAdministrators" + ], + "operationId": "ClassicAdministrators_List", + "description": "Gets service administrator, account administrator, and co-administrators for the subscription.", + "parameters": [ + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Returns an array of administrators.", + "schema": { + "$ref": "#/definitions/ClassicAdministratorListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetClassicAdministrators.json" + } + } + } + } + }, + "definitions": { + "ClassicAdministratorProperties": { + "properties": { + "emailAddress": { + "type": "string", + "description": "The email address of the administrator." + }, + "role": { + "type": "string", + "description": "The role of the administrator." + } + }, + "description": "Classic Administrator properties." + }, + "ClassicAdministrator": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the administrator." + }, + "name": { + "type": "string", + "description": "The name of the administrator." + }, + "type": { + "type": "string", + "description": "The type of the administrator." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ClassicAdministratorProperties", + "description": "Properties for the classic administrator." + } + }, + "description": "Classic Administrators" + }, + "ClassicAdministratorListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ClassicAdministrator" + }, + "description": "An array of administrators." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "ClassicAdministrator list result information." + } + }, + "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." + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json similarity index 71% rename from specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json rename to specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json index 5ae9f8dad073..b7d10cc885ea 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "AuthorizationManagementClient", - "version": "2015-07-01", + "version": "2017-05-01", "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 manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users." }, "host": "management.azure.com", @@ -34,43 +34,6 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators": { - "get": { - "tags": [ - "ClassicAdministrators" - ], - "operationId": "ClassicAdministrators_List", - "description": "Gets service administrator, account administrator, and co-administrators for the subscription.", - "parameters": [ - { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation." - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - } - ], - "responses": { - "200": { - "description": "Returns an array of administrators.", - "schema": { - "$ref": "#/definitions/ClassicAdministratorListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "GetConfigurations": { - "$ref": "./examples/GetClassicAdministrators.json" - } - } - } - }, "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}": { "get": { "tags": [ @@ -161,57 +124,6 @@ } }, "definitions": { - "ClassicAdministratorProperties": { - "properties": { - "emailAddress": { - "type": "string", - "description": "The email address of the administrator." - }, - "role": { - "type": "string", - "description": "The role of the administrator." - } - }, - "description": "Classic Administrator properties." - }, - "ClassicAdministrator": { - "properties": { - "id": { - "type": "string", - "description": "The ID of the administrator." - }, - "name": { - "type": "string", - "description": "The name of the administrator." - }, - "type": { - "type": "string", - "description": "The type of the administrator." - }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ClassicAdministratorProperties", - "description": "Properties for the classic administrator." - } - }, - "description": "Classic Administrators" - }, - "ClassicAdministratorListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ClassicAdministrator" - }, - "description": "An array of administrators." - }, - "nextLink": { - "type": "string", - "description": "The URL to use for getting the next set of results." - } - }, - "description": "ClassicAdministrator list result information." - }, "ProviderOperation": { "properties": { "name": { @@ -234,6 +146,10 @@ "type": "object", "x-ms-client-flatten": true, "description": "The operation properties." + }, + "isDataAction": { + "type": "boolean", + "description": "The dataAction flag to specify the operation type." } }, "description": "Operation" diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json similarity index 100% rename from specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json rename to specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json index 802928ab074c..b8babe68088f 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetAllProviderOperations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2015-07-01" + "api-version": "2017-05-01" }, "responses": { "200": { diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json index e74cc452347a..3517f906b4a7 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetProviderOperationsRP.json @@ -1,7 +1,7 @@ { "parameters": { "resourceProviderNamespace": "resourceProviderNamespace", - "api-version": "2015-07-01" + "api-version": "2017-05-01" }, "responses": { "200": { diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index 81aa53b52c13..9a55c49417b7 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -64,8 +64,9 @@ These settings apply only when `--tag=package-2018-01-01-preview` is specified o ``` yaml $(tag) == 'package-2018-01-01-preview' input-file: -- Microsoft.Authorization/preview/2018-01-01-preview/authorization.json -- Microsoft.Authorization/preview/2018-01-01-preview/authorization-AuthorizationCalls.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json ``` --- From 3fe7452d75e89c2f488b6ed05e2e79507a5afdac Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Mon, 29 Jan 2018 13:33:49 -0800 Subject: [PATCH 3/9] move provider operations to new api --- .../authorization-ProviderOperationCalls.json | 245 ------------------ .../authorization-RoleBasedCalls.json | 189 ++++++++++++++ .../authorization/resource-manager/readme.md | 1 - 3 files changed, 189 insertions(+), 246 deletions(-) delete mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json deleted file mode 100644 index b7d10cc885ea..000000000000 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "AuthorizationManagementClient", - "version": "2017-05-01", - "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 manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to 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": { - "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}": { - "get": { - "tags": [ - "ProviderOperationsMetadata" - ], - "operationId": "ProviderOperationsMetadata_Get", - "description": "Gets provider operations metadata for the specified resource provider.", - "parameters": [ - { - "name": "resourceProviderNamespace", - "in": "path", - "required": true, - "type": "string", - "description": "The namespace of the resource provider." - }, - { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for the operation." - }, - { - "name": "$expand", - "in": "query", - "required": false, - "type": "string", - "default": "resourceTypes", - "description": "Specifies whether to expand the values." - } - ], - "responses": { - "200": { - "description": "OK - Returns the operations metadata.", - "schema": { - "$ref": "#/definitions/ProviderOperationsMetadata" - } - } - }, - "x-ms-examples": { - "GetConfigurations": { - "$ref": "./examples/GetProviderOperationsRP.json" - } - } - } - }, - "/providers/Microsoft.Authorization/providerOperations": { - "get": { - "tags": [ - "ProviderOperationsMetadata" - ], - "operationId": "ProviderOperationsMetadata_List", - "description": "Gets provider operations metadata for all resource providers.", - "parameters": [ - { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation." - }, - { - "name": "$expand", - "in": "query", - "required": false, - "type": "string", - "default": "resourceTypes", - "description": "Specifies whether to expand the values." - } - ], - "responses": { - "200": { - "description": "OK - Returns an array of the operations metadata.", - "schema": { - "$ref": "#/definitions/ProviderOperationsMetadataListResult" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "GetConfigurations": { - "$ref": "./examples/GetAllProviderOperations.json" - } - } - } - } - }, - "definitions": { - "ProviderOperation": { - "properties": { - "name": { - "type": "string", - "description": "The operation name." - }, - "displayName": { - "type": "string", - "description": "The operation display name." - }, - "description": { - "type": "string", - "description": "The operation description." - }, - "origin": { - "type": "string", - "description": "The operation origin." - }, - "properties": { - "type": "object", - "x-ms-client-flatten": true, - "description": "The operation properties." - }, - "isDataAction": { - "type": "boolean", - "description": "The dataAction flag to specify the operation type." - } - }, - "description": "Operation" - }, - "ResourceType": { - "properties": { - "name": { - "type": "string", - "description": "The resource type name." - }, - "displayName": { - "type": "string", - "description": "The resource type display name." - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderOperation" - }, - "description": "The resource type operations." - } - }, - "description": "Resource Type" - }, - "ProviderOperationsMetadata": { - "properties": { - "id": { - "type": "string", - "description": "The provider id." - }, - "name": { - "type": "string", - "description": "The provider name." - }, - "type": { - "type": "string", - "description": "The provider type." - }, - "displayName": { - "type": "string", - "description": "The provider display name." - }, - "resourceTypes": { - "type": "array", - "items": { - "$ref": "#/definitions/ResourceType" - }, - "description": "The provider resource types" - }, - "operations": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderOperation" - }, - "description": "The provider operations." - } - }, - "description": "Provider Operations metadata" - }, - "ProviderOperationsMetadataListResult": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderOperationsMetadata" - }, - "description": "The list of providers." - }, - "nextLink": { - "type": "string", - "description": "The URL to use for getting the next set of results." - } - }, - "description": "Provider operations metadata list" - } - }, - "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." - } - } -} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json index 96bf74325b22..1a3b72ed63da 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json @@ -32,6 +32,94 @@ } }, "paths": { + "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}": { + "get": { + "tags": [ + "ProviderOperationsMetadata" + ], + "operationId": "ProviderOperationsMetadata_Get", + "description": "Gets provider operations metadata for the specified resource provider.", + "parameters": [ + { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." + }, + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for the operation." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "default": "resourceTypes", + "description": "Specifies whether to expand the values." + } + ], + "responses": { + "200": { + "description": "OK - Returns the operations metadata.", + "schema": { + "$ref": "#/definitions/ProviderOperationsMetadata" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetProviderOperationsRP.json" + } + } + } + }, + "/providers/Microsoft.Authorization/providerOperations": { + "get": { + "tags": [ + "ProviderOperationsMetadata" + ], + "operationId": "ProviderOperationsMetadata_List", + "description": "Gets provider operations metadata for all resource providers.", + "parameters": [ + { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "default": "resourceTypes", + "description": "Specifies whether to expand the values." + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of the operations metadata.", + "schema": { + "$ref": "#/definitions/ProviderOperationsMetadataListResult" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetAllProviderOperations.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions": { "get": { "tags": [ @@ -795,6 +883,107 @@ } }, "definitions": { + "ProviderOperation": { + "properties": { + "name": { + "type": "string", + "description": "The operation name." + }, + "displayName": { + "type": "string", + "description": "The operation display name." + }, + "description": { + "type": "string", + "description": "The operation description." + }, + "origin": { + "type": "string", + "description": "The operation origin." + }, + "properties": { + "type": "object", + "x-ms-client-flatten": true, + "description": "The operation properties." + }, + "isDataAction": { + "type": "boolean", + "description": "The dataAction flag to specify the operation type." + } + }, + "description": "Operation" + }, + "ResourceType": { + "properties": { + "name": { + "type": "string", + "description": "The resource type name." + }, + "displayName": { + "type": "string", + "description": "The resource type display name." + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderOperation" + }, + "description": "The resource type operations." + } + }, + "description": "Resource Type" + }, + "ProviderOperationsMetadata": { + "properties": { + "id": { + "type": "string", + "description": "The provider id." + }, + "name": { + "type": "string", + "description": "The provider name." + }, + "type": { + "type": "string", + "description": "The provider type." + }, + "displayName": { + "type": "string", + "description": "The provider display name." + }, + "resourceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/ResourceType" + }, + "description": "The provider resource types" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderOperation" + }, + "description": "The provider operations." + } + }, + "description": "Provider Operations metadata" + }, + "ProviderOperationsMetadataListResult": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ProviderOperationsMetadata" + }, + "description": "The list of providers." + }, + "nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results." + } + }, + "description": "Provider operations metadata list" + }, "PermissionGetResult": { "properties": { "value": { diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index 9a55c49417b7..51be9684dab5 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -65,7 +65,6 @@ These settings apply only when `--tag=package-2018-01-01-preview` is specified o ``` yaml $(tag) == 'package-2018-01-01-preview' input-file: - Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json -- Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json ``` From aa1e9fbb36dfecf49feffeff4377fc5e26236ecf Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Tue, 30 Jan 2018 17:27:45 -0800 Subject: [PATCH 4/9] address some of the comments --- .../authorization-ClassicAdminCalls.json | 6 +- .../authorization-RoleBasedCalls.json | 126 ++++++++---------- 2 files changed, 54 insertions(+), 78 deletions(-) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json index 85f21f4e070a..67521e2e3a3c 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-ClassicAdminCalls.json @@ -43,11 +43,7 @@ "description": "Gets service administrator, account administrator, and co-administrators for the subscription.", "parameters": [ { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation." + "$ref": "#/parameters/ApiVersionParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json index 1a3b72ed63da..bfd15bfb7447 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json @@ -41,18 +41,10 @@ "description": "Gets provider operations metadata for the specified resource provider.", "parameters": [ { - "name": "resourceProviderNamespace", - "in": "path", - "required": true, - "type": "string", - "description": "The namespace of the resource provider." + "$ref": "#/parameters/ResourceProviderNamespaceParameter" }, { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for the operation." + "$ref": "#/parameters/ApiVersionParameter" }, { "name": "$expand", @@ -87,11 +79,7 @@ "description": "Gets provider operations metadata for all resource providers.", "parameters": [ { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "The API version to use for this operation." + "$ref": "#/parameters/ApiVersionParameter" }, { "name": "$expand", @@ -129,11 +117,7 @@ "description": "Gets all permissions the caller has for a resource group.", "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group to get the permissions for. The name is case insensitive." + "$ref": "#/parameters/ResourceGroupNameParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -169,18 +153,10 @@ "description": "Gets all permissions the caller has for a resource.", "parameters": [ { - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group containing the resource. The name is case insensitive." + "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "name": "resourceProviderNamespace", - "in": "path", - "required": true, - "type": "string", - "description": "The namespace of the resource provider." + "$ref": "#/parameters/ResourceProviderNamespaceParameter" }, { "name": "parentResourcePath", @@ -238,18 +214,10 @@ "operationId": "RoleAssignments_ListForResource", "description": "Gets role assignments for a resource.", "parameters": [{ - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group." + "$ref": "#/parameters/ResourceGroupNameParameter" }, { - "name": "resourceProviderNamespace", - "in": "path", - "required": true, - "type": "string", - "description": "The namespace of the resource provider." + "$ref": "#/parameters/ResourceProviderNamespaceParameter" }, { "name": "parentResourcePath", @@ -315,11 +283,7 @@ "operationId": "RoleAssignments_ListForResourceGroup", "description": "Gets role assignments for a resource group.", "parameters": [{ - "name": "resourceGroupName", - "in": "path", - "required": true, - "type": "string", - "description": "The name of the resource group." + "$ref": "#/parameters/ResourceGroupNameParameter" }, { "name": "$filter", @@ -802,81 +766,83 @@ } } }, - "/{roleDefinitionId}": { + "/{scope}/providers/Microsoft.Authorization/roleDefinitions": { "get": { "tags": [ "RoleDefinitions" ], - "operationId": "RoleDefinitions_GetById", - "description": "Gets a role definition by ID.", + "operationId": "RoleDefinitions_List", + "description": "Get all role definitions that are applicable at scope and above.", "parameters": [{ - "name": "roleDefinitionId", + "name": "scope", "in": "path", "required": true, "type": "string", - "description": "The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.", + "description": "The scope of the role definition.", "x-ms-skip-url-encoding": true }, + { + "name": "$filter", + "in": "query", + "required": false, + "type": "string", + "description": "The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well." + }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK - Returns information about the role definition.", + "description": "OK - Returns an array of role definitions.", "schema": { - "$ref": "#/definitions/RoleDefinition" + "$ref": "#/definitions/RoleDefinitionListResult" } } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-odata": "#/definitions/RoleDefinitionFilter", "x-ms-examples": { "GetConfigurations": { - "$ref": "./examples/GetRoleDefinitionById.json" + "$ref": "./examples/GetRoleDefinitionAtScope.json" } } } - }, - "/{scope}/providers/Microsoft.Authorization/roleDefinitions": { + } + }, + "x-ms-paths":{ + "/{roleDefinitionId}": { "get": { "tags": [ "RoleDefinitions" ], - "operationId": "RoleDefinitions_List", - "description": "Get all role definitions that are applicable at scope and above.", + "operationId": "RoleDefinitions_GetById", + "description": "Gets a role definition by ID.", "parameters": [{ - "name": "scope", + "name": "roleDefinitionId", "in": "path", "required": true, "type": "string", - "description": "The scope of the role definition.", + "description": "The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.", "x-ms-skip-url-encoding": true }, - { - "name": "$filter", - "in": "query", - "required": false, - "type": "string", - "description": "The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well." - }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK - Returns an array of role definitions.", + "description": "OK - Returns information about the role definition.", "schema": { - "$ref": "#/definitions/RoleDefinitionListResult" + "$ref": "#/definitions/RoleDefinition" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-odata": "#/definitions/RoleDefinitionFilter", "x-ms-examples": { "GetConfigurations": { - "$ref": "./examples/GetRoleDefinitionAtScope.json" + "$ref": "./examples/GetRoleDefinitionById.json" } } } @@ -1232,6 +1198,20 @@ "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." + }, + "ResourceProviderNamespaceParameter": { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider." } } } \ No newline at end of file From d00dab07e4f02229a1ca71d27668e65232d3b199 Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Wed, 31 Jan 2018 09:39:08 -0800 Subject: [PATCH 5/9] add disambiguation path --- .../2018-01-01-preview/authorization-RoleBasedCalls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json index bfd15bfb7447..83eb5deebb29 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json @@ -813,7 +813,7 @@ } }, "x-ms-paths":{ - "/{roleDefinitionId}": { + "/{roleDefinitionId}?disambiguation_dummy": { "get": { "tags": [ "RoleDefinitions" From d2d5d9914320bac8573f53c6582b680f2322f504 Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Wed, 31 Jan 2018 17:08:45 -0800 Subject: [PATCH 6/9] add missed out batch api in readme --- .../authorization-RoleBasedCalls.json | 34 +++++++++++++++++++ .../authorization/resource-manager/readme.md | 1 + 2 files changed, 35 insertions(+) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json index 83eb5deebb29..39a322dba233 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json @@ -553,6 +553,40 @@ } } }, + "/{roleDefinitionId}": { + "get": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_GetById", + "description": "Gets a role definition by ID.", + "parameters": [{ + "name": "roleDefinitionId", + "in": "path", + "required": true, + "type": "string", + "description": "The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns information about the role definition.", + "schema": { + "$ref": "#/definitions/RoleDefinition" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleDefinitionById.json" + } + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments": { "get": { "tags": [ diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index 51be9684dab5..4e269d5cfea2 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -142,6 +142,7 @@ go: batch: - tag: package-2015-07 - tag: package-2017-10-01-preview + - tag: package-2018-01-01-preview ``` ### Tag: package-2015-07 and go From 42f52c7c15f7d7b316a4fde6d8841dae22cc04fa Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Wed, 31 Jan 2018 17:32:19 -0800 Subject: [PATCH 7/9] fix testing error --- .../authorization-RoleBasedCalls.json | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json index 39a322dba233..83eb5deebb29 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json @@ -553,40 +553,6 @@ } } }, - "/{roleDefinitionId}": { - "get": { - "tags": [ - "RoleDefinitions" - ], - "operationId": "RoleDefinitions_GetById", - "description": "Gets a role definition by ID.", - "parameters": [{ - "name": "roleDefinitionId", - "in": "path", - "required": true, - "type": "string", - "description": "The fully qualified role definition ID. Use the format, /subscriptions/{guid}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for subscription level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant level role definitions.", - "x-ms-skip-url-encoding": true - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK - Returns information about the role definition.", - "schema": { - "$ref": "#/definitions/RoleDefinition" - } - } - }, - "x-ms-examples": { - "GetConfigurations": { - "$ref": "./examples/GetRoleDefinitionById.json" - } - } - } - }, "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignments": { "get": { "tags": [ From 4e86c805a1f7b255cb1f61eb05694ae56ddf3bc9 Mon Sep 17 00:00:00 2001 From: Haridarshan Hosakere Sudhakar Date: Thu, 1 Feb 2018 12:11:06 -0800 Subject: [PATCH 8/9] add missed out quotes --- specification/authorization/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index fc9e04eb63b2..7ecbae35517d 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -171,6 +171,7 @@ Please also specify `--go-sdk-folder= Date: Thu, 1 Feb 2018 16:32:09 -0800 Subject: [PATCH 9/9] fix linter issues --- .../authorization-RoleBasedCalls.json | 12 ++++++------ .../examples/DeleteRoleAssignmentById.json | 2 +- .../examples/GetRoleAssignmentById.json | 2 +- .../examples/GetRoleDefinitionById.json | 2 +- .../examples/PutRoleAssignmentById.json | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json index 83eb5deebb29..63188f9cd9a1 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json @@ -446,7 +446,7 @@ } } }, - "/{roleAssignmentId}": { + "/{roleId}": { "delete": { "tags": [ "RoleAssignments" @@ -454,7 +454,7 @@ "operationId": "RoleAssignments_DeleteById", "description": "Deletes a role assignment.", "parameters": [{ - "name": "roleAssignmentId", + "name": "roleId", "in": "path", "required": true, "type": "string", @@ -486,7 +486,7 @@ "operationId": "RoleAssignments_CreateById", "description": "Creates a role assignment by ID.", "parameters": [{ - "name": "roleAssignmentId", + "name": "roleId", "in": "path", "required": true, "type": "string", @@ -527,7 +527,7 @@ "operationId": "RoleAssignments_GetById", "description": "Gets a role assignment by ID.", "parameters": [{ - "name": "roleAssignmentId", + "name": "roleId", "in": "path", "required": true, "type": "string", @@ -813,7 +813,7 @@ } }, "x-ms-paths":{ - "/{roleDefinitionId}?disambiguation_dummy": { + "/{roleId}?disambiguation_dummy": { "get": { "tags": [ "RoleDefinitions" @@ -821,7 +821,7 @@ "operationId": "RoleDefinitions_GetById", "description": "Gets a role definition by ID.", "parameters": [{ - "name": "roleDefinitionId", + "name": "roleId", "in": "path", "required": true, "type": "string", diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json index 5fb4ef8ce22f..7433ca13c28d 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/DeleteRoleAssignmentById.json @@ -1,7 +1,7 @@ { "parameters": { "scope": "scope", - "roleAssignmentId": "roleAssignmentId", + "roleId": "roleAssignmentId", "api-version": "2018-01-01-preview" }, "responses": { diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json index 475894b1eddf..793886e6d9fd 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleAssignmentById.json @@ -1,6 +1,6 @@ { "parameters": { - "roleAssignmentId": "roleassignmentId", + "roleId": "roleassignmentId", "api-version": "2018-01-01-preview" }, "responses": { diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json index 90d46d6b9d59..e22697ad8780 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/GetRoleDefinitionById.json @@ -1,6 +1,6 @@ { "parameters": { - "roleDefinitionId": "roleDefinitionId", + "roleId": "roleDefinitionId", "api-version": "2018-01-01-preview" }, "responses": { diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json index 189cb1f8e2cb..180a63d39d91 100644 --- a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-01-01-preview/examples/PutRoleAssignmentById.json @@ -1,7 +1,7 @@ { "parameters": { "scope": "scope", - "roleAssignmentId": "roleAssignmentId", + "roleId": "roleAssignmentId", "parameters": { "properties": { "roleDefinitionId": "/subscriptions/4004a9fd-d58e-48dc-aeb2-4a4aec58606f/providers/Microsoft.Authorization/roleDefinitions/de139f84-1756-47ae-9be6-808fbbe84772",