-
Notifications
You must be signed in to change notification settings - Fork 259
Expand file tree
/
Copy pathazure.ai.formrecognizer.DocumentModelAdministrationClient.yml
More file actions
377 lines (318 loc) · 14.1 KB
/
azure.ai.formrecognizer.DocumentModelAdministrationClient.yml
File metadata and controls
377 lines (318 loc) · 14.1 KB
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
### YamlMime:PythonClass
uid: azure.ai.formrecognizer.DocumentModelAdministrationClient
name: DocumentModelAdministrationClient
fullName: azure.ai.formrecognizer.DocumentModelAdministrationClient
module: azure.ai.formrecognizer
inheritances:
- azure.ai.formrecognizer._form_base_client.FormRecognizerClientBase
summary: 'DocumentModelAdministrationClient is the Form Recognizer interface to use
for building
and managing models.
It provides methods for building models, as well as methods for viewing and deleting
models,
viewing model operations, accessing account information, copying models to another
Form Recognizer resource, and composing a new model from a collection of existing
models.
> [!NOTE]
> DocumentModelAdministrationClient should be used with API versions
>
> 2022-08-31 and up. To use API versions <=v2.1, instantiate a FormTrainingClient.
>
New in version 2022-08-31: The *DocumentModelAdministrationClient* and its client
methods.'
constructor:
syntax: 'DocumentModelAdministrationClient(endpoint: str, credential: AzureKeyCredential
| TokenCredential, **kwargs: Any)'
parameters:
- name: endpoint
description: 'Supported Cognitive Services endpoints (protocol and hostname,
for example: [https://westus2.api.cognitive.microsoft.com](https://westus2.api.cognitive.microsoft.com)).'
isRequired: true
types:
- <xref:str>
- name: credential
description: 'Credentials needed for the client to connect to Azure.
This is an instance of AzureKeyCredential if using an API key or a token
credential from <xref:azure.identity>.'
isRequired: true
types:
- <xref:azure.core.credentials.AzureKeyCredential>
- <xref:azure.core.credentials.TokenCredential>
- name: api_version
description: 'The API version of the service to use for requests. It defaults
to the latest service version.
Setting to an older version may result in reduced feature compatibility. To
use API versions
<=v2.1, instantiate a FormTrainingClient.'
types:
- <xref:str>
- <xref:azure.ai.formrecognizer.DocumentAnalysisApiVersion>
methods:
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.begin_build_document_model
name: begin_build_document_model
summary: 'Build a custom document model.
The request must include a *blob_container_url* keyword parameter that is an
externally accessible Azure storage blob container URI (preferably a Shared Access
Signature URI). Note that
a container URI (without SAS) is accepted only when the container is public or
has a managed identity
configured, see more about configuring managed identities to work with Form Recognizer
here:
[https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/managed-identities](https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/managed-identities).
Models are built using documents that are of the following content type - ''application/pdf'',
''image/jpeg'', ''image/png'', ''image/tiff'', ''image/bmp'', or ''image/heif''.
Other types of content in the container
is ignored.'
signature: 'begin_build_document_model(build_mode: str | ModelBuildMode, *, blob_container_url:
str, **kwargs: Any) -> DocumentModelAdministrationLROPoller[DocumentModelDetails]'
parameters:
- name: build_mode
description: 'The custom model build mode. Possible values include: "template",
"neural".
For more information about build modes, see: [https://aka.ms/azsdk/formrecognizer/buildmode](https://aka.ms/azsdk/formrecognizer/buildmode).'
isRequired: true
types:
- <xref:str>
- <xref:azure.ai.formrecognizer.ModelBuildMode>
- name: blob_container_url
description: 'An Azure Storage blob container''s SAS URI. A container URI (without
SAS)
can be used if the container is public or has a managed identity configured.
For more information on
setting up a training data set, see: [https://aka.ms/azsdk/formrecognizer/buildtrainingset](https://aka.ms/azsdk/formrecognizer/buildtrainingset).'
types:
- <xref:str>
- name: model_id
description: A unique ID for your model. If not specified, a model ID will be
created for you.
types:
- <xref:str>
- name: description
description: An optional description to add to the model.
types:
- <xref:str>
- name: prefix
description: 'A case-sensitive prefix string to filter documents in the blob container
url path.
For example, when using an Azure storage blob URI, use the prefix to restrict
sub folders.
*prefix* should end in ''/'' to avoid cases where filenames share the same prefix.'
types:
- <xref:str>
- name: tags
description: List of user defined key-value tag attributes associated with the
model.
types:
- <xref:dict>[<xref:str>, <xref:str>]
return:
description: 'An instance of an DocumentModelAdministrationLROPoller. Call *result()*
on the poller
object to return a <xref:azure.ai.formrecognizer.DocumentModelDetails>.'
types:
- <xref:azure.ai.formrecognizer.DocumentModelAdministrationLROPoller>[<xref:azure.ai.formrecognizer.DocumentModelDetails>]
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.begin_compose_document_model
name: begin_compose_document_model
summary: 'Creates a composed document model from a collection of existing models.
A composed model allows multiple models to be called with a single model ID. When
a document is
submitted to be analyzed with a composed model ID, a classification step is first
performed to
route it to the correct custom model.'
signature: 'begin_compose_document_model(component_model_ids: List[str], **kwargs:
Any) -> DocumentModelAdministrationLROPoller[DocumentModelDetails]'
parameters:
- name: component_model_ids
description: List of model IDs to use in the composed model.
isRequired: true
types:
- <xref:list>[<xref:str>]
- name: model_id
description: 'A unique ID for your composed model.
If not specified, a model ID will be created for you.'
types:
- <xref:str>
- name: description
description: An optional description to add to the model.
types:
- <xref:str>
- name: tags
description: List of user defined key-value tag attributes associated with the
model.
types:
- <xref:dict>[<xref:str>, <xref:str>]
return:
description: 'An instance of an DocumentModelAdministrationLROPoller. Call *result()*
on the poller
object to return a <xref:azure.ai.formrecognizer.DocumentModelDetails>.'
types:
- <xref:azure.ai.formrecognizer.DocumentModelAdministrationLROPoller>[<xref:azure.ai.formrecognizer.DocumentModelDetails>]
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.begin_copy_document_model_to
name: begin_copy_document_model_to
summary: 'Copy a document model stored in this resource (the source) to the user
specified
target Form Recognizer resource.
This should be called with the source Form Recognizer resource
(with the model that is intended to be copied). The *target* parameter should
be supplied from the
target resource''s output from calling the <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.get_copy_authorization>
method.'
signature: 'begin_copy_document_model_to(model_id: str, target: TargetAuthorization,
**kwargs: Any) -> DocumentModelAdministrationLROPoller[DocumentModelDetails]'
parameters:
- name: model_id
description: Model identifier of the model to copy to target resource.
isRequired: true
types:
- <xref:str>
- name: target
description: 'The copy authorization generated from the target resource''s call
to
<xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.get_copy_authorization>.'
isRequired: true
types:
- <xref:azure.ai.formrecognizer.TargetAuthorization>
return:
description: 'An instance of a DocumentModelAdministrationLROPoller. Call *result()*
on the poller
object to return a <xref:azure.ai.formrecognizer.DocumentModelDetails>.'
types:
- <xref:azure.ai.formrecognizer.DocumentModelAdministrationLROPoller>[<xref:azure.ai.formrecognizer.DocumentModelDetails>]
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.close
name: close
summary: Close the <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient>
session.
signature: close() -> None
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.delete_document_model
name: delete_document_model
summary: Delete a custom document model.
signature: 'delete_document_model(model_id: str, **kwargs: Any) -> None'
parameters:
- name: model_id
description: Model identifier.
isRequired: true
types:
- <xref:str>
return:
types:
- <xref:None>
exceptions:
- type: azure.core.exceptions.HttpResponseError
- type: azure.core.exceptions.ResourceNotFoundError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.get_copy_authorization
name: get_copy_authorization
summary: 'Generate authorization for copying a custom model into the target Form
Recognizer resource.
This should be called by the target resource (where the model will be copied to)
and the output can be passed as the *target* parameter into <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.begin_copy_document_model_to>.'
signature: 'get_copy_authorization(**kwargs: Any) -> TargetAuthorization'
parameters:
- name: model_id
description: 'A unique ID for your copied model.
If not specified, a model ID will be created for you.'
types:
- <xref:str>
- name: description
description: An optional description to add to the model.
types:
- <xref:str>
- name: tags
description: List of user defined key-value tag attributes associated with the
model.
types:
- <xref:dict>[<xref:str>, <xref:str>]
return:
description: A dictionary with values necessary for the copy authorization.
types:
- <xref:azure.ai.formrecognizer.TargetAuthorization>
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.get_document_analysis_client
name: get_document_analysis_client
summary: Get an instance of a DocumentAnalysisClient from DocumentModelAdministrationClient.
signature: 'get_document_analysis_client(**kwargs: Any) -> DocumentAnalysisClient'
return:
description: A DocumentAnalysisClient
types:
- <xref:azure.ai.formrecognizer.DocumentAnalysisClient>
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.get_document_model
name: get_document_model
summary: Get a document model by its ID.
signature: 'get_document_model(model_id: str, **kwargs: Any) -> DocumentModelDetails'
parameters:
- name: model_id
description: Model identifier.
isRequired: true
types:
- <xref:str>
return:
description: DocumentModelDetails
types:
- <xref:azure.ai.formrecognizer.DocumentModelDetails>
exceptions:
- type: azure.core.exceptions.HttpResponseError
- type: azure.core.exceptions.ResourceNotFoundError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.get_operation
name: get_operation
summary: 'Get an operation by its ID.
Get an operation associated with the Form Recognizer resource.
Note that operation information only persists for 24 hours. If the document model
operation was successful,
the model can be accessed using the <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.get_document_model>
or <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.list_document_models>
APIs.'
signature: 'get_operation(operation_id: str, **kwargs: Any) -> OperationDetails'
parameters:
- name: operation_id
description: The operation ID.
isRequired: true
types:
- <xref:str>
return:
description: OperationDetails
types:
- <xref:azure.ai.formrecognizer.OperationDetails>
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.get_resource_details
name: get_resource_details
summary: Get information about the models under the Form Recognizer resource.
signature: 'get_resource_details(**kwargs: Any) -> ResourceDetails'
return:
description: Summary of custom models under the resource - model count and limit.
types:
- <xref:azure.ai.formrecognizer.ResourceDetails>
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.list_document_models
name: list_document_models
summary: 'List information for each model, including its model ID,
description, and when it was created.'
signature: 'list_document_models(**kwargs: Any) -> ItemPaged[DocumentModelSummary]'
return:
description: Pageable of DocumentModelSummary.
types:
- <xref:azure.core.paging.ItemPaged>[<xref:azure.ai.formrecognizer.DocumentModelSummary>]
exceptions:
- type: azure.core.exceptions.HttpResponseError
- uid: azure.ai.formrecognizer.DocumentModelAdministrationClient.list_operations
name: list_operations
summary: 'List information for each operation.
Lists all operations associated with the Form Recognizer resource.
Note that operation information only persists for 24 hours. If a document model
operation was successful,
the document model can be accessed using the <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.get_document_model>
or <xref:azure.ai.formrecognizer.DocumentModelAdministrationClient.list_document_models>
APIs.'
signature: 'list_operations(**kwargs: Any) -> ItemPaged[OperationSummary]'
return:
description: A pageable of OperationSummary.
types:
- <xref:azure.core.paging.ItemPaged>[<xref:azure.ai.formrecognizer.OperationSummary>]
exceptions:
- type: azure.core.exceptions.HttpResponseError