Get-AzureRmDeploymentManagerServiceUnit

サービス ユニットを取得します。

構文

Get-AzureRmDeploymentManagerServiceUnit
   [-ResourceGroupName] <String>
   [-ServiceTopologyName] <String>
   [-ServiceName] <String>
   [-Name] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentManagerServiceUnit
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Service] <PSServiceResource>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentManagerServiceUnit
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-ServiceResourceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentManagerServiceUnit
   [-ResourceGroupName] <String>
   [-ServiceName] <String>
   [-Name] <String>
   [-ServiceTopology] <PSServiceTopologyResource>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentManagerServiceUnit
   [-ResourceGroupName] <String>
   [-ServiceName] <String>
   [-Name] <String>
   [-ServiceTopologyResourceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentManagerServiceUnit
   [-ResourceId] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzureRmDeploymentManagerServiceUnit
   [-ServiceUnit] <PSServiceUnitResource>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

説明

Get-AzureRmDeploymentManagerServiceUnit コマンドレットは、サービス内のサービス ユニットを取得します。

サービス ユニットの名前、定義されたサービス、サービス トポロジ名、およびリソース グループ名を指定します。 または、ServiceUnit オブジェクトまたは ResourceId を指定することもできます。

このオブジェクトをローカルで変更し、Set-AzureRmDeploymentManagerServiceUnit コマンドレットを使用してサービス ユニットに変更を適用できます。

例 1

PS C:\> Get-AzureRmDeploymentManagerServiceUnit -ResourceGroupName ContosoResourceGroup -ServiceTopologyName ContosoServiceTopology -ServiceName ContosoService1  -Name ContosoService1Storage

このコマンドは、ContosoResourceGroup の ContosoServiceTopology という名前のサービス トポロジのサービス ContosoService1 の下にある ContosoService1Storage というサービス ユニットを取得します。

例 2: リソース識別子を使用してサービス ユニットを取得する。

PS C:\> Get-AzureRmDeploymentManagerServiceUnit -ResourceId "/subscriptions/subscriptionId/resourcegroups/ContosoResourceGroup/providers/Microsoft.DeploymentManager/serviceTopologies/ContosoServiceTopology/services/ContosoService1/serviceUnits/ContosoService1Storage"

このコマンドは、ContosoResourceGroup の ContosoServiceTopology という名前のサービス トポロジのサービス ContosoService1 の下にある ContosoService1Storage というサービス ユニットを取得します。

例 3: サービス ユニット オブジェクトを使用してサービス ユニットを取得します。

PS C:\> Get-AzureRmDeploymentManagerServiceUnit -ServiceUnit $serviceUnitObject

このコマンドは、名前、サービス名、サービス トポロジ名、ResourceGroup が、それぞれ$serviceUnitObjectの Name、ServiceName、ServiceTopologyName、ResourceGroupName プロパティと一致するサービス ユニットを取得します。

パラメーター

-DefaultProfile

Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。

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

-Name

サービス ユニットの名前。

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

-ResourceGroupName

リソース グループです。

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

-ResourceId

リソース識別子。

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

-Service

サービス ユニットを作成する必要があるサービス オブジェクト。

Type:PSServiceResource
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ServiceName

サービス ユニットが含まれるサービスの名前。

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

-ServiceResourceId

サービス ユニットを作成する必要があるサービス リソース識別子。

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

-ServiceTopology

サービス ユニットを作成する必要があるサービス トポロジ オブジェクト。

Type:PSServiceTopologyResource
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ServiceTopologyName

サービス ユニットが含まれるサービス トポロジの名前。

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

-ServiceTopologyResourceId

サービス ユニットを作成する必要があるサービス トポロジ リソース識別子。

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

-ServiceUnit

サービス ユニット リソース オブジェクト。

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

入力

None

出力

PSServiceUnitResource