Develop Azure Functions Flashcards
Which of the following is true about a function app in Azure?
a) Each function in a function app can have its own pricing plan
b) Function apps can be managed, deployed, and scaled individually
c) All functions in a function app share the same runtime version
d) Functions in a function app must be authored in different languages
c) All functions in a function app share the same runtime version
In which version of Azure Functions runtime must all functions in a function app be authored in the same language?
a) Functions 1.x
b) Functions 2.x
c) Functions 3.x
d) Functions 4.x
b) Functions 2.x
What is recommended for developing Azure Functions due to limitations on portal editing?
a) Develop functions in the portal and test locally
b) Develop functions locally and publish to Azure
c) Use the Azure portal for all development and testing
d) Use only pre-configured templates
b) Develop functions locally and publish to Azure
Which tool allows you to test and debug Azure Functions locally?
a) Visual Studio Code
b) Azure CLI
c) Azure Portal
d) Application Insights
a) Visual Studio Code
Which file in a Functions project directory contains configuration options that affect all functions in a function app?
a) local.settings.json
b) host.json
c) appsettings.json
d) bindings.json
b) host.json
What is the purpose of the local.settings.json
file?
a) To store production environment variables
b) To store app settings and local development tools settings
c) To configure settings related to all functions in the function app
d) To override application settings in Azure
b) To store app settings and local development tools settings
What should be done with local.settings.json
before publishing a project to a remote repository?
a) Ensure it’s included in the repository
b) Exclude it to prevent exposing secrets
c) Encrypt it before publishing
d) Share it only with the development team
b) Exclude it to prevent exposing secrets
When synchronizing settings, what must be done when developing functions locally?
a) Local settings must be added to the app settings in the deployed function app
b) Download settings from the cloud and add them to host.json
c) Local settings must always override cloud settings
d) Automatically sync settings with Azure
a) Local settings must be added to the app settings in the deployed function app
How many triggers can a function have?
a) None
b) One
c) Multiple
d) Unlimited
b) One
What is a binding in Azure Functions?
a) A way to hardcode access to external services
b) A way to declaratively connect resources to a function
c) A method to trigger the function execution
d) A function output type
b) A way to declaratively connect resources to a function
Which of the following languages uses function.json
to define triggers and bindings?
a) C#
b) Java
c) Python
d) JavaScript
d) JavaScript
In .NET and Java, how is the data type for input data determined?
a) By configuring function.json
directly
b) By setting the dataType
property in function.json
c) By defining the parameter type in the method
d) By using inout bindings
c) By defining the parameter type in the method
What does the queueTrigger
in the function.json file do?
a) It defines the name of the table to write to
b) It specifies how the function is triggered by an Azure Queue message
c) It sets up the output connection to Azure Table Storage
d) It disables the function during execution
b) It specifies how the function is triggered by an Azure Queue message
What is the purpose of the direction
property in the bindings
array?
a) To indicate if the binding is an input or output
b) To specify the data type used by the trigger
c) To define the connection to the Azure service
d) To set the type of function execution
a) To indicate if the binding is an input or output
In the C# example, how is the new row added to Azure Table Storage?
a) By returning a Person
object from the function
b) By manually calling an Azure SDK method
c) By storing the queue message directly
d) By using a Console.WriteLine
command
a) By returning a Person
object from the function
What information does the function use to generate a new RowKey
for the table?
a) The name of the queue
b) The mobile number from the message
c) A randomly generated GUID
d) The log information from ILogger
c) A randomly generated GUID
What does Azure Functions use to store and access connection strings securely?
a) The app’s code
b) Application settings in Azure App Service
c) A secrets manager stored on a local server
d) Direct configuration in the function.json file
b) Application settings in Azure App Service
What is the default provider for configuration settings in Azure Functions?
a) Azure Key Vault
b) Environment variables
c) Custom secrets manager
d) Managed identity
b) Environment variables
What is the benefit of using identity-based connections in Azure Functions?
a) It removes the need to use a connection string or key
b) It simplifies the code structure
c) It increases the storage capacity of the function app
d) It improves the logging of identity activities
a) It removes the need to use a connection string or key
What role must be assigned to an identity to grant access to a service in Azure?
a) Managed identity
b) Function Administrator role
c) Azure RBAC or an access policy
d) System-assigned role
c) Azure RBAC or an access policy
What is the primary purpose of this exercise with Azure Functions in Visual Studio Code?
a) To create and test an Azure Function that responds to HTTP requests locally
b) To set up a web server in Visual Studio Code
c) To configure an Azure VM for function deployment
d) To install all Visual Studio Code extensions
a) To create and test an Azure Function that responds to HTTP requests locally
What is the minimum .NET version required to create the Azure Function in this exercise?
a) .NET 6
b) .NET 5
c) .NET 8
d) .NET 7
c) .NET 8
What should be selected as the authorization level when creating the function in this exercise?
a) Admin
b) User
c) Anonymous
d) Function
c) Anonymous
After running the function locally, which option in Visual Studio Code is used to stop Core Tools?
a) Press F1
b) Press Shift + F5
c) Close Visual Studio Code
d) Press F5 again
b) Press Shift + F5
What is the first step you must complete before publishing your app to Azure?
a) Choose the Create resource… button
b) Sign in to your Azure account
c) Run the function locally
d) Select a globally unique function app name
b) Sign in to your Azure account
What resource is automatically created in Azure to maintain state and other information for your project?
a) Application Insights
b) Azure Storage account
c) Resource group
d) Consumption plan
b) Azure Storage account
What happens if you publish to an existing function app in Azure?
a) The function app is duplicated
b) Previous deployments are overwritten
c) The app must be renamed
d) A new resource group is created
b) Previous deployments are overwritten
After deploying your function app, where can you view the creation and deployment results?
a) In the Azure portal
b) In the Activity Log area of the terminal
c) In the View Output window
d) In the Explorer pane
c) In the View Output window