Skip to content

Commit

Permalink
Add function app config to latest Web API (#27358)
Browse files Browse the repository at this point in the history
* Add functionAppConfig definition

* Add create or update function app Flex Consumption example

* Add create or update function app Flex Consumption with details example

* Update CommonDefinitions.json to reference the new examples
  • Loading branch information
Francisco-Gamino authored Feb 3, 2024
1 parent 0765e9d commit 56abc43
Show file tree
Hide file tree
Showing 4 changed files with 866 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3027,6 +3027,10 @@
"$ref": "#/definitions/SiteConfig",
"description": "Configuration of the app."
},
"functionAppConfig": {
"$ref": "#/definitions/FunctionAppConfig",
"description": "Configuration specific of the Azure Function app."
},
"daprConfig": {
"$ref": "#/definitions/DaprConfig",
"description": "Dapr configuration of the app."
Expand Down Expand Up @@ -3690,6 +3694,157 @@
}
}
},
"FunctionsDeployment": {
"description": "Configuration section for the function app deployment.",
"type": "object",
"properties": {
"storage": {
"description": "Storage for deployed package used by the function app.",
"type": "object",
"properties": {
"type": {
"description": "Property to select Azure Storage type. Available options: blobContainer.",
"type": "string",
"enum": [
"blobContainer"
],
"x-ms-enum": {
"name": "storageType",
"modelAsString": true
}
},
"value": {
"description": "Property to set the URL for the selected Azure Storage type. Example: For blobContainer, the value could be https://<storageAccountName>.blob.core.windows.net/<containerName>.",
"type": "string",
"format": "uri"
},
"authentication": {
"description": "Authentication method to access the storage account for deployment.",
"type": "object",
"properties": {
"type": {
"description": "Property to select authentication type to access the selected storage account. Available options: SystemAssignedIdentity, UserAssignedIdentity, StorageAccountConnectionString.",
"type": "string",
"enum": [
"SystemAssignedIdentity",
"UserAssignedIdentity",
"StorageAccountConnectionString"
],
"x-ms-enum": {
"name": "authenticationType",
"modelAsString": true
}
},
"userAssignedIdentityResourceId": {
"description": "Use this property for UserAssignedIdentity. Set the resource ID of the identity. Do not set a value for this property when using other authentication type.",
"type": "string"
},
"storageAccountConnectionStringName": {
"description": "Use this property for StorageAccountConnectionString. Set the name of the app setting that has the storage account connection string. Do not set a value for this property when using other authentication type.",
"type": "string"
}
}
}
}
}
}
},
"FunctionsAlwaysReadyConfig": {
"description": "Sets the number of 'Always Ready' instances for a function group or a specific function.",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Either a function group or a function name is required. For additional information see https://aka.ms/flexconsumption/alwaysready."
},
"instanceCount": {
"type": "number",
"description": "Sets the number of 'Always Ready' instances for a given function group or a specific function. For additional information see https://aka.ms/flexconsumption/alwaysready."
}
}
},
"FunctionsScaleAndConcurrency": {
"description": "Scale and concurrency settings for the function app.",
"type": "object",
"properties": {
"alwaysReady": {
"description": "'Always Ready' configuration for the function app.",
"type": "array",
"items": {
"$ref": "#/definitions/FunctionsAlwaysReadyConfig"
}
},
"maximumInstanceCount": {
"description": "The maximum number of instances for the function app.",
"type": "number"
},
"instanceMemoryMB": {
"description": "Set the amount of memory allocated to each instance of the function app in MB. CPU and network bandwidth are allocated proportionally.",
"type": "number"
},
"triggers": {
"type": "object",
"description": "Scale and concurrency settings for the function app triggers.",
"properties": {
"http": {
"type": "object",
"description": "Scale and concurrency settings for the HTTP trigger.",
"properties": {
"perInstanceConcurrency": {
"type": "number",
"description": "The maximum number of concurrent HTTP trigger invocations per instance."
}
}
}
}
}
}
},
"FunctionsRuntime": {
"description": "Function app runtime name and version.",
"type": "object",
"properties": {
"name": {
"description": "Function app runtime name. Available options: dotnet-isolated, node, java, powershell, python, custom",
"type": "string",
"enum": [
"dotnet-isolated",
"node",
"java",
"powershell",
"python",
"custom"
],
"x-ms-enum": {
"name": "runtimeName",
"modelAsString": true
}
},
"version": {
"description": "Function app runtime version. Example: 8 (for dotnet-isolated)",
"type": "string",
"x-nullable": true
}
}
},
"FunctionAppConfig": {
"description": "Function app configuration.",
"type": "object",
"properties": {
"deployment": {
"$ref": "#/definitions/FunctionsDeployment",
"description": "Function app deployment configuration."
},
"runtime": {
"$ref": "#/definitions/FunctionsRuntime",
"description": "Function app runtime settings."
},
"scaleAndConcurrency": {
"$ref": "#/definitions/FunctionsScaleAndConcurrency",
"description": "Function app scale and concurrency settings."
}
}
},
"DaprConfig": {
"description": "App Dapr configuration.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@
"Create or Update web app": {
"$ref": "./examples/CreateOrUpdateWebApp.json"
},
"Create or Update Flex Consumption function app": {
"$ref": "./examples/CreateOrUpdateFunctionAppFlexConsumption.json"
},
"Create or Update Flex Consumption function app with details": {
"$ref": "./examples/CreateOrUpdateFunctionAppFlexConsumptionWithDetails.json"
},
"Clone web app": {
"$ref": "./examples/CloneWebApp.json"
}
Expand Down
Loading

0 comments on commit 56abc43

Please sign in to comment.