Skip to content

Commit f340e97

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into us370875-cli-posh-nat
2 parents a2a17f4 + fe775d7 commit f340e97

File tree

443 files changed

+3781
-5771
lines changed

Some content is hidden

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

443 files changed

+3781
-5771
lines changed

.github/policies/disallow-edits.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,16 @@ configuration:
155155
if:
156156
# If a 'sign-off' comment is added to a PR in the articles/reliability folder , and the PR author isn't Anastasia or John...
157157
- payloadType: Issue_Comment
158-
- isPullRequest
159158
- filesMatchPattern:
160159
matchAny: true
161160
pattern: articles/reliability/*
162-
- commentContains:
163-
pattern: '\#sign-off'
164-
isRegex: true
161+
- or:
162+
- commentContains:
163+
pattern: ^(#sign-off)$
164+
isRegex: True
165+
- commentContains:
166+
pattern: ^(\#sign-off)$
167+
isRegex: True
165168
- not:
166169
or:
167170
- isActivitySender:

.openpublishing.redirection.json

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,120 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "articles/automation/update-management/configure-alerts.md",
5+
"redirect_url": "/azure/update-manager/manage-alerts",
6+
"redirect_document_id": false
7+
},
8+
{
9+
"source_path": "articles/automation/update-management/configure-groups.md",
10+
"redirect_url": "/azure/update-manager/dynamic-scope-overview",
11+
"redirect_document_id": false
12+
},
13+
{
14+
"source_path": "articles/automation/update-management/configure-wuagent.md",
15+
"redirect_url": "/azure/update-manager/configure-wu-agent",
16+
"redirect_document_id": false
17+
},
18+
{
19+
"source_path": "articles/automation/update-management/deploy-updates.md",
20+
"redirect_url": "/azure/update-manager/deploy-updates",
21+
"redirect_document_id": false
22+
},
23+
{
24+
"source_path": "articles/automation/update-management/enable-from-automation-account.md",
25+
"redirect_url": "/azure/update-manager/migration-overview",
26+
"redirect_document_id": false
27+
},
28+
{
29+
"source_path": "articles/automation/update-management/enable-from-portal.md",
30+
"redirect_url": "/azure/update-manager/migration-using-portal",
31+
"redirect_document_id": false
32+
},
33+
{
34+
"source_path": "articles/automation/update-management/enable-from-runbook.md",
35+
"redirect_url": "/azure/update-manager/migration-using-runbook-scripts",
36+
"redirect_document_id": false
37+
},
38+
{
39+
"source_path": "articles/automation/update-management/enable-from-template.md",
40+
"redirect_url": "/azure/update-manager/migration-manual",
41+
"redirect_document_id": false
42+
},
43+
{
44+
"source_path": "articles/automation/update-management/enable-from-vm.md",
45+
"redirect_url": "/azure/update-manager/migration-overview",
46+
"redirect_document_id": false
47+
},
48+
{
49+
"source_path": "articles/automation/update-management/manage-updates-for-vm.md",
50+
"redirect_url": "/azure/update-manager/view-updates",
51+
"redirect_document_id": false
52+
},
53+
{
54+
"source_path": "articles/automation/update-management/mecmintegration.md",
55+
"redirect_url": "/azure/update-manager/overview",
56+
"redirect_document_id": false
57+
},
58+
{
59+
"source_path": "articles/automation/update-management/operating-system-requirements.md",
60+
"redirect_url": "/azure/update-manager/support-matrix-updates",
61+
"redirect_document_id": false
62+
},
63+
{
64+
"source_path": "articles/automation/update-management/overview.md",
65+
"redirect_url": "/azure/update-manager/workflow-update-manager",
66+
"redirect_document_id": false
67+
},
68+
{
69+
"source_path": "articles/automation/update-management/plan-deployment.md",
70+
"redirect_url": "/azure/update-manager/workflow-update-manager",
71+
"redirect_document_id": false
72+
},
73+
{
74+
"source_path": "articles/automation/update-management/pre-post-scripts.md",
75+
"redirect_url": "/azure/update-manager/pre-post-events-schedule-maintenance-configuration",
76+
"redirect_document_id": false
77+
},
78+
{
79+
"source_path": "articles/automation/update-management/query-logs.md",
80+
"redirect_url": "/azure/update-manager/sample-query-logs",
81+
"redirect_document_id": false
82+
},
83+
{
84+
"source_path": "articles/automation/update-management/remove-feature.md",
85+
"redirect_url": "/azure/update-manager/view-updates",
86+
"redirect_document_id": false
87+
},
88+
{
89+
"source_path": "articles/automation/update-management/remove-vms.md",
90+
"redirect_url": "/azure/update-manager/deploy-updates",
91+
"redirect_document_id": false
92+
},
93+
{
94+
"source_path": "articles/automation/update-management/scope-configuration.md",
95+
"redirect_url": "/azure/update-manager/updates-maintenance-schedules",
96+
"redirect_document_id": false
97+
},
98+
{
99+
"source_path": "articles/automation/update-management/view-update-assessments.md",
100+
"redirect_url": "/azure/update-manager/view-updates",
101+
"redirect_document_id": false
102+
},
103+
{
104+
"source_path": "articles/automation/troubleshoot/update-management.md",
105+
"redirect_url": "/azure/update-manager/troubleshoot",
106+
"redirect_document_id": false
107+
},
108+
{
109+
"source_path": "articles/automation/troubleshoot/update-agent-issues.md",
110+
"redirect_url": "/azure/update-manager/troubleshoot",
111+
"redirect_document_id": false
112+
},
113+
{
114+
"source_path": "articles/automation/troubleshoot/update-agent-issues-linux.md",
115+
"redirect_url": "/azure/update-manager/troubleshoot",
116+
"redirect_document_id": false
117+
},
3118
{
4119
"source_path": "articles/automation/change-tracking/enable-from-portal.md",
5120
"redirect_url": "/azure/automation/change-tracking/enable-vms-monitoring-agent",
@@ -85,6 +200,11 @@
85200
"redirect_url": "https://azuremarketplace.microsoft.com/marketplace/apps?page=1",
86201
"redirect_document_id": false
87202
},
203+
{
204+
"source_path": "articles/partner-solutions/logzio/index.yml",
205+
"redirect_url": "/previous-versions/azure/partner-solutions/logzio/index",
206+
"redirect_document_id": false
207+
},
88208
{
89209
"source_path": "articles/partner-solutions/logzio/create.md",
90210
"redirect_url": "/previous-versions/azure/partner-solutions/logzio/create",

articles/api-management/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,8 @@
544544
href: json-to-xml-policy.md
545545
- name: limit-concurrency
546546
href: limit-concurrency-policy.md
547+
- name: llm-content-safety
548+
href: llm-content-safety-policy.md
547549
- name: llm-emit-token-metric
548550
href: llm-emit-token-metric-policy.md
549551
- name: llm-semantic-cache-lookup

articles/api-management/api-management-policies.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ More information about policies:
5959

6060
|Policy |Description | Classic | V2 | Consumption |Self-hosted |Workspace |
6161
|---------|---------|---------|---------|---------|--------|------|
62+
| [Enforce content safety checks on LLM requests](llm-content-safety-policy.md) | Enforces content safety checks on LLM requests (prompts) by transmitting them to the [Azure AI Content Safety](/azure/ai-services/content-safety/overview) service before sending to the backend LLM. | Yes | Yes | Yes | Yes | Yes |
6263
| [Validate content](validate-content-policy.md) | Validates the size or content of a request or response body against one or more API schemas. The supported schema formats are JSON and XML. | Yes | Yes | Yes | Yes | Yes |
6364
| [Validate GraphQL request](validate-graphql-request-policy.md) | Validates and authorizes a request to a GraphQL API. | Yes | Yes | Yes | Yes | No |
6465
| [Validate OData request](validate-odata-request-policy.md) | Validates a request to an OData API to ensure conformance with the OData specification. | Yes | Yes | Yes | Yes | Yes |
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: Azure API Management policy reference - llm-content-safety
3+
description: Reference for the llm-content-safety policy available for use in Azure API Management. Provides policy usage, settings, and examples.
4+
services: api-management
5+
author: dlepow
6+
7+
ms.service: azure-api-management
8+
ms.collection: ce-skilling-ai-copilot
9+
ms.custom:
10+
ms.topic: article
11+
ms.date: 03/04/2025
12+
ms.author: danlep
13+
---
14+
15+
# Enforce content safety checks on LLM requests
16+
17+
[!INCLUDE [api-management-availability-premium-dev-standard-basic-premiumv2-standardv2-basicv2](../../includes/api-management-availability-premium-dev-standard-basic-premiumv2-standardv2-basicv2.md)]
18+
19+
The `llm-content-safety` policy enforces content safety checks on large language model (LLM) requests (prompts) by transmitting them to the [Azure AI Content Safety](/azure/ai-services/content-safety/overview) service before sending to the backend LLM API. When the policy is enabled and Azure AI Content Safety detects malicious content, API Management blocks the request and returns a `403` error code.
20+
21+
Use the policy in scenarios such as the following:
22+
23+
* Block requests that contain predefined categories of harmful content or hate speech
24+
* Apply custom blocklists to prevent specific content from being sent
25+
* Shield against prompts that match attack patterns
26+
27+
[!INCLUDE [api-management-policy-generic-alert](../../includes/api-management-policy-generic-alert.md)]
28+
29+
## Prerequisites
30+
31+
* An [Azure AI Content Safety](/azure/ai-services/content-safety/) resource.
32+
* An API Management [backend](backends.md) configured to route content safety API calls and authenticate to the Azure AI Content Safety service, in the form `https://<content-safety-service-name>.cognitiveservices.azure.com`. Managed identity with Cognitive Services User role is recommended for authentication.
33+
34+
35+
## Policy statement
36+
37+
```xml
38+
<llm-content-safety backend-id="name of backend entity" shield-prompt="true | false" >
39+
<categories output-type="FourSeverityLevels | EightSeverityLevels">
40+
<category name="Hate | SelfHarm | Sexual | Violence" threshold="integer" />
41+
<!-- If there are multiple categories, add more category elements -->
42+
[...]
43+
</categories>
44+
<blocklists>
45+
<id>blocklist-identifier</id>
46+
<!-- If there are multiple blocklists, add more id elements -->
47+
[...]
48+
</blocklists>
49+
</llm-content-safety>
50+
```
51+
52+
## Attributes
53+
54+
| Attribute | Description | Required | Default |
55+
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
56+
| backend-id | Identifier (name) of the Azure AI Content Safety backend to route content-safety API calls to. Policy expressions are allowed. | Yes | N/A |
57+
| shield-prompt | If set to `true`, content is checked for user attacks. Otherwise, skip this check. Policy expressions are allowed. | No | `false` |
58+
59+
60+
## Elements
61+
62+
| Element | Description | Required |
63+
| -------------- | -----| -------- |
64+
| categories | A list of `category` elements that specify settings for blocking requests when the category is detected. | No |
65+
| blocklists | A list of [blocklist](/azure/ai-services/content-safety/how-to/use-blocklist) `id` elements from the Azure AI Content Safety instance for which detection causes the request to be blocked. Policy expressions are allowed. | No |
66+
67+
### categories attributes
68+
69+
| Attribute | Description | Required | Default |
70+
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
71+
| output-type | Specifies how severity levels are returned by Azure AI Content Safety. The attribute must have one of the following values.<br /><br />- `FourSeverityLevels`: Output severities in four levels: 0,2,4,6.<br/>- `EightSeverityLevels`: Output severities in eight levels: 0,1,2,3,4,5,6,7.<br/><br/>Policy expressions are allowed. | No | `FourSeverityLevels` |
72+
73+
74+
### category attributes
75+
76+
| Attribute | Description | Required | Default |
77+
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
78+
| name | Specifies the name of this category. The attribute must have one of the following values: `Hate`, `SelfHarm`, `Sexual`, `Violence`. Policy expressions are allowed. | Yes | N/A |
79+
| threshold | Specifies the threshold value for this category at which request are blocked. Requests with content severities less than the threshold aren't blocked. The value must be between 0 and 7. Policy expressions are allowed. | Yes | N/A |
80+
81+
82+
## Usage
83+
84+
- [**Policy sections:**](./api-management-howto-policies.md#sections) inbound
85+
- [**Policy scopes:**](./api-management-howto-policies.md#scopes) global, workspace, product, API
86+
- [**Gateways:**](api-management-gateways-overview.md) classic, v2, consumption, self-hosted, workspace
87+
88+
### Usage notes
89+
90+
* The policy runs on a concatenation of all text content in a completion or chat completion request.
91+
* If the request exceeds the character limit of Azure AI Content Safety, a `403` error is returned.
92+
* This policy can be used multiple times per policy definition.
93+
94+
## Example
95+
96+
The following example enforces content safety checks on LLM requests using the Azure AI Content Safety service. The policy blocks requests that contain speech in the `Hate` or `Violence` category with a severity level of 4 or higher. The `shield-prompt` attribute is set to `true` to check for adversarial attacks.
97+
98+
```xml
99+
<policies>
100+
<inbound>
101+
<llm-content-safety backend-id="content-safety-backend" shield-prompt="true">
102+
<categories output-type="EightSeverityLevels">
103+
<category name="Hate" threshold="4" />
104+
<category name="Violence" threshold="4" />
105+
</categories>
106+
</llm-content-safety>
107+
</inbound>
108+
</policies>
109+
110+
```
111+
112+
## Related policies
113+
114+
* [Content validation](api-management-policies.md#content-validation)
115+
* [llm-token-limit](llm-token-limit-policy.md) policy
116+
* [llm-emit-token-metric](llm-emit-token-metric-policy.md) policy
117+
118+
[!INCLUDE [api-management-policy-ref-next-steps](../../includes/api-management-policy-ref-next-steps.md)]

articles/app-service/app-service-undelete.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,25 @@ ms.date: 10/4/2023
77
ms.topic: article
88
ms.custom: devx-track-azurepowershell
99
---
10+
# Restore deleted App Service app
1011

11-
# Restore Deleted App Service App Using PowerShell
12+
If you happened to accidentally delete your app in Azure App Service, you can now restore it by using the Azure portal or PowerShell.
1213

13-
If you happened to accidentally delete your app in Azure App Service, you can restore it using the commands from the [Az PowerShell module](/powershell/azure/).
14+
## Restore deleted App Service app by using the portal
15+
16+
If you deleted your app in Azure App Service, you can now restore it from the portal by using following steps:
17+
18+
1. Navigate to App Services in the portal.
19+
1. Click on **Manage Deleted Apps**.
20+
1. Select **Subscription**.
21+
1. From the dropdown, select the deleted app. Apps deleted in last 30 days will show up in the drop down list.
22+
1. Select destination app from the dropdown where you want to restore your app.
23+
1. If you would like to restore the deleted app to a slot of destination app, check the slot checkbox and select available slots from the dropdown.
24+
1. By default only app content is restored. If you want app configuration also to be restored, check **Restore App configuration**.
25+
26+
## Restore deleted App Service app by using PowerShell
27+
28+
If you deleted your app in Azure App Service, you can restore it using the commands from the [Az PowerShell module](/powershell/azure/).
1429

1530
> [!NOTE]
1631
> - Deleted apps are purged from the system 30 days after the initial deletion. After an app is purged, it can't be recovered.

0 commit comments

Comments
 (0)