azure - 如何获取与 Azure SDK 运行的 Azure LogicApp 相关的所有操作?
问题描述
我有一个包含 100 多个操作的逻辑应用程序。我正在使用以下代码来获取逻辑应用运行的所有操作和状态,
return _client
.WorkflowRunActions
.ListWithHttpMessagesAsync(_resourceGroup, logicApp, workflowRunName)
.Result.Body.OrderBy(x => x.StartTime);
但它只返回 30,而不是所有动作。在我的逻辑应用程序中,我有一些操作可以将记录插入 Azure Sql 表,例如,
但是上面的代码没有返回这些动作。我还注意到条件下的所有操作也没有返回。任何人都可以分享一些想法吗?
解决方案
在 Result Body 中有一个NextPageLink
属性,用于获取下一个响应页面。你可以参考我下面的代码。
Task<AzureOperationResponse<IPage<WorkflowRunAction>>> actions = client.WorkflowRunActions.ListWithHttpMessagesAsync(resourceGroupName: "resource group name", workflowName: "gelogic", runName: "run name");
var nextaction = client.WorkflowRunActions.ListNextWithHttpMessagesAsync(actions.Result.Body.NextPageLink);
var numerator = nextaction.Result.Body.GetEnumerator();
while (numerator.MoveNext()) {
WorkflowRunAction item = numerator.Current;
Console.WriteLine(item.Name);
}
推荐阅读
- java - 按 JPA 条件查询中的列表排序
- xml - 如何使用 VBA 在 ContentControl 中设置 storeItemID?
- python - Python h5py - 为什么我会收到广播错误?
- javascript - 我有多种类型的变量作为返回类型。如何检查变量是否具有 string[] 类型
- swift - NSMutableDictionary 对象的数据类型在添加对象后发生变化
- java - 方法没有签名:sample.Login.cellToString() 适用于参数类型:(org.apache.poi.xssf.usermodel.XSSFCell)
- excel - 多行范围内的第一个和最后一个非空单元格
- java - 使用 Bazel 中其他模块的“src/test”下的实用程序测试类
- constraint-programming - 如何在 Flatzinc 输出中生成具体的“array_int_maximum”?
- python - 预处理给定图像后如何解码 QR 码?