EasmClient.GetDiscoveryGroupRunsAsync 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
GetDiscoveryGroupRunsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken) |
Retrieve a collection of discovery run results for a discovery group with a given groupName. |
GetDiscoveryGroupRunsAsync(String, String, Nullable<Int32>, Nullable<Int32>, RequestContext) |
[Protocol Method] Retrieve a collection of discovery run results for a discovery group with a given groupName.
|
GetDiscoveryGroupRunsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
- Source:
- EasmClient.cs
Retrieve a collection of discovery run results for a discovery group with a given groupName.
public virtual Azure.AsyncPageable<Azure.Analytics.Defender.Easm.DiscoveryRunResult> GetDiscoveryGroupRunsAsync (string groupName, string filter = default, int? skip = default, int? maxpagesize = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetDiscoveryGroupRunsAsync : string * string * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Analytics.Defender.Easm.DiscoveryRunResult>
override this.GetDiscoveryGroupRunsAsync : string * string * Nullable<int> * Nullable<int> * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Analytics.Defender.Easm.DiscoveryRunResult>
Public Overridable Function GetDiscoveryGroupRunsAsync (groupName As String, Optional filter As String = Nothing, Optional skip As Nullable(Of Integer) = Nothing, Optional maxpagesize As Nullable(Of Integer) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of DiscoveryRunResult)
Parameters
- groupName
- String
The unique identifier for the discovery group.
- filter
- String
Filter the result list using the given expression.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
groupName
is null.
groupName
is an empty string, and was expected to be non-empty.
Examples
This sample shows how to call GetDiscoveryGroupRunsAsync.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
await foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRunsAsync("<groupName>"))
{
}
This sample shows how to call GetDiscoveryGroupRunsAsync with all parameters.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
await foreach (DiscoveryRunResult item in client.GetDiscoveryGroupRunsAsync("<groupName>", filter: "<filter>", skip: 1234, maxpagesize: 1234))
{
}
Applies to
GetDiscoveryGroupRunsAsync(String, String, Nullable<Int32>, Nullable<Int32>, RequestContext)
- Source:
- EasmClient.cs
[Protocol Method] Retrieve a collection of discovery run results for a discovery group with a given groupName.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetDiscoveryGroupRunsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.AsyncPageable<BinaryData> GetDiscoveryGroupRunsAsync (string groupName, string filter, int? skip, int? maxpagesize, Azure.RequestContext context);
abstract member GetDiscoveryGroupRunsAsync : string * string * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetDiscoveryGroupRunsAsync : string * string * Nullable<int> * Nullable<int> * Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetDiscoveryGroupRunsAsync (groupName As String, filter As String, skip As Nullable(Of Integer), maxpagesize As Nullable(Of Integer), context As RequestContext) As AsyncPageable(Of BinaryData)
Parameters
- groupName
- String
The unique identifier for the discovery group.
- filter
- String
Filter the result list using the given expression.
- 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
groupName
is null.
groupName
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 GetDiscoveryGroupRunsAsync and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync("<groupName>", null, null, null, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
This sample shows how to call GetDiscoveryGroupRunsAsync with all parameters and parse the result.
Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
EasmClient client = new EasmClient(endpoint, credential);
await foreach (BinaryData item in client.GetDiscoveryGroupRunsAsync("<groupName>", "<filter>", 1234, 1234, null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("submittedDate").ToString());
Console.WriteLine(result.GetProperty("startedDate").ToString());
Console.WriteLine(result.GetProperty("completedDate").ToString());
Console.WriteLine(result.GetProperty("tier").ToString());
Console.WriteLine(result.GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("totalAssetsFoundCount").ToString());
Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("seeds")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("kind").ToString());
Console.WriteLine(result.GetProperty("excludes")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("names")[0].ToString());
}
Applies to
Azure SDK for .NET