Skip to content

Commit b301af0

Browse files
Migrate Resources from generation to main (#25631)
* Move Resources to main * remove test record contains secrets --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 1c28d63 commit b301af0

File tree

301 files changed

+13999
-14180
lines changed

Some content is hidden

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

301 files changed

+13999
-14180
lines changed

src/Resources/Authorization.Autorest/Az.Authorization.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
GUID = 'c9f907de-d9b2-4db4-b439-78ce632c122e'
2+
GUID = '05291185-22ad-4d77-a19f-50c191748b67'
33
RootModule = './Az.Authorization.psm1'
44
ModuleVersion = '0.1.0'
55
CompatiblePSEditions = 'Core', 'Desktop'

src/Resources/Authorization.Autorest/help/Az.Authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Authorization
3-
Module Guid: c9f907de-d9b2-4db4-b439-78ce632c122e
3+
Module Guid: 05291185-22ad-4d77-a19f-50c191748b67
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.authorization
55
Help Version: 1.0.0.0
66
Locale: en-US

src/Resources/MSGraph.Autorest/examples/New-AzADUser.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Create user with password profile
99

1010
### Example 2: Create user with password
1111
```powershell
12-
$password = "xxxxxxxxxx"
13-
$password = ConvertTo-SecureString -AsPlainText -Force $password
12+
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
1413
New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
1514
```
1615

src/Resources/MSGraph.Autorest/exports/New-AzADUser.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ $password = "xxxxxxxxxx"
2424
$pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password}
2525
New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
2626
.Example
27-
$password = "xxxxxxxxxx"
28-
$password = ConvertTo-SecureString -AsPlainText -Force $password
27+
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
2928
New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
3029
3130
.Outputs

src/Resources/MSGraph.Autorest/exports/ProxyCmdletDefinitions.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10800,8 +10800,7 @@ $password = "xxxxxxxxxx"
1080010800
$pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password}
1080110801
New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
1080210802
.Example
10803-
$password = "xxxxxxxxxx"
10804-
$password = ConvertTo-SecureString -AsPlainText -Force $password
10803+
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
1080510804
New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
1080610805

1080710806
.Outputs

src/Resources/MSGraph.Autorest/internal/New-AzADUser.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ $password = "xxxxxxxxxx"
2424
$pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password}
2525
New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
2626
.Example
27-
$password = "xxxxxxxxxx"
28-
$password = ConvertTo-SecureString -AsPlainText -Force $password
27+
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
2928
New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
3029
3130
.Outputs

src/Resources/MSGraph.Autorest/internal/ProxyCmdletDefinitions.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6181,8 +6181,7 @@ $password = "xxxxxxxxxx"
61816181
$pp = New-Object -TypeName "Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Models.ApiV10.IMicrosoftGraphPasswordProfile" -Property @{Password=$password}
61826182
New-AzADUser -DisplayName $uname -PasswordProfile $pp -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
61836183
.Example
6184-
$password = "xxxxxxxxxx"
6185-
$password = ConvertTo-SecureString -AsPlainText -Force $password
6184+
$password = ConvertTo-SecureString -String "****" -AsPlainText -Force
61866185
New-AzADUser -DisplayName $uname -Password $password -AccountEnabled $true -MailNickname $nickname -UserPrincipalName $upn
61876186

61886187
.Outputs

src/Resources/Policy.Autorest/custom/Helpers.ps1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,14 @@ function ConvertFrom-JsonSafe
235235
ConvertFrom-Json $InputObject -AsHashtable:$AsHashtable
236236
}
237237
elseif ($AsHashtable) {
238-
$hashtable = @{}
239-
($InputObject | ConvertFrom-Json).psobject.properties | Foreach { $hashtable[$_.Name] = $_.Value }
240-
$hashTable
238+
# ConvertFrom-Json on Windows Powershell doesn't support -AsHashtable parameter
239+
$converted = ConvertParameterInput ($InputObject | ConvertFrom-Json)
240+
if (($converted -is [array]) -and ($converted.Count -eq 1)) {
241+
return $converted[0]
242+
}
243+
else {
244+
return $converted
245+
}
241246
}
242247
else {
243248
ConvertFrom-Json $InputObject
@@ -327,7 +332,7 @@ function ConvertParameterInput
327332
{
328333
$returnValue = @{}
329334
foreach ($property in $InputObject.PSObject.Properties) {
330-
$returnValue[$property.Name] = (ConvertParameterInput $property.Value).PSObject.BaseObject
335+
$returnValue[$property.Name] = (ConvertParameterInput $property.Value)
331336
}
332337

333338
return $returnValue

src/Resources/Policy.Autorest/custom/New-AzPolicyAssignment.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ param(
113113
[Parameter(ValueFromPipelineByPropertyName)]
114114
[ValidateNotNullOrEmpty()]
115115
[ValidateSet('Default', 'DoNotEnforce')]
116+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('Default', 'DoNotEnforce')]
116117
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Body')]
117118
[System.String]
118119
# The policy assignment enforcement mode.
@@ -121,6 +122,7 @@ param(
121122

122123
[Parameter()]
123124
[ValidateSet('None', 'SystemAssigned', 'UserAssigned')]
125+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('None', 'SystemAssigned', 'UserAssigned')]
124126
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Body')]
125127
[System.String]
126128
# The identity type.

src/Resources/Policy.Autorest/custom/New-AzPolicyExemption.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ param(
5252

5353
[Parameter(ValueFromPipelineByPropertyName)]
5454
[ValidateSet('Default', 'DoNotValidate')]
55+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('Default', 'DoNotValidate')]
5556
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Body')]
5657
[System.String]
5758
# Whether to validate the exemption is at or under the assignment scope.
@@ -71,6 +72,7 @@ param(
7172

7273
[Parameter(ParameterSetName='Default', Mandatory, ValueFromPipelineByPropertyName)]
7374
[ValidateSet('Waiver', 'Mitigated')]
75+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('Waiver', 'Mitigated')]
7476
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Path')]
7577
[System.String]
7678
# The policy exemption category

0 commit comments

Comments
 (0)