CodeTransparencyClient.GetOperation Method

Definition

Overloads

Name Description
GetOperation(String, RequestContext)
Obsolete.

Get operation status.

GetOperation(String, CancellationToken)
Obsolete.

Get operation status.

GetOperation(String, RequestContext)

Source:
CodeTransparencyClient.cs

Caution

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

Get operation status.

[System.Obsolete("GetOperation is deprecated as it was removed from the recent IETF SCITT draft.")]
public virtual Azure.Response GetOperation(string operationId, Azure.RequestContext context);
[<System.Obsolete("GetOperation is deprecated as it was removed from the recent IETF SCITT draft.")>]
abstract member GetOperation : string * Azure.RequestContext -> Azure.Response
override this.GetOperation : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetOperation (operationId As String, context As RequestContext) As 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 GetOperation and parse the result.

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

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

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

Applies to

GetOperation(String, CancellationToken)

Source:
CodeTransparencyClient.cs

Caution

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

Get operation status.

[System.Obsolete("GetOperation is deprecated as it was removed from the recent IETF SCITT draft.")]
public virtual Azure.Response<BinaryData> GetOperation(string operationId, System.Threading.CancellationToken cancellationToken = default);
[<System.Obsolete("GetOperation is deprecated as it was removed from the recent IETF SCITT draft.")>]
abstract member GetOperation : string * System.Threading.CancellationToken -> Azure.Response<BinaryData>
override this.GetOperation : string * System.Threading.CancellationToken -> Azure.Response<BinaryData>
Public Overridable Function GetOperation (operationId As String, Optional cancellationToken As CancellationToken = Nothing) As 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 GetOperation.

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

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

Applies to