ConfidentialLedgerClient.GetConsortiumMembersAsync(RequestContext) Method

Definition

[Protocol Method] Lists the consortium members.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.AsyncPageable<BinaryData> GetConsortiumMembersAsync (Azure.RequestContext context = default);
abstract member GetConsortiumMembersAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetConsortiumMembersAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetConsortiumMembersAsync (Optional context As RequestContext = Nothing) As AsyncPageable(Of BinaryData)

Parameters

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetConsortiumMembersAsync and parse the result.

TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential);

await foreach (BinaryData item in client.GetConsortiumMembersAsync())
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("certificate").ToString());
    Console.WriteLine(result.GetProperty("id").ToString());
}

This sample shows how to call GetConsortiumMembersAsync with all request content and parse the result.

TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential);

await foreach (BinaryData item in client.GetConsortiumMembersAsync())
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("certificate").ToString());
    Console.WriteLine(result.GetProperty("id").ToString());
}

Remarks

Consortium members can manage the Confidential Ledger.

Below is the JSON schema for one item in the pageable response.

Response Body:

Schema for ConsortiumMembers:

{
  certificate: string, # Required. PEM-encoded certificate associated with the member.
  id: string, # Required. Identifier assigned to the member.
}

Applies to