Develop Azure Functions Flashcards

1
Q

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

A

c) All functions in a function app share the same runtime version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

b) Functions 2.x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

b) Develop functions locally and publish to Azure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

a) Visual Studio Code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

A

b) host.json

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

b) To store app settings and local development tools settings

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

b) Exclude it to prevent exposing secrets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

a) Local settings must be added to the app settings in the deployed function app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many triggers can a function have?

a) None
b) One
c) Multiple
d) Unlimited

A

b) One

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

b) A way to declaratively connect resources to a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following languages uses function.json to define triggers and bindings?

a) C#
b) Java
c) Python
d) JavaScript

A

d) JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

c) By defining the parameter type in the method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

b) It specifies how the function is triggered by an Azure Queue message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

a) To indicate if the binding is an input or output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

a) By returning a Person object from the function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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

A

c) A randomly generated GUID

17
Q

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

A

b) Application settings in Azure App Service

18
Q

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

A

b) Environment variables

19
Q

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

a) It removes the need to use a connection string or key

20
Q

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

A

c) Azure RBAC or an access policy

21
Q

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

a) To create and test an Azure Function that responds to HTTP requests locally

22
Q

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

A

c) .NET 8

23
Q

What should be selected as the authorization level when creating the function in this exercise?

a) Admin
b) User
c) Anonymous
d) Function

A

c) Anonymous

24
Q

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

A

b) Press Shift + F5

25
Q

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

A

b) Sign in to your Azure account

26
Q

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

A

b) Azure Storage account

27
Q

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

A

b) Previous deployments are overwritten

28
Q

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

A

c) In the View Output window