Skip to content

Commit 971148a

Browse files
Merge pull request #235137 from laujan/85965-update-firewall-settings-page
update firewall settings
2 parents 6a4a4ac + ca7b8cd commit 971148a

File tree

5 files changed

+51
-13
lines changed

5 files changed

+51
-13
lines changed

articles/cognitive-services/Translator/firewalls.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,33 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: translator-text
1010
ms.topic: conceptual
11-
ms.date: 12/06/2021
11+
ms.date: 04/19/2023
1212
ms.author: lajanuar
1313
---
1414

15-
# How to translate behind IP firewalls with Translator
15+
# Use Translator behind firewalls
1616

17-
Translator can translate behind firewalls using either domain-name or IP filtering. Domain-name filtering is the preferred method. If you still require IP filtering, we suggest you to get the [IP addresses details using service tag](../../virtual-network/service-tags-overview.md#service-tags-on-premises). Translator is under the **CognitiveServicesManagement** service tag.
17+
Translator can translate behind firewalls using either [Domain-name](../../firewall/dns-settings.md#configure-dns-proxy---azure-portal) or [IP filtering](#configure-firewall). Domain-name filtering is the preferred method.
1818

19-
We **do not recommend** running Microsoft Translator from behind a specific IP filtered firewall. The setup is likely to break in the future without notice.
19+
If you still require IP filtering, you can get the [IP addresses details using service tag](../../virtual-network/service-tags-overview.md#discover-service-tags-by-using-downloadable-json-files). Translator is under the **CognitiveServicesManagement** service tag.
20+
21+
## Configure firewall
22+
23+
Navigate to your Translator resource in the Azure portal.
24+
25+
1. Select **Networking** from the **Resource Management** section.
26+
1. Under the **Firewalls and virtual networks** tab, choose **Selected Networks and Private Endpoints**.
27+
28+
:::image type="content" source="media/firewall-setting-azure-portal.png" alt-text="Screenshot of the firewall setting in the Azure portal.":::
29+
30+
> [!NOTE]
31+
>
32+
> * Once you enable **Selected Networks and Private Endpoints**, you must use the **Virtual Network** endpoint to call the Translator. You can't use the standard translator endpoint (`api.cognitive.microsofttranslator.com`) and you can't authenticate with an access token.
33+
> * For more information, *see* [**Virtual Network Support**](reference/v3-0-reference.md#virtual-network-support).
34+
35+
1. To grant access to an internet IP range, enter the IP address or address range (in [CIDR format](https://tools.ietf.org/html/rfc4632)) under **Firewall** > **Address Range**. Only valid public IP (`non-reserved`) addresses are accepted.
36+
37+
Running Microsoft Translator from behind a specific IP filtered firewall is **not recommended**. The setup is likely to break in the future without notice.
2038

2139
The IP addresses for Translator geographical endpoints as of September 21, 2021 are:
2240

@@ -25,3 +43,9 @@ The IP addresses for Translator geographical endpoints as of September 21, 2021
2543
|United States|api-nam.cognitive.microsofttranslator.com|20.42.6.144, 20.49.96.128, 40.80.190.224, 40.64.128.192|
2644
|Europe|api-eur.cognitive.microsofttranslator.com|20.50.1.16, 20.38.87.129|
2745
|Asia Pacific|api-apc.cognitive.microsofttranslator.com|40.80.170.160, 20.43.132.96, 20.37.196.160, 20.43.66.16|
46+
47+
## Next steps
48+
49+
[**Translator virtual network support**](reference/v3-0-reference.md#virtual-network-support)
50+
51+
[**Configure virtual networks**](../cognitive-services-virtual-networks.md#grant-access-from-an-internet-ip-range)
240 KB
Loading
127 KB
Loading
240 KB
Loading

articles/cognitive-services/Translator/reference/v3-0-reference.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: translator-text
1010
ms.topic: reference
11-
ms.date: 12/06/2021
11+
ms.date: 04/20/2023
1212
ms.author: lajanuar
1313
---
1414

@@ -28,16 +28,16 @@ Version 3 of the Translator provides a modern JSON-based Web API. It improves us
2828

2929
Requests to Translator are, in most cases, handled by the datacenter that is closest to where the request originated. If there's a datacenter failure when using the global endpoint, the request may be routed outside of the geography.
3030

31-
To force the request to be handled within a specific geography, use the desired geographical endpoint. All requests are processed among the datacenters within the geography.
31+
To force the request to be handled within a specific geography, use the desired geographical endpoint. All requests are processed among the datacenters within the geography.
3232

3333
|Geography|Base URL (geographical endpoint)|Datacenters|
3434
|:--|:--|:--|
35-
|Global (non-regional)| api.cognitive.microsofttranslator.com|Closest available datacenter|
35+
|Global (`non-regional`)| api.cognitive.microsofttranslator.com|Closest available datacenter|
3636
|Asia Pacific| api-apc.cognitive.microsofttranslator.com|Korea South, Japan East, Southeast Asia, and Australia East|
3737
|Europe| api-eur.cognitive.microsofttranslator.com|North Europe, West Europe|
3838
|United States| api-nam.cognitive.microsofttranslator.com|East US, South Central US, West Central US, and West US 2|
3939

40-
<sup>1</sup> Customers with a resource located in Switzerland North or Switzerland West can ensure that their Text API requests are served within Switzerland. To ensure that requests are handled in Switzerland, create the Translator resource in the 'Resource region' 'Switzerland North' or 'Switzerland West', then use the resource's custom endpoint in your API requests. For example: If you create a Translator resource in Azure portal with 'Resource region' as 'Switzerland North' and your resource name is 'my-swiss-n', then your custom endpoint is "https://my-swiss-n.cognitiveservices.azure.com". And a sample request to translate is:
40+
<sup>`1`</sup> Customers with a resource located in Switzerland North or Switzerland West can ensure that their Text API requests are served within Switzerland. To ensure that requests are handled in Switzerland, create the Translator resource in the 'Resource region' 'Switzerland North' or 'Switzerland West', then use the resource's custom endpoint in your API requests. For example: If you create a Translator resource in Azure portal with 'Resource region' as 'Switzerland North' and your resource name is 'my-swiss-n', then your custom endpoint is "https://my-swiss-n.cognitiveservices.azure.com". And a sample request to translate is:
4141
```curl
4242
// Pass secret key and region using headers to a custom endpoint
4343
curl -X POST "https://my-swiss-n.cognitiveservices.azure.com/translator/text/v3.0/translate?to=fr" \
@@ -46,7 +46,7 @@ curl -X POST "https://my-swiss-n.cognitiveservices.azure.com/translator/text/v3.
4646
-H "Content-Type: application/json" \
4747
-d "[{'Text':'Hello'}]" -v
4848
```
49-
<sup>2</sup> Custom Translator isn't currently available in Switzerland.
49+
<sup>`2`</sup> Custom Translator isn't currently available in Switzerland.
5050

5151
## Authentication
5252

@@ -60,7 +60,8 @@ There are three headers that you can use to authenticate your subscription. This
6060
|Authorization|*Use with Cognitive Services subscription if you're passing an authentication token.*<br/>The value is the Bearer token: `Bearer <token>`.|
6161
|Ocp-Apim-Subscription-Region|*Use with Cognitive Services multi-service and regional translator resource.*<br/>The value is the region of the multi-service or regional translator resource. This value is optional when using a global translator resource.|
6262

63-
### Secret key
63+
### Secret key
64+
6465
The first option is to authenticate using the `Ocp-Apim-Subscription-Key` header. Add the `Ocp-Apim-Subscription-Key: <YOUR_SECRET_KEY>` header to your request.
6566

6667
#### Authenticating with a global resource
@@ -170,7 +171,7 @@ An authentication token is valid for 10 minutes. The token should be reused when
170171
|:-----|:----|
171172
|Authorization| The value is an access **bearer token** generated by Azure AD.</br><ul><li> The bearer token provides proof of authentication and validates the client's authorization to use the resource.</li><li> An authentication token is valid for 10 minutes and should be reused when making multiple calls to Translator.</br></li>*See* [Sample request: 2. Get a token](../../authentication.md?tabs=powershell#sample-request)</ul>|
172173
|Ocp-Apim-Subscription-Region| The value is the region of the **translator resource**.</br><ul><li> This value is optional if the resource is global.</li></ul>|
173-
|Ocp-Apim-ResourceId| The value is the Resource ID for your Translator resource instance.</br><ul><li>You'll find the Resource ID in the Azure portal at **Translator Resource → Properties**. </li><li>Resource ID format: </br>/subscriptions/<**subscriptionId**>/resourceGroups/<**resourceGroupName**>/providers/Microsoft.CognitiveServices/accounts/<**resourceName**>/</li></ul>|
174+
|Ocp-Apim-ResourceId| The value is the Resource ID for your Translator resource instance.</br><ul><li>You find the Resource ID in the Azure portal at **Translator Resource → Properties**. </li><li>Resource ID format: </br>/subscriptions/<**subscriptionId**>/resourceGroups/<**resourceGroupName**>/providers/Microsoft.CognitiveServices/accounts/<**resourceName**>/</li></ul>|
174175

175176
##### **Translator property page—Azure portal**
176177

@@ -238,6 +239,19 @@ Once you turn on this capability, you must use the custom endpoint to call the T
238239

239240
You can find the custom endpoint after you create a [translator resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) and allow access from selected networks and private endpoints.
240241

242+
1. Navigate to your Translator resource in the Azure portal.
243+
1. Select **Networking** from the **Resource Management** section.
244+
1. Under the **Firewalls and virtual networks** tab, choose **Selected Networks and Private Endpoints**.
245+
246+
:::image type="content" source="../media/virtual-network-setting-azure-portal.png" alt-text="Screenshot of the virtual network setting in the Azure portal.":::
247+
248+
1. Select **Save** to apply your changes.
249+
1. Select **Keys and Endpoint** from the **Resource Management** section.
250+
1. Select the **Virtual Network** tab.
251+
1. Listed there are the endpoints for Text Translation and Document Translation.
252+
253+
:::image type="content" source="../media/virtual-network-endpoint.png" alt-text="Screenshot of the virtual network endpoint.":::
254+
241255
|Headers|Description|
242256
|:-----|:----|
243257
|Ocp-Apim-Subscription-Key| The value is the Azure secret key for your subscription to Translator.|
@@ -258,8 +272,8 @@ curl -X POST "https://<your-custom-domain>.cognitiveservices.azure.com/translato
258272

259273
A standard error response is a JSON object with name/value pair named `error`. The value is also a JSON object with properties:
260274

261-
* `code`: A server-defined error code.
262-
* `message`: A string giving a human-readable representation of the error.
275+
* `code`: A server-defined error code.
276+
* `message`: A string giving a human-readable representation of the error.
263277

264278
For example, a customer with a free trial subscription would receive the following error once the free quota is exhausted:
265279

0 commit comments

Comments
 (0)