Implement Azure Functions Flashcards
Your company has developed an application that needs to be able to accept, store, and process images. This application utilizes Azure App Services to host the web app, utilizes OAuth for authentication, and uses a General-Purpose v2 Blob Storage account for the images. You’ve been asked to ensure images uploaded are processed to create a better experience for people viewing from mobile devices by converting them to more manageable sizes & formats. The process should only run when new images are uploaded or updated. What is the best method to achieve this result?
- Use Azure Storage Blob Compression to process images as they come in
- Create a Function that is triggered whenever an upload request comes through the webapp, catching the image before it lands in the Blob Storage Account
- Build an Event Hub trigger event that kicks off a Function that will process the images.
- Build an Azure Function that uses a Blob Storage Trigger for any changes and runs whenever it detects new images or when an image is updated.
-Build an Azure Function that uses a Blob Storage Trigger for any changes and runs whenever it detects new images or when an image is updated.
Polling the blob container for updates creates a simple and efficient method of triggering your function.
Which of the following are valid Azure Function Triggers? (Choose 3.)
- IoT
- HTTP
- Service Bus
- Webhook
- App Service
- JavaScript
-HTTP
A HTTP Trigger is a basic and simple trigger for your Azure Function.
-Service Bus
Use the Service Bus trigger to respond to messages from a Service Bus queue or topic. I like buses.
-Webhook
If an external system supports webhooks, it can be configured to call an Azure Functions Webhook using HTTP and pass on relevant data.
What is the most cost effective service to host funtions that are expected to have minimum use?
Use a consumption model.
The first 1 million function requests every month are free
A scheduled job reads Blob Storage contents and creates a new Cosmos DB document.
What are the relevant Trigger, Input binding and Output binding to use in this scenario?
List of bindings/triggers:
- Queue
- Timer
- Event Grid
- HTTP
- None
- Blob Storage
- Cosmos DB
- SendGrid
- Microsoft Graph
Trigger: timer
Input Binding: Blob Storage
Output Binding: Cosmos DB
A new queue message arrives which runs a function to write to another queue.
What are the relevant Trigger, Input binding and Output binding to use in this scenario?
List of bindings/triggers:
- Queue
- Timer
- Event Grid
- HTTP
- None
- Blob Storage
- Cosmos DB
- SendGrid
- Microsoft Graph
Trigger: Queue
Input binding: None
Output Binding: Queue
Which application patterns can benefit from durable functions? (Choose all that apply.)
Aggregator Sharding Gatekeeper Function chaining Cache-aside Fan-out/fan-in Federated Identity Valet Key Monitoring
Fan-out/fan-in
Aggregator
Monitoring
Function chaining
True Or False? Azure Functions can have multiple triggers?
False
How is data from bindings provided to a function?
As a function parameter
How are Azure Function triggers and binding definitions defined in C#
Decorate Methods and parameters with C# Attributes
What are Durable Functions?
An extension of Azure Function, functions with state
We secured our function against unknown HTTP callers by requiring a function-specific API key be passed with each call. Which of the following fields is the name header in the HTTP requests that needs to contain this key?
x-functions-key
x-requested-with
x-csrf-token
x-functions-key
How does Pattern Function Chaining work?
Multiple F1 .. Fn functions called in ordered sequence, Output from Fx is is applied as Input to Fx+1