次の方法で共有


Get-AzCloudServiceInstanceView

クラウド サービスの状態を取得します。

構文

Get-AzCloudServiceInstanceView
   -CloudServiceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

説明

クラウド サービスの状態を取得します。

例 1: クラウド サービス インスタンス ビューを取得する

$cloudServiceInstanceView = Get-AzCloudServiceInstanceView -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS"

$cloudServiceInstanceView
$cloudServiceInstanceView.ToJsonString()

RoleInstanceStatusesSummary                                   Statuses
---------------------------                                   --------

{{ProvisioningState/succeeded : 4}, {PowerState/started : 4}} {Provisioning succeeded, Started, Current Upgrade Domain of cloud service is -1., Max Upgrade Domain of cloud service is 1.}
{
  "roleInstance": {
    "statusesSummary": [
      {
        "code": "ProvisioningState/succeeded",
        "count": 4
      },
      {
        "code": "PowerState/started",
        "count": 4
      }
    ]
  },
  "statuses": [
    {
      "code": "ProvisioningState/succeeded",
      "displayStatus": "Provisioning succeeded",
      "level": "Info",
      "time": "2020-10-28T13:26:48.8109686Z"
    },
    {
      "code": "PowerState/started",
      "displayStatus": "Started",
      "level": "Info",
      "time": "2020-10-28T13:26:48.8109686Z"
    },
    {
      "code": "CurrentUpgradeDomain/-1",
      "displayStatus": "Current Upgrade Domain of cloud service is -1.",
      "level": "Info"
    },
    {
      "code": "MaxUpgradeDomain/1",
      "displayStatus": "Max Upgrade Domain of cloud service is 1.",
      "level": "Info"
    }
  ]
}

このコマンドレットは、ContosOrg という名前のリソース グループに属する ContosoCS という名前のクラウド サービスのインスタンス ビューを取得します。

パラメーター

-CloudServiceName

クラウド サービスの名前。

型:String
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-DefaultProfile

DefaultProfile パラメーターは機能しません。 別のサブスクリプションに対してコマンドレットを実行する場合は、使用可能な場合は SubscriptionId パラメーターを使用します。

型:PSObject
Aliases:AzureRMContext, AzureCredential
配置:Named
規定値:None
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-ResourceGroupName

リソース グループの名前。

型:String
配置:Named
規定値:None
必須:True
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

-SubscriptionId

Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、すべてのサービス呼び出しの URI の一部を形成します。

型:String[]
配置:Named
規定値:(Get-AzContext).Subscription.Id
必須:False
パイプライン入力を受け取る:False
ワイルドカード文字を受け取る:False

出力

ICloudServiceInstanceView