You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/Arcus.Scripting.LogicApps/Arcus.Scripting.LogicApps.psm1
+34-10
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,27 @@
10
10
11
11
.ParameterLogicAppName
12
12
The name of the Azure Logic App.
13
+
14
+
.ParameterWorkflowName
15
+
[Optional] The name of the workflow in the Azure Logic App Standard Site.
16
+
17
+
.ParameterEnvironmentName
18
+
[Optional] The Azure Cloud environment in which the Azure Logic App resides.
13
19
14
20
.ParameterMaximumFollowNextPageLink
15
-
The number of times the script should retrieve the next page of Logic App runs, if not specified the entire run history of the Logic App will be retrieved.
21
+
[Optional] The number of times the script should retrieve the next page of Logic App runs, if not specified the entire run history of the Logic App will be retrieved.
16
22
17
23
#>
18
24
functionCancel-AzLogicAppRuns {
19
25
param(
20
26
[Parameter(Mandatory=$true)][string] $ResourceGroupName=$(throw"Name of the resource group is required"),
21
27
[Parameter(Mandatory=$true)][string] $LogicAppName=$(throw"Name of the logic app is required"),
[Optional] The name of the workflow in the Azure Logic App Standard Site.
53
+
54
+
.ParameterEnvironmentName
55
+
[Optional] The Azure Cloud environment in which the Azure Logic App resides.
56
+
43
57
.ParameterStartTime
44
58
The start time of the failed instances of the Azure Logic App.
45
59
46
60
.ParameterEndTime
47
-
The end time of the failed instances of the Azure Logic App.
61
+
[Optional] The end time of the failed instances of the Azure Logic App.
48
62
49
63
.ParameterMaximumFollowNextPageLink
50
-
The number of times the script should retrieve the next page of Logic App runs, if not specified the entire run history of the Logic App will be retrieved.
64
+
[Optional] The number of times the script should retrieve the next page of Logic App runs, if not specified the entire run history of the Logic App will be retrieved.
51
65
52
66
#>
53
67
functionResubmit-FailedAzLogicAppRuns {
54
68
param(
55
69
[Parameter(Mandatory=$true)][string] $ResourceGroupName=$(throw"Name of the resource group is required"),
56
70
[Parameter(Mandatory=$true)][string] $LogicAppName=$(throw"Name of the logic app is required"),
If your solution consists of multiple interfaces, you can specify the flow-specific name of the configuration file, if not, the script will look for a file named 'deploy-orderControl.json' by default.
124
144
125
145
.ParameterResourcePrefix
126
-
The prefix assigned to all Azure Logic Apps, which can differ per environment.
146
+
[Optional] The prefix assigned to all Azure Logic Apps, which can differ per environment.
127
147
128
148
.ParameterEnvironmentName
129
149
[Optional] The Azure Cloud environment in which the Azure Logic App resides.
If your solution consists of multiple interfaces, you can specify the flow-specific name of the configuration file, if not, the script will look for a file named 'deploy-orderControl.json' by default.
202
226
203
227
.ParameterResourcePrefix
204
-
The prefix assigned to all Azure Logic Apps, which can differ per environment.
228
+
[Optional] The prefix assigned to all Azure Logic Apps, which can differ per environment.
205
229
206
230
.ParameterEnvironmentName
207
231
[Optional] The Azure Cloud environment in which the Azure Logic App resides.
Write-Verbose"Cancelled run '$runName' for the Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'"
18
+
}
19
+
20
+
Write-Host"Successfully cancelled all running instances for the Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'"-ForegroundColor Green
while ($nextPageUrl-ne$null-and$nextPageCounter-le$MaximumFollowNextPageLink) {
43
+
$nextPageCounter=$nextPageCounter+1
44
+
$listRunningParams=@{
45
+
Method='Get'
46
+
Headers=@{
47
+
'authorization'="Bearer $accessToken"
48
+
}
49
+
URI=$nextPageUrl
50
+
}
15
51
16
-
Write-Host"Successfully cancelled all running instances for the Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'"-ForegroundColor Green
Write-Verbose"Cancelled run '$runName' for the workflow '$WorkflowName' in Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'"
72
+
}
73
+
74
+
Write-Host"Successfully cancelled all running instances for the workflow '$WorkflowName' in Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'"-ForegroundColor Green
75
+
}
17
76
} catch {
18
-
throw"Failed to cancel all running instances for the Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'. Details: $($_.Exception.Message)"
77
+
if ($WorkflowName-eq"") {
78
+
throw"Failed to cancel all running instances for the Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'. Details: $($_.Exception.Message)"
79
+
} else {
80
+
throw"Failed to cancel all running instances for the workflow '$WorkflowName' in Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'. Details: $($_.Exception.Message)"
Write-Host"Successfully disabled workflow '$WorkflowName' in Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'"-ForegroundColor Green
37
+
}
38
+
} catch {
39
+
if ($WorkflowName-eq"") {
40
+
throw"Failed to disable Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'. Details: $($_.Exception.Message)"
41
+
} else {
42
+
throw"Failed to disable workflow '$WorkflowName' in Azure Logic App '$LogicAppName' in resource group '$ResourceGroupName'. Details: $($_.Exception.Message)"
0 commit comments