Sdílet prostřednictvím


CodeTransparencyClient.GetEntryStatusAsync Method

Definition

Overloads

GetEntryStatusAsync(String, RequestContext)

[Protocol Method] Get the status the entry operation

GetEntryStatusAsync(String, CancellationToken)

Get the status the entry operation.

GetEntryStatusAsync(String, RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get the status the entry operation

public virtual System.Threading.Tasks.Task<Azure.Response> GetEntryStatusAsync (string operationId, Azure.RequestContext context);
abstract member GetEntryStatusAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetEntryStatusAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetEntryStatusAsync (operationId As String, context As RequestContext) As Task(Of Response)

Parameters

operationId
String

ID of the operation 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

operationId is null.

operationId 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 GetEntryStatusAsync 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 = await client.GetEntryStatusAsync("<operationId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("operationId").ToString());
Console.WriteLine(result.GetProperty("status").ToString());

This sample shows how to call GetEntryStatusAsync 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 = await client.GetEntryStatusAsync("<operationId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("entryId").ToString());
Console.WriteLine(result.GetProperty("error").ToString());
Console.WriteLine(result.GetProperty("operationId").ToString());
Console.WriteLine(result.GetProperty("status").ToString());

Applies to

GetEntryStatusAsync(String, CancellationToken)

Source:
CodeTransparencyClient.cs

Get the status the entry operation.

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

Parameters

operationId
String

ID of the operation to retrieve.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

operationId is null.

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

Examples

This sample shows how to call GetEntryStatusAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<GetOperationResult> response = await client.GetEntryStatusAsync("<operationId>");

This sample shows how to call GetEntryStatusAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<GetOperationResult> response = await client.GetEntryStatusAsync("<operationId>");

Applies to