From c438128827ac1bc39960c93d0b0e7fcbe2ab9388 Mon Sep 17 00:00:00 2001 From: Ryan Rossiter Date: Thu, 6 Jun 2019 09:20:17 -0700 Subject: [PATCH] Add elevateAccess to Microsoft.Authorization (#6219) * Add elevateAccess to Microsoft.Authorization elevateAccess was only present in an old stable version of Microsoft.Authorization, which was not used for SDK generation. This change moves the elevateAccess call to a version that can then be added to the readme and used for SDK generation. * More descriptive operationId --- .../authorization-ElevateAccessCalls.json | 71 +++++++++++++++++++ .../2015-07-01/examples/ElevateAccess.json | 9 +++ .../authorization/resource-manager/readme.md | 6 ++ 3 files changed, 86 insertions(+) create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/examples/ElevateAccess.json diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json new file mode 100644 index 000000000000..4043bf91de4b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json @@ -0,0 +1,71 @@ +{ + "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": { + "/providers/Microsoft.Authorization/elevateAccess": { + "post": { + "tags": [ + "ElevateAccess" + ], + "operationId": "GlobalAdministrator_ElevateAccess", + "description": "Elevates access for a Global Administrator.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an HttpResponseMessage with HttpStatusCode 200." + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/ElevateAccess.json" + } + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation." + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/examples/ElevateAccess.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/examples/ElevateAccess.json new file mode 100644 index 000000000000..d4972762b66a --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2015-07-01/examples/ElevateAccess.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "api-version": "2015-07-01" + }, + "responses": { + "200": { + } + } +} diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index 2e1bc4406452..619c6cc0fa20 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -73,7 +73,9 @@ These settings apply only when `--tag=package-2015-07-01-preview` is specified o ``` yaml $(tag) == 'package-2015-07-01-preview' input-file: +- Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json - Microsoft.Authorization/preview/2015-07-01/authorization.json +- Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json ``` ### Tag: package-2017-10-01-preview-only @@ -122,6 +124,7 @@ These settings apply only when `--tag=package-2017-10-01-preview` is specified o input-file: - Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json - Microsoft.Authorization/preview/2015-07-01/authorization.json +- Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json - Microsoft.Authorization/preview/2017-10-01-preview/authorization-RACalls.json ``` @@ -132,6 +135,7 @@ 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/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationsCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleAssignmentsCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleDefinitionsCalls.json @@ -144,6 +148,7 @@ These settings apply only when `--tag=package-2018-07-01-preview` is specified o ``` yaml $(tag) == 'package-2018-07-01-preview' input-file: - Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationsCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleAssignmentsCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleDefinitionsCalls.json @@ -157,6 +162,7 @@ These settings apply only when `--tag=package-2018-09-01-preview` is specified o ``` yaml $(tag) == 'package-2018-09-01-preview' input-file: - Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/preview/2015-07-01/authorization-ElevateAccessCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationsCalls.json - Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleAssignmentsCalls.json - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleDefinitionsCalls.json