ConversationAnalysisClient.GetAnalyzeConversationJobStatusAsync メソッド

定義

[プロトコルメソッド]分析の状態と結果を取得する

  • この プロトコル メソッド を使用すると、高度なシナリオで応答の要求と処理を明示的に作成できます。
public virtual System.Threading.Tasks.Task<Azure.Response> GetAnalyzeConversationJobStatusAsync (Guid jobId, bool? showStats = default, Azure.RequestContext context = default);
abstract member GetAnalyzeConversationJobStatusAsync : Guid * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetAnalyzeConversationJobStatusAsync : Guid * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetAnalyzeConversationJobStatusAsync (jobId As Guid, Optional showStats As Nullable(Of Boolean) = Nothing, Optional context As RequestContext = Nothing) As Task(Of Response)

パラメーター

jobId
Guid

ジョブ ID。

showStats
Nullable<Boolean>

(省略可能) が true に設定されている場合、応答には要求レベルとドキュメント レベルの統計が含まれます。

context
RequestContext

要求コンテキスト。これは、クライアント パイプラインの既定の動作を呼び出しごとにオーバーライドできます。

戻り値

サービスから返された応答。

例外

サービスから成功以外の状態コードが返されました。

このサンプルでは、必要なパラメーターを使用して GetAnalyzeConversationJobStatusAsync を呼び出し、結果を解析する方法を示します。

var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ConversationAnalysisClient(endpoint, credential);

Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.NewGuid());

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("jobId").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString());
Console.WriteLine(result.GetProperty("status").ToString());

このサンプルでは、すべてのパラメーターを使用して GetAnalyzeConversationJobStatusAsync を呼び出す方法と、結果を解析する方法を示します。

var credential = new AzureKeyCredential("<key>");
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new ConversationAnalysisClient(endpoint, credential);

Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.NewGuid(), true);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("displayName").ToString());
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());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("details").GetProperty("<test>").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("details")[0].GetProperty("innererror").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("details").GetProperty("<test>").ToString());
Console.WriteLine(result.GetProperty("errors")[0].GetProperty("innererror").GetProperty("target").ToString());
Console.WriteLine(result.GetProperty("nextLink").ToString());

注釈

その他の情報については、サービス REST API のドキュメントを参照してください。 https://video2.skills-academy.com/rest/api/language/2023-04-01/analyze-conversation/job-status

適用対象