CodeTransparencyClient.GetOperationAsync Method

Definition

Overloads

Name Description
GetOperationAsync(String, RequestContext)
Obsolete.

Get operation status.

GetOperationAsync(String, CancellationToken)
Obsolete.

Get operation status.

GetOperationAsync(String, RequestContext)

Source:
CodeTransparencyClient.cs

Caution

GetOperationAsync is deprecated as it was removed from the recent IETF SCITT draft.

Get operation status.

[System.Obsolete("GetOperationAsync is deprecated as it was removed from the recent IETF SCITT draft.")]
public virtual System.Threading.Tasks.Task<Azure.Response> GetOperationAsync(string operationId, Azure.RequestContext context);
[<System.Obsolete("GetOperationAsync is deprecated as it was removed from the recent IETF SCITT draft.")>]
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 options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Attributes

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

Caution

GetOperationAsync is deprecated as it was removed from the recent IETF SCITT draft.

Get operation status.

[System.Obsolete("GetOperationAsync is deprecated as it was removed from the recent IETF SCITT draft.")]
public virtual System.Threading.Tasks.Task<Azure.Response<BinaryData>> GetOperationAsync(string operationId, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("GetOperationAsync is deprecated as it was removed from the recent IETF SCITT draft.")>]
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 that can be used to cancel the operation.

Returns

Attributes

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.

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