Skip to content

Commit e84a545

Browse files
authored
Timeseriesiinsights api upgrade (#12523)
* upgrade api version to 2020-05-15 * Update Az.TimeSeriesInsights.psd1
1 parent eb772b7 commit e84a545

File tree

471 files changed

+10197
-10630
lines changed

Some content is hidden

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

471 files changed

+10197
-10630
lines changed

src/TimeSeriesInsights/Az.TimeSeriesInsights.format.ps1xml

Lines changed: 388 additions & 364 deletions
Large diffs are not rendered by default.

src/TimeSeriesInsights/Az.TimeSeriesInsights.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 5/13/2020
6+
# Generated on: 7/29/2020
77
#
88

99
@{
@@ -45,7 +45,7 @@ PowerShellVersion = '5.1'
4545
DotNetFrameworkVersion = '4.7.2'
4646

4747
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# CLRVersion = ''
48+
# ClrVersion = ''
4949

5050
# Processor architecture (None, X86, Amd64) required by this module
5151
# ProcessorArchitecture = ''
@@ -122,7 +122,7 @@ PrivateData = @{
122122
# IconUri = ''
123123

124124
# ReleaseNotes of this module
125-
ReleaseNotes = '* the first preview release'
125+
# ReleaseNotes = ''
126126

127127
# Prerelease string of this module
128128
# Prerelease = ''

src/TimeSeriesInsights/Az.TimeSeriesInsights.psm1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@
1616
$accountsName = 'Az.Accounts'
1717
$accountsModule = Get-Module -Name $accountsName
1818
if(-not $accountsModule) {
19-
$localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
19+
$localAccountsPath = Join-Path $PSScriptRoot 'generated/modules'
2020
if(Test-Path -Path $localAccountsPath) {
2121
$localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
2222
if($localAccounts) {
2323
$accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
2424
}
2525
}
2626
if(-not $accountsModule) {
27-
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.7.4' } | Measure-Object).Count -gt 0
27+
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
2828
if($hasAdequateVersion) {
29-
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.7.4 -Scope Global -PassThru
29+
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
3030
}
3131
}
3232
}
3333

3434
if(-not $accountsModule) {
35-
Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36-
} elseif (($accountsModule.Version -lt [System.Version]'1.7.4') -and (-not $localAccounts)) {
37-
Write-Error "`nThis module requires $accountsName version 1.7.4 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
35+
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36+
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
37+
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3838
}
3939
Write-Information "Loaded Module '$($accountsModule.Name)'"
4040

src/TimeSeriesInsights/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Upgraded API verision to 2020-05-15
2122

2223
## Version 0.1.0
2324
* the first preview release

src/TimeSeriesInsights/build-module.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if(-not $Debugger) {
8888
$null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
8989
}
9090

91-
$dll = Join-Path $PSScriptRoot 'bin\Az.TimeSeriesInsights.private.dll'
91+
$dll = Join-Path $PSScriptRoot 'bin/Az.TimeSeriesInsights.private.dll'
9292
if(-not (Test-Path $dll)) {
9393
Write-Error "Unable to find output assembly in '$binFolder'."
9494
}
@@ -97,7 +97,7 @@ if(-not (Test-Path $dll)) {
9797
$null = Import-Module -Name $dll
9898

9999
$modulePaths = $dll
100-
$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.TimeSeriesInsights.custom.psm1'
100+
$customPsm1 = Join-Path $PSScriptRoot 'custom/Az.TimeSeriesInsights.custom.psm1'
101101
if(Test-Path $customPsm1) {
102102
$modulePaths = @($dll, $customPsm1)
103103
}

src/TimeSeriesInsights/check-dependencies.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ if(-not $Isolated) {
2121
return
2222
}
2323

24-
function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum) {
24+
function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
2525
if($predicate) {
2626
$module = Get-Module -ListAvailable -Name $moduleName
2727
if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) {
2828
$null = New-Item -ItemType Directory -Force -Path $path
2929
Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
30-
if($versionMinimum) {
30+
if ($requiredVersion) {
31+
Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
32+
}elseif($versionMinimum) {
3133
Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
3234
} else {
3335
Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
@@ -39,13 +41,13 @@ function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [
3941
$ProgressPreference = 'SilentlyContinue'
4042
$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
4143

42-
$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
44+
$localModulesPath = Join-Path $PSScriptRoot 'generated/modules'
4345
if(Test-Path -Path $localModulesPath) {
4446
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
4547
}
4648

47-
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.7.4'
48-
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -versionMinimum ''
49+
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
50+
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
4951

5052
$tools = Join-Path $PSScriptRoot 'tools'
5153
$resourceDir = Join-Path $tools 'Resources'

src/TimeSeriesInsights/custom/Az.TimeSeriesInsights.custom.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# region Generated
22
# Load the private module dll
3-
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.TimeSeriesInsights.private.dll')
3+
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.TimeSeriesInsights.private.dll')
44

55
# Load the internal module
6-
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.TimeSeriesInsights.internal.psm1'
6+
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.TimeSeriesInsights.internal.psm1'
77
if(Test-Path $internalModulePath) {
88
$null = Import-Module -Name $internalModulePath
99
}

src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEnvironment.ps1

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Create an environment in the specified subscription and resource group.
2323
https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightsenvironment
2424
#>
2525
function New-AzTimeSeriesInsightsEnvironment {
26-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEnvironmentResource])]
27-
[CmdletBinding(DefaultParameterSetName='standard', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
26+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.IEnvironmentResource])]
27+
[CmdletBinding(DefaultParameterSetName='Gen1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
2828
param(
2929
[Parameter(Mandatory)]
3030
[Alias('EnvironmentName')]
@@ -47,7 +47,7 @@ function New-AzTimeSeriesInsightsEnvironment {
4747
${SubscriptionId},
4848

4949
[Parameter(Mandatory)]
50-
[ArgumentCompleter({param ( $CommandName, $ParameterName, $WordToComplete, $CommandAst, $FakeBoundParameters ) return @('Standard', 'LongTerm')})]
50+
[ArgumentCompleter({param ( $CommandName, $ParameterName, $WordToComplete, $CommandAst, $FakeBoundParameters ) return @('Gen1', 'Gen2')})]
5151
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
5252
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Support.Kind]
5353
# The kind of the environment.
@@ -59,26 +59,26 @@ function New-AzTimeSeriesInsightsEnvironment {
5959
# The location of the resource.
6060
${Location},
6161

62-
[Parameter(ParameterSetName='standard', Mandatory)]
62+
[Parameter(ParameterSetName='Gen1', Mandatory)]
6363
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
6464
[System.Int32]
6565
# The capacity of the sku.
66-
# For standard environments, this value can be changed to support scale out of environments after they have been created.
66+
# For Gen1 environments, this value can be changed to support scale out of environments after they have been created.
6767
${Capacity},
6868

69-
[Parameter(ParameterSetName='standard', Mandatory)]
69+
[Parameter(ParameterSetName='Gen1', Mandatory)]
7070
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
7171
[System.TimeSpan]
7272
# The data retention time.
7373
${DataRetentionTime},
7474

75-
[Parameter(ParameterSetName='standard')]
75+
[Parameter(ParameterSetName='Gen1')]
7676
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
77-
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[]]
77+
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.ITimeSeriesIdProperty[]]
7878
# The list of event properties which will be used to partition data in the environment.
7979
${PartitionKeyProperty},
8080

81-
[Parameter(ParameterSetName='standard')]
81+
[Parameter(ParameterSetName='Gen1')]
8282
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
8383
[System.String]
8484
# The behavior the Time Series Insights service should take when the environment's capacity has been exceeded
@@ -91,33 +91,33 @@ function New-AzTimeSeriesInsightsEnvironment {
9191
# The name of this SKU.
9292
${Sku},
9393

94-
[Parameter(ParameterSetName='longterm', Mandatory)]
94+
[Parameter(ParameterSetName='Gen2', Mandatory)]
9595
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
96-
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ITimeSeriesIdProperty[]]
96+
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.ITimeSeriesIdProperty[]]
9797
# The list of event properties which will be used to define the environment's time series id.
9898
${TimeSeriesIdProperty},
9999

100-
[Parameter(ParameterSetName='longterm', Mandatory)]
100+
[Parameter(ParameterSetName='Gen2', Mandatory)]
101101
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
102102
[System.String]
103103
# The name of the storage account that will hold the environment's long term data.
104104
${StorageAccountName},
105105

106-
[Parameter(ParameterSetName='longterm', Mandatory)]
106+
[Parameter(ParameterSetName='Gen2', Mandatory)]
107107
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
108108
[System.Security.SecureString]
109109
# The value of the management key that grants the Time Series Insights service write access to the storage account.
110110
${StorageAccountKey},
111111

112-
[Parameter(ParameterSetName='longterm')]
112+
[Parameter(ParameterSetName='Gen2')]
113113
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
114114
[System.TimeSpan]
115115
# ISO8601 timespan specifying the number of days the environment's events will be available for query from the warm store.
116116
${WarmStoreDataRetentionTime},
117117

118118
[Parameter()]
119119
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
120-
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ICreateOrUpdateTrackedResourcePropertiesTags]))]
120+
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.ICreateOrUpdateTrackedResourcePropertiesTags]))]
121121
[System.Collections.Hashtable]
122122
# Key-value pairs of additional properties for the resource.
123123
${Tag},
@@ -186,9 +186,9 @@ function New-AzTimeSeriesInsightsEnvironment {
186186

187187
process {
188188
try {
189-
if ($PSBoundParameters['Kind'] -eq 'Standard') {
190-
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.StandardEnvironmentCreateOrUpdateParameters]::new()
191-
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.StandardEnvironmentCreationProperties]::new()
189+
if ($PSBoundParameters['Kind'] -eq 'Gen1') {
190+
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.Gen1EnvironmentCreateOrUpdateParameters]::new()
191+
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.Gen1EnvironmentCreationProperties]::new()
192192

193193
$Parameter.SkuCapacity = $PSBoundParameters['Capacity']
194194
$null = $PSBoundParameters.Remove('Capacity')
@@ -206,8 +206,8 @@ function New-AzTimeSeriesInsightsEnvironment {
206206
$null = $PSBoundParameters.Remove('StorageLimitExceededBehavior')
207207
}
208208
} else {
209-
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.LongTermEnvironmentCreateOrUpdateParameters]::new()
210-
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.LongTermEnvironmentCreationProperties]::new()
209+
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.Gen2EnvironmentCreateOrUpdateParameters]::new()
210+
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.Gen2EnvironmentCreationProperties]::new()
211211

