QuestionAnsweringAuthoringClient.GetExportStatus 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
| Name | Description |
|---|---|
| GetExportStatus(String, String, CancellationToken) |
Gets the status of an Export job, once job completes, returns the project metadata, and assets. |
| GetExportStatus(String, String, RequestContext) |
[Protocol Method] Gets the status of an Export job, once job completes, returns the project metadata, and assets.
|
GetExportStatus(String, String, CancellationToken)
Gets the status of an Export job, once job completes, returns the project metadata, and assets.
public virtual Azure.Response<Azure.AI.Language.QuestionAnswering.Authoring.QuestionAnsweringAuthoringExportJobState> GetExportStatus(string projectName, string jobId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetExportStatus : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.QuestionAnswering.Authoring.QuestionAnsweringAuthoringExportJobState>
override this.GetExportStatus : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Language.QuestionAnswering.Authoring.QuestionAnsweringAuthoringExportJobState>
Public Overridable Function GetExportStatus (projectName As String, jobId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of QuestionAnsweringAuthoringExportJobState)
Parameters
- projectName
- String
Name of the project.
- jobId
- String
The job ID.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
projectName or jobId is null.
projectName or jobId is an empty string, and was expected to be non-empty.
Applies to
GetExportStatus(String, String, RequestContext)
[Protocol Method] Gets the status of an Export job, once job completes, returns the project metadata, and assets.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetExportStatus(String, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context = default);
public virtual Azure.Response GetExportStatus(string projectName, string jobId, Azure.RequestContext context);
abstract member GetExportStatus : string * string * Azure.RequestContext -> Azure.Response
override this.GetExportStatus : string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetExportStatus (projectName As String, jobId As String, Optional context As RequestContext = Nothing) As Response
Public Overridable Function GetExportStatus (projectName As String, jobId As String, context As RequestContext) As Response
Parameters
- projectName
- String
Name of the project.
- jobId
- String
The job 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
projectName or jobId is null.
projectName or jobId is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call GetExportStatus with required parameters and parse the result.
var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new QuestionAnsweringAuthoringClient(endpoint, credential);
Response response = client.GetExportStatus("<projectName>", "<jobId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("expirationDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Remarks
Below is the JSON schema for the response payload. Additional information can be found in the service REST API documentation: https://learn.microsoft.com/rest/api/cognitiveservices/questionanswering/question-answering-projects/get-export-status
Response Body:
Schema for ExportJobState:
{
createdDateTime: string (ISO 8601 Format), # Required.
expirationDateTime: string (ISO 8601 Format), # Optional.
jobId: string, # Required.
lastUpdatedDateTime: string (ISO 8601 Format), # Required.
status: "notStarted" | "running" | "succeeded" | "failed" | "cancelled" | "cancelling" | "partiallyCompleted", # Required. Job Status.
}