diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/authorization-RoleAssignmentUsageMetricsCalls.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/authorization-RoleAssignmentUsageMetricsCalls.json new file mode 100644 index 000000000000..1b9a50845b07 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/authorization-RoleAssignmentUsageMetricsCalls.json @@ -0,0 +1,130 @@ +{ + "swagger": "2.0", + "info": { + "title": "AuthorizationManagementClient", + "version": "2019-08-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 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": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleAssignmentsUsageMetrics": { + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_List", + "description": "Gets all role assignments for the subscription.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK - Returns an array of role assignments.", + "schema": { + "$ref": "#/definitions/RoleAssignmentUsageMetricsResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/Error" + } + } + }, + "x-ms-examples": { + "GetConfigurations": { + "$ref": "./examples/GetRoleAssignmentUsageMetrics.json" + } + } + } + } + }, + "definitions": { + "Error": { + "properties": { + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Brief error code" + }, + "message": { + "type": "string", + "description": "Longer message explaining the details of the error" + } + } + } + }, + "description": "Object to be thrown in case of an unsuccesful response" + }, + "RoleAssignmentUsageMetricsResult": { + "properties": { + "subscriptionId": { + "type": "string", + "description": "Id of the subscription" + }, + "roleAssignmentsLimit": { + "type": "integer", + "description": "The maximum number of role assignments that can be created" + }, + "roleAssignmentsCurrentCount": { + "type": "integer", + "description": "The current number of role assignments that have been created" + }, + "roleAssignmentsRemainingCount": { + "type": "integer", + "description": "The number of role assignments that can be created before reaching the limit" + } + } + } + }, + "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/2019-08-01-preview/examples/DeleteRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleAssignmentById.json new file mode 100644 index 000000000000..e1ebf6df0681 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleAssignmentById.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "scope": "scope", + "roleId": "roleAssignmentId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleAssignmentByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleAssignmentByName.json new file mode 100644 index 000000000000..13a437db3501 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleAssignmentByName.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleDefinition.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleDefinition.json new file mode 100644 index 000000000000..49b1499709e7 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/DeleteRoleDefinition.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "api-version": "2019-08-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" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetAllProviderOperations.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetAllProviderOperations.json new file mode 100644 index 000000000000..ca10be5edc72 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetAllProviderOperations.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "id", + "name": "name", + "type": "type", + "displayName": "displayName", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [] + } + ], + "operations": [] + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetAllRoleAssignments.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetAllRoleAssignments.json new file mode 100644 index 000000000000..efea9d9878fc --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetAllRoleAssignments.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "subId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetPermissions.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetPermissions.json new file mode 100644 index 000000000000..acf4d912a695 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetPermissions.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "subscriptionId": "subID", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [], + "notActions": [], + "dataActions": [], + "notDataActions": [] + } + ], + "nextLink": "nextlink" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetProviderOperationsRP.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetProviderOperationsRP.json new file mode 100644 index 000000000000..81ad635138d3 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetProviderOperationsRP.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "resourceProviderNamespace": "resourceProviderNamespace", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "id", + "name": "name", + "type": "type", + "displayName": "displayName", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [] + } + ], + "operations": [] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetResourcePermissions.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetResourcePermissions.json new file mode 100644 index 000000000000..0771b9a068de --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetResourcePermissions.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "subId", + "resourceGroupName": "rgname", + "resourceProviderNamespace": "rpnamespace", + "parentResourcePath": "parentResourcePath", + "resourceType": "resourceType", + "resourceName": "resourceName", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "actions": [], + "notActions": [] + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentById.json new file mode 100644 index 000000000000..09df0f94fe51 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentById.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "roleId": "roleassignmentId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentByName.json new file mode 100644 index 000000000000..7ccb8cfbee08 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentByName.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "scope": "scope", + "roleAssignmentName": "roleAssignmentName", + "subscriptionId": "subId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentByScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentByScope.json new file mode 100644 index 000000000000..2ea74cb994ab --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentByScope.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "scope": "scope", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentUsageMetrics.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentUsageMetrics.json new file mode 100644 index 000000000000..a7237749a8a7 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentUsageMetrics.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "subscriptionId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "", + "roleAssignmentsLimit": 2000, + "roleAssignmentsCurrentCount": 110, + "roleAssignmentsRemainingCount": 1890 + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentsForResource.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentsForResource.json new file mode 100644 index 000000000000..315e4134cdf5 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentsForResource.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "resourceProviderNamespace": "resourceProviderNamespace", + "parentResourcePath": "parentResourcePath", + "resourceType": "resourceType", + "resourceName": "resourceName", + "subscriptionId": "subId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentsForResourceGroup.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentsForResourceGroup.json new file mode 100644 index 000000000000..5da6ab8722e1 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleAssignmentsForResourceGroup.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "resourceGroupName": "rgname", + "subscriptionId": "subId", + "api-version": "2019-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "raId" + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionAtScope.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionAtScope.json new file mode 100644 index 000000000000..41051ba13d7c --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionAtScope.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "scope": "scope", + "api-version": "2019-08-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" + } + ] + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionById.json new file mode 100644 index 000000000000..374b0689cbce --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionById.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "roleId": "roleDefinitionId", + "api-version": "2019-08-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" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionByName.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionByName.json new file mode 100644 index 000000000000..49b1499709e7 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/GetRoleDefinitionByName.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "scope": "scope", + "roleDefinitionId": "roleDefinitionId", + "api-version": "2019-08-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" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleAssignment.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleAssignment.json new file mode 100644 index 000000000000..858e981b277c --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleAssignment.json @@ -0,0 +1,31 @@ +{ + "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": "2019-08-01-preview" + }, + "responses": { + "201": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleAssignmentById.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleAssignmentById.json new file mode 100644 index 000000000000..aaf3192b6a72 --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleAssignmentById.json @@ -0,0 +1,31 @@ +{ + "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": "2019-08-01-preview" + }, + "responses": { + "201": { + "body": { + "properties": { + "roleDefinitionId": "/subscriptions/subId/providers/Microsoft.Authorization/roleDefinitions/roledefinitionId", + "principalId": "Pid", + "principalType": "Ptype", + "scope": "/subscriptions/subId/resourcegroups/rgname", + "canDelegate": false + }, + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/roleAssignments/roleassignmentId", + "type": "Microsoft.Authorization/roleAssignments", + "name": "roleassignmentId" + } + } + } +} diff --git a/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleDefinition.json b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleDefinition.json new file mode 100644 index 000000000000..bed237d69d2b --- /dev/null +++ b/specification/authorization/resource-manager/Microsoft.Authorization/preview/2019-08-01-preview/examples/PutRoleDefinition.json @@ -0,0 +1,61 @@ +{ + "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": "2019-08-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" + } + } + } +} diff --git a/specification/authorization/resource-manager/readme.md b/specification/authorization/resource-manager/readme.md index 8e52bc8d5fd6..8dd5812f1ed5 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-2020-04-01-preview-only +tag: package-2019-08-preview ``` ## Suppression @@ -69,12 +69,32 @@ directive: reason: for this case the result of the proposed change would resemble a boolean anyways ``` + +### Tag: package-2019-08-preview + +These settings apply only when `--tag=package-preview-2019-08` is specified on the command line. + +```yaml $(tag) == 'package-preview-2019-08' +input-file: +- Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/stable/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 +- Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json +``` ### Tag: package-2020-04-01-preview-only These settings apply only when `--tag=package-2020-04-preview` is specified on the command line. -``` yaml $(tag) == 'package-2020-04-01-preview-only' +``` yaml $(tag) == 'package-2020-04-preview' input-file: +- Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json +- Microsoft.Authorization/stable/2015-07-01/authorization-ElevateAccessCalls.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationsCalls.json +- Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleDefinitionsCalls.json +- Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json +- Microsoft.Authorization/preview/2019-08-01-preview/authorization-RoleAssignmentUsageMetricsCalls.json - Microsoft.Authorization/preview/2020-04-01-preview/authorization-RoleAssignmentsCalls.json ``` @@ -256,4 +276,3 @@ See configuration in [readme.java.md](./readme.java.md) ## AzureResourceSchema See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) -