共用方式為


FaceSessionClient.GetSessionImage Method

Definition

Overloads

GetSessionImage(String, RequestContext)

[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details.

GetSessionImage(String, CancellationToken)

Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details.

GetSessionImage(String, RequestContext)

Source:
FaceSessionClient.cs

[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/liveness-session-operations/get-session-image for more details.

public virtual Azure.Response GetSessionImage (string sessionImageId, Azure.RequestContext context);
abstract member GetSessionImage : string * Azure.RequestContext -> Azure.Response
override this.GetSessionImage : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetSessionImage (sessionImageId As String, context As RequestContext) As Response

Parameters

sessionImageId
String

The request ID of the image to be retrieved.

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

sessionImageId is null.

sessionImageId 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 GetSessionImage and parse the result.

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

Response response = client.GetSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa", null);

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

Applies to

GetSessionImage(String, CancellationToken)

Source:
FaceSessionClient.cs
public virtual Azure.Response<BinaryData> GetSessionImage (string sessionImageId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetSessionImage : string * System.Threading.CancellationToken -> Azure.Response<BinaryData>
override this.GetSessionImage : string * System.Threading.CancellationToken -> Azure.Response<BinaryData>
Public Overridable Function GetSessionImage (sessionImageId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BinaryData)

Parameters

sessionImageId
String

The request ID of the image to be retrieved.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

sessionImageId is null.

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

Examples

This sample shows how to call GetSessionImage.

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

Response<BinaryData> response = client.GetSessionImage("3d035d35-2e01-4ed4-8935-577afde9caaa");

Applies to