-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mongo rbac cherry-pick * Removing entry for 07 preview Co-authored-by: kavskalyan <kakhandr@microsoft.com>
- Loading branch information
1 parent
60844c7
commit 8392017
Showing
10 changed files
with
894 additions
and
0 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
...mentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBRoleDefinitionCreateUpdate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"parameters": { | ||
"mongoDbRoleDefinitionId": "myMongoDbRoleDefinitionId", | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview", | ||
"createUpdateMongoDbRoleDefinitionParameters": { | ||
"properties": { | ||
"roleName": "myRoleName", | ||
"databaseName": "sales", | ||
"privileges": [ | ||
{ | ||
"resource": { | ||
"db": "sales", | ||
"collection": "sales" | ||
}, | ||
"actions": [ | ||
"insert", | ||
"find" | ||
] | ||
} | ||
], | ||
"roles": [ | ||
{ | ||
"role": "myInheritedRole", | ||
"db": "sales" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbRoleDefinitions/myMongoDbRoleDefinitionId", | ||
"name": "myMongoDbRoleDefinitionId", | ||
"type": "Microsoft.DocumentDB/databaseAccounts/mongoDbRoleDefinitionId", | ||
"properties": { | ||
"roleName": "myRoleName", | ||
"type": "CustomRole", | ||
"databaseName": "sales", | ||
"privileges": [ | ||
{ | ||
"resource": { | ||
"db": "sales", | ||
"collection": "coll" | ||
}, | ||
"actions": [ | ||
"find", | ||
"insert" | ||
] | ||
} | ||
], | ||
"roles": [ | ||
{ | ||
"db": "sales", | ||
"role": "myReadRole" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"202": {} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...t.DocumentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBRoleDefinitionDelete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"parameters": { | ||
"mongoDbRoleDefinitionId": "myMongoDbRoleDefinitionId", | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": {}, | ||
"204": {} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
...soft.DocumentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBRoleDefinitionGet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"parameters": { | ||
"mongoDbRoleDefinitionId": "myMongoDbRoleDefinitionId", | ||
"databaseName": "sales", | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbRoleDefinitions/myMongoDbRoleDefinitionId", | ||
"name": "myMongoRoleDefinitionId", | ||
"type": "Microsoft.DocumentDB/databaseAccounts/mongoRoleDefinitions", | ||
"properties": { | ||
"roleName": "myRoleName", | ||
"type": "CustomRole", | ||
"databaseName": "sales", | ||
"privileges": [ | ||
{ | ||
"resource": { | ||
"db": "sales", | ||
"collection": "coll" | ||
}, | ||
"actions": [ | ||
"find", | ||
"insert" | ||
] | ||
} | ||
], | ||
"roles": [ | ||
{ | ||
"db": "sales", | ||
"role": "myReadRole" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...oft.DocumentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBRoleDefinitionList.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongoRoleDefinitions/myRoleDefinitionId", | ||
"name": "myRoleDefinitionId", | ||
"type": "Microsoft.DocumentDB/databaseAccounts/mongoRoleDefinitions", | ||
"properties": { | ||
"roleName": "myRoleName", | ||
"type": "CustomRole", | ||
"databaseName": "sales", | ||
"privileges": [ | ||
{ | ||
"resource": { | ||
"db": "sales", | ||
"collection": "coll" | ||
}, | ||
"actions": [ | ||
"find", | ||
"insert" | ||
] | ||
} | ||
], | ||
"roles": [ | ||
{ | ||
"db": "sales", | ||
"role": "myReadRole" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...mentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBUserDefinitionCreateUpdate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"parameters": { | ||
"userName": "myUserName", | ||
"databaseName": "sales", | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview", | ||
"createUpdateMongoDbRoleDefinitionParameters": { | ||
"properties": { | ||
"userName": "myUserName", | ||
"password": "myPassword", | ||
"databaseName": "sales", | ||
"customData": "My custom data", | ||
"roles": [ | ||
{ | ||
"role": "myReadRole", | ||
"db": "sales" | ||
} | ||
], | ||
"mechanisms": "SCRAM-SHA-256" | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbUserDefinitions/myUserId", | ||
"name": "myUserName", | ||
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions", | ||
"properties": { | ||
"userName": "myUserName", | ||
"databaseName": "sales", | ||
"customData": "My custom data", | ||
"roles": [ | ||
{ | ||
"db": "sales", | ||
"role": "myReadRole" | ||
} | ||
], | ||
"mechanisms": "SCRAM-SHA-256" | ||
} | ||
} | ||
}, | ||
"202": {} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...t.DocumentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBUserDefinitionDelete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parameters": { | ||
"userName": "myUserName", | ||
"databaseName": "sales", | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": {}, | ||
"204": {} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...soft.DocumentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBUserDefinitionGet.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"parameters": { | ||
"userName": "myUserName", | ||
"databaseName": "sales", | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbUserDefinitions/myUserId", | ||
"name": "myUserId", | ||
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions", | ||
"properties": { | ||
"userName": "myUserName", | ||
"databaseName": "sales", | ||
"customData": "My custom data", | ||
"roles": [ | ||
{ | ||
"db": "sales", | ||
"role": "myReadRole" | ||
} | ||
], | ||
"mechanisms": "SCRAM-SHA-256" | ||
} | ||
} | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...oft.DocumentDB/preview/2021-10-15-preview/examples/CosmosDBMongoDBUserDefinitionList.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "mySubscriptionId", | ||
"resourceGroupName": "myResourceGroupName", | ||
"accountName": "myAccountName", | ||
"api-version": "2021-10-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"id": "/subscriptions/mySubscriptionId/resourceGroups/myResourceGroupName/providers/Microsoft.DocumentDB/databaseAccounts/myAccountName/mongodbUserDefinitions/myUserId", | ||
"name": "myUserId", | ||
"type": "Microsoft.DocumentDB/databaseAccounts/mongodbUserDefinitions", | ||
"properties": { | ||
"userName": "myUserName", | ||
"databaseName": "sales", | ||
"customData": "My custom data", | ||
"roles": [ | ||
{ | ||
"db": "sales", | ||
"role": "myReadRole" | ||
} | ||
], | ||
"mechanisms": "SCRAM-SHA-256" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.