Skip to content

Commit b5e96be

Browse files
Move Monitor to main
1 parent 789536d commit b5e96be

File tree

153 files changed

+2098
-313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+2098
-313
lines changed

src/Monitor/ActionGroup.Autorest/build-module.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX)
15+
param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks)
1616
$ErrorActionPreference = 'Stop'
1717

1818
if($PSEdition -ne 'Core') {
@@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
177177
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
178178
}
179179

180+
if (-not $DisableAfterBuildTasks){
181+
$afterBuildTasksPath = Join-Path $PSScriptRoot ''
182+
$afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable
183+
if(Test-Path -Path $afterBuildTasksPath -PathType leaf){
184+
Write-Host -ForegroundColor Green 'Running after build tasks...'
185+
. $afterBuildTasksPath @afterBuildTasksArgs
186+
}
187+
}
188+
189+
180190
Write-Host -ForegroundColor Green '-------------Done-------------'

src/Monitor/ActionGroup.Autorest/examples/New-AzActionGroupLogicAppReceiverObject.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
### Example 1: create action group logic app receiver
22
```powershell
3-
New-AzActionGroupLogicAppReceiverObject -CallbackUrl "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w" -Name "sample logic app" -ResourceId "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp"
3+
New-AzActionGroupLogicAppReceiverObject -CallbackUrl "https://p*****7w" -Name "sample logic app" -ResourceId "/subscriptions/{subId}/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp"
44
```
55

66
```output
7-
CallbackUrl Name ResourceId
8-
----------- ---- ----------
9-
https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w sample logic app /subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/provid…
7+
CallbackUrl Name ResourceId
8+
----------- ---- ----------
9+
https://p*****7w sample logic app /subscriptions/{subId}/resourceGroups/LogicApp/provid…
1010
```
1111

1212
This command creates action group logic app receiver object.

src/Monitor/ActionGroup.Autorest/exports/New-AzActionGroup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
<#
1818
.Synopsis
19-
Create a new action group or Create an existing one.
19+
Create a new action group or update an existing one.
2020
.Description
21-
Create a new action group or Create an existing one.
21+
Create a new action group or update an existing one.
2222
.Example
2323
$email1 = New-AzActionGroupEmailReceiverObject -EmailAddress [email protected] -Name user1
2424
$sms1 = New-AzActionGroupSmsReceiverObject -CountryCode '{countrycode}' -Name user2 -PhoneNumber '{phonenumber}'

src/Monitor/ActionGroup.Autorest/exports/New-AzActionGroupLogicAppReceiverObject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Create an in-memory object for LogicAppReceiver.
2020
.Description
2121
Create an in-memory object for LogicAppReceiver.
2222
.Example
23-
New-AzActionGroupLogicAppReceiverObject -CallbackUrl "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w" -Name "sample logic app" -ResourceId "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp"
23+
New-AzActionGroupLogicAppReceiverObject -CallbackUrl "https://p*****7w" -Name "sample logic app" -ResourceId "/subscriptions/{subId}/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp"
2424
2525
.Outputs
2626
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.LogicAppReceiver

