Skip to content

Commit 82911c1

Browse files
Migrate AppConfiguration from generation to main (#22388)
* Move AppConfiguration to main * Update Changelog.md --------- Co-authored-by: wyunchi-ms <[email protected]>
1 parent 8c5e457 commit 82911c1

File tree

349 files changed

+51247
-182
lines changed

Some content is hidden

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

349 files changed

+51247
-182
lines changed

src/AppConfiguration/AppConfiguration.Autorest/build-module.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
123123

124124
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
125125
$modelCmdlets = @()
126+
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
127+
if (Test-Path $modelCmdletFolder) {
128+
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
129+
}
126130
if ($modelCmdlets.Count -gt 0) {
127131
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
128132
CreateModelCmdlet($modelCmdlets)

src/AppConfiguration/AppConfiguration.Autorest/create-model-cmdlets.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ function CreateModelCmdlet {
2323
}
2424

2525
$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
26-
$ModuleName = 'AppConfiguration'
2726
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
2827
$null = New-Item -ItemType Directory -Force -Path $OutputDir
28+
if (''.length -gt 0) {
29+
$ModuleName = ''
30+
} else {
31+
$ModuleName = 'Az.AppConfiguration'
32+
}
2933

3034
$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
3135
$Content = ''
@@ -64,10 +68,10 @@ function CreateModelCmdlet {
6468
$ObjectType = $Model
6569
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
6670
# remove duplicated module name
67-
if ($ObjectType.StartsWith($ModuleName)) {
71+
if ($ObjectType.StartsWith('AppConfiguration')) {
6872
$ModulePrefix = ''
6973
} else {
70-
$ModulePrefix = $ModuleName
74+
$ModulePrefix = 'AppConfiguration'
7175
}
7276
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
7377

@@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}.
158162
.Outputs
159163
${ObjectTypeWithNamespace}
160164
.Link
161-
https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
165+
https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
162166
#>
163167
function New-Az${ModulePrefix}${ObjectType}Object {
164168
[OutputType('${ObjectTypeWithNamespace}')]

src/AppConfiguration/AppConfiguration.Autorest/docs/Clear-AzAppConfigurationDeletedStore.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ Accept wildcard characters: False
5454
```
5555
5656
### -DefaultProfile
57-
The credentials, account, tenant, and subscription used for communication with Azure.
57+
The DefaultProfile parameter is not functional.
58+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5859
5960
```yaml
6061
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/docs/Get-AzAppConfigurationDeletedStore.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ Gets a deleted Azure app configuration store.
6666
## PARAMETERS
6767

6868
### -DefaultProfile
69-
The credentials, account, tenant, and subscription used for communication with Azure.
69+
The DefaultProfile parameter is not functional.
70+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
7071

7172
```yaml
7273
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/docs/Get-AzAppConfigurationStore.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ This command gets an app configuration store by name.
8383
## PARAMETERS
8484

8585
### -DefaultProfile
86-
The credentials, account, tenant, and subscription used for communication with Azure.
86+
The DefaultProfile parameter is not functional.
87+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8788

8889
```yaml
8990
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/docs/Get-AzAppConfigurationStoreKey.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ This command lists all store keys of an app configuration store.
4141
## PARAMETERS
4242

4343
### -DefaultProfile
44-
The credentials, account, tenant, and subscription used for communication with Azure.
44+
The DefaultProfile parameter is not functional.
45+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
4546

4647
```yaml
4748
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/docs/New-AzAppConfigurationStoreKey.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ This command regenerate key of an app configuration store.
4646
## PARAMETERS
4747

4848
### -DefaultProfile
49-
The credentials, account, tenant, and subscription used for communication with Azure.
49+
The DefaultProfile parameter is not functional.
50+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
5051

5152
```yaml
5253
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/docs/Remove-AzAppConfigurationStore.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Accept wildcard characters: False
6161
```
6262
6363
### -DefaultProfile
64-
The credentials, account, tenant, and subscription used for communication with Azure.
64+
The DefaultProfile parameter is not functional.
65+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
6566
6667
```yaml
6768
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/docs/Test-AzAppConfigurationStoreNameAvailability.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ This command tests availability of the app configuration store name.
3838
## PARAMETERS
3939

4040
### -DefaultProfile
41-
The credentials, account, tenant, and subscription used for communication with Azure.
41+
The DefaultProfile parameter is not functional.
42+
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
4243

4344
```yaml
4445
Type: System.Management.Automation.PSObject

src/AppConfiguration/AppConfiguration.Autorest/exports/Clear-AzAppConfigurationDeletedStore.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ param(
7878
[ValidateNotNull()]
7979
[Microsoft.Azure.PowerShell.Cmdlets.AppConfiguration.Category('Azure')]
8080
[System.Management.Automation.PSObject]
81-
# The credentials, account, tenant, and subscription used for communication with Azure.
81+
# The DefaultProfile parameter is not functional.
82+
# Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
8283
${DefaultProfile},
8384

8485
[Parameter()]
@@ -148,7 +149,7 @@ begin {
148149
$parameterSet = $PSCmdlet.ParameterSetName
149150

150151
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
151-
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
152+
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
152153
}
153154
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
154155
if ($preTelemetryId -eq '') {

0 commit comments

Comments
 (0)