TextAuthoringProject.ImportAsync 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
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, 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.
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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler ImportAsync(WaitUntil, TextAuthoringExportedProject, String, CancellationToken) convenience overload with strongly typed models first.
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.