共用方式為


Get-AzCloudServiceRoleInstance

從雲端服務取得角色實例。

語法

Get-AzCloudServiceRoleInstance
   -CloudServiceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-Expand <InstanceViewTypes>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCloudServiceRoleInstance
   -CloudServiceName <String>
   -ResourceGroupName <String>
   -RoleInstanceName <String>
   [-SubscriptionId <String[]>]
   [-Expand <InstanceViewTypes>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzCloudServiceRoleInstance
   -InputObject <ICloudServiceIdentity>
   [-Expand <InstanceViewTypes>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

從雲端服務取得角色實例。

範例

範例 1:取得所有角色實例

Get-AzCloudServiceRoleInstance -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"

Name                    Location    SkuName        SkuTier
----                    --------    -------        -------
ContosoFrontEnd_IN_0    eastus2euap Standard_D1_v2 Standard
ContosoFrontEnd_IN_1    eastus2euap Standard_D1_v2 Standard
ContosoBackEnd_IN_1     eastus2euap Standard_D1_v2 Standard
ContosoBackEnd_IN_1     eastus2euap Standard_D1_v2 Standard

此命令會取得屬於 ContosOrg 資源群組之雲端服務的所有角色實例屬性。

範例 2:取得單一角色實例的屬性

Get-AzCloudServiceRoleInstance -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0"

Name                    Location    SkuName        SkuTier
----                    --------    -------        -------
ContosoFrontEnd_IN_0    eastus2euap Standard_D1_v2 Standard

此命令會取得名為 ContosoCS 之雲端服務ContosoFrontEnd_IN_0角色實例的屬性,該實例屬於名為 ContosOrg 的資源群組。

參數

-CloudServiceName

雲端服務的名稱。

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

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

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

-Expand

要套用至作業的展開表達式。 雲端服務不支援 『UserData』。

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

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

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

-ResourceGroupName

資源群組的名稱。

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

-RoleInstanceName

角色實例的名稱。

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

-SubscriptionId

可唯一識別Microsoft Azure 訂用帳戶的訂用帳戶認證。 訂用帳戶標識碼會形成每個服務呼叫 URI 的一部分。

類型:String[]
Position:Named
預設值:(Get-AzContext).Subscription.Id
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

ICloudServiceIdentity

輸出

IRoleInstance