如何通过 Azure SDK 获取与 Azure LogicApp 运行 相关的所有操作?
How to get all the actions related to a Azure LogicApp run by Azure SDK?
我有一个包含 100 多个操作的逻辑应用。我正在使用以下代码获取逻辑应用程序 运行、
的所有操作和状态
return _client
.WorkflowRunActions
.ListWithHttpMessagesAsync(_resourceGroup, logicApp, workflowRunName)
.Result.Body.OrderBy(x => x.StartTime);
但它只有returns30个,不是所有动作。在我的逻辑应用程序中,我有一些操作可以将记录插入到 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);
}
我有一个包含 100 多个操作的逻辑应用。我正在使用以下代码获取逻辑应用程序 运行、
的所有操作和状态 return _client
.WorkflowRunActions
.ListWithHttpMessagesAsync(_resourceGroup, logicApp, workflowRunName)
.Result.Body.OrderBy(x => x.StartTime);
但它只有returns30个,不是所有动作。在我的逻辑应用程序中,我有一些操作可以将记录插入到 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);
}