@@ -32,10 +32,13 @@ def convert_status(status, ll=False):
32
32
class TranslationGlossary (object ): # pylint: disable=useless-object-inheritance
33
33
"""Glossary / translation memory to apply to the translation.
34
34
35
- :param str glossary_url: Required. Location of the glossary file. This should be a SAS URL to
36
- the glossary file in the storage blob container. If the translation language pair is
37
- not present in the glossary, it will not be applied. See the service documentation for the
38
- supported SAS permissions: https://aka.ms/azsdk/documenttranslation/sas-permissions
35
+ :param str glossary_url: Required. Location of the glossary file. This should be a URL to
36
+ the glossary file in the storage blob container. The URL can be a SAS URL (see the
37
+ service documentation for the supported SAS permissions for accessing storage
38
+ containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions) or a managed identity
39
+ can be created and used to access documents in your storage account
40
+ (see https://aka.ms/azsdk/documenttranslation/managed-identity). Note that if the translation
41
+ language pair is not present in the glossary, it will not be applied.
39
42
:param str file_format: Required. Format of the glossary file. To see supported formats,
40
43
call the :func:`~DocumentTranslationClient.get_supported_glossary_formats()` client method.
41
44
:keyword str format_version: File format version. If not specified, the service will
@@ -44,10 +47,13 @@ class TranslationGlossary(object): # pylint: disable=useless-object-inheritance
44
47
:keyword str storage_source: Storage Source. Default value: "AzureBlob".
45
48
Currently only "AzureBlob" is supported.
46
49
47
- :ivar str glossary_url: Required. Location of the glossary file. This should be a SAS URL to
48
- the glossary file in the storage blob container. If the translation language pair is
49
- not present in the glossary, it will not be applied. See the service documentation for the
50
- supported SAS permissions: https://aka.ms/azsdk/documenttranslation/sas-permissions
50
+ :ivar str glossary_url: Required. Location of the glossary file. This should be a URL to
51
+ the glossary file in the storage blob container. The URL can be a SAS URL (see the
52
+ service documentation for the supported SAS permissions for accessing storage
53
+ containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions) or a managed identity
54
+ can be created and used to access documents in your storage account
55
+ (see https://aka.ms/azsdk/documenttranslation/managed-identity). Note that if the translation
56
+ language pair is not present in the glossary, it will not be applied.
51
57
:ivar str file_format: Required. Format of the glossary file. To see supported formats,
52
58
call the :func:`~DocumentTranslationClient.get_supported_glossary_formats()` client method.
53
59
:ivar str format_version: File format version. If not specified, the service will
@@ -95,9 +101,10 @@ class TranslationTarget(object): # pylint: disable=useless-object-inheritance
95
101
"""Destination for the finished translated documents.
96
102
97
103
:param str target_url: Required. The target location for your translated documents.
98
- This should be a container SAS URL to your target container/blob. See the service
99
- documentation for the supported SAS permissions for accessing
100
- target storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions
104
+ This can be a SAS URL (see the service documentation for the supported SAS permissions
105
+ for accessing target storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions)
106
+ or a managed identity can be created and used to access documents in your storage account
107
+ (see https://aka.ms/azsdk/documenttranslation/managed-identity).
101
108
:param str language_code: Required. Target Language Code. This is the language
102
109
you want your documents to be translated to. See supported languages here:
103
110
https://docs.microsoft.com/azure/cognitive-services/translator/language-support#translate
@@ -108,9 +115,10 @@ class TranslationTarget(object): # pylint: disable=useless-object-inheritance
108
115
Currently only "AzureBlob" is supported.
109
116
110
117
:ivar str target_url: Required. The target location for your translated documents.
111
- This should be a container SAS URL to your target container/blob. See the service
112
- documentation for the supported SAS permissions for accessing
113
- target storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions
118
+ This can be a SAS URL (see the service documentation for the supported SAS permissions
119
+ for accessing target storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions)
120
+ or a managed identity can be created and used to access documents in your storage account
121
+ (see https://aka.ms/azsdk/documenttranslation/managed-identity).
114
122
:ivar str language_code: Required. Target Language Code. This is the language
115
123
you want your documents to be translated to. See supported languages here:
116
124
https://docs.microsoft.com/azure/cognitive-services/translator/language-support#translate
@@ -165,13 +173,15 @@ def __repr__(self):
165
173
class DocumentTranslationInput (object ): # pylint: disable=useless-object-inheritance
166
174
# pylint: disable=C0301
167
175
"""Input for translation. This requires that you have your source document or
168
- documents in an Azure Blob Storage container. Provide a SAS URL to the source file or
176
+ documents in an Azure Blob Storage container. Provide a URL to the source file or
169
177
source container containing the documents for translation. The source document(s) are
170
178
translated and written to the location provided by the TranslationTargets.
171
179
172
180
:param str source_url: Required. Location of the folder / container or single file with your
173
- documents. See the service documentation for the supported SAS permissions for accessing
174
- source storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions
181
+ documents. This can be a SAS URL (see the service documentation for the supported SAS permissions
182
+ for accessing source storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions)
183
+ or a managed identity can be created and used to access documents in your storage account
184
+ (see https://aka.ms/azsdk/documenttranslation/managed-identity).
175
185
:param targets: Required. Location of the destination for the output. This is a list of
176
186
TranslationTargets. Note that a TranslationTarget is required for each language code specified.
177
187
:type targets: list[~azure.ai.translation.document.TranslationTarget]
@@ -189,8 +199,10 @@ class DocumentTranslationInput(object): # pylint: disable=useless-object-inheri
189
199
Currently only "AzureBlob" is supported.
190
200
191
201
:ivar str source_url: Required. Location of the folder / container or single file with your
192
- documents. See the service documentation for the supported SAS permissions for accessing
193
- source storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions
202
+ documents. This can be a SAS URL (see the service documentation for the supported SAS permissions
203
+ for accessing source storage containers/blobs: https://aka.ms/azsdk/documenttranslation/sas-permissions)
204
+ or a managed identity can be created and used to access documents in your storage account
205
+ (see https://aka.ms/azsdk/documenttranslation/managed-identity).
194
206
:ivar targets: Required. Location of the destination for the output. This is a list of
195
207
TranslationTargets. Note that a TranslationTarget is required for each language code specified.
196
208
:vartype targets: list[~azure.ai.translation.document.TranslationTarget]
0 commit comments