{ "swagger": "2.0", "info": { "title": "AuthorizationManagementClient", "version": "2020-10-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 assignments. 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": { "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}": { "get": { "tags": [ "roleManagementPolicies" ], "operationId": "RoleManagementPolicies_Get", "description": "Get the specified role management policy for a resource scope", "parameters": [ { "name": "scope", "in": "path", "required": true, "type": "string", "description": "The scope of the role management policy.", "x-ms-skip-url-encoding": true }, { "name": "roleManagementPolicyName", "in": "path", "required": true, "type": "string", "description": "The name (guid) of the role management policy to get." }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK - Returns information about the role management policy.", "schema": { "$ref": "#/definitions/RoleManagementPolicy" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-examples": { "GetRoleManagementPolicyByName": { "$ref": "./examples/GetRoleManagementPolicyByName.json" } } }, "patch": { "tags": [ "roleManagementPolicies" ], "operationId": "RoleManagementPolicies_Update", "description": "Update a role management policy", "parameters": [ { "name": "scope", "in": "path", "required": true, "type": "string", "description": "The scope of the role management policy to upsert.", "x-ms-skip-url-encoding": true }, { "name": "roleManagementPolicyName", "in": "path", "required": true, "type": "string", "description": "The name (guid) of the role management policy to upsert." }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/RoleManagementPolicy" }, "description": "Parameters for the role management policy." }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Ok - Returns the updated policy.", "schema": { "$ref": "#/definitions/RoleManagementPolicy" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-examples": { "PatchRoleManagementPolicy": { "$ref": "./examples/PatchRoleManagementPolicy.json" }, "PatchPartialRoleManagementPolicy": { "$ref": "./examples/PatchPartialRoleManagementPolicy.json" } } }, "delete": { "tags": [ "roleManagementPolicies" ], "operationId": "RoleManagementPolicies_Delete", "description": "Delete a role management policy", "parameters": [ { "name": "scope", "in": "path", "required": true, "type": "string", "description": "The scope of the role management policy to upsert.", "x-ms-skip-url-encoding": true }, { "name": "roleManagementPolicyName", "in": "path", "required": true, "type": "string", "description": "The name (guid) of the role management policy to upsert." }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK - Successfully deleted the policy." }, "204": { "description": "NoContent - policy does not exists." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-examples": { "DeleteRoleManagementPolicy": { "$ref": "./examples/DeleteRoleManagementPolicy.json" } } } }, "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies": { "get": { "tags": [ "roleManagementPolicies" ], "operationId": "RoleManagementPolicies_ListForScope", "description": "Gets role management policies for a resource scope.", "parameters": [ { "name": "scope", "in": "path", "required": true, "type": "string", "description": "The scope of the role management policy.", "x-ms-skip-url-encoding": true }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK - Returns an array of role management policies.", "schema": { "$ref": "#/definitions/RoleManagementPolicyListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "GetRoleManagementPolicyByRoleDefinitionFilter": { "$ref": "./examples/GetRoleManagementPolicyByScope.json" } } } } }, "definitions": { "RoleManagementPolicyProperties": { "properties": { "scope": { "type": "string", "description": "The role management policy scope." }, "displayName": { "type": "string", "description": "The role management policy display name." }, "description": { "type": "string", "description": "The role management policy description." }, "isOrganizationDefault": { "type": "boolean", "description": "The role management policy is default policy." }, "lastModifiedBy": { "$ref": "./common-types.json#/definitions/Principal" }, "lastModifiedDateTime": { "type": "string", "readOnly": true, "format": "date-time", "description": "The last modified date time." }, "rules": { "type": "array", "items": { "$ref": "./common-types.json#/definitions/RoleManagementPolicyRule" }, "description": "The rule applied to the policy." }, "effectiveRules": { "type": "array", "items": { "$ref": "./common-types.json#/definitions/RoleManagementPolicyRule" }, "readOnly": true, "description": "The readonly computed rule applied to the policy." }, "policyProperties": { "readOnly": true, "type": "object", "description": "Additional properties of scope", "$ref": "#/definitions/PolicyProperties" } }, "type": "object", "description": "Role management policy properties with scope." }, "RoleManagementPolicy": { "properties": { "id": { "type": "string", "readOnly": true, "description": "The role management policy Id." }, "name": { "type": "string", "readOnly": true, "description": "The role management policy name." }, "type": { "type": "string", "readOnly": true, "description": "The role management policy type." }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/RoleManagementPolicyProperties", "description": "Role management policy properties." } }, "type": "object", "description": "Role management policy" }, "RoleManagementPolicyListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/RoleManagementPolicy" }, "description": "Role management policy list." }, "nextLink": { "type": "string", "description": "The URL to use for getting the next set of results." } }, "type": "object", "description": "Role management policy list operation result." }, "PolicyProperties": { "properties": { "scope": { "type": "object", "description": "Details of the resource scope", "readOnly": true, "properties": { "id": { "type": "string", "description": "Scope id of the resource" }, "displayName": { "type": "string", "description": "Display name of the resource" }, "type": { "type": "string", "description": "Type of the resource" } } } }, "type": "object", "description": "Expanded info of resource scope" }, "CloudError": { "x-ms-external": true, "properties": { "error": { "$ref": "#/definitions/CloudErrorBody" } }, "type": "object", "description": "An error response from the service." }, "CloudErrorBody": { "x-ms-external": true, "properties": { "code": { "type": "string", "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." }, "message": { "type": "string", "description": "A message describing the error, intended to be suitable for display in a user interface." } }, "type": "object", "description": "An error response from the service." } } }