Sprog

DocumentTranslationClient Class

Definition

The DocumentTranslationClient.

public class DocumentTranslationClient
type DocumentTranslationClient = class
Public Class DocumentTranslationClient
Inheritance
DocumentTranslationClient

Constructors

Name Description
DocumentTranslationClient()

Protected constructor to allow mocking.

DocumentTranslationClient(DocumentTranslationClientSettings)

Initializes a new instance of DocumentTranslationClient from a DocumentTranslationClientSettings.

DocumentTranslationClient(Uri, AzureKeyCredential, DocumentTranslationClientOptions)

Initializes a new instance of DocumentTranslationClient.

DocumentTranslationClient(Uri, AzureKeyCredential)

Initializes a new instance of DocumentTranslationClient class for the specified service instance.

DocumentTranslationClient(Uri, TokenCredential, DocumentTranslationClientOptions)

Initializes a new instance of DocumentTranslationClient.

DocumentTranslationClient(Uri, TokenCredential)

Initializes a new instance of the DocumentTranslationClient class for the specified service instance.

Properties

Name Description
Pipeline

The HTTP pipeline for sending and receiving REST requests and responses.

Methods

Name Description
CancelTranslation(Guid, CancellationToken)

Cancel a currently processing or queued translation. A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned. All documents that have completed translation will not be cancelled and will be charged. All pending documents will be cancelled if possible.

CancelTranslation(Guid, RequestContext)

[Protocol Method] Cancel a currently processing or queued translation. A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned. All documents that have completed translation will not be cancelled and will be charged. All pending documents will be cancelled if possible.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
CancelTranslationAsync(Guid, CancellationToken)

Cancel a currently processing or queued translation. A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned. All documents that have completed translation will not be cancelled and will be charged. All pending documents will be cancelled if possible.

CancelTranslationAsync(Guid, RequestContext)

[Protocol Method] Cancel a currently processing or queued translation. A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned. All documents that have completed translation will not be cancelled and will be charged. All pending documents will be cancelled if possible.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetDocumentsStatus(Guid, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, CancellationToken)

Returns the status for all documents in a batch document translation request.
If the number of documents in the response exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.
top, skip and maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.
top indicates the total number of records the user wants to be returned across all pages. skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. maxpagesize is the maximum items returned in a page. If more items are requested via top (or top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.
orderby query parameter can be used to sort the returned list (ex "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc desc"). The default sorting is descending by createdDateTimeUtc. Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).
When both top and skip are included, the server should first apply skip and then top on the collection. Note: If the server can't honor top and/or skip, the server must return an error to the client informing about it instead of just ignoring the query options. This reduces the risk of the client making assumptions about the data returned.

GetDocumentsStatus(Guid, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, RequestContext)

[Protocol Method] Returns the status for all documents in a batch document translation request.
If the number of documents in the response exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.
top, skip and maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.
top indicates the total number of records the user wants to be returned across all pages. skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. maxpagesize is the maximum items returned in a page. If more items are requested via top (or top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.
orderby query parameter can be used to sort the returned list (ex "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc desc"). The default sorting is descending by createdDateTimeUtc. Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).
When both top and skip are included, the server should first apply skip and then top on the collection. Note: If the server can't honor top and/or skip, the server must return an error to the client informing about it instead of just ignoring the query options. This reduces the risk of the client making assumptions about the data returned.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetDocumentsStatusAsync(Guid, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, CancellationToken)

Returns the status for all documents in a batch document translation request.
If the number of documents in the response exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.
top, skip and maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.
top indicates the total number of records the user wants to be returned across all pages. skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. maxpagesize is the maximum items returned in a page. If more items are requested via top (or top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.
orderby query parameter can be used to sort the returned list (ex "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc desc"). The default sorting is descending by createdDateTimeUtc. Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).
When both top and skip are included, the server should first apply skip and then top on the collection. Note: If the server can't honor top and/or skip, the server must return an error to the client informing about it instead of just ignoring the query options. This reduces the risk of the client making assumptions about the data returned.

GetDocumentsStatusAsync(Guid, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, RequestContext)

[Protocol Method] Returns the status for all documents in a batch document translation request.
If the number of documents in the response exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.
top, skip and maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.
top indicates the total number of records the user wants to be returned across all pages. skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time. maxpagesize is the maximum items returned in a page. If more items are requested via top (or top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.
orderby query parameter can be used to sort the returned list (ex "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc desc"). The default sorting is descending by createdDateTimeUtc. Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents. createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by. The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).
When both top and skip are included, the server should first apply skip and then top on the collection. Note: If the server can't honor top and/or skip, the server must return an error to the client informing about it instead of just ignoring the query options. This reduces the risk of the client making assumptions about the data returned.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetDocumentStatus(Guid, Guid, CancellationToken)

