共用方式為


Remove-AzServiceFabricManagedClusterApplicationType

從叢集移除受控應用程式類型。 這會移除此資源下的所有類型版本。 僅支援 ARM 部署的應用程式類型。

語法

Remove-AzServiceFabricManagedClusterApplicationType
      [-ResourceGroupName] <String>
      [-ClusterName] <String>
      [-Name <String>]
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzServiceFabricManagedClusterApplicationType
      -ResourceId <String>
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzServiceFabricManagedClusterApplicationType
      -InputObject <PSManagedApplicationType>
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

此 Cmdlet 會移除受控應用程式類型,形成叢集,並將移除此資源下的所有類型版本,但在執行此命令之前,應該先移除其下的所有應用程式。

範例

範例 1

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appTypeName = "testAppType"
Remove-AzServiceFabricManagedClusterApplicationType -ResourceGroupName $resourceGroupName -ClusterName $clusterName -Name $appTypeName -Verbose

此範例會移除受控應用程式類型 「testAppType」 及其下的所有版本。 如果有使用此類型建立的任何應用程式,命令將會擲回例外狀況。

範例 2

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appTypeName = "testAppType"
$appType = Get-AzServiceFabricManagedClusterApplicationType -ResourceGroupName $resourceGroupName -ClusterName $clusterName -Name $appTypeName
$appType | Remove-AzServiceFabricManagedClusterApplicationType -Verbose

此範例會移除受控應用程式類型 「testAppType」 及其下的所有版本。 如果有使用此類型建立的任何應用程式,命令將會擲回例外狀況。

範例 3

$resourceId = "/subscriptions/13ad2c84-84fa-4798-ad71-e70c07af873f/resourcegroups/testRG/providers/Microsoft.ServiceFabric/managedClusters/testCluster/applicationTypes/testAppType"
Remove-AzServiceFabricManagedClusterApplicationType -ResourceId $resourceId

此範例會移除具有指定 ARM 資源識別碼的受控應用程式類型詳細數據。

參數

-ClusterName

指定叢集的名稱。

類型:String
Position:1
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Confirm

在執行 Cmdlet 之前,提示您進行確認。

類型:SwitchParameter
別名:cf
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-DefaultProfile

用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。

類型:IAzureContextContainer
別名:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-Force

拿掉但不提示。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-InputObject

受控應用程式類型資源。

類型:PSManagedApplicationType
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-Name

指定受控應用程式類型的名稱。

類型:String
別名:ApplicationTypeName
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-PassThru

{{ Fill PassThru Description }}

類型:SwitchParameter
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

-ResourceGroupName

指定資源群組的名稱。

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-ResourceId

受控應用程式類型的 Arm ResourceId。

類型:String
Position:Named
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出