Share via


CodeTransparencyClient.GetOperationAsync Method

Definition

Overloads

GetOperationAsync(String, RequestContext)

[Protocol Method] Get status of the long running registration operation, mandatory in IETF SCITT draft

GetOperationAsync(String, CancellationToken)

Get status of the long running registration operation, mandatory in IETF SCITT draft.

GetOperationAsync(String, RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get status of the long running registration operation, mandatory in IETF SCITT draft

public virtual System.Threading.Tasks.Task<Azure.Response> GetOperationAsync(string operationId, Azure.RequestContext context);
abstract member GetOperationAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetOperationAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetOperationAsync (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 GetOperationAsync and parse the result.

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

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

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

Applies to

GetOperationAsync(String, CancellationToken)

Source:
CodeTransparencyClient.cs

Get status of the long running registration operation, mandatory in IETF SCITT draft.

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

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 GetOperationAsync.

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

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

Applies to