Skip to content

Commit a34d18e

Browse files
Update CmdletBinding to include ConfirmImpact - closes ConfirmImpact of destructive functions should be high #46
This change enhances the safety of the following functions by setting the ConfirmImpact to 'High': - Remove-FabricDomainWorkspaceRoleAssignment - Remove-FabricEnvironment - Remove-FabricEventhouse - Remove-FabricEventstream - Revoke-FabricExternalDataShares - Remove-FabricItem - Remove-FabricMLModel - Remove-FabricReflex - Remove-FabricSQLDatabase - Remove-FabricSparkJobDefinition - Remove-FabricSparkCustomPool - Revoke-FabricCapacityTenantSettingOverrides - Remove-FabricWarehouse This ensures that users are prompted for confirmation before executing potentially destructive actions. Thank you!
1 parent 2161f3d commit a34d18e

13 files changed

+16
-16
lines changed

source/Public/Domain/Remove-FabricDomainWorkspaceRoleAssignment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Author: Tiago Balabuch
3232
#>
3333

3434
function Remove-FabricDomainWorkspaceRoleAssignment {
35-
[CmdletBinding(SupportsShouldProcess)]
35+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
3636
[Alias("Unassign-FabricDomainWorkspaceRoleAssignment")]
3737
param (
3838
[Parameter(Mandatory = $true)]

source/Public/Environment/Remove-FabricEnvironment.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Author: Tiago Balabuch
2626

2727
function Remove-FabricEnvironment
2828
{
29-
[CmdletBinding(SupportsShouldProcess)]
29+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
3030
param (
3131
[Parameter(Mandatory = $true)]
3232
[ValidateNotNullOrEmpty()]

source/Public/Eventhouse/Remove-FabricEventhouse.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function Remove-FabricEventhouse
3838
3939
#>
4040

41-
[CmdletBinding(SupportsShouldProcess)]
41+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
4242
param (
4343
[Parameter(Mandatory = $true)]
4444
[ValidateNotNullOrEmpty()]

source/Public/Eventstream/Remove-FabricEventstream.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Deletes the Eventstream with ID "67890" from workspace "12345".
3030
Author: Tiago Balabuch
3131
3232
#>
33-
[CmdletBinding(SupportsShouldProcess)]
33+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
3434
param (
3535
[Parameter(Mandatory = $true)]
3636
[ValidateNotNullOrEmpty()]

source/Public/External Data Share/Revoke-FabricExternalDataShares.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function Revoke-FabricExternalDataShares {
2727
Author: Tiago Balabuch
2828
#>
2929

30-
[CmdletBinding()]
30+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
3131
param (
3232
[Parameter(Mandatory = $true)]
3333
[ValidateNotNullOrEmpty()]
@@ -67,4 +67,4 @@ function Revoke-FabricExternalDataShares {
6767
Write-Message -Message "Failed to retrieve External Data Shares. Error: $errorDetails" -Level Error
6868
}
6969

70-
}
70+
}

source/Public/Item/Remove-FabricItem.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#>
3232

3333
Function Remove-FabricItem {
34-
[CmdletBinding(SupportsShouldProcess)]
34+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
3535
param
3636
(
3737
[Parameter(Mandatory = $true)]
@@ -67,4 +67,4 @@ Function Remove-FabricItem {
6767
}
6868
}
6969
}
70-
}
70+
}

source/Public/ML Model/Remove-FabricMLModel.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#>
2626
function Remove-FabricMLModel
2727
{
28-
[CmdletBinding(SupportsShouldProcess)]
28+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
2929
param (
3030
[Parameter(Mandatory = $true)]
3131
[ValidateNotNullOrEmpty()]

source/Public/Reflex/Remove-FabricReflex.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#>
2626
function Remove-FabricReflex
2727
{
28-
[CmdletBinding(SupportsShouldProcess)]
28+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
2929
param (
3030
[Parameter(Mandatory = $true)]
3131
[ValidateNotNullOrEmpty()]

source/Public/SQL Database/Remove-FabricSQLDatabase.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Author: Kamil Nowinski
2626

2727
function Remove-FabricSQLDatabase
2828
{
29-
[CmdletBinding(SupportsShouldProcess)]
29+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
3030
param (
3131
[Parameter(Mandatory = $true)]
3232
[ValidateNotNullOrEmpty()]

source/Public/Spark Job Definition/Remove-FabricSparkJobDefinition.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#>
2525
function Remove-FabricSparkJobDefinition
2626
{
27-
[CmdletBinding(SupportsShouldProcess)]
27+
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')]
2828
param (
2929
[Parameter(Mandatory = $true)]
3030
[ValidateNotNullOrEmpty()]

0 commit comments

Comments
 (0)