Skip to content

Commit a666b85

Browse files
authored
Add back missing parameter completion functionality (#25654)
1 parent 727849f commit a666b85

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ param(
124124
[Parameter(ValueFromPipelineByPropertyName)]
125125
[ValidateNotNullOrEmpty()]
126126
[ValidateSet('Default', 'DoNotEnforce')]
127+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('Default', 'DoNotEnforce')]
127128
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Body')]
128129
[System.String]
129130
# The policy assignment enforcement mode.
@@ -132,6 +133,7 @@ param(
132133

133134
[Parameter()]
134135
[ValidateSet('None', 'SystemAssigned', 'UserAssigned')]
136+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('None', 'SystemAssigned', 'UserAssigned')]
135137
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Body')]
136138
[System.String]
137139
# The identity type.

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

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

7575
[Parameter(ValueFromPipelineByPropertyName)]
7676
[ValidateSet('Waiver', 'Mitigated')]
77+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('Waiver', 'Mitigated')]
7778
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Path')]
7879
[System.String]
7980
# The policy exemption category
@@ -115,6 +116,7 @@ param(
115116

116117
[Parameter()]
117118
[ValidateSet('Default', 'DoNotValidate')]
119+
[Microsoft.Azure.PowerShell.Cmdlets.Policy.PSArgumentCompleterAttribute('Default', 'DoNotValidate')]
118120
[Microsoft.Azure.PowerShell.Cmdlets.Policy.Category('Body')]
119121
[System.String]
120122
# The option whether validate the exemption is at or under the assignment scope.

0 commit comments

Comments
 (0)