Azure Function

Azure Functions is a serverless computing solution that enables you to write less code, manage fewer infrastructures, and reduce costs. Rather than dealing with the deployment and maintenance of servers, the cloud infrastructure provides all necessary up-to-date resources to keep applications operational. It supports multiple languages, including C#, Python, Java, JavaScript, and PowerShell.

When creating an Azure Function, it must be associated with storage accounts, which allows it to utilize storage files within the code. For security purposes, it is advisable to rotate the access key of the Azure storage accounts every six months. The function app is linked to the storage account using the access key via backend CLI commands.

To get a list of storage accounts

az webapp config storage-account list --name [MyWebApp] --resource-group [MyResourceGroup]

Storage accounts

State. It will inform you whether the connection is successful and if the credentials are correct.

To update the access key from the Backend.

az webapp config storage-account update --custom-id
                                        [--access-key]
                                        [--account-name]
                                        [--ids]
                                        [--mount-path]
                                        [--name]
                                        [--resource-group]
                                        [--share-name]
                                        [--slot]
                                        [--slot-setting]
                                        [--storage-type {AzureBlob, AzureFiles}]
                                        [--subscription]

Examples

Update the access key for a connection to the Azure blob.

Azure CLI

az webapp config storage-account update -g [ResourceGroup Name] -n [FunctionApp name] --custom-id [Name shown in storage account list] --access-key [AccessKey]

Required Parameters

--custom-id -i: Name of the share configured within the web ap

Optional Parameters