DocumentTranslationClient.CancelTranslation Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CancelTranslation(Guid, RequestContext) |
[Protocol Method] Cancel a currently processing or queued translation
|
CancelTranslation(Guid, CancellationToken) |
Cancel a currently processing or queued translation. |
CancelTranslation(Guid, RequestContext)
- Source:
- DocumentTranslationClient.cs
- Source:
- DocumentTranslationClient.cs
[Protocol Method] Cancel a currently processing or queued translation
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler CancelTranslation(Guid, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response CancelTranslation (Guid translationId, Azure.RequestContext context);
public virtual Azure.Response CancelTranslation (Guid id, Azure.RequestContext context);
abstract member CancelTranslation : Guid * Azure.RequestContext -> Azure.Response
override this.CancelTranslation : Guid * Azure.RequestContext -> Azure.Response
abstract member CancelTranslation : Guid * Azure.RequestContext -> Azure.Response
override this.CancelTranslation : Guid * Azure.RequestContext -> Azure.Response
Public Overridable Function CancelTranslation (translationId As Guid, context As RequestContext) As Response
Public Overridable Function CancelTranslation (id As Guid, context As RequestContext) As Response
Parameters
- translationIdid
- Guid
Format - uuid. The operation-id.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
Service returned a non-success status code.
Applies to
CancelTranslation(Guid, CancellationToken)
- Source:
- DocumentTranslationClient.cs
- Source:
- DocumentTranslationClient.cs
Cancel a currently processing or queued translation.
public virtual Azure.Response<Azure.AI.Translation.Document.TranslationStatusResult> CancelTranslation (Guid translationId, System.Threading.CancellationToken cancellationToken = default);
public virtual Azure.Response<Azure.AI.Translation.Document.TranslationStatusResult> CancelTranslation (Guid id, System.Threading.CancellationToken cancellationToken = default);
abstract member CancelTranslation : Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Translation.Document.TranslationStatusResult>
override this.CancelTranslation : Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Translation.Document.TranslationStatusResult>
abstract member CancelTranslation : Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Translation.Document.TranslationStatusResult>
override this.CancelTranslation : Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Translation.Document.TranslationStatusResult>
Public Overridable Function CancelTranslation (translationId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Response(Of TranslationStatusResult)
Public Overridable Function CancelTranslation (id As Guid, Optional cancellationToken As CancellationToken = Nothing) As Response(Of TranslationStatusResult)
Parameters
- translationIdid
- Guid
Format - uuid. The operation-id.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Remarks
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.
Applies to
Azure SDK for .NET