You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- content: 'A CRON expression is a string that consists of six fields that represent a set of times. The order of the six fields in Azure is: {second} {minute} {hour} {day} {month} {day of the week}. Suppose you needed a CRON expression that meant "every day", what special character would you put in the {day of the week} position?'
18
-
choices:
19
-
- content: "/"
20
-
isCorrect: false
21
-
explanation: "A slash specifies an increment. For example, a */5 in the {seconds} field means every five seconds."
22
-
- content: "*"
23
-
isCorrect: true
24
-
explanation: "An asterisk specifies that every possible value should be selected. Having an asterisk in the {day of the week} field means that every day should be selected."
25
-
- content: ","
26
-
isCorrect: false
27
-
explanation: "A comma separates items in a list. For example, a 1,2,3 in the {month} field means select January, February, and March."
28
-
- content: "‐"
29
-
isCorrect: false
30
-
explanation: "A hyphen specifies a range. For example, a 1-3 in the {month} field means select January, February, and March."
31
-
32
-
- content: 'Suppose your Azure Function has a blob trigger associated with it and you want it to execute only when *png* images are uploaded. Which of the following blob trigger *Path* values should you use?'
33
-
choices:
34
-
- content: "samples-workitems/{name}"
35
-
isCorrect: false
36
-
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
37
-
- content: "samples-workitems/{name}/png"
38
-
isCorrect: false
39
-
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
40
-
- content: "samples-workitems/{name}?png"
41
-
isCorrect: false
42
-
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
43
-
- content: "samples-workitems/{name}.png"
44
-
isCorrect: true
45
-
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
46
-
47
-
- content: 'True or false: an Azure Function can have multiple triggers associated with it?'
48
-
choices:
49
-
- content: "True"
50
-
isCorrect: false
51
-
explanation: "Every Azure Function must have exactly one trigger associated with it. If you want to use multiple triggers, you must create multiple functions."
52
-
- content: "False"
53
-
isCorrect: true
54
-
explanation: "Every Azure Function must have exactly one trigger associated with it. If you want to use multiple triggers, you must create multiple functions."
- content: 'A CRON expression is a string that consists of six fields that represent a set of times. The order of the six fields in Azure is: {second} {minute} {hour} {day} {month} {day of the week}. Suppose you needed a CRON expression that meant "every day", what special character would you put in the {day of the week} position?'
18
+
choices:
19
+
- content: "/"
20
+
isCorrect: false
21
+
explanation: "A slash specifies an increment. For example, a */5 in the {seconds} field means every five seconds."
22
+
- content: "*"
23
+
isCorrect: true
24
+
explanation: "An asterisk specifies that every possible value should be selected. Having an asterisk in the {day of the week} field means that every day should be selected."
25
+
- content: ","
26
+
isCorrect: false
27
+
explanation: "A comma separates items in a list. For example, a 1,2,3 in the {month} field means select January, February, and March."
28
+
- content: "‐"
29
+
isCorrect: false
30
+
explanation: "A hyphen specifies a range. For example, a 1-3 in the {month} field means select January, February, and March."
31
+
32
+
- content: 'Suppose your Azure Function has a blob trigger associated with it and you want it to execute only when PNG images are uploaded. Which of the following blob trigger *Path* values should you use?'
33
+
choices:
34
+
- content: "`samples-workitems/{name}`"
35
+
isCorrect: false
36
+
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
37
+
- content: "`samples-workitems/{name}/png`"
38
+
isCorrect: false
39
+
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
40
+
- content: "`samples-workitems/{name}?png`"
41
+
isCorrect: false
42
+
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
43
+
- content: "`samples-workitems/{name}.png`"
44
+
isCorrect: true
45
+
explanation: "The Path tells the blob trigger where it should monitor for changes, and if there are any filters applied. Adding a file extension to the Path specifies that uploaded files must have that file extension in order for the trigger to invoke the function."
46
+
47
+
- content: 'True or false: an Azure Function can have multiple triggers associated with it?'
48
+
choices:
49
+
- content: "True"
50
+
isCorrect: false
51
+
explanation: "Every Azure Function must have exactly one trigger associated with it. If you want to use multiple triggers, you must create multiple functions."
52
+
- content: "False"
53
+
isCorrect: true
54
+
explanation: "Every Azure Function must have exactly one trigger associated with it. If you want to use multiple triggers, you must create multiple functions."
Copy file name to clipboardExpand all lines: learn-pr/azure/execute-azure-function-with-triggers/includes/1-introduction.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
Imagine a scenario where a busy hair salon has a recurring problem: customers commonly miss their appointments. Appointments are reserved time slots, so if a customer misses an appointment, the salon loses money. To fix this problem, the salon reaches out to you, a software developer. To improve the situation, you decide to send two types of reminder text messages, one that's sent as soon as the appointment is scheduled or changed, and a text message sent each morning to each customer who has an appointment that day.
1
+
Imagine a scenario where a busy hair salon has a recurring problem: customers commonly miss their appointments. Appointments are reserved time slots, so if a customer misses an appointment, the salon loses money. To fix this problem, the salon reaches out to you, a software developer. To improve the situation, you decide to send two types of reminder text messages. One message is sent as soon as the appointment is scheduled or changed. Another text message is sent each morning to each customer who has an appointment that day.
2
2
3
-
You need to create a service that can be easily scheduled, updated, and scaled. You decide to solve this problem using Azure Functions. You already know how to implement the logic to send a text message. Now you need to learn how to send the message at a specific time or when a specific event occurs. Luckily, Azure Functions supports a feature called _triggers_. Triggers are used to invoke your function code in Azure.
3
+
You need to create a service that can be easily scheduled, updated, and scaled. You decide to solve this problem using Azure Functions. You already know how to implement the logic to send a text message. Now you need to learn how to send the message at a specific time or when a specific event occurs. Luckily, Azure Functions supports a feature called *triggers*. Triggers are used to invoke your function code in Azure.
4
4
5
5
## Learning objectives
6
6
@@ -13,7 +13,7 @@ In this module, you will:
13
13
14
14
## Supported languages
15
15
16
-
This module uses the Azure portal to create and test your function code. Functions supports in-portal development for the following languages:
16
+
This module uses the Azure portal to create and test your function code. Azure Functions supports in-portal development for the following languages:
Copy file name to clipboardExpand all lines: learn-pr/azure/execute-azure-function-with-triggers/includes/2-determine-best-trigger.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
A single function in Azure Functions doesn't do work until something tells it to execute. For example, we could create a function to send out a reminder text message to our customers before an appointment. If we don't tell the function when it should run, our customers will never receive a message.
1
+
A single function in Azure Functions doesn't do work until something tells it to execute. For example, we could create a function to send out a reminder text message to our customers before an appointment. If we don't tell the function when it should run, our customers never receive a message.
2
2
3
-
This unit describes triggers at a high level, explores the most common types of triggers, and uses bindings to connect a trigger to a function.
3
+
This unit describes triggers at a high level, explores the most common types of triggers, and discusses using bindings to connect a trigger to a function.
4
4
5
5
## What is a trigger?
6
6
@@ -33,6 +33,6 @@ Unlike a trigger, a function can have multiple input bindings and output binding
33
33
34
34
## What is a function app?
35
35
36
-
Azure Functions lets you group one or more functions into a single function app. All functions in a function app share the same resources, app settings, and deployments.
36
+
Azure Functions lets you group one or more functions into a single function app. All of the functions in a function app, share the same resources, app settings, and deployments.
37
37
38
-
In the next exercise, we'll run a function on a schedule using a Timer trigger.
38
+
In the next exercise, we'll run a function on a schedule using a timer trigger.
Copy file name to clipboardExpand all lines: learn-pr/azure/execute-azure-function-with-triggers/includes/3-timer-trigger.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The order of the six fields in Azure is: `{second} {minute} {hour} {day} {month}
15
15
16
16
For example, a CRON expression to create a trigger that executes every five minutes looks like: `0 */5 * * * *`
17
17
18
-
At first, this string might look confusing. We'll come back and break down these concepts when we have a deeper look at CRON expressions.
18
+
At first, this string might look confusing. We'll break down these concepts after we have a deeper look at CRON expressions.
19
19
20
20
To build a CRON expression, you need to have a basic understanding of some of the special characters.
21
21
@@ -26,7 +26,7 @@ To build a CRON expression, you need to have a basic understanding of some of th
26
26
| - | Specifies a range | A hyphen "10-12" in the hour field means a range that includes the hours 10, 11, and 12. |
27
27
| / | Specifies an increment | A slash "*/10" in the minutes field means an increment of every 10 minutes. |
28
28
29
-
Now we'll go back to the original CRON expression example. Let’s try to understand it better by breaking it down field by field.
29
+
Now let's go back to the original CRON expression example and try to understand it better by breaking it down field by field.
30
30
31
31
```text
32
32
0 */5 * * * *
@@ -38,12 +38,12 @@ The **second field** represents minutes. The value "*/5" contains two special ch
38
38
39
39
The **remaining four fields** numerically represent the hour in a 24-hour day, day in the month, month in a 12-month year, and day of the 7-day week. An asterisk for these fields means to select every possible value. In this example, we select "every hour of every day of every month."
40
40
41
-
When you put all the fields together, the expression is read as "the first second of every fifth minute of every hour, of every day, of every month".
41
+
When you put all the fields together, the expression is read as "the first second of every fifth minute of every hour, of every day, of every month."
42
42
43
43
## How to create a timer trigger
44
44
45
45
You can create a timer trigger in the Azure portal. In your function app, select **timer trigger** from the list of trigger templates. Enter the logic that you want to execute. Supply a **Timestamp parameter name** and the **CRON expression**.
46
46
47
-
In this module, we'll focus on creating triggers in the portal, but you can also create triggers programmatically using Core Tools, Visual Studio or Visual Studio Code.
47
+
In this module, we focus on creating triggers in the portal, but you can also create triggers programmatically using Core Tools, Visual Studio or Visual Studio Code.
48
48
49
49
A timer trigger invokes the function code on a consistent schedule. To define the schedule for a timer trigger, we build a CRON expression, which is a string that represents a set of times.
Copy file name to clipboardExpand all lines: learn-pr/azure/execute-azure-function-with-triggers/includes/4-create-timer-trigger.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
In this unit, we'll create an Azure Function app that's invoked every 20 seconds using a timer trigger.
1
+
In this unit, we create an Azure Function app and a timer trigger that we use to invoke it every 20 seconds.
2
2
3
3
## Create an Azure Function App
4
4
@@ -62,12 +62,12 @@ Let's create a timer trigger in your function.
62
62
63
63
## Test the timer
64
64
65
-
Now that we've configured the timer, it will invoke the function on the interval we defined.
65
+
Now that the timer is configured, it invokes the function on the interval we defined.
66
66
67
67
1. On the **TimerTrigger1** pane, in the taskbar at the top of the screen, select **Code + Test**. The **Code + Test** pane appears.
68
68
69
69
> [!NOTE]
70
-
> Azure automatically provides a default name for a new trigger that you create. **TimerTrigger1** is default value that you can change when you create a new trigger.
70
+
> Azure automatically provides a default name for a new trigger that you create. **TimerTrigger1** is a default value that you can change when you create a new trigger.
71
71
72
72
1. The **Logs** session pane opens at the bottom of the page. Select the **App Insight Logs** drop-down, and then select **Filesystem Logs**. Select **OK** when the **Switching to filesystem based logs...** message displays.
Copy file name to clipboardExpand all lines: learn-pr/azure/execute-azure-function-with-triggers/includes/5-http-trigger.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
An HTTP request is a common operation on most platforms and devices. Whether it's a request to look up a word in a dictionary or to get the local weather, we send HTTP requests all the time. Azure Functions allows us to quickly create a piece of logic to execute when an HTTP request is received.
2
2
3
-
In this unit, you'll learn how to create and invoke a function using an HTTP trigger. You'll also explore some of the customization options available for HTTP triggers.
3
+
In this unit, you learn how to create and invoke a function using an HTTP trigger. You also explore some of the customization options available for HTTP triggers.
Copy file name to clipboardExpand all lines: learn-pr/azure/execute-azure-function-with-triggers/includes/6-create-http-trigger.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
In this unit, we're going to create a function that accepts an HTTP request with a single string. The function returns a string back to the caller to represent success or failure. We'll continue working on the function from the previous exercise.
1
+
In this unit, we're going to create a function that accepts an HTTP request with a single string. The function returns a string back to the caller to represent success or failure. Let's continue by working on the function from the previous exercise.
2
2
3
3
## Create an HTTP trigger
4
4
@@ -16,13 +16,13 @@ Let's continue using our existing functions app and add an HTTP trigger.
16
16
17
17
1. In the **Select a template** section, select **HTTP trigger**, then select **Next**.
18
18
19
-
1. In the **Template details** section, in **New Function** field, enter a name for the function. Scroll down and in the **Authorization level** dropdown list, select *Anonymous*, and then select **Create**. Your newly created Function pane appears.
19
+
1. In the **Template details** section, in the **New Function** field, enter a name for the function. Scroll down and in the **Authorization level** dropdown list, select *Anonymous*, and then select **Create**. Your newly created Function pane appears.
20
20
21
-
1. In the taskbar at the top of the screen, select **Code + Test**, and review the auto-generated code to get an idea about what's going on. The *req* parameter represents the incoming request and contains a *name* parameter. Check to see if *name* has a value. If it does, we return a greeting. Otherwise, it continues to ask for a value.
21
+
1. In the taskbar at the top of the screen, select **Code + Test**, and review the autogenerated code to get an idea about what's going on. The *req* parameter represents the incoming request and contains a *name* parameter. Check to see if *name* has a value. If it does, we return a greeting. Otherwise, it continues to ask for a value.
22
22
23
23
## Get your function URL
24
24
25
-
Now that we've created the HTTP trigger, let's get the function URL so we can begin to make a request.
25
+
Now that the HTTP trigger is created, let's get the function URL so we can begin to make a request.
26
26
27
27
1. On the top menu bar, select **Get Function Url**. The **Get Function Url** dialog appears.
28
28
@@ -38,6 +38,6 @@ Let's issue a GET request for the URL to see if we get a response.
38
38
39
39
1. Add a query parameter called *name* with your name to the URL; for example, `https://<your-webapp-name>.azurewebsites.net/api/HttpTrigger1?name=Jesse`
40
40
41
-
1. Press <kbd>Enter</kbd> to submit the request.
41
+
1. Press <kbd>Enter</kbd>, to submit the request.
42
42
43
43
1. The message, **Hello, Jesse. This HTTP triggered function executed successfully.** displays.
0 commit comments