Share via


CodeTransparencyClient.GetEntry Method

Definition

Overloads

GetEntry(String, RequestContext)

[Protocol Method] Get receipt

GetEntry(String, CancellationToken)

Get receipt.

GetEntry(String, RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get receipt

public virtual Azure.Response GetEntry(string entryId, Azure.RequestContext context);
abstract member GetEntry : string * Azure.RequestContext -> Azure.Response
override this.GetEntry : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetEntry (entryId As String, context As RequestContext) As Response

Parameters

entryId
String

ID of the entry to retrieve.

context
RequestContext

The request context, 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 GetEntry and parse the result.

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

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

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

Applies to

GetEntry(String, CancellationToken)

Source:
CodeTransparencyClient.cs

Get receipt.

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

Parameters

entryId
String

ID of the entry to retrieve.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

entryId is null.

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

Examples

This sample shows how to call GetEntry.

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

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

Applies to