Skip to content

Commit

Permalink
authorization add 2020-08-01-preview (Azure#13207)
Browse files Browse the repository at this point in the history
* authorization add 2020-08-01-preview

* update version in spec

* validate calls

* update version

* fix new ci requirement

* fix version

* fix validate definition

* mark readonly properties as such
  • Loading branch information
jdhms authored and MirzaSikander committed Mar 22, 2021
1 parent 2738bb3 commit 5aeb5ef
Show file tree
Hide file tree
Showing 19 changed files with 1,435 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"swagger": "2.0",
"info": {
"version": "2020-08-01-preview",
"title": "Common types"
},
"paths": {},
"definitions": {
"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": {
"ResourceProviderNamespaceParameter": {
"name": "resourceProviderNamespace",
"in": "path",
"required": true,
"type": "string",
"description": "The namespace of the resource provider.",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "method"
},
"ResourceTypeParameter": {
"name": "resourceType",
"in": "path",
"required": true,
"type": "string",
"description": "The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "method"
},
"ResourceNameParameter": {
"name": "resourceName",
"in": "path",
"required": true,
"type": "string",
"description": "The resource name.",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "method"
},
"ScopeParameter": {
"name": "scope",
"in": "path",
"required": true,
"type": "string",
"description": "The scope of the operation or resource. Valid scopes are: subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'",
"x-ms-skip-url-encoding": true,
"x-ms-parameter-location": "method"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"roleAssignmentId": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"api-version": "2020-08-01-preview",
"parameters": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"type": "Microsoft.Authorization/roleAssignments",
"name": "b0f43c54-e787-4862-89b1-a653fa9cf747"
}
},
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"type": "Microsoft.Authorization/roleAssignments",
"name": "b0f43c54-e787-4862-89b1-a653fa9cf747"
}
},
"500": {
"body": {
"message": "Something went wrong."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account",
"roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff",
"api-version": "2020-08-01-preview",
"parameters": {
"properties": {
"roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff",
"type": "Microsoft.Authorization/roleAssignments",
"name": "05c5a614-a7d6-4502-b150-c2fb455033ff"
}
},
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff",
"type": "Microsoft.Authorization/roleAssignments",
"name": "05c5a614-a7d6-4502-b150-c2fb455033ff"
}
},
"500": {
"body": {
"message": "Something went wrong."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg",
"roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff",
"api-version": "2020-08-01-preview",
"parameters": {
"properties": {
"roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff",
"type": "Microsoft.Authorization/roleAssignments",
"name": "05c5a614-a7d6-4502-b150-c2fb455033ff"
}
},
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff",
"type": "Microsoft.Authorization/roleAssignments",
"name": "05c5a614-a7d6-4502-b150-c2fb455033ff"
}
},
"500": {
"body": {
"message": "Something went wrong."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
"roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff",
"api-version": "2020-08-01-preview",
"parameters": {
"properties": {
"roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff",
"type": "Microsoft.Authorization/roleAssignments",
"name": "05c5a614-a7d6-4502-b150-c2fb455033ff"
}
},
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff",
"type": "Microsoft.Authorization/roleAssignments",
"name": "05c5a614-a7d6-4502-b150-c2fb455033ff"
}
},
"500": {
"body": {
"message": "Something went wrong."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
"roleAssignmentName": "b0f43c54-e787-4862-89b1-a653fa9cf747",
"api-version": "2020-08-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"type": "Microsoft.Authorization/roleAssignments",
"name": "b0f43c54-e787-4862-89b1-a653fa9cf747"
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"roleAssignmentId": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"api-version": "2020-08-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"type": "Microsoft.Authorization/roleAssignments",
"name": "b0f43c54-e787-4862-89b1-a653fa9cf747"
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
"roleAssignmentName": "b0f43c54-e787-4862-89b1-a653fa9cf747",
"api-version": "2020-08-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"type": "Microsoft.Authorization/roleAssignments",
"name": "b0f43c54-e787-4862-89b1-a653fa9cf747"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"roleAssignmentId": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"api-version": "2020-08-01-preview"
},
"responses": {
"200": {
"body": {
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
"principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987",
"principalType": "User",
"scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
},
"id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747",
"type": "Microsoft.Authorization/roleAssignments",
"name": "b0f43c54-e787-4862-89b1-a653fa9cf747"
}
}
}
}
Loading

0 comments on commit 5aeb5ef

Please sign in to comment.