-
Notifications
You must be signed in to change notification settings - Fork 21.1k
/
create-translator-resource.yml
156 lines (132 loc) · 8.44 KB
/
create-translator-resource.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
### YamlMime:HowTo
metadata:
title: Create a Translator resource
titleSuffix: Azure AI services
description: Learn how to create an Azure AI Translator resource and retrieve your API key and endpoint URL in the Azure portal.
author: laujan
ms.author: lajanuar
manager: nitinme
ms.date: 06/06/2024
ms.service: azure-ai-translator
ms.topic: how-to
ms.custom:
- ge-structured-content-pilot
title: |
Create a Translator resource
introduction: |
In this article, you learn how to create a Translator resource in the Azure portal. [Azure AI Translator](translator-overview.md) is a cloud-based machine translation service that is part of the [Azure AI services](../what-are-ai-services.md) family. Azure resources are instances of services that you create. All API requests to Azure AI services require an *endpoint* URL and a read-only *key* for authenticating access.
prerequisites:
summary: |
To get started, you need an active [**Azure account**](https://azure.microsoft.com/free/cognitive-services/). If you don't have one, you can [**create a free 12-month subscription**](https://azure.microsoft.com/free/).
procedureSection:
- title: |
Create your resource
summary: |
With your Azure account, you can access the Translator service through two different resource types:
steps:
- |
[**Single-service**](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) resource types enable access to a single service API key and endpoint. ***Document Translation is only supported in the single-service resources type***.
- |
[**Multi-service**](https://portal.azure.com/#create/Microsoft.CognitiveServicesAllInOne) resource types enable access to multiple Azure AI services by using a single API key and endpoint. Document Translation is not supported in the multi-service resource type.
- title:
Complete your project and instance details
summary: |
After you decide which resource type you want use to access the Translator service, you can enter the details for your project and instance.
steps:
- |
**Subscription**. Select one of your available Azure subscriptions.
- |
**Resource Group**. You can create a new resource group or add your resource to a pre-existing resource group that shares the same lifecycle, permissions, and policies.
- |
**Resource Region**. Choose **Global** unless your business or application requires a specific region. If you're planning on using the Document Translation feature with [managed identity authorization](document-translation/how-to-guides/create-use-managed-identities.md), choose a geographic region such as **East US**.
- |
**Name**. Enter a name for your resource. The name you choose must be unique within Azure.
> [!NOTE]
> If you're using a Translator feature that requires a custom domain endpoint, such as Document Translation, the value that you enter in the Name field will be the custom domain name parameter for the endpoint.
- |
**Pricing tier**. Select a [pricing tier](https://azure.microsoft.com/pricing/details/cognitive-services/translator) that meets your needs:
* Each subscription has a free tier.
* The free tier has the same features and functionality as the paid plans and doesn't expire.
* Only one free tier resource is available per subscription.
* Document Translation is supported in paid tier only. The Language Studio supports the S1 and D3 instance tiers. If you just want to try Document Translation, select the Standard S1 instance tier.
- |
If you create a multi-service resource, the links at the bottom of the **Basics** tab provide technical documentation regarding the appropriate operation of the service.
- |
Select **Review + Create**.
- |
Review the service terms, and select **Create** to deploy your resource.
- |
After your resource has successfully deployed, select **Go to resource**.
### Authentication keys and endpoint URL
All Azure AI services API requests require an endpoint URL and a read-only key for authentication.
* **Authentication keys**. Your key is a unique string that is passed on every request to the Translation service. You can pass your key through a query-string parameter or by specifying it in the HTTP request header.
* **Endpoint URL**. Use the Global endpoint in your API request unless you need a specific Azure region or custom endpoint. For more information, see [Base URLs](reference/v3-0-reference.md#base-urls). The Global endpoint URL is `api.cognitive.microsofttranslator.com`.
- title: |
Get your authentication keys and endpoint
summary: |
To authenticate your connection to your Translator resource, you need to find its keys and endpoint.
steps:
- |
After your new resource deploys, select **Go to resource** or go to your resource page.
- |
In the left navigation pane, under **Resource Management**, select **Keys and Endpoint**.
- |
Copy and paste your keys and endpoint URL in a convenient location, such as Notepad.
:::image type="content" source="media/keys-and-endpoint-resource.png" alt-text="Screenshot of the Azure portal showing the Keys and Endpoint page of a Translator resource. The keys and endpoints are highlighted.":::
- title: |
Create a Text Translation client
summary: |
Text Translation supports both [global and regional endpoints](#complete-your-project-and-instance-details). Once you have your [authentication keys](#authentication-keys-and-endpoint-url), you need to create an instance of the `TextTranslationClient`, using an `AzureKeyCredential` for authentication, to interact with the Text Translation service:
steps:
- |
To create a `TextTranslationClient` using a global resource endpoint, you need your resource **API key**:
```bash
AzureKeyCredential credential = new('<apiKey>');
TextTranslationClient client = new(credential);
```
- |
To create a `TextTranslationClient` using a regional resource endpoint, you need your resource **API key** and the name of the **region** where your resource is located:
```bash
AzureKeyCredential credential = new('<apiKey>');
TextTranslationClient client = new(credential, '<region>');
```
- title: |
Create a Document Translation client
summary: |
Use the Document Translation API to asynchronously translate large volumes of text and multiple documents across languages. The batch translation process requires an Azure Blob storage account with storage containers for your source and translated documents.
steps:
- |
Document Translation is currently supported in the Translator (single-service) resource using S1 Standard Service Plan (Pay-as-you-go) or in the D3 Volume Discount Plan.
- |
"For more information on creating a Translator resource for Document Translation, see [Prerequisites: Use Document Translation](document-translation/how-to-guides/use-rest-api-programmatically.md#prerequisites)".
- title: |
How to delete a resource or resource group
summary: |
> [!WARNING]
>
> Deleting a resource group also deletes all resources contained in the group.
To delete the resource:
1. Search and select ***Resource groups*** in the Azure portal, and select your resource group.
2. Select the resources to be deleted by selecting the adjacent check box.
3. Select ***Delete*** from the top menu near the right edge.
4. Enter **delete** in the ***Delete Resources*** dialog box.
5. Select ***Delete***.
To delete the resource group:
steps:
- |
Go to your Resource Group in the Azure portal.
- |
Select **Delete resource group** from the top menu bar.
- |
Confirm the deletion request by entering the resource group name and selecting **Delete**.
nextStep:
text: Get started with Translator.
url: quickstart-text-rest-api.md
# - text: Get started with Translator
# url: quickstart-text-rest-api.md
# - text: Microsoft Translator code samples
# url: https://github.com/MicrosoftTranslator
# - text: Microsoft Translator Support Forum
# url: https://www.aka.ms/TranslatorForum
#- text: Get Started with Azure (3-minute video)
# url: https://azure.microsoft.com/get-started/?b=16.24