Skip to content

Commit 20ebc30

Browse files
authored
Merge pull request #185490 from MicrosoftDocs/master
1/19 PM Publish
2 parents 75cf521 + 75ef46f commit 20ebc30

File tree

262 files changed

+1291
-888
lines changed

Some content is hidden

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

262 files changed

+1291
-888
lines changed

articles/active-directory-domain-services/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Active Directory Domain Services
33
description: Lists Azure Policy built-in policy definitions for Azure Active Directory Domain Services. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.service: active-directory
66
ms.subservice: domain-services
77
author: justinha

articles/aks/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Kubernetes Service
33
description: Lists Azure Policy built-in policy definitions for Azure Kubernetes Service. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
---

articles/api-management/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure API Management
33
description: Lists Azure Policy built-in policy definitions for Azure API Management. These built-in policy definitions provide approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
author: dlepow
66
ms.author: danlep
77
ms.service: api-management

articles/app-service/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ With App Service, you pay for the Azure compute resources you use. The compute r
1818

1919
## Why use App Service?
2020

21-
Here are some key features of App Service:
21+
Azure App Service is a fully managed platform as a service (PaaS) offering for developers. Here are some key features of App Service:
2222

2323
* **Multiple languages and frameworks** - App Service has first-class support for ASP.NET, ASP.NET Core, Java, Ruby, Node.js, PHP, or Python. You can also run [PowerShell and other scripts or executables](webjobs-create.md) as background services.
2424
* **Managed production environment** - App Service automatically [patches and maintains the OS and language frameworks](overview-patch-os-runtime.md) for you. Spend time writing great apps and let Azure worry about the platform.
@@ -87,4 +87,4 @@ Create your first web app.
8787
> [HTML (on Windows or Linux)](quickstart-html.md)
8888
8989
> [!div class="nextstepaction"]
90-
> [Custom container (Windows or Linux)](tutorial-custom-container.md)
90+
> [Custom container (Windows or Linux)](tutorial-custom-container.md)

articles/app-service/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure App Service
33
description: Lists Azure Policy built-in policy definitions for Azure App Service. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
---

articles/attestation/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Attestation
33
description: Lists Azure Policy built-in policy definitions for Azure Attestation. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.topic: reference
66
ms.service: attestation
77
author: msmbaldwin

articles/automation/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Automation
33
description: Lists Azure Policy built-in policy definitions for Azure Automation. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.topic: reference
66
ms.custom: subject-policy-reference
77
---

articles/azure-app-configuration/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure App Configuration
33
description: Lists Azure Policy built-in policy definitions for Azure App Configuration. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.topic: reference
66
author: AlexandraKemperMS
77
ms.author: alkemper

articles/azure-app-configuration/quickstart-aspnet-core-app.md

