CodeTransparencyClient.GetEntry Method
Definition
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.
Overloads
GetEntry(String, Nullable<Boolean>, RequestContext) |
[Protocol Method] Get Entry with or without receipt embedded in its unprotected header
|
GetEntry(String, Nullable<Boolean>, CancellationToken) |
Get Entry with or without receipt embedded in its unprotected header. |
GetEntry(String, Nullable<Boolean>, RequestContext)
- Source:
- CodeTransparencyClient.cs
[Protocol Method] Get Entry with or without receipt embedded in its unprotected header
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetEntry(String, Nullable<Boolean>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response GetEntry (string entryId, bool? embedReceipt, Azure.RequestContext context);
abstract member GetEntry : string * Nullable<bool> * Azure.RequestContext -> Azure.Response
override this.GetEntry : string * Nullable<bool> * Azure.RequestContext -> Azure.Response
Public Overridable Function GetEntry (entryId As String, embedReceipt As Nullable(Of Boolean), 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("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response response = client.GetEntry("<entryId>", null, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
This sample shows how to call GetEntry with all parameters and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response response = client.GetEntry("<entryId>", true, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());
Applies to
GetEntry(String, Nullable<Boolean>, CancellationToken)
- Source:
- CodeTransparencyClient.cs
Get Entry with or without receipt embedded in its unprotected header.
public virtual Azure.Response<BinaryData> GetEntry (string entryId, bool? embedReceipt = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEntry : string * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<BinaryData>
override this.GetEntry : string * Nullable<bool> * System.Threading.CancellationToken -> Azure.Response<BinaryData>
Public Overridable Function GetEntry (entryId As String, Optional embedReceipt As Nullable(Of Boolean) = Nothing, 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("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response<BinaryData> response = client.GetEntry("<entryId>");
This sample shows how to call GetEntry with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);
Response<BinaryData> response = client.GetEntry("<entryId>", embedReceipt: true);