WorkflowsClient.GetWorkflowsAsync(RequestContext) 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.
[Protocol Method] List all workflows.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.AsyncPageable<BinaryData> GetWorkflowsAsync (Azure.RequestContext context);
abstract member GetWorkflowsAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
override this.GetWorkflowsAsync : Azure.RequestContext -> Azure.AsyncPageable<BinaryData>
Public Overridable Function GetWorkflowsAsync (context As RequestContext) As AsyncPageable(Of BinaryData)
Parameters
- 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
Service returned a non-success status code.
Examples
This sample shows how to call GetWorkflowsAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
WorkflowsClient client = new WorkflowsClient(endpoint, credential);
await foreach (BinaryData item in client.GetWorkflowsAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("isEnabled").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
}
This sample shows how to call GetWorkflowsAsync with all parameters and parse the result.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
WorkflowsClient client = new WorkflowsClient(endpoint, credential);
await foreach (BinaryData item in client.GetWorkflowsAsync(null))
{
JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossaryHierarchy").ToString());
Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underCollection").ToString());
Console.WriteLine(result.GetProperty("triggers")[0].GetProperty("underGlossary").ToString());
Console.WriteLine(result.GetProperty("createdTime").ToString());
Console.WriteLine(result.GetProperty("createdBy").ToString());
Console.WriteLine(result.GetProperty("lastUpdateTime").ToString());
Console.WriteLine(result.GetProperty("updatedBy").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("isEnabled").ToString());
Console.WriteLine(result.GetProperty("description").ToString());
}
Applies to
Azure SDK for .NET