From 47a0b4aaa658a667637e9bf3498090715fe5ca57 Mon Sep 17 00:00:00 2001 From: grlin <42353527+grlin@users.noreply.github.com> Date: Tue, 4 Sep 2018 08:40:08 -0700 Subject: [PATCH] Grlin/Adding Principal Type to RA (#3737) * adding principal type to putRA * updating version to 2018-09-01-preview * base commit, version 2018-01-01-preview * adding principal type + updating version number * adding principalType known values --- .../authorization-RoleBasedCalls.json | 1243 +++++++++++++++++ .../examples/DeleteRoleAssignmentById.json | 22 + .../examples/DeleteRoleAssignmentByName.json | 22 + .../examples/DeleteRoleDefinition.json | 40 + .../examples/GetAllProviderOperations.json | 31 + .../examples/GetAllRoleAssignments.json | 25 + .../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 | 30 + .../examples/PutRoleAssignmentById.json | 30 + .../examples/PutRoleDefinition.json | 71 + .../authorization/resource-manager/readme.md | 28 +- 21 files changed, 1870 insertions(+), 4 deletions(-) create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleBasedCalls.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentByName.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleDefinition.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetAllProviderOperations.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetAllRoleAssignments.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetPermissions.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetProviderOperationsRP.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetResourcePermissions.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentByName.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentByScope.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentsForResource.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentsForResourceGroup.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionAtScope.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionByName.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleAssignment.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleAssignmentById.json create mode 100644 specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleDefinition.json diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleBasedCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleBasedCalls.json new file mode 100644 index 000000000000..74f038bcd9c8 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleBasedCalls.json @@ -0,0 +1,1243 @@ +{ + "swagger": "2.0", + "info": { + "title": "AuthorizationManagementClient", + "version": "2018-09-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": { + "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}": { + "get": { + "tags": [ + "ProviderOperationsMetadata" + ], + "operationId": "ProviderOperationsMetadata_Get", + "description": "Gets provider operations metadata for the specified resource provider.", + "parameters": [ + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "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": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "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": [ + "Permissions" + ], + "operationId": "Permissions_ListForResourceGroup", + "description": "Gets all permissions the caller has for a resource group.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$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": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the resource.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to get 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": [{ + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ResourceProviderNamespaceParameter" + }, + { + "name": "parentResourcePath", + "in": "path", + "required": true, + "type": "string", + "description": "The parent resource identity.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceType", + "in": "path", + "required": true, + "type": "string", + "description": "The resource type of the resource.", + "x-ms-skip-url-encoding": true + }, + { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource to get 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": [{ + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "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" + } + } + } + }, + "/{roleId}": { + "delete": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_DeleteById", + "description": "Deletes a role assignment.", + "parameters": [{ + "name": "roleId", + "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": "roleId", + "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": "roleId", + "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" + } + } + } + }, + "/{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" + } + } + } + } + }, + "x-ms-paths":{ + "/{roleId}?disambiguation_dummy": { + "get": { + "tags": [ + "RoleDefinitions" + ], + "operationId": "RoleDefinitions_GetById", + "description": "Gets a role definition by ID.", + "parameters": [{ + "name": "roleId", + "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" + } + } + } + } + }, + "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": { + "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." + }, + "type": { + "type": "string", + "description": "Returns role definition with the specific type." + } + }, + "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." + }, + "principalType": { + "type": "string", + "description": "The principal type of the assigned principal ID.", + "enum": [ + "User", + "Group", + "ServicePrincipal", + "Unknown", + "DirectoryRoleTemplate", + "ForeignGroup", + "Application", + "MSI", + "DirectoryObjectOrGroup", + "Everyone" + ], + "x-msenum": { + "name": "PrincipalType", + "modelAsString": true + } + }, + "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." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ResourceProviderNamespaceParameter": { + "name": "resourceProviderNamespace", + "in": "path", + "required": true, + "type": "string", + "description": "The namespace of the resource provider.", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentById.json new file mode 100644 index 000000000000..8728e7aa38b7 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentById.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "scope": "scope", + "roleId": "roleAssignmentId", + "api-version": "2018-09-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-09-01-preview/examples/DeleteRoleAssignmentByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentByName.json new file mode 100644 index 000000000000..ceee8a6e3216 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleAssignmentByName.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "api-version": "2018-09-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-09-01-preview/examples/DeleteRoleDefinition.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleDefinition.json new file mode 100644 index 000000000000..c97bc978fe1b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/DeleteRoleDefinition.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "api-version": "2018-09-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-09-01-preview/examples/GetAllProviderOperations.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetAllProviderOperations.json new file mode 100644 index 000000000000..419d36c68a13 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetAllProviderOperations.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2018-09-01-preview" + }, + "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-09-01-preview/examples/GetAllRoleAssignments.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetAllRoleAssignments.json new file mode 100644 index 000000000000..fb5d95543c36 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetAllRoleAssignments.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "subId", + "api-version": "2018-09-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-09-01-preview/examples/GetPermissions.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetPermissions.json new file mode 100644 index 000000000000..6c87c5db05a2 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetPermissions.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "subscriptionId": "subID", + "api-version": "2018-09-01-preview" + }, + "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-09-01-preview/examples/GetProviderOperationsRP.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetProviderOperationsRP.json new file mode 100644 index 000000000000..5f15f7703c07 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetProviderOperationsRP.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "resourceProviderNamespace": "resourceProviderNamespace", + "api-version": "2018-09-01-preview" + }, + "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-09-01-preview/examples/GetResourcePermissions.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetResourcePermissions.json new file mode 100644 index 000000000000..e79ee7c70604 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetResourcePermissions.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "subId", + "resourceGroupName": "rgname", + "resourceProviderNamespace": "rpnamespace", + "parentResourcePath": "parentResourcePath", + "resourceType": "resourceType", + "resourceName": "resourceName", + "api-version": "2018-09-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [ + + ], + "notActions": [ + + ] + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentById.json new file mode 100644 index 000000000000..25e9c928b072 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentById.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "roleId": "roleassignmentId", + "api-version": "2018-09-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-09-01-preview/examples/GetRoleAssignmentByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentByName.json new file mode 100644 index 000000000000..565c4321d019 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentByName.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "subscriptionId": "subId", + "api-version": "2018-09-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-09-01-preview/examples/GetRoleAssignmentByScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentByScope.json new file mode 100644 index 000000000000..b37258d178bb --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentByScope.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "scope": "scope", + "api-version": "2018-09-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-09-01-preview/examples/GetRoleAssignmentsForResource.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentsForResource.json new file mode 100644 index 000000000000..0464db8bac19 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-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-09-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-09-01-preview/examples/GetRoleAssignmentsForResourceGroup.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentsForResourceGroup.json new file mode 100644 index 000000000000..5ef0fb9c83dd --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleAssignmentsForResourceGroup.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "subscriptionId": "subId", + "api-version": "2018-09-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-09-01-preview/examples/GetRoleDefinitionAtScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionAtScope.json new file mode 100644 index 000000000000..f2084e159f13 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionAtScope.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "scope": "scope", + "api-version": "2018-09-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-09-01-preview/examples/GetRoleDefinitionById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionById.json new file mode 100644 index 000000000000..7b4388ce01e2 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionById.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "roleId": "roleDefinitionId", + "api-version": "2018-09-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-09-01-preview/examples/GetRoleDefinitionByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionByName.json new file mode 100644 index 000000000000..c97bc978fe1b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/GetRoleDefinitionByName.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "api-version": "2018-09-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-09-01-preview/examples/PutRoleAssignment.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleAssignment.json new file mode 100644 index 000000000000..59cdae83f7b3 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleAssignment.json @@ -0,0 +1,30 @@ +{ + "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", + "principalType": "User", + "canDelegate": false + } + }, + "api-version": "2018-09-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-09-01-preview/examples/PutRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleAssignmentById.json new file mode 100644 index 000000000000..ddbaaea7afdb --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleAssignmentById.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "scope": "scope", + "roleId": "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", + "principalType": "User", + "canDelegate":false + } + }, + "api-version": "2018-09-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-09-01-preview/examples/PutRoleDefinition.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-01-preview/examples/PutRoleDefinition.json new file mode 100644 index 000000000000..2367b82febc9 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2018-09-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-09-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 2ffeec661fee..338aa8bb399f 100644 --- a/specification/authorization/resource-manager/readme.md +++ b/specification/authorization/resource-manager/readme.md @@ -26,7 +26,7 @@ These are the global settings for the Authorization API. ``` yaml openapi-type: arm -tag: package-2018-01-01-preview +tag: package-2018-09-01-preview ``` ## Suppression @@ -115,6 +115,16 @@ input-file: - Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleBasedCalls.json ``` +### Tag: package-2018-09-01-preview + +These settings apply only when `--tag=package-2018-09-01-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2018-09-01-preview' +input-file: +- Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/preview/2018-09-01-preview/authorization-RoleBasedCalls.json +``` + --- # Code Generation @@ -155,11 +165,12 @@ batch: - tag: package-2015-07 - tag: package-2017-10-01-preview - tag: package-2018-01-01-preview + - tag: package-2018-09-01-preview ``` ### Tag: package-2015-07 and go -These settings apply only when `--tag=package-2015-07 --go` is specified on he command line. +These settings apply only when `--tag=package-2015-07 --go` is specified on the command line. Please also specify `--go-sdk-folder=`. ``` yaml $(tag) == 'package-2015-07' && $(go) @@ -168,7 +179,7 @@ output-folder: $(go-sdk-folder)/services/authorization/mgmt/2015-07-01/authoriza ### Tag: package-2017-10-01-preview and go -These settings apply only when `--tag=package-2017-10-01-preview --go` is specified on he command line. +These settings apply only when `--tag=package-2017-10-01-preview --go` is specified on the command line. Please also specify `--go-sdk-folder=`. ``` yaml $(tag) == 'package-2017-10-01-preview' && $(go) @@ -177,13 +188,22 @@ output-folder: $(go-sdk-folder)/services/preview/authorization/mgmt/2017-10-01-p ### Tag: package-2018-01-01-preview and go -These settings apply only when `--tag=package-2018-01-01-preview --go` is specified on he command line. +These settings apply only when `--tag=package-2018-01-01-preview --go` is specified on the command line. Please also specify `--go-sdk-folder=`. ``` yaml $(tag) == 'package-2018-01-01-preview' && $(go) output-folder: $(go-sdk-folder)/services/preview/authorization/mgmt/2018-01-01-preview/authorization ``` +### Tag: package-2018-09-01-preview and go + +These settings apply only when `--tag=package-2018-09-01-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag) == 'package-2018-09-01-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/authorization/mgmt/2018-09-01-preview/authorization +``` + ## Java These settings apply only when `--java` is specified on the command line.