Share via


TextAuthoringProject.ImportAsync Method

Definition

Overloads

Name Description
ImportAsync(WaitUntil, TextAuthoringExportedProject, String, CancellationToken)

Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced.

ImportAsync(WaitUntil, RequestContent, String, RequestContext)

[Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced.

ImportAsync(WaitUntil, String, String, CancellationToken)

Triggers a job to import a project using raw JSON string input. This is an alternative to the structured import method, and is useful when importing directly from exported project files.

ImportAsync(WaitUntil, TextAuthoringExportedProject, String, CancellationToken)

Source:
TextAuthoringProject.cs

Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced.

public virtual System.Threading.Tasks.Task<Azure.Operation> ImportAsync(Azure.WaitUntil waitUntil, Azure.AI.Language.Text.Authoring.TextAuthoringExportedProject body, string format = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportAsync : Azure.WaitUntil * Azure.AI.Language.Text.Authoring.TextAuthoringExportedProject * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation>
override this.ImportAsync : Azure.WaitUntil * Azure.AI.Language.Text.Authoring.TextAuthoringExportedProject * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation>
Public Overridable Function ImportAsync (waitUntil As WaitUntil, body As TextAuthoringExportedProject, Optional format As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Operation)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

body
TextAuthoringExportedProject

The project data to import.

format
String

The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to

ImportAsync(WaitUntil, RequestContent, String, RequestContext)

Source:
TextAuthoringProject.cs

[Protocol Method] Triggers a job to import a project. If a project with the same name already exists, the data of that project is replaced.

public virtual System.Threading.Tasks.Task<Azure.Operation> ImportAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string format = default, Azure.RequestContext context = default);
abstract member ImportAsync : Azure.WaitUntil * Azure.Core.RequestContent * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
override this.ImportAsync : Azure.WaitUntil * Azure.Core.RequestContent * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
Public Overridable Function ImportAsync (waitUntil As WaitUntil, content As RequestContent, Optional format As String = Nothing, Optional context As RequestContext = Nothing) As Task(Of Operation)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

content
RequestContent

The content to send as the body of the request.

format
String

The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The Operation representing an asynchronous operation on the service.

Exceptions

Service returned a non-success status code.

Applies to

ImportAsync(WaitUntil, String, String, CancellationToken)

Source:
TextAuthoringProject.cs

Triggers a job to import a project using raw JSON string input. This is an alternative to the structured import method, and is useful when importing directly from exported project files.

public virtual System.Threading.Tasks.Task<Azure.Operation> ImportAsync(Azure.WaitUntil waitUntil, string projectJson, string format = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportAsync : Azure.WaitUntil * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation>
override this.ImportAsync : Azure.WaitUntil * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation>
Public Overridable Function ImportAsync (waitUntil As WaitUntil, projectJson As String, Optional format As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Operation)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

projectJson
String

A raw JSON string representing the entire project to import. This string should match the format of an exported Text Authoring project.

format
String

The format of the project to import. The currently supported formats are json and aml formats. If not provided, the default is set to json.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to