DeidentificationClient.GetJobs Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetJobs(Nullable<Int32>, String, RequestContext) |
[Protocol Method] List de-identification jobs.
|
GetJobs(Nullable<Int32>, String, CancellationToken) |
List de-identification jobs. |
GetJobs(Nullable<Int32>, String, RequestContext)
- Source:
- DeidentificationClient.cs
[Protocol Method] List de-identification jobs.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetJobs(Nullable<Int32>, String, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Pageable<BinaryData> GetJobs (int? maxpagesize, string continuationToken, Azure.RequestContext context);
abstract member GetJobs : Nullable<int> * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetJobs : Nullable<int> * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetJobs (maxpagesize As Nullable(Of Integer), continuationToken As String, context As RequestContext) As Pageable(Of BinaryData)
Parameters
- 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 Pageable<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
Service returned a non-success status code.
Examples
This sample shows how to call GetJobs and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);
foreach (BinaryData item in client.GetJobs(null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString());
Console.WriteLine(result.GetProperty("createdAt").ToString());
}
This sample shows how to call GetJobs 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);
foreach (BinaryData item in client.GetJobs(1234, "<continuationToken>", null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("sourceLocation").GetProperty("extensions")[0].ToString());
Console.WriteLine(result.GetProperty("targetLocation").GetProperty("location").ToString());
Console.WriteLine(result.GetProperty("targetLocation").GetProperty("prefix").ToString());
Console.WriteLine(result.GetProperty("operation").ToString());
Console.WriteLine(result.GetProperty("dataType").ToString());
Console.WriteLine(result.GetProperty("redactionFormat").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());
Console.WriteLine(result.GetProperty("lastUpdatedAt").ToString());
Console.WriteLine(result.GetProperty("createdAt").ToString());
Console.WriteLine(result.GetProperty("startedAt").ToString());
Console.WriteLine(result.GetProperty("summary").GetProperty("successful").ToString());
Console.WriteLine(result.GetProperty("summary").GetProperty("failed").ToString());
Console.WriteLine(result.GetProperty("summary").GetProperty("canceled").ToString());
Console.WriteLine(result.GetProperty("summary").GetProperty("total").ToString());
Console.WriteLine(result.GetProperty("summary").GetProperty("bytesProcessed").ToString());
}
Applies to
GetJobs(Nullable<Int32>, String, CancellationToken)
- Source:
- DeidentificationClient.cs
List de-identification jobs.
public virtual Azure.Pageable<Azure.Health.Deidentification.DeidentificationJob> GetJobs (int? maxpagesize = default, string continuationToken = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetJobs : Nullable<int> * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Health.Deidentification.DeidentificationJob>
override this.GetJobs : Nullable<int> * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Health.Deidentification.DeidentificationJob>
Public Overridable Function GetJobs (Optional maxpagesize As Nullable(Of Integer) = Nothing, Optional continuationToken As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of DeidentificationJob)
Parameters
- continuationToken
- String
Token to continue a previous query.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetJobs.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);
foreach (DeidentificationJob item in client.GetJobs())
{
}
This sample shows how to call GetJobs with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
DeidentificationClient client = new DeidentificationClient(endpoint, credential);
foreach (DeidentificationJob item in client.GetJobs(maxpagesize: 1234, continuationToken: "<continuationToken>"))
{
}
Remarks
Resource list operation template.
Applies to
Azure SDK for .NET