ConfidentialLedgerClient.GetEnclaveQuotes(RequestContext) Method
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.
[Protocol Method] Gets quotes for all nodes of the Confidential Ledger.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
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
The request context, which can override default behaviors of the client pipeline on a per-call basis.
The response returned from the service.
Service returned a non-success status code.
This sample shows how to call GetEnclaveQuotes and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient 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("<key>").GetProperty("nodeId").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<key>").GetProperty("quoteVersion").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<key>").GetProperty("raw").ToString());
This sample shows how to call GetEnclaveQuotes with all request content and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient 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("<key>").GetProperty("nodeId").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<key>").GetProperty("mrenclave").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<key>").GetProperty("quoteVersion").ToString());
Console.WriteLine(result.GetProperty("enclaveQuotes").GetProperty("<key>").GetProperty("raw").ToString());
A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.
Below is the JSON schema for the response payload.
Response Body:
Schema for 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.
}
Product | Versions |
---|---|
Azure SDK for .NET | Latest, Preview |
Azure SDK for .NET feedback
Azure SDK for .NET is an open source project. Select a link to provide feedback: