你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

DeidentificationClient.GetJobDocumentsAsync Method

Definition

Overloads

GetJobDocumentsAsync(String, Nullable<Int32>, String, RequestContext)

[Protocol Method] List processed documents within a job.

GetJobDocumentsAsync(String, Nullable<Int32>, String, CancellationToken)

List processed documents within a job.

GetJobDocumentsAsync(String, Nullable<Int32>, String, RequestContext)

Source:
DeidentificationClient.cs

[Protocol Method] List processed documents within a job.

public virtual Azure.AsyncPageable<BinaryData> GetJobDocumentsAsync (string name, int? maxpagesize, string continuationToken, Azure.RequestContext context);
abstract member GetJobDocumentsAsync : string * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetJobDocumentsAsync : string * Nullable<int> * string * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetJobDocumentsAsync (name As String, maxpagesize As Nullable(Of Integer), continuationToken As String, context As RequestContext) As AsyncPageable(Of BinaryData)

Parameters

name
String

The name of a job.

maxpagesize
Nullable<Int32>

The maximum number of result items per page.

continuationToken
String

Token to continue a previous query.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The AsyncPageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

name is null.

name 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 GetJobDocumentsAsync and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);

await foreach (BinaryData item in client.GetJobDocumentsAsync("<name>", null, null, null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString());
    Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString());
    Console.WriteLine(result.GetProperty("status").ToString());
}

This sample shows how to call GetJobDocumentsAsync with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);

await foreach (BinaryData item in client.GetJobDocumentsAsync("<name>", 1234, "<continuationToken>", null))
{
    JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
    Console.WriteLine(result.GetProperty("id").ToString());
    Console.WriteLine(result.GetProperty("input").GetProperty("path").ToString());
    Console.WriteLine(result.GetProperty("input").GetProperty("etag").ToString());
    Console.WriteLine(result.GetProperty("output").GetProperty("path").ToString());
    Console.WriteLine(result.GetProperty("output").GetProperty("etag").ToString());
    Console.WriteLine(result.GetProperty("status").ToString());
    Console.WriteLine(result.GetProperty("error").GetProperty("code").ToString());
    Console.WriteLine(result.GetProperty("error").GetProperty("message").ToString());
    Console.WriteLine(result.GetProperty("error").GetProperty("target").ToString());
    Console.WriteLine(result.GetProperty("error").GetProperty("innererror").GetProperty("code").ToString());
}

Applies to

GetJobDocumentsAsync(String, Nullable<Int32>, String, CancellationToken)

Source:
DeidentificationClient.cs

List processed documents within a job.

public virtual Azure.AsyncPageable<Azure.Health.Deidentification.DocumentDetails> GetJobDocumentsAsync (string name, int? maxpagesize = default, string continuationToken = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetJobDocumentsAsync : string * Nullable<int> * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Health.Deidentification.DocumentDetails>
override this.GetJobDocumentsAsync : string * Nullable<int> * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Health.Deidentification.DocumentDetails>
Public Overridable Function GetJobDocumentsAsync (name As String, Optional maxpagesize As Nullable(Of Integer) = Nothing, Optional continuationToken As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of DocumentDetails)

Parameters

name
String

The name of a job.

maxpagesize
Nullable<Int32>

The maximum number of result items per page.

continuationToken
String

Token to continue a previous query.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

name is null.

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

Examples

This sample shows how to call GetJobDocumentsAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);

await foreach (DocumentDetails item in client.GetJobDocumentsAsync("<name>"))
{
}

This sample shows how to call GetJobDocumentsAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);

await foreach (DocumentDetails item in client.GetJobDocumentsAsync("<name>", maxpagesize: 1234, continuationToken: "<continuationToken>"))
{
}

Remarks

Resource list operation template.

Applies to