共用方式為


Set-AzServiceFabricManagedClusterApplicationType

更新 Service Fabric 受控應用程式類型。 這可讓您更新標籤。 僅支援 ARM 部署的應用程式類型。

Syntax

Set-AzServiceFabricManagedClusterApplicationType
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-Name <String>]
   [-Tag <Hashtable>]
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterApplicationType
   [-Tag <Hashtable>]
   -InputObject <PSManagedApplicationType>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterApplicationType
   [-Tag <Hashtable>]
   -ResourceId <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

此 Cmdlet 可用來更新應用程式類型標籤。

範例

範例 1

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appTypeName = "testAppType"
$newTags = @{new="tags"}
Set-AzServiceFabricManagedClusterApplicationType -ResourceGroupName $resourceGroupName -ClusterName $clusterName -Name $appTypeName -Tag $newTags -Verbose

此範例會更新受控應用程式類型 「testAppType」 標籤。

範例 2

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appTypeName = "testAppType"
$newTags = @{new="tags"}
$appType = Get-AzServiceFabricManagedClusterApplicationType -ResourceGroupName $resourceGroupName -ClusterName $clusterName -Name $appTypeName
$appType | Set-AzServiceFabricManagedClusterApplicationType -Tag $newTags -Verbose

此範例會更新受控應用程式類型 「testAppType」 標籤。

範例 3

$newTags = @{new="tags"}
$resourceId = "/subscriptions/13ad2c84-84fa-4798-ad71-e70c07af873f/resourcegroups/testRG/providers/Microsoft.ServiceFabric/managedClusters/testCluster/applicationTypes/testAppType"
Set-AzServiceFabricManagedClusterApplicationType -ResourceId $resourceId -Tag $newTags

此範例會使用指定的 ARM 資源識別碼來更新受控應用程式類型詳細數據。

參數

-ClusterName

指定叢集的名稱。

類型:String
Position:1
預設值:None
必要:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

執行 Cmdlet 之前先提示您確認。

類型:SwitchParameter
Aliases:cf
Position:Named
預設值:None
必要:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

類型:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
預設值:None
必要:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

拿掉但不提示。

類型:SwitchParameter
Position:Named
預設值:None
必要:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

受控應用程式類型資源。

類型:PSManagedApplicationType
Position:Named
預設值:None
必要:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

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

類型:String
Aliases:ApplicationTypeName
Position:Named
預設值:None
必要:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

指定資源群組的名稱。

類型:String
Position:0
預設值:None
必要:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceId

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

類型:String
Position:Named
預設值:None
必要:True
Accept pipeline input:True
Accept wildcard characters:False

-Tag

將標記指定為索引鍵/值組。

類型:Hashtable
Position:Named
預設值:None
必要:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

顯示執行 Cmdlet 後會發生的情況。 未執行 Cmdlet。

類型:SwitchParameter
Aliases:wi
Position:Named
預設值:None
必要:False
Accept pipeline input:False
Accept wildcard characters:False

輸入

String

Hashtable

PSManagedApplicationType

輸出

Boolean

PSManagedApplicationType