Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ContainerInstance/ContainerInstance.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module-version: 1.0.3
# Normally, title is the service name
title: ContainerInstance
subject-prefix: $(service-name)
enable-change-safety: true

directive:
# Following is two common directive which are normally required in all the RPs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,27 @@ function Invoke-AzContainerInstanceCommand {
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
processΒ {
tryΒ {
Az.ContainerInstance.internal\Invoke-AzContainerInstanceCommandΒ @PSBoundParameters
}Β catchΒ {

dynamicparam {
# Change Safety: forward the wrapped generated cmdlet's dynamic parameters (-AcquirePolicyToken / -ChangeReference).
# Self-gates on enable-change-safety: the private cmdlet implements IDynamicParameters only when the module opted in.
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command -Name 'Az.ContainerInstance.private\Invoke-AzContainerInstanceCommand_ExecuteExpanded' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) {
$dynamicParameters.Add($entry.Key, $entry.Value)
}
}
}
return $dynamicParameters
}

process {
try {
Az.ContainerInstance.internal\Invoke-AzContainerInstanceCommand @PSBoundParameters
} catch {
throw
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,23 @@ param(
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)

dynamicparam {
# Change Safety: forward the wrapped generated cmdlet's dynamic parameters (-AcquirePolicyToken / -ChangeReference).
# Self-gates on enable-change-safety: the private cmdlet implements IDynamicParameters only when the module opted in.
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command -Name 'Az.ContainerInstance.private\New-AzContainerGroup_CreateExpanded' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) {
$dynamicParameters.Add($entry.Key, $entry.Value)
}
}
}
return $dynamicParameters
}

process {
try {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "6b2e488e-e778-4c37-91d9-3cbcdbd92fbc"
"generate_Id": "b8eda972-31bc-4da8-aa9f-02ec75d4955f"
}
1 change: 1 addition & 0 deletions src/ContainerInstance/ContainerInstance/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
-->

## Upcoming Release
* Added Change Safety support.

## Version 5.0.0
* [Upgraded code generator](https://go.microsoft.com/fwlink/?linkid=2340249)
Expand Down
1 change: 1 addition & 0 deletions src/ContainerRegistry/ContainerRegistry.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ try-require:
module-version: 0.1.0
title: ContainerRegistry
subject-prefix: $(service-name)
enable-change-safety: true

inlining-threshold: 100

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "a19a7101-0606-4929-92cc-43573f286e00"
"generate_Id": "2f748bc6-e0fe-44b2-879f-bff194351267"
}
1 change: 1 addition & 0 deletions src/ContainerRegistry/ContainerRegistry/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Added Change Safety support for additional cmdlets.

## Version 5.1.0
* Added ChangeSafety Support
Expand Down
1 change: 1 addition & 0 deletions src/EventGrid/EventGrid.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ input-file:
title: EventGrid
module-version: 0.1.0
subject-prefix: $(service-name)
enable-change-safety: true

identity-correction-for-post: true
resourcegroup-append: true
Expand Down
2 changes: 1 addition & 1 deletion src/EventGrid/EventGrid.Autorest/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "71d3c888-de41-4841-b15a-443051b0c462"
"generate_Id": "250f1633-0894-4094-a0e4-52f43ac30f5b"
}
1 change: 1 addition & 0 deletions src/EventGrid/EventGrid/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Added Change Safety support.

## Version 2.2.0
* Upgraded nuget package to signed package.
Expand Down
1 change: 1 addition & 0 deletions src/EventHub/EventHub.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module-version: 0.1.0
# Normally, title is the service name
title: EventHub
subject-prefix: $(service-name)
enable-change-safety: true

