Skip to content

Commit

Permalink
Kusto pools principal assignment (#14079)
Browse files Browse the repository at this point in the history
* kustoPool PrincipalAssignments

* fixed list principal assignments

* principalAssignment list example

* principalAssignment get example

* KustoPoolPrincipalAssignmentsCreateOrUpdate

* KustoPoolPrincipalAssignmentsDelete

* databases PrincipalAssignments

* minor change

* KustoPoolDatabasePrincipalAssignmentsList

* KustoDatabasePrincipalAssignmentsGet

* KustoPoolDatabasePrincipalAssignmentsCreateOrUpdate

* KustoPoolDatabasePrincipalAssignmentsDelete

* fixed example ref

* added system data

* kustoPoolCheckNameAvailability

* KustoPoolsCheckNameAvailability example

Co-authored-by: Itay Sofer <itsofer@microsoft.com>
  • Loading branch information
ItaySofer and Itay Sofer authored Apr 29, 2021
1 parent 6d06460 commit 55b3e2d
Show file tree
Hide file tree
Showing 10 changed files with 1,029 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"databaseName": "Kustodatabase8",
"principalAssignmentName": "kustoprincipal1",
"api-version": "2021-04-01-preview",
"parameters": {
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
},
"201": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"databaseName": "Kustodatabase8",
"principalAssignmentName": "kustoprincipal1",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"databaseName": "Kustodatabase8",
"principalAssignmentName": "kustoprincipal1",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"databaseName": "Kustodatabase8",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
},
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/Databases/Kustodatabase8/PrincipalAssignments/kustoprincipal2",
"name": "synapseWorkspaceName/kustoclusterrptest4/Kustodatabase8/kustoprincipal2",
"type": "Microsoft.Synapse/Workspaces/KustoPools/Databases/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"principalAssignmentName": "kustoprincipal1",
"api-version": "2021-04-01-preview",
"parameters": {
"properties": {
"role": "AllDatabasesAdmin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
},
"201": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"principalAssignmentName": "kustoprincipal1",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"principalAssignmentName": "kustoprincipal1",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"resourceGroupName": "kustorptest",
"workspaceName": "synapseWorkspaceName",
"kustoPoolName": "kustoclusterrptest4",
"api-version": "2021-04-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal1",
"name": "synapseWorkspaceName/kustoclusterrptest4/kustoprincipal1",
"type": "Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
},
{
"id": "/subscriptions/12345678-1234-1234-1234-123456789098/resourceGroups/kustorptest/providers/Microsoft.Synapse/workspaces/synapseWorkspaceName/kustoPools/kustoclusterrptest4/PrincipalAssignments/kustoprincipal2",
"name": "synapseWorkspaceName/kustoclusterrptest4/kustoprincipal2",
"type": "Microsoft.Synapse/Workspaces/KustoPools/PrincipalAssignments",
"properties": {
"role": "Admin",
"principalId": "87654321-1234-1234-1234-123456789123",
"principalType": "App",
"tenantId": "12345678-1234-1234-1234-123456789123",
"tenantName": "tenantName",
"principalName": "TestApp",
"provisioningState": "Succeeded"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "12345678-1234-1234-1234-123456789098",
"api-version": "2021-04-01-preview",
"location": "westus",
"kustoPoolName": {
"name": "kustoclusterrptest4",
"type": "Microsoft.Synapse/workspaces/kustoPools"
}
},
"responses": {
"200": {
"body": {
"name": "kustoclusterrptest4",
"nameAvailable": false,
"message": "Name 'kustoclusterrptest4' is already taken. Please specify a different name"
}
}
}
}
Loading

0 comments on commit 55b3e2d

Please sign in to comment.