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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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/sys.json
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,72 @@
"numberToTake: int"
]
},
{
"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): array",
"parameterTypeSignatures": [
"subscriptionId: string",
"location: string",
"physicalZones: array"
]
},
{
"name": "toLower",
"description": "Converts the specified string to lower case.",
Expand Down Expand Up @@ -1509,6 +1575,72 @@
"[valuePredicate: any => any]"
]
},
{
"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): array",
"parameterTypeSignatures": [
"subscriptionId: string",
"location: string",
"logicalZones: array"
]
},
{
"name": "toUpper",
"description": "Converts the specified string to upper case.",
Expand Down
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): array\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): array\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
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,48 @@
"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): array\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 @@ -1213,6 +1255,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): array\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