src/Monitor/ActionGroup.Autorest/exports/ProxyCmdletDefinitions.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ end {
447447

448448
<#
449449
.Synopsis
450-
Create a new action group or Create an existing one.
450+
Create a new action group or update an existing one.
451451
.Description
452-
Create a new action group or Create an existing one.
452+
Create a new action group or update an existing one.
453453
.Example
454454
$email1 = New-AzActionGroupEmailReceiverObject -EmailAddress [email protected] -Name user1
455455
$sms1 = New-AzActionGroupSmsReceiverObject -CountryCode '{countrycode}' -Name user2 -PhoneNumber '{phonenumber}'
@@ -1056,9 +1056,9 @@ end {
10561056

10571057
<#
10581058
.Synopsis
1059-
Update a new action group or Update an existing one.
1059+
Update a new action group or update an existing one.
10601060
.Description
1061-
Update a new action group or Update an existing one.
1061+
Update a new action group or update an existing one.
10621062
.Example
10631063
$enventhub = New-AzActionGroupEventHubReceiverObject -EventHubName "testEventHub" -EventHubNameSpace "actiongrouptest" -Name "sample eventhub" -SubscriptionId '{subid}'
10641064
Update-AzActionGroup -Name actiongroup1 -ResourceGroupName monitor-action -EventHubReceiver $enventhub
@@ -2296,7 +2296,7 @@ Create an in-memory object for LogicAppReceiver.
22962296
.Description
22972297
Create an in-memory object for LogicAppReceiver.
22982298
.Example
2299-
New-AzActionGroupLogicAppReceiverObject -CallbackUrl "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w" -Name "sample logic app" -ResourceId "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp"
2299+
New-AzActionGroupLogicAppReceiverObject -CallbackUrl "https://p*****7w" -Name "sample logic app" -ResourceId "/subscriptions/{subId}/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp"
23002300
23012301
.Outputs
23022302
Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.LogicAppReceiver

src/Monitor/ActionGroup.Autorest/exports/Update-AzActionGroup.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
<#
1818
.Synopsis
19-
Update a new action group or Update an existing one.
19+
Update a new action group or update an existing one.
2020
.Description
21-
Update a new action group or Update an existing one.
21+
Update a new action group or update an existing one.
2222
.Example
2323
$enventhub = New-AzActionGroupEventHubReceiverObject -EventHubName "testEventHub" -EventHubNameSpace "actiongrouptest" -Name "sample eventhub" -SubscriptionId '{subid}'
2424
Update-AzActionGroup -Name actiongroup1 -ResourceGroupName monitor-action -EventHubReceiver $enventhub

src/Monitor/ActionGroup.Autorest/generated/api/ActionGroup.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ public partial class ActionGroup
353353
var _finalUri = _response.GetFirstHeader(@"Location");
354354
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
355355
var location = _response.GetFirstHeader(@"Location");
356+
var operationLocation = _response.GetFirstHeader(@"Operation-Location");
356357
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
357358
{
358359
// delay before making the next polling request
@@ -365,7 +366,10 @@ public partial class ActionGroup
365366
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
366367
location = _response.GetFirstHeader(@"Location");
367368
}
368-
var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
369+
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
370+
operationLocation = _response.GetFirstHeader(@"Operation-Location");
371+
}
372+
var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
369373
request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.Method.Get);
370374

371375
// and let's look at the current response body and see if we have some information we can give back to the listener
@@ -506,6 +510,7 @@ public partial class ActionGroup
506510
var _finalUri = _response.GetFirstHeader(@"Location");
507511
var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation");
508512
var location = _response.GetFirstHeader(@"Location");
513+
var operationLocation = _response.GetFirstHeader(@"Operation-Location");
509514
while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted )
510515
{
511516
// delay before making the next polling request
@@ -518,7 +523,10 @@ public partial class ActionGroup
518523
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) {
519524
location = _response.GetFirstHeader(@"Location");
520525
}
521-
var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation;
526+
if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) {
527+
operationLocation = _response.GetFirstHeader(@"Operation-Location");
528+
}
529+
var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation;
522530
request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.Method.Get);
523531

524532
// and let's look at the current response body and see if we have some information we can give back to the listener
@@ -644,7 +652,7 @@ public partial class ActionGroup
644652
}
645653
}
646654

647-
/// <summary>Update a new action group or Update an existing one.</summary>
655+
/// <summary>Update a new action group or update an existing one.</summary>
648656
/// <param name="subscriptionId">The ID of the target subscription.</param>
649657
/// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param>
650658
/// <param name="actionGroupName">The name of the action group.</param>
@@ -694,7 +702,7 @@ public partial class ActionGroup
694702
}
695703
}
696704

697-
/// <summary>Update a new action group or Update an existing one.</summary>
705+
/// <summary>Update a new action group or update an existing one.</summary>
698706
/// <param name="viaIdentity"></param>
699707
/// <param name="body">The action group to create or use for the update.</param>
700708
/// <param name="onOk">a delegate that is called when the remote service returns 200 (OK).</param>
@@ -754,7 +762,7 @@ public partial class ActionGroup
754762
}
755763
}
756764

