Skip to content

Commit b129186

Browse files
Merge pull request #110331 from MicrosoftDocs/master
Merge master to live, 4 AM
2 parents 67addb7 + 96939e8 commit b129186

File tree

145 files changed

+4138
-1962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+4138
-1962
lines changed

.openpublishing.publish.config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@
163163
"url": "https://github.com/Azure/azure-functions-templates",
164164
"branch": "dev"
165165
},
166+
{
167+
"path_to_root": "functions-quickstart-java",
168+
"url": "https://github.com/Azure-Samples/functions-quickstarts-java",
169+
"branch": "master"
170+
},
166171
{
167172
"path_to_root": "functions-docs-csharp",
168173
"url": "https://github.com/Azure-Samples/functions-docs-csharp",

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7619,6 +7619,11 @@
76197619
"redirect_url": "/azure/python/tutorial-vs-code-serverless-python-01",
76207620
"redirect_document_id": false
76217621
},
7622+
{
7623+
"source_path": "articles/azure-functions/functions-create-first-java-maven.md",
7624+
"redirect_url": "/azure/azure-functions/functions-create-first-java-gradle",
7625+
"redirect_document_id": false
7626+
},
76227627
{
76237628
"source_path": "articles/azure-functions/scripts/functions-cli-configure-custom-domain.md",
76247629
"redirect_url": "/azure/app-service/scripts/cli-configure-custom-domain?toc=%2fcli%2fazure%2ftoc.json",
@@ -47004,6 +47009,11 @@
4700447009
"redirect_url": "/azure/iot-fundamentals/iot-services-and-technologies/",
4700547010
"redirect_document_id": false
4700647011
},
47012+
{
47013+
"source_path": "articles/iot-central/core/tutorial-connect-device.md",
47014+
"redirect_url": "/azure/iot-central/core/tutorial-connect-device-nodejs/",
47015+
"redirect_document_id": true
47016+
},
4700747017
{
4700847018
"source_path": "articles/iot-accelerators/iot-accelerators-arduino-iot-devkit-az3166-devkit-remote-monitoringV2.md",
4700947019
"redirect_url": "/azure/iot-accelerators/iot-accelerators-arduino-iot-devkit-az3166-devkit-remote-monitoring-v2",

articles/active-directory-b2c/analytics-with-application-insights.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: celestedg
99
ms.service: active-directory
1010
ms.topic: conceptual
1111
ms.workload: identity
12-
ms.date: 03/24/2020
12+
ms.date: 04/05/2020
1313
ms.author: mimart
1414
ms.subservice: B2C
1515

@@ -128,6 +128,7 @@ Add the profiles to the *TrustFrameworkExtensions.xml* file from the starter pac
128128
<InputClaim ClaimTypeReferenceId="PolicyId" PartnerClaimType="{property:Policy}" DefaultValue="{Policy:PolicyId}" />
129129
<InputClaim ClaimTypeReferenceId="CorrelationId" PartnerClaimType="{property:CorrelationId}" DefaultValue="{Context:CorrelationId}" />
130130
<InputClaim ClaimTypeReferenceId="Culture" PartnerClaimType="{property:Culture}" DefaultValue="{Culture:RFC5646}" />
131+
</InputClaims>
131132
</TechnicalProfile>
132133

133134
<TechnicalProfile Id="AppInsights-SignInRequest">
@@ -236,4 +237,4 @@ Add claim types and events to your user journey to fit your needs. You can use [
236237

237238
## Next steps
238239

239-
- Learn more about [Application Insights](application-insights-technical-profile.md) technical profile in the IEF reference.
240+
- Learn more about [Application Insights](application-insights-technical-profile.md) technical profile in the IEF reference.

articles/active-directory/hybrid/tutorial-federation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ $ForestMode = "WinThreshold"
141141
$LogPath = "c:\windows\NTDS"
142142
$SysVolPath = "c:\windows\SYSVOL"
143143
$featureLogPath = "c:\poshlog\featurelog.txt"
144-
$Password = "Pass1w0rd"
144+
$Password = ConvertTo-SecureString "Passw0rd" -AsPlainText -Force
145145
146146
#Install AD DS, DNS and GPMC
147147
start-job -Name addFeature -ScriptBlock {

articles/azure-functions/TOC.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
href: functions-create-your-first-function-visual-studio.md
2323
- name: Command line
2424
href: functions-create-first-azure-function-azure-cli.md
25-
- name: Maven/Gradle (Java)
26-
href: functions-create-first-java-maven.md
2725
- name: Connect to storage
2826
items:
2927
- name: Visual Studio Code
@@ -32,8 +30,6 @@
3230
href: functions-add-output-binding-storage-queue-vs.md
3331
- name: Command line
3432
href: functions-add-output-binding-storage-queue-cli.md
35-
- name: Maven/Gradle (Java)
36-
href: functions-add-output-binding-storage-queue-java.md
3733
- name: Tutorials
3834
items:
3935
- name: Functions with Logic Apps
@@ -175,10 +171,16 @@
175171
href: create-visual-studio.md
176172
- name: Visual Studio Code
177173
href: create-visual-studio-code.md
174+
- name: Java using Gradle
175+
href: functions-create-first-java-gradle.md
178176
- name: Java using Eclipse
179177
href: functions-create-maven-eclipse.md
180178
- name: Java using IntelliJ IDEA
181179
href: functions-create-maven-intellij.md
180+
- name: Kotlin using Maven
181+
href: functions-create-first-kotlin-maven.md
182+
- name: Kotlin using IntelliJ
183+
href: functions-create-maven-kotlin-intellij.md
182184
- name: Linux App Service plan
183185
href: create-function-app-linux-app-service-plan.md
184186
- name: Linux Consumption plan
@@ -205,6 +207,8 @@
205207
href: add-output-binding-storage-queue-vs-code.md
206208
- name: Storage - Visual Studio
207209
href: add-output-binding-storage-queue-vs.md
210+
- name: Storage - Java/Gradle
211+
href: functions-add-output-binding-storage-queue-java.md
208212
- name: Debug and test
209213
items:
210214
- name: Test functions

articles/azure-functions/functions-add-output-binding-storage-queue-cli.md

Lines changed: 28 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -14,84 +14,24 @@ In this article, you integrate an Azure Storage queue with the function and stor
1414

1515
Before you begin, you must complete the article, [Quickstart: Create an Azure Functions project from the command line](functions-create-first-azure-function-azure-cli.md). If you already cleaned up resources at the end of that article, go through the steps again to recreate the function app and related resources in Azure.
1616

17-
## Retrieve the Azure Storage connection string
18-
19-
When you created a function app in Azure in the previous quickstart, you also created a Storage account. The connection string for this account is stored securely in app settings in Azure. By downloading the setting into the *local.settings.json* file, you can use that connection write to a Storage queue in the same account when running the function locally.
20-
21-
1. From the root of the project, run the following command, replacing `<APP_NAME>` with the name of your function app from the previous quickstart. This command will overwrite any existing values in the file.
22-
23-
```
24-
func azure functionapp fetch-app-settings <APP_NAME>
25-
```
26-
27-
1. Open *local.settings.json* and locate the value named `AzureWebJobsStorage`, which is the Storage account connection string. You use the name `AzureWebJobsStorage` and the connection string in other sections of this article.
28-
29-
> [!IMPORTANT]
30-
> Because *local.settings.json* contains secrets downloaded from Azure, always exclude this file from source control. The *.gitignore* file created with a local functions project excludes the file by default.
17+
[!INCLUDE [functions-cli-get-storage-connection](../../includes/functions-cli-get-storage-connection.md)]
3118

3219
[!INCLUDE [functions-register-storage-binding-extension-csharp](../../includes/functions-register-storage-binding-extension-csharp.md)]
3320

34-
## Add an output binding definition to the function
35-
36-
Although a function can have only one trigger, it can have multiple input and output bindings, which let you connect to other Azure services and resources without writing custom integration code.
37-
38-
::: zone pivot="programming-language-python,programming-language-javascript,programming-language-powershell,programming-language-typescript"
39-
You declare these bindings in the *function.json* file in your function folder. From the previous quickstart, your *function.json* file in the *HttpExample* folder contains two bindings in the `bindings` collection:
40-
::: zone-end
41-
42-
::: zone pivot="programming-language-javascript,programming-language-typescript"
43-
:::code language="json" source="~/functions-quickstart-templates/Functions.Templates/Templates/HttpTrigger-JavaScript/function.json" range="2-18":::
44-
::: zone-end
45-
46-
::: zone pivot="programming-language-python"
47-
:::code language="json" source="~/functions-quickstart-templates/Functions.Templates/Templates/HttpTrigger-Python/function.json" range="2-18":::
48-
::: zone-end
49-
50-
::: zone pivot="programming-language-powershell"
51-
:::code language="json" source="~/functions-quickstart-templates/Functions.Templates/Templates/HttpTrigger-PowerShell/function.json" range="2-18":::
52-
::: zone-end
53-
54-
::: zone pivot="programming-language-python,programming-language-javascript, programming-language-powershell, programming-language-typescript"
55-
Each binding has at least a type, a direction, and a name. In the example above, the first binding is of type `httpTrigger` with the direction `in`. For the `in` direction, `name` specifies the name of an input parameter that's sent to the function when invoked by the trigger.
56-
::: zone-end
57-
58-
::: zone pivot="programming-language-javascript,programming-language-typescript"
59-
The second binding in the collection is named `res`. This `http` binding is an output binding (`out`) that is used to write the HTTP response.
60-
61-
To write to an Azure Storage queue from this function, add an `out` binding of type `queue` with the name `msg`, as shown in the code below:
62-
63-
:::code language="json" source="~/functions-docs-javascript/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" range="3-26":::
64-
::: zone-end
65-
66-
::: zone pivot="programming-language-python"
67-
The second binding in the collection is of type `http` with the direction `out`, in which case the special `name` of `$return` indicates that this binding uses the function's return value rather than providing an input parameter.
68-
69-
To write to an Azure Storage queue from this function, add an `out` binding of type `queue` with the name `msg`, as shown in the code below:
70-
71-
:::code language="json" source="~/functions-docs-python/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" range="3-26":::
72-
::: zone-end
73-
74-
::: zone pivot="programming-language-powershell"
75-
The second binding in the collection is named `res`. This `http` binding is an output binding (`out`) that is used to write the HTTP response.
76-
77-
To write to an Azure Storage queue from this function, add an `out` binding of type `queue` with the name `msg`, as shown in the code below:
78-
79-
:::code language="json" source="~/functions-docs-powershell/functions-add-output-binding-storage-queue-cli/HttpExample/function.json" range="3-26":::
80-
::: zone-end
81-
82-
::: zone pivot="programming-language-python,programming-language-javascript,programming-language-powershell,programming-language-typescript"
83-
In this case, `msg` is given to the function as an output argument. For a `queue` type, you must also specify the name of the queue in `queueName` and provide the *name* of the Azure Storage connection (from *local.settings.json*) in `connection`.
84-
::: zone-end
21+
[!INCLUDE [functions-add-output-binding-cli](../../includes/functions-add-output-binding-cli.md)]
8522

8623
::: zone pivot="programming-language-csharp"
8724
[!INCLUDE [functions-add-storage-binding-csharp-library](../../includes/functions-add-storage-binding-csharp-library.md)]
8825
::: zone-end
26+
::: zone pivot="programming-language-java"
27+
[!INCLUDE [functions-add-output-binding-java-cli](../../includes/functions-add-output-binding-java-cli.md)]
28+
::: zone-end
8929

9030
For more information on the details of bindings, see [Azure Functions triggers and bindings concepts](functions-triggers-bindings.md) and [queue output configuration](functions-bindings-storage-queue-output.md#configuration).
9131

9232
## Add code to use the output binding
9333

94-
With the queue binding specified in *function.json*, you can now update your function to receive the `msg` output parameter and write messages to the queue.
34+
With the queue binding defined, you can now update your function to receive the `msg` output parameter and write messages to the queue.
9535

9636
::: zone pivot="programming-language-python"
9737
[!INCLUDE [functions-add-output-binding-python](../../includes/functions-add-output-binding-python.md)]
@@ -113,6 +53,12 @@ With the queue binding specified in *function.json*, you can now update your fun
11353
[!INCLUDE [functions-add-storage-binding-csharp-library-code](../../includes/functions-add-storage-binding-csharp-library-code.md)]
11454
::: zone-end
11555

56+
::: zone pivot="programming-language-java"
57+
[!INCLUDE [functions-add-output-binding-java-code](../../includes/functions-add-output-binding-java-code.md)]
58+
59+
[!INCLUDE [functions-add-output-binding-java-test-cli](../../includes/functions-add-output-binding-java-test-cli.md)]
60+
::: zone-end
61+
11662
Observe that you *don't* need to write any code for authentication, getting a queue reference, or writing data. All these integration tasks are conveniently handled in the Azure Functions runtime and queue output binding.
11763

11864
[!INCLUDE [functions-run-function-test-local-cli](../../includes/functions-run-function-test-local-cli.md)]
@@ -121,72 +67,30 @@ Observe that you *don't* need to write any code for authentication, getting a qu
12167

12268
## View the message in the Azure Storage queue
12369

124-
You can view the queue in the [Azure portal](../storage/queues/storage-quickstart-queues-portal.md) or in the [Microsoft Azure Storage Explorer](https://storageexplorer.com/). You can also view the queue in the Azure CLI, as described in the following steps:
125-
126-
1. Open the function project's *local.setting.json* file and copy the connection string value. In a terminal or command window, run the following command to create an environment variable named `AZURE_STORAGE_CONNECTION_STRING`, pasting your specific connection string in place of `<MY_CONNECTION_STRING>`. (This environment variable means you don't need to supply the connection string to each subsequent command using the `--connection-string` argument.)
70+
[!INCLUDE [functions-add-output-binding-view-queue-cli](../../includes/functions-add-output-binding-view-queue-cli.md)]
12771

128-
# [bash](#tab/bash)
129-
130-
```bash
131-
AZURE_STORAGE_CONNECTION_STRING="<MY_CONNECTION_STRING>"
132-
```
133-
134-
# [PowerShell](#tab/powershell)
135-
136-
```powershell
137-
$env:AZURE_STORAGE_CONNECTION_STRING = "<MY_CONNECTION_STRING>"
138-
```
139-
140-
# [Azure CLI](#tab/cmd)
141-
142-
```azurecli
143-
set AZURE_STORAGE_CONNECTION_STRING="<MY_CONNECTION_STRING>"
144-
```
145-
146-
---
147-
148-
1. (Optional) Use the [`az storage queue list`](/cli/azure/storage/queue#az-storage-queue-list) command to view the Storage queues in your account. The output from this command should include a queue named `outqueue`, which was created when the function wrote its first message to that queue.
149-
150-
```azurecli
151-
az storage queue list --output tsv
152-
```
72+
## Redeploy the project to Azure
15373

154-
1. Use the [`az storage message get`](/cli/azure/storage/message#az-storage-message-get) command to read the message from this queue, which should be the first name you used when testing the function earlier. The command reads and removes the first message from the queue.
74+
Now that you've verified locally that the function wrote a message to the Azure Storage queue, you can redeploy your project to update the endpoint running on Azure.
15575

156-
# [bash](#tab/bash)
157-
158-
```bash
159-
echo `echo $(az storage message get --queue-name outqueue -o tsv --query '[].{Message:content}') | base64 --decode`
160-
```
161-
162-
# [PowerShell](#tab/powershell)
163-
164-
```powershell
165-
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($(az storage message get --queue-name outqueue -o tsv --query '[].{Message:content}')))
166-
```
167-
168-
# [Azure CLI](#tab/cmd)
169-
170-
```azurecli
171-
az storage message get --queue-name outqueue -o tsv --query [].{Message:content} > %TEMP%out.b64 && certutil -decode -f %TEMP%out.b64 %TEMP%out.txt > NUL && type %TEMP%out.txt && del %TEMP%out.b64 %TEMP%out.txt /q
172-
```
76+
::: zone pivot="programming-language-javascript,programming-language-typescript,programming-language-python,programming-language-powershell,programming-language-csharp"
77+
In the *LocalFunctionsProj* folder, use the [`func azure functionapp publish`](functions-run-local.md#project-file-deployment) command to redeploy the project, replacing`<APP_NAME>` with the name of your app.
17378

174-
This script uses certutil to decode the base64-encoded message collection from a local temp file. If there's no output, try removing `> NUL` from the script to stop suppressing certutil output, in case there's an error.
175-
176-
---
177-
178-
Because the message body is stored [base64 encoded](functions-bindings-storage-queue-trigger.md#encoding), the message must be decoded before it's displayed. After you execute `az storage message get`, the message is removed from the queue. If there was only one message in `outqueue`, you won't retrieve a message when you run this command a second time and instead get an error.
79+
```
80+
func azure functionapp publish <APP_NAME>
81+
```
82+
::: zone-end
17983

180-
## Redeploy the project to Azure
84+
::: zone pivot="programming-language-java"
18185

182-
Now that you've verified locally that the function wrote a message to the Azure Storage queue, you can redeploy your project to update the endpoint running on Azure.
86+
In the local project folder, use the following Maven command to republish your project:
87+
```
88+
mvn azure-functions:deploy
89+
```
90+
::: zone-end
18391

184-
1. In the *LocalFunctionsProj* folder, use the [`func azure functionapp publish`](functions-run-local.md#project-file-deployment) command to redeploy the project, replacing`<APP_NAME>` with the name of your app.
92+
## Verify in Azure
18593

186-
```
187-
func azure functionapp publish <APP_NAME>
188-
```
189-
19094
1. As in the previous quickstart, use a browser or CURL to test the redeployed function.
19195

19296
# [Browser](#tab/browser)

0 commit comments

Comments
 (0)