Skip to content

Commit

Permalink
Migrate Monitor from generation to main (Azure#26567)
Browse files Browse the repository at this point in the history
* Move Monitor to main

* create BreakingChangeIssues.csv and update changelog

* update changelog

---------

Co-authored-by: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com>
Co-authored-by: Jinpei Li <v-jinpel@microsoft.com>
  • Loading branch information
3 people authored Nov 4, 2024
1 parent 8349058 commit 44c216e
Show file tree
Hide file tree
Showing 44 changed files with 1,363 additions and 770 deletions.
7 changes: 4 additions & 3 deletions src/Monitor/ActivityLogAlert.Autorest/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ if(-not $Isolated -and -not $Debugger) {
$binFolder = Join-Path $PSScriptRoot 'bin'
$objFolder = Join-Path $PSScriptRoot 'obj'

$isAzure = [System.Convert]::ToBoolean('true')

if(-not $Debugger) {
Write-Host -ForegroundColor Green 'Cleaning build folders...'
$null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
Expand Down Expand Up @@ -143,7 +145,7 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
$addComplexInterfaceInfo = !$isAzure
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}

Expand Down Expand Up @@ -178,5 +180,4 @@ if (-not $DisableAfterBuildTasks){
}
}


Write-Host -ForegroundColor Green '-------------Done-------------'
Write-Host -ForegroundColor Green '-------------Done-------------'
7 changes: 4 additions & 3 deletions src/Monitor/Autoscale.Autorest/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ if(-not $Isolated -and -not $Debugger) {
$binFolder = Join-Path $PSScriptRoot 'bin'
$objFolder = Join-Path $PSScriptRoot 'obj'

$isAzure = [System.Convert]::ToBoolean('true')

if(-not $Debugger) {
Write-Host -ForegroundColor Green 'Cleaning build folders...'
$null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
Expand Down Expand Up @@ -143,7 +145,7 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
$addComplexInterfaceInfo = !$isAzure
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}

Expand Down Expand Up @@ -178,5 +180,4 @@ if (-not $DisableAfterBuildTasks){
}
}


Write-Host -ForegroundColor Green '-------------Done-------------'
Write-Host -ForegroundColor Green '-------------Done-------------'
22 changes: 0 additions & 22 deletions src/Monitor/DataCollectionRule.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ title: DataCollectionRule
module-version: 0.1.0
namespace: Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection
subject-prefix: ''
disable-transform-identity-type: true
flatten-userassignedidentity: false

directive:
# custom required body
Expand Down Expand Up @@ -191,24 +189,4 @@ directive:
- model-name: StorageBlobDestination
# string Name, string StorageAccountResourceId, string TableName
- model-name: StorageTableDestination

##### announce upcoming MI-related breaking changes
- where:
parameter-name: IdentityType
set:
breaking-change:
change-description: IdentityType will be removed. EnableSystemAssignedIdentity will be used to enable/disable system assigned identity and UserAssignedIdentity will be used to specify user assigned identities.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 13.0.0
change-effective-date: 2024/11/19
- where:
parameter-name: UserAssignedIdentity
set:
breaking-change:
old-parameter-type: Hashtable
new-parameter-type: string[]
change-description: UserAssignedIdentity's type will be simplified as string array.
deprecated-by-version: 2.0.0
deprecated-by-azversion: 13.0.0
change-effective-date: 2024/11/19
```
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ param(
${Description},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},
[System.Management.Automation.SwitchParameter]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
Expand Down Expand Up @@ -112,12 +111,11 @@ param(
${Tag},

[Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,10 @@ param(
${DestinationStorageTablesDirect},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},
[System.Management.Automation.SwitchParameter]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("Linux", "Windows")]
Expand All @@ -402,12 +401,11 @@ param(
${Tag},

[Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,11 +721,10 @@ param(
${Description},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},
[System.Management.Automation.SwitchParameter]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
Expand Down Expand Up @@ -756,12 +755,11 @@ param(
${Tag},

[Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
Expand Down Expand Up @@ -1468,11 +1466,10 @@ param(
${DestinationStorageTablesDirect},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},
[System.Management.Automation.SwitchParameter]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter(ParameterSetName='CreateExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("Linux", "Windows")]
Expand All @@ -1496,12 +1493,11 @@ param(
${Tag},

[Parameter(ParameterSetName='CreateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)]
Expand Down Expand Up @@ -2249,9 +2245,9 @@ end {

<#
.Synopsis
update part of a data collection endpoint.
update a data collection endpoint.
.Description
update part of a data collection endpoint.
update a data collection endpoint.
.Example
Update-AzDataCollectionEndpoint -Name myCollectionEndpoint -ResourceGroupName AMCS-TEST -Tag @{"123"="abc"}
Expand Down Expand Up @@ -2308,26 +2304,51 @@ param(
${InputObject},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},
# Description of the data collection endpoint.
${Description},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.Nullable[System.Boolean]]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# The immutable ID of this data collection endpoint resource.
# This property is READ-ONLY.
${ImmutableId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("Linux", "Windows")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# The kind of the resource.
${Kind},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("Enabled", "Disabled", "SecuredByPerimeter")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# The configuration to set whether network access from public internet to the endpoints are allowed.
${NetworkAclsPublicNetworkAccess},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IResourceForUpdateTags]))]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IDataCollectionEndpointResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},

[Parameter()]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter()]
Expand Down Expand Up @@ -2977,11 +2998,10 @@ param(
${DestinationStorageTablesDirect},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[System.String]
# Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
${IdentityType},
[System.Nullable[System.Boolean]]
# Determines whether to enable a system-assigned identity for the resource.
${EnableSystemAssignedIdentity},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.PSArgumentCompleterAttribute("Linux", "Windows")]
Expand All @@ -3005,12 +3025,11 @@ param(
${Tag},

[Parameter()]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Monitor.DataCollection.Models.IUserAssignedIdentities]))]
[System.Collections.Hashtable]
# The set of user assigned identities associated with the resource.
# The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.
# The dictionary values can be empty objects ({}) in requests.
[System.String[]]
# The array of user assigned identities associated with the resource.
# The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'
${UserAssignedIdentity},

[Parameter()]
Expand Down
Loading

0 comments on commit 44c216e

Please sign in to comment.