Azure Event Grid で使用できる Azure PowerShell コマンドレット (Get-AzureRmEventGridSubscription) について

ブログ エントリ内にアフィリエイト広告が含まれています
スポンサーリンク

イベント ドリブン型サーバーレス アプリを推進、信頼性の高いクラウド アプリが構築可能な Azure Event Grid の管理について、Azure ポータルだけではなく、Azure PowerShell でも操作が可能になっています。

Azure PowerShell における Azure Event Grid の管理は、ドキュメントにも公開されていますが、使用するパラメーターに関しては現状、英語の情報のみとなっているため、日本語訳 (意訳) してみました。

ここでは、Get-AzureRmEventGridSubscription コマンドレットのヘルプ情報について、「Get-Help」コマンドレットの -Full オプションを用いて実行した結果を元に記載しています。
※Azure Event Grid で使用できる Azure PowerShell コマンドレット一覧については、「Azure Event Grid で使用できる Azure PowerShell コマンドレット一覧について」を参照。

Get-AzureRmEventGridSubscription コマンドレット

名前

Get-AzureRmEventGridSubscription

概要

イベント サブスクリプションの詳細、もしくは現在の Azure サブスクリプション内にあるすべてのイベント サブスクリプションの一覧を取得します。

構文

Get-AzureRmEventGridSubscription
  [[-EventSubscriptionName] <String>]
  [[-ResourceGroupName] <String>]
  [[-TopicName] <String>]
  [-DefaultProfile <IAzureContextContainer>]
  [-IncludeFullEndpointUrl]
  [<CommonParameters>]

Get-AzureRmEventGridSubscription
  [[-EventSubscriptionName] <String>]
  [-ResourceId] <String>
  [-DefaultProfile <IAzureContextContainer>]
  [-IncludeFullEndpointUrl]
  [<CommonParameters>]

Get-AzureRmEventGridSubscription
  [[-ResourceGroupName] <String>]
  [[-TopicTypeName] <String>]
  [[-Location] <String>]
  [-DefaultProfile <IAzureContextContainer>]
  [-IncludeFullEndpointUrl]
  [<CommonParameters>]

Get-AzureRmEventGridSubscription
  [-InputObject] <PSTopic>
  [-DefaultProfile <IAzureContextContainer>]
  [<CommonParameters>]

説明

Get-AzureRmEventGridSubscription コマンドレットは、指定した Event Grid サブスクリプションの詳細、もしくは現在の Azure サブスクリプション、ないしリソース グループ内にあるすべての Event Grid サブスクリプションの一覧を取得します。イベント サブスクリプション名が指定されている場合、1つの Event Grid サブスクリプションの詳細が返されます。イベント サブスクリプション名が指定されていない場合、すべてのイベント サブスクリプションの一覧が返されます。

パラメーター

-DefaultProfile <IAzureContextContainer>

Azure と通信するために使用される資格情報、アカウント、テナント、およびサブスクリプション情報を指定します。

必須 false
位置 named
規定値 None
パイプライン入力を許可する False
ワイルドカード文字を許可する false

-EventSubscriptionName <String>

イベント サブスクリプション名を指定します。

必須 false
位置 0
規定値 None
パイプライン入力を許可する True (ByPropertyName)
ワイルドカード文字を許可する false

-IncludeFullEndpointUrl [<SwitchParameter>]

イベント サブスクリプション先の完全エンドポイント URL を含める場合は指定します。

必須 false
位置 named
規定値 False
パイプライン入力を許可する False
ワイルドカード文字を許可する false

-InputObject <PSTopic>

EventGrid Event サブスクリプション オブジェクトを指定します。

必須 true
位置 0
規定値 None
パイプライン入力を許可する True (ByValue)
ワイルドカード文字を許可する false

-Location <String>

場所を指定します。

必須 false
位置 2
規定値 None
パイプライン入力を許可する True (ByPropertyName)
ワイルドカード文字を許可する false

-ResourceGroupName <String>

リソース グループ名を指定します。

必須 false
位置 0
規定値 None
パイプライン入力を許可する True (ByPropertyName)
ワイルドカード文字を許可する false

-ResourceId <String>

イベント サブスクリプションが作成されたリソース ID を指定します。

必須 true
位置 1
規定値 None
パイプライン入力を許可する True (ByPropertyName)
ワイルドカード文字を許可する false

-TopicName <String>

EventGrid トピック名を指定します。

必須 false
位置 2
規定値 None
パイプライン入力を許可する True (ByPropertyName)
ワイルドカード文字を許可する false

-TopicTypeName <String>

TopicType 名を指定します。

必須 false
位置 1
規定値 None
パイプライン入力を許可する True (ByPropertyName)
ワイルドカード文字を許可する false

<CommonParameters>

このコマンドレットは、次の共通パラメーターをサポートします: Verbose、Debug、ErrorAction、ErrorVariable、WarningAction、WarningVariable、OutBuffer, PipelineVariable、および OutVariable。詳細については、about_CommonParameters を参照してください。

入力

  • System.String
    • Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription System.Management.Automation.SwitchParameter

出力

  • Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscription
    • System.Collections.Generic.List`1[[Microsoft.Azure.Commands.EventGrid.Models.PSEventSubscriptionListInstance, Microsoft.Azure.Commands.EventGrid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

メモ

  • なし

例 1 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1 

コマンドの説明

リソース グループ MyResourceGroupName 内のトピック Topic1 に作成されたイベント サブスクリプション EventSubscription1 の詳細を取得します。

例 2 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1 -IncludeFullEndpointUrl 

コマンドの説明

リソース グループ MyResourceGroupName 内のトピック Topic1 に作成されたイベント サブスクリプション EventSubscription1 の詳細を取得します。これは、WebHook ベースのイベント サブスクリプションの場合、完全なエンドポイント URL を含みます。

例 3 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 

コマンドの説明

リソース グループ MyResourceGroupName 内のトピック Topic1 に作成されたすべてのイベント サブスクリプションの一覧を取得します。

例 4 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1 

コマンドの説明

リソース グループ MyResourceGroupName 内に作成されたイベント サブスクリプション EventSubscription1 の詳細を取得します。

例 5 : 

コマンド

 Get-AzureRmEventGridSubscription -EventSubscriptionName EventSubscription1 

コマンドの説明

現在選択されている Azure サブスクリプションに作成されたイベント サブスクリプション EventSubscription1 の詳細を取得します。

例 6 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName 

コマンドの説明

リソース グループ MyResourceGroupName 内に作成されたすべてのグローバル イベント サブスクリプションの一覧を取得します。

例 7 : 

コマンド

 Get-AzureRmEventGridSubscription 

コマンドの説明

現在選択されている Azure サブスクリプションに作成されたすべてのグローバル イベント サブスクリプションの一覧を取得します。

例 8 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2 

コマンドの説明

指定された場所 westus2 のリソース グループ MyResourceGroupName 内に作成されたすべてのリージョン イベント サブスクリプションの一覧を取得します。

例 9 : 

コマンド

 Get-AzureRmEventGridSubscription -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" 

コマンドの説明

指定した EventHub 名前空間に作成されたすべてのイベント サブスクリプションの一覧を作成します。

例 10 : 

コマンド

 Get-AzureRmEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location 

コマンドの説明

指定した場所の指定したトピックの型 (EventHub 名前空間) に作成されたすべてのイベント サブスクリプションの一覧を取得します。

例 11 : 

コマンド

 Get-AzureRmEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName MyResourceGroupName 

コマンドの説明

指定したリソース グループに作成されたすべてのイベント サブスクリプションの一覧を取得します。

参考

タイトルとURLをコピーしました