Returns the translation status for a specific document based on the request Id and document Id.

GetDocumentStatus(Guid, Guid, RequestContext)

[Protocol Method] Returns the translation status for a specific document based on the request Id and document Id.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetDocumentStatusAsync(Guid, Guid, CancellationToken)

Returns the translation status for a specific document based on the request Id and document Id.

GetDocumentStatusAsync(Guid, Guid, RequestContext)

[Protocol Method] Returns the translation status for a specific document based on the request Id and document Id.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetDocumentTranslationClient(String)

Initializes a new instance of DocumentTranslation.

GetSupportedFormats(FileFormatType, CancellationToken)

Get the list of formats supported by the Document Translation service.

GetSupportedFormats(String, RequestContext)

[Protocol Method] The list of supported formats supported by the Document Translation service. The list includes the common file extension, as well as the content-type if using the upload API.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetSupportedFormatsAsync(FileFormatType, CancellationToken)

Get the list of formats supported by the Document Translation service.

GetSupportedFormatsAsync(String, RequestContext)

[Protocol Method] The list of supported formats supported by the Document Translation service. The list includes the common file extension, as well as the content-type if using the upload API.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetTranslationsStatus(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, CancellationToken)

Returns a list of batch requests submitted and the status for each request.

GetTranslationsStatus(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, RequestContext)

[Protocol Method] Returns a list of batch requests submitted and the status for each request.

GetTranslationsStatusAsync(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, CancellationToken)

Returns a list of batch requests submitted and the status for each request.

GetTranslationsStatusAsync(Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, IEnumerable<Guid>, IEnumerable<String>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, IEnumerable<String>, RequestContext)

[Protocol Method] Returns a list of batch requests submitted and the status for each request.

GetTranslationStatus(Guid, CancellationToken)

Returns the status for a document translation request. The status includes the overall request status, as well as the status for documents that are being translated as part of that request.

GetTranslationStatus(Guid, RequestContext)

[Protocol Method] Returns the status for a document translation request. The status includes the overall request status, as well as the status for documents that are being translated as part of that request.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetTranslationStatusAsync(Guid, CancellationToken)

Returns the status for a document translation request. The status includes the overall request status, as well as the status for documents that are being translated as part of that request.

GetTranslationStatusAsync(Guid, RequestContext)

[Protocol Method] Returns the status for a document translation request. The status includes the overall request status, as well as the status for documents that are being translated as part of that request.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetTranslationStatuses(GetTranslationStatusesOptions, CancellationToken)

Get the status results for submitted translation operations.

GetTranslationStatusesAsync(GetTranslationStatusesOptions, CancellationToken)

Get the status results for submitted translation operations.

StartTranslation(DocumentTranslationInput, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslation(IEnumerable<DocumentTranslationInput>, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslation(IEnumerable<DocumentTranslationInput>, Nullable<Boolean>, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslation(WaitUntil, RequestContent, RequestContext)

Use this API to submit a bulk (batch) translation request to the Document Translation service. Each request can contain multiple documents and must contain a source and destination container for each document.
The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.
Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.
If the glossary is invalid or unreachable during translation, an error is indicated in the document status. If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.

StartTranslation(WaitUntil, StartTranslationDetails, CancellationToken)

Submit a document translation request to the Document Translation service.

StartTranslation(WaitUntil, TranslationBatch, CancellationToken)

Use this API to submit a bulk (batch) translation request to the Document Translation service. Each request can contain multiple documents and must contain a source and destination container for each document.
The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.
Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.
If the glossary is invalid or unreachable during translation, an error is indicated in the document status. If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.

StartTranslationAsync(DocumentTranslationInput, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslationAsync(IEnumerable<DocumentTranslationInput>, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslationAsync(IEnumerable<DocumentTranslationInput>, Nullable<Boolean>, CancellationToken)

Starts a translation operation which translates the document(s) in your source container to your TranslationTarget(s) in the given language.

For document length limits, maximum batch size, and supported document formats, see .

StartTranslationAsync(WaitUntil, RequestContent, RequestContext)

Use this API to submit a bulk (batch) translation request to the Document Translation service. Each request can contain multiple documents and must contain a source and destination container for each document.
The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.
Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.
If the glossary is invalid or unreachable during translation, an error is indicated in the document status. If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.

StartTranslationAsync(WaitUntil, StartTranslationDetails, CancellationToken)

Submit a document translation request to the Document Translation service.

StartTranslationAsync(WaitUntil, TranslationBatch, CancellationToken)

Use this API to submit a bulk (batch) translation request to the Document Translation service. Each request can contain multiple documents and must contain a source and destination container for each document.
The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.
Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.
If the glossary is invalid or unreachable during translation, an error is indicated in the document status. If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.

Applies to