Skip to content

Commit 706f99d

Browse files
authored
Merge branch 'MicrosoftDocs:main' into main
2 parents bbe0f94 + 4252cc7 commit 706f99d

File tree

82 files changed

+1280
-1110
lines changed

Some content is hidden

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

82 files changed

+1280
-1110
lines changed

articles/active-directory-b2c/partner-haventec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,5 @@ For the following instructions, Haventec is a new OIDC identity provider in the
131131

132132
## Next steps
133133

134-
* Go to docs.haventec.com for [Haventec Documentation](https://docs.haventec.com/)
134+
* Go to docs.haventec.com for [Haventec Documentation](https://www.haventec.com/)
135135
* [Azure AD B2C custom policy overview](custom-policy-overview.md)
30.5 KB
Loading
-47.3 KB
Loading
-4.93 KB
Loading
-36.5 KB
Loading
34.1 KB
Loading
-56.6 KB
Loading
46.8 KB
Loading

articles/api-management/visual-studio-code-tutorial.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.service: azure-api-management
55
author: dlepow
66
ms.author: danlep
77
ms.topic: tutorial
8-
ms.date: 10/17/2023
8+
ms.date: 11/19/2024
99
ms.custom: devdivchpfy22
1010
---
1111

@@ -35,24 +35,24 @@ For an introduction to more API Management features, see the API Management tuto
3535

3636
## Import an API
3737

38-
The following example imports an OpenAPI Specification in JSON format into API Management. Microsoft provides the backend API used in this example, and hosts it on Azure at `https://conferenceapi.azurewebsites.net`.
38+
The following example imports an OpenAPI Specification in JSON format into API Management. For this example, you import the open source [Petstore API](https://petstore.swagger.io/).
3939

4040
1. In Visual Studio Code, select the Azure icon from the Activity Bar.
4141
1. In the Explorer pane, expand the API Management instance you created.
4242
1. Right-click **APIs**, and select **Import from OpenAPI Link**.
4343
1. When prompted, enter the following values:
44-
1. An **OpenAPI link** for content in JSON format. For this example: `https://conferenceapi.azurewebsites.net?format=json`.
44+
1. An **OpenAPI link** for content in JSON format. For this example: `https://petstore.swagger.io/v2/swagger.json`.
4545

46-
This file specifies the backend service that implements the example API, in this case `https://conferenceapi.azurewebsites.net`. API Management forwards requests to this web service.
47-
1. An **API name**, such as *demo-conference-api*, that is unique in the API Management instance. This name can contain only letters, number, and hyphens. The first and last characters must be alphanumeric. This name is used in the path to call the API.
46+
This file specifies the backend service that implements the example API and the operations it supports.
47+
1. An **API name**, such as *petstore*, that is unique in the API Management instance. This name can contain only letters, number, and hyphens. The first and last characters must be alphanumeric. This name is used in the path to call the API.
4848

4949
After the API is imported successfully, it appears in the Explorer pane, and available API operations appear under the **Operations** node.
5050

5151
:::image type="content" source="media/visual-studio-code-tutorial/tutorial-api-operations.png" alt-text="Screenshot of imported API in Explorer pane.":::
5252

5353
## Edit the API
5454

55-
You can edit the API in Visual Studio Code. For example, edit the Resource Manager JSON description of the API in the editor window to remove the **http** protocol used to access the API.
55+
You can edit the API in Visual Studio Code. For example, edit the Resource Manager JSON description of the API in the editor window to remove the **http** protocol used to access the API, which is highlighted in the following snip:
5656

5757
:::image type="content" source="media/visual-studio-code-tutorial/import-demo-api.png" alt-text="Screenshot of editing JSON description in Visual Studio Code.":::
5858

@@ -62,28 +62,32 @@ To edit the OpenAPI format, right-click the API name in the Explorer pane and se
6262

6363
API Management provides [policies](api-management-policies.md) that you can configure for your APIs. Policies are a collection of statements. These statements are run sequentially on the request or response of an API. Policies can be global, which apply to all APIs in your API Management instance, or specific to a product, an API, or an API operation.
6464

65-
This section shows how to apply common outbound policies to your API that transform the API response. The policies in this example change response headers and hide original backend URLs that appear in the response body.
65+
This section shows how to apply common inbound and outbound policies to your API.
6666

67-
1. In the Explorer pane, select **Policy** under the *demo-conference-api* that you imported. The policy file opens in the editor window. This file configures policies for all operations in the API.
67+
1. In the Explorer pane, select **Policy** under the *petstore* API that you imported. The policy file opens in the editor window. This file configures policies for all operations in the API.
6868

69-
1. Update the file with the following content in the `<outbound>` element:
69+
1. Update the file with the following content:
7070
```xml
71-
[...]
72-
<outbound>
73-
<set-header name="Custom" exists-action="override">
74-
<value>"My custom value"</value>
75-
</set-header>
76-
<set-header name="X-Powered-By" exists-action="delete" />
77-
<redirect-content-urls />
78-
<base />
79-
</outbound>
80-
[...]
71+
<policies>
72+
<inbound>
73+
<rate-limit calls="3" renewal-period="15" />
74+
<base />
75+
</inbound>
76+
<outbound>
77+
<set-header name="Custom" exists-action="override">
78+
<value>"My custom value"</value>
79+
</set-header>
80+
<base />
81+
</outbound>
82+
<on-error>
83+
<base />
84+
</on-error>
85+
</policies>
8186
```
8287

83-
* The first `set-header` policy adds a custom response header for demonstration purposes.
84-
* The second `set-header` policy deletes the **X-Powered-By** header, if it exists. This header can reveal the application framework used in the API backend, and publishers often remove it.
85-
* The `redirect-content-urls` policy rewrites (masks) links in the response body so that they point to the equivalent links via the API Management gateway.
86-
88+
* The `rate-limit` policy in the `inbound` section limits the number of calls to the API to 3 every 15 seconds.
89+
* The `set-header` policy in the `outbound` section adds a custom response header for demonstration purposes.
90+
8791
1. Save the file. If you're prompted, select **Upload** to upload the file to the cloud.
8892

8993
## Test the API
@@ -104,8 +108,9 @@ You need a subscription key for your API Management instance to test the importe
104108

105109
### Test an API operation
106110

107-
1. In the Explorer pane, expand the **Operations** node under the *demo-conference-api* that you imported.
108-
1. Select an operation such as *GetSpeakers*, and then right-click the operation and select **Test Operation**.
111+
1. In the Explorer pane, expand the **Operations** node under the *petstore* API that you imported.
112+
1. Select an operation such as *[GET] Find pet by ID*, and then right-click the operation and select **Test Operation**.
113+
1. In the editor window, substitute `5` for the `petId` parameter in the request URL.
109114
1. In the editor window, next to **Ocp-Apim-Subscription-Key**, replace `{{SubscriptionKey}}` with the subscription key that you copied.
110115
1. Select **Send request**.
111116

@@ -115,11 +120,11 @@ When the request succeeds, the backend responds with **200 OK** and some data.
115120

116121
:::image type="content" source="media/visual-studio-code-tutorial/test-api-policies.png" alt-text="Screenshot of the API test response in Visual Studio Code.":::
117122

118-
Notice the following details in the response:
123+
Notice the following detail in the response:
124+
125+
* The `Custom` header is added to the response.
119126

120-
* The **Custom** header is added to the response.
121-
* The **X-Powered-By** header doesn't appear in the response.
122-
* URLs to the API backend are redirected to the API Management gateway, in this case `https://apim-hello-world.azure-api.net/demo-conference-api`.
127+
Now test the rate limiting policy. Select **Send request** several times in a row. After sending too many requests in the configured period, you get the `429 Too Many Requests` response.
123128

124129
### Trace request processing
125130

articles/app-service/configure-basic-auth-disable.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The following table shows how various deployment methods behave when basic authe
6868
| Visual Studio deployment | Doesn't work. |
6969
| [FTP](deploy-ftp.md) | Doesn't work. |
7070
| [Local Git](deploy-local-git.md) | Doesn't work. |
71-
| Azure CLI | In Azure CLI 2.48.1 or higher, the following commands fall back to Microsoft Entra authentication:<br/>- [az webapp up](/cli/azure/webapp#az-webapp-up)<br/>- [az webapp deploy](/cli/azure/webapp#az-webapp-deploy)<br/>- [az webapp deployment source config-zip](/cli/azure/webapp/deployment/source#az-webapp-deployment-source-config-zip)<br/>- [az webapp log deployment show](/cli/azure/webapp/log/deployment#az-webapp-log-deployment-show)<br/>- [az webapp log deployment list](/cli/azure/webapp/log/deployment#az-webapp-log-deployment-list)<br/>- [az webapp log download](/cli/azure/webapp/log#az-webapp-log-download)<br/>- [az webapp log tail](/cli/azure/webapp/log#az-webapp-log-tail)<br/>- [az webapp browse](/cli/azure/webapp#az-webapp-browse)<br/>- [az webapp create-remote-connection](/cli/azure/webapp#az-webapp-create-remote-connection)<br/>- [az webapp ssh](/cli/azure/webapp#az-webapp-ssh)<br/>- [az functionapp deploy](/cli/azure/functionapp#az-functionapp-deploy)<br/>- [az functionapp log deployment list](/cli/azure/functionapp/log/deployment#az-functionapp-log-deployment-list)<br/>- [az functionapp log deployment show](/cli/azure/functionapp/log/deployment#az-functionapp-log-deployment-show)<br/>- [az functionapp deployment source config-zip](/cli/azure/functionapp/deployment/source#az-functionapp-deployment-source-config-zip) |
71+
| Azure CLI | In Azure CLI 2.48.1 or higher, the following commands fall back to Microsoft Entra authentication:<br/>- [az webapp up](/cli/azure/webapp#az-webapp-up)<br/>- [az webapp deploy](/cli/azure/webapp#az-webapp-deploy)<br/>- [az webapp log deployment show](/cli/azure/webapp/log/deployment#az-webapp-log-deployment-show)<br/>- [az webapp log deployment list](/cli/azure/webapp/log/deployment#az-webapp-log-deployment-list)<br/>- [az webapp log download](/cli/azure/webapp/log#az-webapp-log-download)<br/>- [az webapp log tail](/cli/azure/webapp/log#az-webapp-log-tail)<br/>- [az webapp browse](/cli/azure/webapp#az-webapp-browse)<br/>- [az webapp create-remote-connection](/cli/azure/webapp#az-webapp-create-remote-connection)<br/>- [az webapp ssh](/cli/azure/webapp#az-webapp-ssh)<br/>- [az functionapp deploy](/cli/azure/functionapp#az-functionapp-deploy)<br/>- [az functionapp log deployment list](/cli/azure/functionapp/log/deployment#az-functionapp-log-deployment-list)<br/>- [az functionapp log deployment show](/cli/azure/functionapp/log/deployment#az-functionapp-log-deployment-show)<br/>- [az functionapp deployment source config-zip](/cli/azure/functionapp/deployment/source#az-functionapp-deployment-source-config-zip) |
7272
| [Maven plugin](https://github.com/microsoft/azure-maven-plugins) or [Gradle plugin](https://github.com/microsoft/azure-gradle-plugins) | Works. |
7373
| [GitHub with App Service Build Service](deploy-continuous-deployment.md?tabs=github) | Doesn't work. |
7474
| [GitHub Actions](deploy-continuous-deployment.md?tabs=github) | - An existing GitHub Actions workflow that uses **basic authentication** can't authenticate. In the Deployment Center, disconnect the existing GitHub configuration and create a new GitHub Actions configuration with the **user-assigned identity** option instead. <br/> - If the existing GitHub Actions deployment is [manually configured](deploy-github-actions.md), try using a service principal or OpenID Connect instead. <br/> - For new GitHub Actions configuration in the Deployment Center, use the **user-assigned identity** option. |

0 commit comments

Comments
 (0)