Skip to content

Commit 6a55467

Browse files
authored
bicep role definition changes (#18457)
Added changes for bicep side for role definition function ## Checklist - [Yes ] I have read and adhere to the [contribution guide](https://github.com/Azure/bicep/blob/main/CONTRIBUTING.md). ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/18457)
1 parent ae5746c commit 6a55467

File tree

53 files changed

+1169
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1169
-0
lines changed

src/Bicep.Core.Samples/Files/baselines/Functions/az.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,25 @@
445445
"... : string"
446446
]
447447
},
448+
{
449+
"name": "roleDefinitions",
450+
"description": "Returns information about the specified role definition including id and roleDefinitionId.",
451+
"fixedParameters": [
452+
{
453+
"name": "roleName",
454+
"description": "The display name of the role definition",
455+
"type": "string",
456+
"required": true
457+
}
458+
],
459+
"minimumArgumentCount": 1,
460+
"maximumArgumentCount": 1,
461+
"flags": "default",
462+
"typeSignature": "(roleName: string): roleDefinition",
463+
"parameterTypeSignatures": [
464+
"roleName: string"
465+
]
466+
},
448467
{
449468
"name": "subscription",
450469
"description": "Returns the subscription scope for the current deployment.",

src/Bicep.Core.Samples/Files/baselines/InvalidExpressions_LF/Completions/azFunctions.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,27 @@
218218
"command": "editor.action.triggerParameterHints"
219219
}
220220
},
221+
{
222+
"label": "roleDefinitions",
223+
"kind": "function",
224+
"documentation": {
225+
"kind": "markdown",
226+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
227+
},
228+
"deprecated": false,
229+
"preselect": false,
230+
"sortText": "3_roleDefinitions",
231+
"insertTextFormat": "snippet",
232+
"insertTextMode": "adjustIndentation",
233+
"textEdit": {
234+
"range": {},
235+
"newText": "roleDefinitions($0)"
236+
},
237+
"command": {
238+
"title": "signature help",
239+
"command": "editor.action.triggerParameterHints"
240+
}
241+
},
221242
{
222243
"label": "subscription",
223244
"kind": "function",

src/Bicep.Core.Samples/Files/baselines/InvalidExpressions_LF/Completions/symbols.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,6 +2533,27 @@
25332533
"command": "editor.action.triggerParameterHints"
25342534
}
25352535
},
2536+
{
2537+
"label": "roleDefinitions",
2538+
"kind": "function",
2539+
"documentation": {
2540+
"kind": "markdown",
2541+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
2542+
},
2543+
"deprecated": false,
2544+
"preselect": false,
2545+
"sortText": "3_roleDefinitions",
2546+
"insertTextFormat": "snippet",
2547+
"insertTextMode": "adjustIndentation",
2548+
"textEdit": {
2549+
"range": {},
2550+
"newText": "roleDefinitions($0)"
2551+
},
2552+
"command": {
2553+
"title": "signature help",
2554+
"command": "editor.action.triggerParameterHints"
2555+
}
2556+
},
25362557
{
25372558
"label": "sampleObject",
25382559
"kind": "variable",

src/Bicep.Core.Samples/Files/baselines/InvalidModules_LF/Completions/symbolsPlusX.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,6 +2780,27 @@
27802780
"command": "editor.action.triggerParameterHints"
27812781
}
27822782
},
2783+
{
2784+
"label": "roleDefinitions",
2785+
"kind": "function",
2786+
"documentation": {
2787+
"kind": "markdown",
2788+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
2789+
},
2790+
"deprecated": false,
2791+
"preselect": false,
2792+
"sortText": "3_roleDefinitions",
2793+
"insertTextFormat": "snippet",
2794+
"insertTextMode": "adjustIndentation",
2795+
"textEdit": {
2796+
"range": {},
2797+
"newText": "roleDefinitions($0)"
2798+
},
2799+
"command": {
2800+
"title": "signature help",
2801+
"command": "editor.action.triggerParameterHints"
2802+
}
2803+
},
27832804
{
27842805
"label": "runtimeInvalidModule1",
27852806
"kind": "module",

src/Bicep.Core.Samples/Files/baselines/InvalidModules_LF/Completions/symbolsPlusX_if.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,6 +2780,27 @@
27802780
"command": "editor.action.triggerParameterHints"
27812781
}
27822782
},
2783+
{
2784+
"label": "roleDefinitions",
2785+
"kind": "function",
2786+
"documentation": {
2787+
"kind": "markdown",
2788+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
2789+
},
2790+
"deprecated": false,
2791+
"preselect": false,
2792+
"sortText": "3_roleDefinitions",
2793+
"insertTextFormat": "snippet",
2794+
"insertTextMode": "adjustIndentation",
2795+
"textEdit": {
2796+
"range": {},
2797+
"newText": "roleDefinitions($0)"
2798+
},
2799+
"command": {
2800+
"title": "signature help",
2801+
"command": "editor.action.triggerParameterHints"
2802+
}
2803+
},
27832804
{
27842805
"label": "runtimeInvalidModule1",
27852806
"kind": "module",

src/Bicep.Core.Samples/Files/baselines/InvalidOutputs_CRLF/Completions/arrayPlusSymbols.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,27 @@
14021402
"command": "editor.action.triggerParameterHints"
14031403
}
14041404
},
1405+
{
1406+
"label": "roleDefinitions",
1407+
"kind": "function",
1408+
"documentation": {
1409+
"kind": "markdown",
1410+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
1411+
},
1412+
"deprecated": false,
1413+
"preselect": false,
1414+
"sortText": "3_roleDefinitions",
1415+
"insertTextFormat": "snippet",
1416+
"insertTextMode": "adjustIndentation",
1417+
"textEdit": {
1418+
"range": {},
1419+
"newText": "roleDefinitions($0)"
1420+
},
1421+
"command": {
1422+
"title": "signature help",
1423+
"command": "editor.action.triggerParameterHints"
1424+
}
1425+
},
14051426
{
14061427
"label": "shallowMerge",
14071428
"kind": "function",

src/Bicep.Core.Samples/Files/baselines/InvalidOutputs_CRLF/Completions/boolPlusSymbols.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,6 +1366,27 @@
13661366
"command": "editor.action.triggerParameterHints"
13671367
}
13681368
},
1369+
{
1370+
"label": "roleDefinitions",
1371+
"kind": "function",
1372+
"documentation": {
1373+
"kind": "markdown",
1374+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
1375+
},
1376+
"deprecated": false,
1377+
"preselect": false,
1378+
"sortText": "3_roleDefinitions",
1379+
"insertTextFormat": "snippet",
1380+
"insertTextMode": "adjustIndentation",
1381+
"textEdit": {
1382+
"range": {},
1383+
"newText": "roleDefinitions($0)"
1384+
},
1385+
"command": {
1386+
"title": "signature help",
1387+
"command": "editor.action.triggerParameterHints"
1388+
}
1389+
},
13691390
{
13701391
"label": "shallowMerge",
13711392
"kind": "function",

src/Bicep.Core.Samples/Files/baselines/InvalidOutputs_CRLF/Completions/objectPlusSymbols.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,27 @@
13521352
"command": "editor.action.triggerParameterHints"
13531353
}
13541354
},
1355+
{
1356+
"label": "roleDefinitions",
1357+
"kind": "function",
1358+
"documentation": {
1359+
"kind": "markdown",
1360+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
1361+
},
1362+
"deprecated": false,
1363+
"preselect": false,
1364+
"sortText": "3_roleDefinitions",
1365+
"insertTextFormat": "snippet",
1366+
"insertTextMode": "adjustIndentation",
1367+
"textEdit": {
1368+
"range": {},
1369+
"newText": "roleDefinitions($0)"
1370+
},
1371+
"command": {
1372+
"title": "signature help",
1373+
"command": "editor.action.triggerParameterHints"
1374+
}
1375+
},
13551376
{
13561377
"label": "shallowMerge",
13571378
"kind": "function",

src/Bicep.Core.Samples/Files/baselines/InvalidOutputs_CRLF/Completions/symbols.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,27 @@
13521352
"command": "editor.action.triggerParameterHints"
13531353
}
13541354
},
1355+
{
1356+
"label": "roleDefinitions",
1357+
"kind": "function",
1358+
"documentation": {
1359+
"kind": "markdown",
1360+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
1361+
},
1362+
"deprecated": false,
1363+
"preselect": false,
1364+
"sortText": "3_roleDefinitions",
1365+
"insertTextFormat": "snippet",
1366+
"insertTextMode": "adjustIndentation",
1367+
"textEdit": {
1368+
"range": {},
1369+
"newText": "roleDefinitions($0)"
1370+
},
1371+
"command": {
1372+
"title": "signature help",
1373+
"command": "editor.action.triggerParameterHints"
1374+
}
1375+
},
13551376
{
13561377
"label": "shallowMerge",
13571378
"kind": "function",

src/Bicep.Core.Samples/Files/baselines/InvalidParameters_LF/Completions/arrayPlusSymbols.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,6 +2072,27 @@
20722072
"command": "editor.action.triggerParameterHints"
20732073
}
20742074
},
2075+
{
2076+
"label": "roleDefinitions",
2077+
"kind": "function",
2078+
"documentation": {
2079+
"kind": "markdown",
2080+
"value": "```bicep\nroleDefinitions(roleName: string): roleDefinition\n\n``` \nGets a role definition that can be used in role assignments. \n"
2081+
},
2082+
"deprecated": false,
2083+
"preselect": false,
2084+
"sortText": "3_roleDefinitions",
2085+
"insertTextFormat": "snippet",
2086+
"insertTextMode": "adjustIndentation",
2087+
"textEdit": {
2088+
"range": {},
2089+
"newText": "roleDefinitions($0)"
2090+
},
2091+
"command": {
2092+
"title": "signature help",
2093+
"command": "editor.action.triggerParameterHints"
2094+
}
2095+
},
20752096
{
20762097
"label": "sampleResource",
20772098
"kind": "interface",

0 commit comments

Comments
 (0)