# If there are post APIs for some kinds of actions in the RP, you may need to
# uncomment following line to support viaIdentity for these post APIs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,18 @@ function Approve-AzEventHubPrivateEndpointConnection{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasDescription = $PSBoundParameters.Remove('Description')
$hasAsJob = $PSBoundParameters.Remove('AsJob')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,18 @@ function Deny-AzEventHubPrivateEndpointConnection{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubPrivateEndpointConnection_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasDescription = $PSBoundParameters.Remove('Description')
$hasAsJob = $PSBoundParameters.Remove('AsJob')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,18 @@ function New-AzEventHubAuthorizationRule{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateExpanded' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$null = $PSBoundParameters.Remove('WhatIf')
$null = $PSBoundParameters.Remove('Confirm')
Expand Down
13 changes: 12 additions & 1 deletion src/EventHub/EventHub.Autorest/custom/New-AzEventHubKey.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,18 @@ function New-AzEventHubKey{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubNamespaceKey_Regenerate' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasKeyValue = $PSBoundParameters.Remove('KeyValue')
$hasKeyType = $PSBoundParameters.Remove('KeyType')
Expand Down
15 changes: 15 additions & 0 deletions src/EventHub/EventHub.Autorest/custom/New-AzEventHubNamespace.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,21 @@ function New-AzEventHubNamespace{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
dynamicparam {
# Change Safety: forward the wrapped generated cmdlet's dynamic parameters (-AcquirePolicyToken / -ChangeReference).
# Self-gates on enable-change-safety: the private cmdlet implements IDynamicParameters only when the module opted in.
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command -Name 'Az.EventHub.private\New-AzEventHubNamespace_CreateExpanded' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) {
$dynamicParameters.Add($entry.Key, $entry.Value)
}
}
}
return $dynamicParameters
}
process{
try{
$null = $PSBoundParameters.Remove('WhatIf')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,18 @@ function Remove-AzEventHubAuthorizationRule{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\Remove-AzEventHubNamespaceAuthorizationRule_Delete' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$null = $PSBoundParameters.Remove('WhatIf')
$null = $PSBoundParameters.Remove('Confirm')
Expand Down
15 changes: 15 additions & 0 deletions src/EventHub/EventHub.Autorest/custom/Set-AzEventHub.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,21 @@ function Set-AzEventHub{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
dynamicparam {
# Change Safety: forward the wrapped generated cmdlet's dynamic parameters (-AcquirePolicyToken / -ChangeReference).
# Self-gates on enable-change-safety: the private cmdlet implements IDynamicParameters only when the module opted in.
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command -Name 'Az.EventHub.private\New-AzEventHub_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) {
$dynamicParameters.Add($entry.Key, $entry.Value)
}
}
}
return $dynamicParameters
}
process{
try{
$hasCaptureEnabled = $PSBoundParameters.Remove('CaptureEnabled')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,18 @@ function Set-AzEventHubApplicationGroup{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubApplicationGroup_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{

$hasIsEnabled = $PSBoundParameters.Remove('IsEnabled')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,18 @@ function Set-AzEventHubAuthorizationRule{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubNamespaceAuthorizationRule_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasRights = $PSBoundParameters.Remove('Rights')
$hasAsJob = $PSBoundParameters.Remove('AsJob')
Expand Down
13 changes: 12 additions & 1 deletion src/EventHub/EventHub.Autorest/custom/Set-AzEventHubCluster.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,18 @@ function Set-AzEventHubCluster{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubCluster_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasCapacity = $PSBoundParameters.Remove('Capacity')
$hasTag = $PSBoundParameters.Remove('Tag')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,18 @@ function Set-AzEventHubConsumerGroup{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\New-AzEventHubConsumerGroup_CreateViaIdentity' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasUserMetadata = $PSBoundParameters.Remove('UserMetadata')
$hasAsJob = $PSBoundParameters.Remove('AsJob')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,18 @@ function Set-AzEventHubGeoDRConfigurationBreakPair{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\Invoke-AzEventHubBreakDisasterRecoveryConfigPairing_Break' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasAsJob = $PSBoundParameters.Remove('AsJob')
$null = $PSBoundParameters.Remove('WhatIf')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,18 @@ function Set-AzEventHubGeoDRConfigurationFailOver{
# Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
process{
dynamicparam {
$dynamicParameters = [System.Management.Automation.RuntimeDefinedParameterDictionary]::new()
$wrapped = Get-Command 'Az.EventHub.private\Invoke-AzEventHubFailDisasterRecoveryConfigOver_Fail' -ErrorAction Ignore
if ($wrapped -and [System.Management.Automation.IDynamicParameters].IsAssignableFrom($wrapped.ImplementingType)) {
$instance = [System.Activator]::CreateInstance($wrapped.ImplementingType)
foreach ($entry in $instance.GetDynamicParameters().GetEnumerator()) {
if (-not $dynamicParameters.ContainsKey($entry.Key)) { $dynamicParameters.Add($entry.Key, $entry.Value) }
}
}
return $dynamicParameters
}
process{
try{
$hasAsJob = $PSBoundParameters.Remove('AsJob')
$null = $PSBoundParameters.Remove('WhatIf')
Expand Down
Loading
Loading