Share via


CodeTransparencyClient.GetCodeTransparencyVersion Method

Definition

Overloads

GetCodeTransparencyVersion(CancellationToken)

Get CodeTransparency version information.

GetCodeTransparencyVersion(RequestContext)

[Protocol Method] Get CodeTransparency version information.

GetCodeTransparencyVersion(CancellationToken)

Source:
CodeTransparencyClient.cs

Get CodeTransparency version information.

public virtual Azure.Response<Azure.Security.CodeTransparency.VersionResult> GetCodeTransparencyVersion (System.Threading.CancellationToken cancellationToken = default);
abstract member GetCodeTransparencyVersion : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.VersionResult>
override this.GetCodeTransparencyVersion : System.Threading.CancellationToken -> Azure.Response<Azure.Security.CodeTransparency.VersionResult>
Public Overridable Function GetCodeTransparencyVersion (Optional cancellationToken As CancellationToken = Nothing) As Response(Of VersionResult)

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetCodeTransparencyVersion.

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

Response<VersionResult> response = client.GetCodeTransparencyVersion();

This sample shows how to call GetCodeTransparencyVersion with all parameters.

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

Response<VersionResult> response = client.GetCodeTransparencyVersion();

Applies to

GetCodeTransparencyVersion(RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get CodeTransparency version information.

public virtual Azure.Response GetCodeTransparencyVersion (Azure.RequestContext context);
abstract member GetCodeTransparencyVersion : Azure.RequestContext -> Azure.Response
override this.GetCodeTransparencyVersion : Azure.RequestContext -> Azure.Response
Public Overridable Function GetCodeTransparencyVersion (context As RequestContext) As Response

Parameters

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

Service returned a non-success status code.

Examples

This sample shows how to call GetCodeTransparencyVersion 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.GetCodeTransparencyVersion(null);

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

This sample shows how to call GetCodeTransparencyVersion 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.GetCodeTransparencyVersion(null);

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

Applies to