757-
/// <summary>Update a new action group or Update an existing one.</summary>
765+
/// <summary>Update a new action group or update an existing one.</summary>
758766
/// <param name="viaIdentity"></param>
759767
/// <param name="body">The action group to create or use for the update.</param>
760768
/// <param name="eventListener">an <see cref="Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.IEventListener" /> instance that will receive events.</param>
@@ -811,7 +819,7 @@ public partial class ActionGroup
811819
}
812820
}
813821

814-
/// <summary>Update a new action group or Update an existing one.</summary>
822+
/// <summary>Update a new action group or update an existing one.</summary>
815823
/// <param name="subscriptionId">The ID of the target subscription.</param>
816824
/// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param>
817825
/// <param name="actionGroupName">The name of the action group.</param>
@@ -860,7 +868,7 @@ public partial class ActionGroup
860868
}
861869
}
862870

863-
/// <summary>Update a new action group or Update an existing one.</summary>
871+
/// <summary>Update a new action group or update an existing one.</summary>
864872
/// <param name="subscriptionId">The ID of the target subscription.</param>
865873
/// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param>
866874
/// <param name="actionGroupName">The name of the action group.</param>
@@ -906,7 +914,7 @@ public partial class ActionGroup
906914
}
907915
}
908916

909-
/// <summary>Update a new action group or Update an existing one.</summary>
917+
/// <summary>Update a new action group or update an existing one.</summary>
910918
/// <param name="subscriptionId">The ID of the target subscription.</param>
911919
/// <param name="resourceGroupName">The name of the resource group. The name is case insensitive.</param>
912920
/// <param name="actionGroupName">The name of the action group.</param>

src/Monitor/ActionGroup.Autorest/generated/cmdlets/NewAzActionGroup_CreateExpanded.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets
1010
using Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.Cmdlets;
1111
using System;
1212

13-
/// <summary>Create a new action group or Create an existing one.</summary>
13+
/// <summary>Create a new action group or update an existing one.</summary>
1414
/// <remarks>
1515
/// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}"
1616
/// </remarks>
1717
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzActionGroup_CreateExpanded", SupportsShouldProcess = true)]
1818
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IActionGroupResource))]
19-
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Description(@"Create a new action group or Create an existing one.")]
19+
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Description(@"Create a new action group or update an existing one.")]
2020
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Generated]
2121
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", ApiVersion = "2023-01-01")]
2222
public partial class NewAzActionGroup_CreateExpanded : global::System.Management.Automation.PSCmdlet,

src/Monitor/ActionGroup.Autorest/generated/cmdlets/NewAzActionGroup_CreateViaIdentityExpanded.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets
1010
using Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.Cmdlets;
1111
using System;
1212

13-
/// <summary>Create a new action group or Create an existing one.</summary>
13+
/// <summary>Create a new action group or update an existing one.</summary>
1414
/// <remarks>
1515
/// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}"
1616
/// </remarks>
1717
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzActionGroup_CreateViaIdentityExpanded", SupportsShouldProcess = true)]
1818
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IActionGroupResource))]
19-
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Description(@"Create a new action group or Create an existing one.")]
19+
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Description(@"Create a new action group or update an existing one.")]
2020
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Generated]
2121
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", ApiVersion = "2023-01-01")]
2222
public partial class NewAzActionGroup_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet,

src/Monitor/ActionGroup.Autorest/generated/cmdlets/NewAzActionGroup_CreateViaJsonFilePath.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Cmdlets
1010
using Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Runtime.Cmdlets;
1111
using System;
1212

13-
/// <summary>Create a new action group or Create an existing one.</summary>
13+
/// <summary>Create a new action group or update an existing one.</summary>
1414
/// <remarks>
1515
/// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}"
1616
/// </remarks>
1717
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzActionGroup_CreateViaJsonFilePath", SupportsShouldProcess = true)]
1818
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Models.IActionGroupResource))]
19-
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Description(@"Create a new action group or Create an existing one.")]
19+
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Description(@"Create a new action group or update an existing one.")]
2020
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.Generated]
2121
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}", ApiVersion = "2023-01-01")]
2222
[global::Microsoft.Azure.PowerShell.Cmdlets.Monitor.ActionGroup.NotSuggestDefaultParameterSet]

0 commit comments

Comments
 (0)