Freigeben über


ConfidentialLedgerClient.GetEnclaveQuotesAsync(RequestContext) Methode

Definition

[Protokollmethode] Ruft Angebote für alle Knoten des Confidential Ledgers ab.

  • Diese Protokollmethode ermöglicht die explizite Erstellung der Anforderung und Verarbeitung der Antwort für erweiterte Szenarien.
public virtual System.Threading.Tasks.Task<Azure.Response> GetEnclaveQuotesAsync (Azure.RequestContext context = default);
abstract member GetEnclaveQuotesAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetEnclaveQuotesAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetEnclaveQuotesAsync (Optional context As RequestContext = Nothing) As Task(Of Response)

Parameter

context
RequestContext

Der Anforderungskontext, der das Standardverhalten der Clientpipeline pro Aufruf außer Kraft setzen kann.

Gibt zurück

Die vom Dienst zurückgegebene Antwort.

Ausnahmen

Der Dienst hat einen nicht erfolgreichen status Code zurückgegeben.

Beispiele

In diesem Beispiel wird gezeigt, wie GetEnclaveQuotesAsync aufgerufen und das Ergebnis analysiert wird.

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

Response response = await client.GetEnclaveQuotesAsync();

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());

Hinweise

Ein Zitat ist eine SGX-Enclavemessung, die verwendet werden kann, um die Gültigkeit eines Knotens und seiner Enclave zu überprüfen.

Im Folgenden finden Sie das JSON-Schema für die Antwortnutzlast.

Antworttext:

Schema für 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.
}

Gilt für: