編集

次の方法で共有


Remove-AzSubscriptionDeploymentStack

Removes a Subscription scoped Deployment Stack.

Syntax

Remove-AzSubscriptionDeploymentStack
      [-Name] <String>
      -ActionOnUnmanage <PSActionOnUnmanage>
      [-PassThru]
      [-Force]
      [-BypassStackOutOfSyncError]
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSubscriptionDeploymentStack
      -ResourceId <String>
      -ActionOnUnmanage <PSActionOnUnmanage>
      [-PassThru]
      [-Force]
      [-BypassStackOutOfSyncError]
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzSubscriptionDeploymentStack
      [-InputObjet] <PSDeploymentStack>
      -ActionOnUnmanage <PSActionOnUnmanage>
      [-PassThru]
      [-Force]
      [-BypassStackOutOfSyncError]
      [-Pre]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Delete a subscription scoped deployment stack.

Examples

Example 1: Deletes the subscription scoped deployment stack MySubStack from the current subscription

Remove-AzSubscriptionDeploymentStack -Name MySubStack

Deletes a subscription scoped deployment stack named 'MySubStack' in default subscription, with unmanaged resources and resource groups being detached on cleanup.

Parameters

-ActionOnUnmanage

Action to take on resources that become unmanaged on deletion or update of the deployment stack. Possible values include: 'detachAll' (do not delete any unmanaged resources), 'deleteResources' (delete all unmanaged resources that are not RGs or MGs), and 'deleteAll' (delete every unmanaged resource).

Type:PSActionOnUnmanage
Accepted values:DetachAll, DeleteResources, DeleteAll
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-BypassStackOutOfSyncError

Bypass errors for the stack being out of sync when running the operation. If the stack is out of sync and this parameter is not set, the operation will fail. Only include this parameter if instructed to do so on a failed stack operation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Do not ask for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObjet

The stack PS object

Type:PSDeploymentStack
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the deploymentStack to delete

Type:String
Aliases:StackName
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

If set, a boolean will be returned with value dependent on cmdlet success.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Pre

When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

ResourceId of the stack to delete

Type:String
Aliases:Id
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

Boolean