Share via


CodeTransparencyClient.GetEntryStatementAsync Method

Definition

Overloads

Name Description
GetEntryStatementAsync(String, RequestContext)

[Protocol Method] Get the transparent statement consisting of the signed statement and the receipt embedded in the header

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetEntryStatementAsync(String, CancellationToken)

Get the transparent statement consisting of the signed statement and the receipt embedded in the header.

GetEntryStatementAsync(String, RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get the transparent statement consisting of the signed statement and the receipt embedded in the header

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetEntryStatementAsync(string entryId, Azure.RequestContext context);
abstract member GetEntryStatementAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetEntryStatementAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetEntryStatementAsync (entryId As String, context As RequestContext) As Task(Of Response)

Parameters

entryId
String

ID of the entry to retrieve.

context
RequestContext

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

Returns

The response returned from the service.

Exceptions

entryId is null.

entryId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

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

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response response = await client.GetEntryStatementAsync("2.131", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

Applies to

GetEntryStatementAsync(String, CancellationToken)

Source:
CodeTransparencyClient.cs

Get the transparent statement consisting of the signed statement and the receipt embedded in the header.

public virtual System.Threading.Tasks.Task<Azure.Response<BinaryData>> GetEntryStatementAsync(string entryId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEntryStatementAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<BinaryData>>
override this.GetEntryStatementAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<BinaryData>>
Public Overridable Function GetEntryStatementAsync (entryId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BinaryData))

Parameters

entryId
String

ID of the entry to retrieve.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

entryId is null.

entryId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetEntryStatementAsync.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<BinaryData> response = await client.GetEntryStatementAsync("2.131");

Applies to