次の方法で共有


ConfidentialLedgerClient.GetEnclaveQuotes(RequestContext) メソッド

定義

[プロトコルメソッド]Confidential Ledger のすべてのノードの引用符を取得します。

  • この プロトコル メソッド を使用すると、高度なシナリオで応答の要求と処理を明示的に作成できます。
public virtual Azure.Response GetEnclaveQuotes (Azure.RequestContext context = default);
abstract member GetEnclaveQuotes : Azure.RequestContext -> Azure.Response
override this.GetEnclaveQuotes : Azure.RequestContext -> Azure.Response
Public Overridable Function GetEnclaveQuotes (Optional context As RequestContext = Nothing) As Response

パラメーター

context
RequestContext

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

戻り値

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

例外

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

このサンプルでは、GetEnclaveQuotes を呼び出して結果を解析する方法を示します。

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

Response response = client.GetEnclaveQuotes();

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("currentNodeId").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<test>").GetProperty("nodeId").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<test>").GetProperty("mrenclave").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<test>").GetProperty("quoteVersion").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<test>").GetProperty("raw").ToString());

注釈

引用符は、ノードとそのエンクレーブの有効性を検証するために使用できる SGX エンクレーブ測定です。

応答ペイロードの JSON スキーマを次に示します。

応答本文:

ConfidentialLedgerEnclavesスキーマ:

{
  currentNodeId: string, # Required. Id of the Confidential Ledger node responding to the request.
  enclaveQuotes: Dictionary<string, EnclaveQuote>, # Required. Dictionary of enclave quotes, indexed by node id.
}

適用対象