Lines changed: 100 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ms.service: azure-app-configuration
77
ms.devlang: csharp
88
ms.custom: devx-track-csharp, contperf-fy21q1, mode-other
99
ms.topic: quickstart
10-
ms.date: 09/25/2020
10+
ms.date: 1/3/2022
1111
ms.author: alkemper
1212
#Customer intent: As an ASP.NET Core developer, I want to learn how to manage all my app settings in one place.
1313
---
@@ -71,61 +71,115 @@ dotnet new mvc --no-https --output TestAppConfig
7171
7272
Access this secret using the .NET Core Configuration API. A colon (`:`) works in the configuration name with the Configuration API on all supported platforms. For more information, see [Configuration keys and values](/aspnet/core/fundamentals/configuration#configuration-keys-and-values).
7373
74-
1. In *Program.cs*, add a reference to the .NET Core Configuration API namespace:
74+
1. Select the correct syntax based on your environment.
7575
76-
```csharp
77-
using Microsoft.Extensions.Configuration;
78-
```
79-
80-
1. Update the `CreateWebHostBuilder` method to use App Configuration by calling the `AddAzureAppConfiguration` method.
81-
82-
> [!IMPORTANT]
83-
> `CreateHostBuilder` replaces `CreateWebHostBuilder` in .NET Core 3.x. Select the correct syntax based on your environment.
84-
85-
#### [.NET 5.x](#tab/core5x)
76+
#### [.NET 6.x](#tab/core6x)
77+
In *Program.cs*, replace its content with the following code:
8678
8779
```csharp
88-
public static IHostBuilder CreateHostBuilder(string[] args) =>
89-
Host.CreateDefaultBuilder(args)
90-
.ConfigureWebHostDefaults(webBuilder =>
91-
webBuilder.ConfigureAppConfiguration(config =>
92-
{
93-
var settings = config.Build();
94-
var connection = settings.GetConnectionString("AppConfig");
95-
config.AddAzureAppConfiguration(connection);
96-
}).UseStartup<Startup>());
80+
var builder = WebApplication.CreateBuilder(args);
81+
//Retrieve the Connection String from the secrets manager
82+
var connectionString = builder.Configuration["AppConfig"];
83+
84+
builder.Host.ConfigureAppConfiguration(builder =>
85+
{
86+
//Connect to your App Config Store using the connection string
87+
builder.AddAzureAppConfiguration(connectionString);
88+
})
89+
.ConfigureServices(services =>
90+
{
91+
services.AddControllersWithViews();
92+
});
93+
94+
var app = builder.Build();
95+
96+
// Configure the HTTP request pipeline.
97+
if (!app.Environment.IsDevelopment())
98+
{
99+
app.UseExceptionHandler("/Home/Error");
100+
}
101+
app.UseStaticFiles();
102+
103+
app.UseRouting();
104+
105+
app.UseAuthorization();
106+
107+
app.MapControllerRoute(
108+
name: "default",
109+
pattern: "{controller=Home}/{action=Index}/{id?}");
110+
111+
app.Run();
97112
```
113+
114+
#### [.NET 5.x](#tab/core5x)
115+
116+
1. In *Program.cs*, add a reference to the .NET Core Configuration API namespace:
117+
118+
```csharp
119+
using Microsoft.Extensions.Configuration;
120+
```
121+
122+
1. Update the `CreateHostBuilder` method to use App Configuration by calling the `AddAzureAppConfiguration` method.
123+
124+
```csharp
125+
public static IHostBuilder CreateHostBuilder(string[] args) =>
126+
Host.CreateDefaultBuilder(args)
127+
.ConfigureWebHostDefaults(webBuilder =>
128+
webBuilder.ConfigureAppConfiguration(config =>
129+
{
130+
var settings = config.Build();
131+
var connection = settings.GetConnectionString("AppConfig");
132+
config.AddAzureAppConfiguration(connection);
133+
}).UseStartup<Startup>());
134+
```
98135
#### [.NET Core 3.x](#tab/core3x)
99136
100-
```csharp
101-
public static IHostBuilder CreateHostBuilder(string[] args) =>
102-
Host.CreateDefaultBuilder(args)
103-
.ConfigureWebHostDefaults(webBuilder =>
104-
webBuilder.ConfigureAppConfiguration(config =>
137+
> [!IMPORTANT]
138+
> `CreateHostBuilder` in .NET 3.x replaces `CreateWebHostBuilder` in .NET Core 2.x.
139+
140+
1. In *Program.cs*, add a reference to the .NET Core Configuration API namespace:
141+
142+
```csharp
143+
using Microsoft.Extensions.Configuration;
144+
```
145+
1. Update the `CreateHostBuilder` method to use App Configuration by calling the `AddAzureAppConfiguration` method.
146+
147+
```csharp
148+
public static IHostBuilder CreateHostBuilder(string[] args) =>
149+
Host.CreateDefaultBuilder(args)
150+
.ConfigureWebHostDefaults(webBuilder =>
151+
webBuilder.ConfigureAppConfiguration(config =>
152+
{
153+
var settings = config.Build();
154+
var connection = settings.GetConnectionString("AppConfig");
155+
config.AddAzureAppConfiguration(connection);
156+
}).UseStartup<Startup>());
157+
```
158+
159+
#### [.NET Core 2.x](#tab/core2x)
160+
161+
1. In *Program.cs*, add a reference to the .NET Core Configuration API namespace:
162+
163+
```csharp
164+
using Microsoft.Extensions.Configuration;
165+
```
166+
167+
1. Update the `CreateWebHostBuilder` method to use App Configuration by calling the `AddAzureAppConfiguration` method.
168+
169+
```csharp
170+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
171+
WebHost.CreateDefaultBuilder(args)
172+
.ConfigureAppConfiguration(config =>
105173
{
106174
var settings = config.Build();
107175
var connection = settings.GetConnectionString("AppConfig");
108176
config.AddAzureAppConfiguration(connection);
109-
}).UseStartup<Startup>());
110-
```
111-
112-
#### [.NET Core 2.x](#tab/core2x)
113-
114-
```csharp
115-
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
116-
WebHost.CreateDefaultBuilder(args)
117-
.ConfigureAppConfiguration(config =>
118-
{
119-
var settings = config.Build();
120-
var connection = settings.GetConnectionString("AppConfig");
121-
config.AddAzureAppConfiguration(connection);
122-
})
123-
.UseStartup<Startup>();
124-
```
125-
126-
---
177+
})
178+
.UseStartup<Startup>();
179+
```
180+
---
127181
128-
With the preceding change, the [configuration provider for App Configuration](/dotnet/api/Microsoft.Extensions.Configuration.AzureAppConfiguration) has been registered with the .NET Core Configuration API.
182+
This code will connect to your App Configuration store using a connection string and load all keys that have the *TestApp* prefix from a previous step. For more information on the configuration provider APIs, reference the [configuration provider for App Configuration docs](/dotnet/api/Microsoft.Extensions.Configuration.AzureAppConfiguration).
129183
130184
## Read from the App Configuration store
131185
@@ -171,7 +225,7 @@ In the preceding code, the App Configuration store's keys are used as follows:
171225
dotnet run
172226
```
173227
174-
1. If you're working on your local machine, use a browser to navigate to `http://localhost:5000`. This address is the default URL for the locally hosted web app. If you're working in the Azure Cloud Shell, select the **Web Preview** button followed by **Configure**.
228+
1. If you're working on your local machine, use a browser to navigate to `http://localhost:5000` or as specified in the command output. This address is the default URL for the locally hosted web app. If you're working in the Azure Cloud Shell, select the **Web Preview** button followed by **Configure**.
175229
176230
![Locate the Web Preview button](./media/quickstarts/cloud-shell-web-preview.png)
177231

articles/azure-arc/kubernetes/policy-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Built-in policy definitions for Azure Arc-enabled Kubernetes
33
description: Lists Azure Policy built-in policy definitions for Azure Arc-enabled Kubernetes. These built-in policy definitions provide common approaches to managing your Azure resources.
4-
ms.date: 12/15/2021
4+
ms.date: 01/18/2022
55
ms.service: azure-arc
66
#ms.subservice: azure-arc-kubernetes coming soon
77
ms.topic: reference

0 commit comments

Comments
 (0)