212212
$Parameter.Property.StorageConfigurationAccountName = $PSBoundParameters['StorageAccountName']
213213
$null = $PSBoundParameters.Remove('StorageAccountName')

src/TimeSeriesInsights/custom/New-AzTimeSeriesInsightsEventSource.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Create an event source under the specified environment.
2323
https://docs.microsoft.com/en-us/powershell/module/az.timeseriesinsights/new-aztimeseriesinsightseventsource
2424
#>
2525
function New-AzTimeSeriesInsightsEventSource {
26-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IEventSourceResource])]
26+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.IEventSourceResource])]
2727
[CmdletBinding(DefaultParameterSetName='eventhub', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
2828
param(
2929
[Parameter(Mandatory)]
@@ -67,7 +67,7 @@ function New-AzTimeSeriesInsightsEventSource {
6767

6868
[Parameter()]
6969
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Category('Body')]
70-
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.ICreateOrUpdateTrackedResourcePropertiesTags]))]
70+
[Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.ICreateOrUpdateTrackedResourcePropertiesTags]))]
7171
[System.Collections.Hashtable]
7272
# Key-value pairs of additional properties for the resource.
7373
${Tag},
@@ -172,17 +172,17 @@ function New-AzTimeSeriesInsightsEventSource {
172172
process {
173173
try {
174174
if ($PSBoundParameters['Kind'] -eq 'Microsoft.EventHub') {
175-
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.EventHubEventSourceCreateOrUpdateParameters]::new()
176-
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.EventHubEventSourceCreationProperties]::new()
175+
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.EventHubEventSourceCreateOrUpdateParameters]::new()
176+
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.EventHubEventSourceCreationProperties]::new()
177177

178178
$Parameter.Property.EventHubName = $PSBoundParameters['EventHubName']
179179
$null = $PSBoundParameters.Remove('EventHubName')
180180

181181
$Parameter.Property.ServiceBusNameSpace = $PSBoundParameters['ServiceBusNameSpace']
182182
$null = $PSBoundParameters.Remove('ServiceBusNameSpace')
183183
} else {
184-
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IoTHubEventSourceCreateOrUpdateParameters]::new()
185-
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20180815Preview.IoTHubEventSourceCreationProperties]::new()
184+
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.IoTHubEventSourceCreateOrUpdateParameters]::new()
185+
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.TimeSeriesInsights.Models.Api20200515.IoTHubEventSourceCreationProperties]::new()
186186

187187
$Parameter.Property.IoTHubName = $PSBoundParameters['IoTHubName']
188188
$null = $PSBoundParameters.Remove('IoTHubName')

0 commit comments

Comments
 (0)