Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logical<->physical zone mapping functions to Bicep #11660

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions src/Bicep.Core.Samples/Files/Functions/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,5 +555,137 @@
"resourceType: string",
"... : string"
]
},
{
"name": "toLogicalZone",
"description": "Returns the logical zone corresponding to the given physical zone.",
"fixedParameters": [
{
"name": "subscriptionId",
"description": "The subscription ID of the deployed availability zones",
"type": "string",
"required": true
},
{
"name": "location",
"description": "The location of the availability zone mappings",
"type": "string",
"required": true
},
{
"name": "physicalZone",
"description": "The physical zone to convert",
"type": "string",
"required": true
}
],
"minimumArgumentCount": 3,
"maximumArgumentCount": 3,
"flags": "default",
"typeSignature": "(subscriptionId: string, location: string, physicalZone: string): string",
"parameterTypeSignatures": [
"subscriptionId: string",
"location: string",
"physicalZone: string"
]
},
{
"name": "toLogicalZones",
"description": "Returns the logical zone array corresponding to the given array of physical zones.",
"fixedParameters": [
{
"name": "subscriptionId",
"description": "The subscription ID of the deployed availability zones",
"type": "string",
"required": true
},
{
"name": "location",
"description": "The location of the availability zone mappings",
"type": "string",
"required": true
},
{
"name": "physicalZones",
"description": "An array of physical zones to convert",
"type": "array",
"required": true
}
],
"minimumArgumentCount": 3,
"maximumArgumentCount": 3,
"flags": "default",
"typeSignature": "(subscriptionId: string, location: string, physicalZones: array): string[]",
"parameterTypeSignatures": [
"subscriptionId: string",
"location: string",
"physicalZones: array"
]
},
{
"name": "toPhysicalZone",
"description": "Returns the physical zone corresponding to the given logical zone.",
"fixedParameters": [
{
"name": "subscriptionId",
"description": "The subscription ID of the deployed availability zones",
"type": "string",
"required": true
},
{
"name": "location",
"description": "The location of the availability zone mappings",
"type": "string",
"required": true
},
{
"name": "logicalZone",
"description": "The logical zone to convert",
"type": "string",
"required": true
}
],
"minimumArgumentCount": 3,
"maximumArgumentCount": 3,
"flags": "default",
"typeSignature": "(subscriptionId: string, location: string, logicalZone: string): string",
"parameterTypeSignatures": [
"subscriptionId: string",
"location: string",
"logicalZone: string"
]
},
{
"name": "toPhysicalZones",
"description": "Returns the physical zone array corresponding to the given array of logical zones.",
"fixedParameters": [
{
"name": "subscriptionId",
"description": "The subscription ID of the deployed availability zones",
"type": "string",
"required": true
},
{
"name": "location",
"description": "The location of the availability zone mappings",
"type": "string",
"required": true
},
{
"name": "logicalZones",
"description": "An array of logical zones to convert",
"type": "array",
"required": true
}
],
"minimumArgumentCount": 3,
"maximumArgumentCount": 3,
"flags": "default",
"typeSignature": "(subscriptionId: string, location: string, logicalZones: array): string[]",
"parameterTypeSignatures": [
"subscriptionId: string",
"location: string",
"logicalZones: array"
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,89 @@
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toLogicalZone",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoLogicalZone(subscriptionId: string, location: string, physicalZone: string): string\n\n```\nReturns the logical zone corresponding to the given physical zone.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toLogicalZone",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toLogicalZone($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toLogicalZones",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoLogicalZones(subscriptionId: string, location: string, physicalZones: array): string[]\n\n```\nReturns the logical zone array corresponding to the given array of physical zones.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toLogicalZones",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toLogicalZones($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toPhysicalZone",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoPhysicalZone(subscriptionId: string, location: string, logicalZone: string): string\n\n```\nReturns the physical zone corresponding to the given logical zone.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toPhysicalZone",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toPhysicalZone($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toPhysicalZones",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoPhysicalZones(subscriptionId: string, location: string, logicalZones: array): string[]\n\n```\nReturns the physical zone array corresponding to the given array of logical zones.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toPhysicalZones",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toPhysicalZones($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,48 @@
"newText": "threeElements"
}
},
{
"label": "toLogicalZone",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoLogicalZone(subscriptionId: string, location: string, physicalZone: string): string\n\n```\nReturns the logical zone corresponding to the given physical zone.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toLogicalZone",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toLogicalZone($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toLogicalZones",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoLogicalZones(subscriptionId: string, location: string, physicalZones: array): string[]\n\n```\nReturns the logical zone array corresponding to the given array of physical zones.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toLogicalZones",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toLogicalZones($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toLower",
"kind": "function",
Expand Down Expand Up @@ -2635,6 +2677,48 @@
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toPhysicalZone",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoPhysicalZone(subscriptionId: string, location: string, logicalZone: string): string\n\n```\nReturns the physical zone corresponding to the given logical zone.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toPhysicalZone",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toPhysicalZone($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toPhysicalZones",
"kind": "function",
"documentation": {
"kind": "markdown",
"value": "```bicep\ntoPhysicalZones(subscriptionId: string, location: string, logicalZones: array): string[]\n\n```\nReturns the physical zone array corresponding to the given array of logical zones.\n"
},
"deprecated": false,
"preselect": false,
"sortText": "3_toPhysicalZones",
"insertTextFormat": "snippet",
"insertTextMode": "adjustIndentation",
"textEdit": {
"range": {},
"newText": "toPhysicalZones($0)"
},
"command": {
"title": "signature help",
"command": "editor.action.triggerParameterHints"
}
},
{
"label": "toUpper",
"kind": "function",
Expand Down
Loading
Loading