Skip to content

Commit 1f6e4f4

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into egridblobcreate0416
2 parents 4027ab2 + 87e7b41 commit 1f6e4f4

File tree

52 files changed

+976
-539
lines changed

Some content is hidden

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

52 files changed

+976
-539
lines changed

articles/app-service/webjobs-sdk-get-started.md

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,31 @@ This article shows you how to deploy WebJobs as a .NET Core console app. To depl
3434

3535
## WebJobs NuGet packages
3636

37-
1. Install the latest stable 3.x version of the `Microsoft.Azure.WebJobs.Extensions` NuGet package, which includes `Microsoft.Azure.WebJobs`.
37+
1. Install the latest stable 3.x version of the [`Microsoft.Azure.WebJobs.Extensions` NuGet package](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions/), which includes `Microsoft.Azure.WebJobs`.
3838

39-
Here's the **Package Manager Console** command for version 3.0.2:
39+
Here's the **Package Manager Console** command:
4040

4141
```powershell
42-
Install-Package Microsoft.Azure.WebJobs.Extensions -version 3.0.2
42+
Install-Package Microsoft.Azure.WebJobs.Extensions -version <3_X_VERSION>
4343
```
4444
45+
In this command, replace `<3_X_VERSION>` with a supported version of the package.
46+
4547
## Create the Host
4648
4749
The host is the runtime container for functions that listens for triggers and calls functions. The following steps create a host that implements [`IHost`](/dotnet/api/microsoft.extensions.hosting.ihost), which is the Generic Host in ASP.NET Core.
4850
49-
1. In *Program.cs*, add a `using` statement:
51+
1. In *Program.cs*, add these `using` statements:
5052
5153
```cs
54+
using System.Threading.Tasks;
5255
using Microsoft.Extensions.Hosting;
5356
```
5457
5558
1. Replace the `Main` method with the following code:
5659
5760
```cs
58-
static void Main(string[] args)
61+
static async Task Main()
5962
{
6063
var builder = new HostBuilder();
6164
builder.ConfigureWebJobs(b =>
@@ -65,7 +68,7 @@ The host is the runtime container for functions that listens for triggers and ca
6568
var host = builder.Build();
6669
using (host)
6770
{
68-
host.Run();
71+
await host.RunAsync();
6972
}
7073
}
7174
```
@@ -76,12 +79,12 @@ In ASP.NET Core, host configurations are set by calling methods on the [`HostBui
7679
7780
In this section, you set up console logging that uses the [ASP.NET Core logging framework](/aspnet/core/fundamentals/logging).
7881
79-
1. Install the latest stable version of the `Microsoft.Extensions.Logging.Console` NuGet package, which includes `Microsoft.Extensions.Logging`.
82+
1. Install the latest stable version of the [`Microsoft.Extensions.Logging.Console` NuGet package](https://www.nuget.org/packages/Microsoft.Extensions.Logging.Console/), which includes `Microsoft.Extensions.Logging`.
8083
81-
Here's the **Package Manager Console** command for version 2.2.0:
84+
Here's the **Package Manager Console** command:
8285
8386
```powershell
84-
Install-Package Microsoft.Extensions.Logging.Console -version 2.2.0
87+
Install-Package Microsoft.Extensions.Logging.Console -version <3_X_VERSION>
8588
```
8689

8790
1. In *Program.cs*, add a `using` statement:
@@ -90,6 +93,8 @@ In this section, you set up console logging that uses the [ASP.NET Core logging
9093
using Microsoft.Extensions.Logging;
9194
```
9295

96+
In this command, replace `<3_X_VERSION>` with a supported 3.x version of the package.
97+
9398
1. Call the [`ConfigureLogging`](/dotnet/api/microsoft.aspnetcore.hosting.webhostbuilderextensions.configurelogging) method on [`HostBuilder`](/dotnet/api/microsoft.extensions.hosting.hostbuilder). The [`AddConsole`](/dotnet/api/microsoft.extensions.logging.consoleloggerextensions.addconsole) method adds console logging to the configuration.
9499

95100
```cs
@@ -102,7 +107,7 @@ In this section, you set up console logging that uses the [ASP.NET Core logging
102107
The `Main` method now looks like this:
103108

104109
```cs
105-
static void Main(string[] args)
110+
static async Task Main()
106111
{
107112
var builder = new HostBuilder();
108113
builder.ConfigureWebJobs(b =>
@@ -116,7 +121,7 @@ In this section, you set up console logging that uses the [ASP.NET Core logging
116121
var host = builder.Build();
117122
using (host)
118123
{
119-
host.Run();
124+
await host.RunAsync();
120125
}
121126
}
122127
```
@@ -134,11 +139,13 @@ Starting with version 3.x, you must explicitly install the Storage binding exten
134139

135140
1. Install the latest stable version of the [Microsoft.Azure.WebJobs.Extensions.Storage](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.Storage) NuGet package, version 3.x.
136141
137-
Here's the **Package Manager Console** command for version 3.0.4:
142+
Here's the **Package Manager Console** command:
138143

139144
```powershell
140-
Install-Package Microsoft.Azure.WebJobs.Extensions.Storage -Version 3.0.4
145+
Install-Package Microsoft.Azure.WebJobs.Extensions.Storage -Version <3_X_VERSION>
141146
```
147+
148+
In this command, replace `<3_X_VERSION>` with a supported version of the package.
142149

143150
2. In the `ConfigureWebJobs` extension method, call the `AddAzureStorage` method on the [`HostBuilder`](/dotnet/api/microsoft.extensions.hosting.hostbuilder) instance to initialize the Storage extension. At this point, the `ConfigureWebJobs` method looks like the following example:
144151

@@ -155,22 +162,22 @@ Starting with version 3.x, you must explicitly install the Storage binding exten
155162
1. Right-click the project, select **Add** > **New Item...**, choose **Class**, name the new C# class file *Functions.cs*, and select **Add**.
156163

157164
1. In Functions.cs, replace the generated template with the following code:
158-
159-
```cs
160-
using Microsoft.Azure.WebJobs;
161-
using Microsoft.Extensions.Logging;
162-
163-
namespace WebJobsSDKSample
164-
{
165-
public class Functions
166-
{
167-
public static void ProcessQueueMessage([QueueTrigger("queue")] string message, ILogger logger)
168-
{
169-
logger.LogInformation(message);
170-
}
171-
}
172-
}
173-
```
165+
166+
```cs
167+
using Microsoft.Azure.WebJobs;
168+
using Microsoft.Extensions.Logging;
169+
170+
namespace WebJobsSDKSample
171+
{
172+
public class Functions
173+
{
174+
public static void ProcessQueueMessage([QueueTrigger("queue")] string message, ILogger logger)
175+
{
176+
logger.LogInformation(message);
177+
}
178+
}
179+
}
180+
```
174181

175182
The `QueueTrigger` attribute tells the runtime to call this function when a new message is written on an Azure Storage queue called `queue`. The contents of the queue message are provided to the method code in the `message` parameter. The body of the method is where you process the trigger data. In this example, the code just logs the message.
176183

@@ -348,21 +355,22 @@ In this section, you do the following tasks to set up Application Insights loggi
348355

349356
To take advantage of [Application Insights](../azure-monitor/app/app-insights-overview.md) logging, update your logging code to do the following:
350357

351-
* Add an Application Insights logging provider with default [filtering](webjobs-sdk-how-to.md#log-filtering); all Information and higher-level logs goes to both the console and Application Insights when you're running locally.
358+
* Add an Application Insights logging provider with default [filtering](webjobs-sdk-how-to.md#log-filtering). When running locally, all Information and higher-level logs are written to both the console and Application Insights.
352359
* Put the [LoggerFactory](./webjobs-sdk-how-to.md#logging-and-monitoring) object in a `using` block to ensure that log output is flushed when the host exits.
353360

354-
1. Install the latest stable 3.x version of the NuGet package for the Application Insights logging provider: `Microsoft.Azure.WebJobs.Logging.ApplicationInsights`.
361+
1. Install the latest stable 3.x version of the [`Microsoft.Azure.WebJobs.Logging.ApplicationInsights` NuGet package](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Logging.ApplicationInsights/).
355362
356-
Here's the **Package Manager Console** command for version 3.0.2:
363+
Here's the **Package Manager Console** command:
357364

358365
```powershell
359-
Install-Package Microsoft.Azure.WebJobs.Logging.ApplicationInsights -Version 3.0.2
366+
Install-Package Microsoft.Azure.WebJobs.Logging.ApplicationInsights -Version <3_X_VERSION>
360367
```
368+
In this command, replace `<3_X_VERSION>` with a supported version of the package.
361369

362370
1. Open *Program.cs* and replace the code in the `Main` method with the following code:
363371

364372
```cs
365-
static void Main(string[] args)
373+
static async Task Main()
366374
{
367375
var builder = new HostBuilder();
368376
builder.UseEnvironment(EnvironmentName.Development);
@@ -385,7 +393,7 @@ To take advantage of [Application Insights](../azure-monitor/app/app-insights-ov
385393
var host = builder.Build();
386394
using (host)
387395
{
388-
host.Run();
396+
await host.RunAsync();
389397
}
390398
}
391399
```

articles/app-service/webjobs-sdk-how-to.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ Automatic triggers call a function in response to an event. Consider this exampl
152152
```cs
153153
public static void Run(
154154
[QueueTrigger("myqueue-items")] string myQueueItem,
155-
[Blob("samples-workitems/{myQueueItem}", FileAccess.Read)] Stream myBlob,
155+
[Blob("samples-workitems/{queueTrigger}", FileAccess.Read)] Stream myBlob,
156156
ILogger log)
157157
{
158158
log.LogInformation($"BlobInput processed blob\n Name:{myQueueItem} \n Size: {myBlob.Length} bytes");
159159
}
160160
```
161161

162-
The `QueueTrigger` attribute tells the runtime to call the function whenever a queue message appears in the `myqueue-items` queue. The `Blob` attribute tells the runtime to use the queue message to read a blob in the *sample-workitems* container. The content of the queue message, passed in to the function in the `myQueueItem` parameter, is the name of the blob.
162+
The `QueueTrigger` attribute tells the runtime to call the function whenever a queue message appears in the `myqueue-items` queue. The `Blob` attribute tells the runtime to use the queue message to read a blob in the *sample-workitems* container. The name of the blob item in the `samples-workitems` container is obtained directly from the queue trigger as a binding expression (`{queueTrigger}`).
163163

164164
[!INCLUDE [webjobs-always-on-note](../../includes/webjobs-always-on-note.md)]
165165

articles/azure-functions/durable/durable-functions-event-publishing.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,36 @@ Now you can send events to the topic.
6363

6464
In your Durable Functions project, find the `host.json` file.
6565

66+
### Durable Functions 1.x
67+
6668
Add `eventGridTopicEndpoint` and `eventGridKeySettingName` in a `durableTask` property.
6769

6870
```json
6971
{
72+
"durableTask": {
73+
"eventGridTopicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
74+
"eventGridKeySettingName": "EventGridKey"
75+
}
76+
}
77+
```
78+
79+
### Durable Functions 2.x
80+
81+
Add a `notifications` section to the `durableTask` property of the file, replacing `<topic_name>` with the name you chose. If the `durableTask` or `extensions` properties do not exist, create them like this example:
82+
83+
```json
84+
{
85+
"version": "2.0",
86+
"extensions": {
7087
"durableTask": {
71-
"eventGridTopicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
72-
"eventGridKeySettingName": "EventGridKey"
88+
"notifications": {
89+
"eventGrid": {
90+
"topicEndpoint": "https://<topic_name>.westus2-1.eventgrid.azure.net/api/events",
91+
"keySettingName": "EventGridKey"
92+
}
93+
}
7394
}
95+
}
7496
}
7597
```
7698

Loading

articles/azure-resource-manager/templates/template-tutorial-use-key-vault.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
title: Use Azure Key Vault in templates
33
description: Learn how to use Azure Key Vault to pass secure parameter values during Resource Manager template deployment
44
author: mumian
5-
ms.date: 05/23/2019
5+
ms.date: 04/16/2020
66
ms.topic: tutorial
77
ms.author: jgao
88
ms.custom: seodec18
99
---
1010

1111
# Tutorial: Integrate Azure Key Vault in your ARM template deployment
1212

13-
Learn how to retrieve secrets from an Azure key vault and pass the secrets as parameters when you deploy an Azure Resource Manager (ARM) template. The parameter value is never exposed, because you reference only its key vault ID. For more information, see [Use Azure Key Vault to pass secure parameter value during deployment](./key-vault-parameter.md).
13+
Learn how to retrieve secrets from an Azure key vault and pass the secrets as parameters when you deploy an Azure Resource Manager (ARM) template. The parameter value is never exposed, because you reference only its key vault ID. You can reference the key vault secret by using a static ID or a dynamic ID. This tutorial uses a static ID. With the static ID approach, you reference the key vault in the template parameter file, not the template file. For more information about both approaches, see [Use Azure Key Vault to pass secure parameter value during deployment](./key-vault-parameter.md).
1414

1515
In the [Set resource deployment order](./template-tutorial-create-templates-with-dependent-resources.md) tutorial, you create a virtual machine (VM). You need to provide the VM administrator username and password. Instead of providing the password, you can pre-store the password in an Azure key vault and then customize the template to retrieve the password from the key vault during the deployment.
1616

@@ -28,8 +28,6 @@ This tutorial covers the following tasks:
2828
2929
If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/free/) before you begin.
3030

31-
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
32-
3331
## Prerequisites
3432

3533
To complete this article, you need:
@@ -44,7 +42,7 @@ To complete this article, you need:
4442

4543
## Prepare a key vault
4644

47-
In this section, you create a key vault and add a secret to it, so that you can retrieve the secret when you deploy your template. There are many ways to create a key vault. In this tutorial, you use Azure PowerShell to deploy an [ARM template](https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/tutorials-use-key-vault/CreateKeyVault.json). This template does the following:
45+
In this section, you create a key vault and add a secret to it, so that you can retrieve the secret when you deploy your template. There are many ways to create a key vault. In this tutorial, you use Azure PowerShell to deploy an [ARM template](https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/tutorials-use-key-vault/CreateKeyVault.json). This template does two things:
4846

4947
* Creates a key vault with the `enabledForTemplateDeployment` property enabled. This property must be *true* before the template deployment process can access the secrets that are defined in the key vault.
5048
* Adds a secret to the key vault. The secret stores the VM administrator password.
@@ -67,14 +65,16 @@ $templateUri = "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/
6765

6866
New-AzResourceGroup -Name $resourceGroupName -Location $location
6967
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -keyVaultName $keyVaultName -adUserId $adUserId -secretValue $secretValue
68+
69+
Write-Host "Press [ENTER] to continue ..."
7070
```
7171

7272
> [!IMPORTANT]
7373
> * The resource group name is the project name, but with **rg** appended to it. To make it easier to [clean up the resources that you created in this tutorial](#clean-up-resources), use the same project name and resource group name when you [deploy the next template](#deploy-the-template).
7474
> * The default name for the secret is **vmAdminPassword**. It's hardcoded in the template.
75-
> * To enable the template to retrieve the secret, you must enable an access policy called "Enable access to Azure Resource Manager for template deployment" for the key vault. This policy is enabled in the template. For more information about the access policy, see [Deploy key vaults and secrets](./key-vault-parameter.md#deploy-key-vaults-and-secrets).
75+
> * To enable the template to retrieve the secret, you must enable an access policy called **Enable access to Azure Resource Manager for template deployment** for the key vault. This policy is enabled in the template. For more information about the access policy, see [Deploy key vaults and secrets](./key-vault-parameter.md#deploy-key-vaults-and-secrets).
7676
77-
The template has one output value, called *keyVaultId*. Write down the ID value for later use, when you deploy the virtual machine. The resource ID format is:
77+
The template has one output value, called *keyVaultId*. You will use this ID along with the secret name to retrieve the secret value later in the tutorial. The resource ID format is:
7878

7979
```json
8080
/subscriptions/<SubscriptionID>/resourceGroups/mykeyvaultdeploymentrg/providers/Microsoft.KeyVault/vaults/<KeyVaultName>
@@ -103,13 +103,14 @@ Azure Quickstart Templates is a repository for ARM templates. Instead of creatin
103103
```
104104

105105
1. Select **Open** to open the file. The scenario is the same as the one that's used in [Tutorial: Create ARM templates with dependent resources](./template-tutorial-create-templates-with-dependent-resources.md).
106-
The template defines five resources:
106+
The template defines six resources:
107107
108-
* `Microsoft.Storage/storageAccounts`. See the [template reference](https://docs.microsoft.com/azure/templates/Microsoft.Storage/storageAccounts).
109-
* `Microsoft.Network/publicIPAddresses`. See the [template reference](https://docs.microsoft.com/azure/templates/microsoft.network/publicipaddresses).
110-
* `Microsoft.Network/virtualNetworks`. See the [template reference](https://docs.microsoft.com/azure/templates/microsoft.network/virtualnetworks).
111-
* `Microsoft.Network/networkInterfaces`. See the [template reference](https://docs.microsoft.com/azure/templates/microsoft.network/networkinterfaces).
112-
* `Microsoft.Compute/virtualMachines`. See the [template reference](https://docs.microsoft.com/azure/templates/microsoft.compute/virtualmachines).
108+
* [**Microsoft.Storage/storageAccounts**](/azure/templates/Microsoft.Storage/storageAccounts).
109+
* [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses).
110+
* [**Microsoft.Network/networkSecurityGroups**](/azure/templates/microsoft.network/networksecuritygroups).
111+
* [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualnetworks).
112+
* [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkinterfaces).
113+
* [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines).
113114
114115
It's helpful to have some basic understanding of the template before you customize it.
115116

@@ -123,7 +124,7 @@ Azure Quickstart Templates is a repository for ARM templates. Instead of creatin
123124

124125
## Edit the parameters file
125126

126-
You don't need to make any changes to the template file.
127+
By using the static ID method, you don't need to make any changes to the template file. Retrieving the secret value is done by configuring the template parameter file.
127128
128129
1. In Visual Studio Code, open *azuredeploy.parameters.json* if it's not already open.
129130
1. Update the `adminPassword` parameter to:
@@ -140,7 +141,7 @@ You don't need to make any changes to the template file.
140141
```
141142

142143
> [!IMPORTANT]
143-
> Replace the value for **id** with the resource ID of the key vault that you created in the previous procedure.
144+
> Replace the value for **id** with the resource ID of the key vault that you created in the previous procedure. The secretName is hardcoded as **vmAdminPassword**. See [Prepare a key vault](#prepare-a-key-vault).
144145

145146
![Integrate key vault and Resource Manager template virtual machine deployment parameters file](./media/template-tutorial-use-key-vault/resource-manager-tutorial-create-vm-parameters-file.png)
146147

articles/cognitive-services/index.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ conceptualContent:
9393
- url: ./speaker-recognition/home.md
9494
itemType: overview
9595
text: Speaker Recognition (Preview)
96-
- url: ./speech/home.md
97-
itemType: overview
98-
text: Bing Speech (Retiring)
96+
# - url: ./speech/home.md
97+
# itemType: overview
98+
# text: Bing Speech (Retiring)
9999
# - url: ./translator-speech/overview.md
100100
# itemType: overview
101101
# text: Translator Speech (Retiring)

0 commit comments

Comments
 (0)