Get-AzCloudServiceRoleInstance

Gets a role instance from a cloud service.

Syntax

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

Gets a role instance from a cloud service.

Examples

Example 1: Get all role instances

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

This command gets the properties of all role instances of cloud service named ContosoCS that belongs to the resource group named ContosOrg.

Example 2: Get properties for single role instance

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

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

This command gets the properties of the role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg.

Parameters

-CloudServiceName

Name of the cloud service.

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

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Expand

The expand expression to apply to the operation. 'UserData' is not supported for cloud services.

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

-InputObject

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

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

-ResourceGroupName

Name of the resource group.

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

-RoleInstanceName

Name of the role instance.

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

-SubscriptionId

Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

ICloudServiceIdentity

Outputs

IRoleInstance