Get-AzEventGridDomain
Event Grid doメイン の詳細を取得するか、現在の Azure サブスクリプションのすべての Event Grid doメイン の一覧を取得します。
構文
Get-AzEventGridDomain
[[-ResourceGroupName] <String>]
[-ODataQuery <String>]
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzEventGridDomain
[-ResourceGroupName] <String>
[-Name] <String>
[-ODataQuery <String>]
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzEventGridDomain
[-ResourceId] <String>
[-ODataQuery <String>]
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzEventGridDomain
[-NextLink <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
説明
Get-AzEventGridDoメイン コマンドレットは、指定した Event Grid doメイン の詳細、または現在の Azure サブスクリプションのすべての Event Grid doメイン の一覧を取得します。 doメイン 名を指定すると、1 つの Event Grid doメイン の詳細が返されます。 doメイン 名が指定されていない場合は、doメイン の一覧が返されます。 このリストで返される要素の数は、Top パラメーターによって制御されます。 Top 値が指定されていないか$null場合、一覧には一度に返されるすべての doメイン アイテムが含まれます。 それ以外の場合、Top は、リストで返される要素の最大数を示します。 さらに多くの doメイン が使用可能な場合は、次の呼び出しで NextLink の値を使用して、doメイン の次のページを取得する必要があります。 最後に、ODataQuery パラメーターを使用して検索結果のフィルター処理を実行します。 フィルター 処理クエリは、Name プロパティのみを使用する OData 構文に従います。 サポートされる操作には、CONTAINS、eq (等しい)、ne (等しくない場合)、AND、OR、NOT が含まれます。
例
例 1
リソース グループ 'MyResourceGroupName' の Event Grid doメイン 'Doメイン1' の詳細を取得します。
Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1
ResourceGroupName : MyResourceGroupName
DomainName : Domain1
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain1
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain1.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Tag1, Value1], [Tag2, Value2]}
例 2
ResourceId オプションを使用して、リソース グループ 'MyResourceGroupName' の Event Grid doメイン 'Doメイン1' の詳細を取得します。
Get-AzEventGridDomain -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1"
ResourceGroupName : MyResourceGroupName
DomainName : Domain1
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain1
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain1.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Tag1, Value1], [Tag2, Value2]}
例 3
リソース グループ 'MyResourceGroupName' 内のすべての Event Grid doメイン を改ページなしで一覧表示します (すべての doメイン が 1 回で返されます)
$result=Get-AzEventGridDomain -ResourceGroup MyResourceGroupName
Write-Output $result.PsDomainsList
ResourceGroupName : MyResourceGroupName
DomainName : Domain1
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain1
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain1.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Tag1, Value1], [Tag2, Value2]}
ResourceGroupName : MyResourceGroupName
DomainName : Domain2
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain2
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain2.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags :
ResourceGroupName : MyResourceGroupName
DomainName : Domain3
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain3
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain3.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Tag3, Value3], [Tag4, Value4]}
ResourceGroupName : MyResourceGroupName
DomainName : Domain4
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain4
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain4.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags :
例 4
リソース グループ 'MyResourceGroupName' の Event Grid doメインs (存在する場合) を一覧表示します。リソース グループ 'MyResourceGroupName' は、一度に 10 $odataFilterのタスクメインを満たします。 さらに多くの結果が得られている場合は、$result。NextLink は$nullされません。 doメイン の次のページを取得するために、ユーザーは Get-AzEventGridDo を再度呼び出しメイン結果を使用する必要があります。前の呼び出しから取得した NextLink。 呼び出し元は、結果が返されたときに停止する必要があります。NextLink が$nullになります。
$total = 0
$odataFilter = "Name ne 'ABCD'"
$result = Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Top 10 -ODataQuery $odataFilter
$total += $result.Count
while ($null -ne $result.NextLink)
{
$result = Get-AzEventGridDomain -NextLink $result.NextLink
$total += $result.Count
}
Write-Output "Total number of domains is $Total"
例 5
Azure サブスクリプション内のすべての Event Grid doメイン を改ページせずに一覧表示します (すべて実行メインが 1 回で返されます)
$result=Get-AzEventGridDomain
Write-Output $result.PsDomainsList
ResourceGroupName : MyResourceGroupName
DomainName : Domain1
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname1/providers/Microsoft.EventGrid/domains/domain1
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain1.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Tag1, Value1], [Tag2, Value2]}
ResourceGroupName : MyResourceGroupName
DomainName : Domain2
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname1/providers/Microsoft.EventGrid/domains/domain2
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain2.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags :
ResourceGroupName : MyResourceGroupName
DomainName : Domain3
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname2/providers/Microsoft.EventGrid/domains/domain3
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain3.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags : {[Tag3, Value3], [Tag4, Value4]}
ResourceGroupName : MyResourceGroupName
DomainName : Domain4
Id : /subscriptions/<Azure Subscription Id>/resourceGroups/myresourcegroupname3/providers/Microsoft.EventGrid/domains/domain4
Type : Microsoft.EventGrid/domains
Location : westus2
Endpoint : https://domain4.westus2-1.eventgrid.azure.net/api/events
ProvisioningState : Succeeded
Tags :
例 6
$odataFilter クエリを一度に 20 個メイン満たす Event Grid doメイン (ある場合) を Azure サブスクリプションに一覧表示します。 さらに多くの結果が得られている場合は、$result。NextLink は$nullされません。 doメイン の次のページを取得するために、ユーザーは Get-AzEventGridDo を再度呼び出しメイン結果を使用する必要があります。前の呼び出しから取得した NextLink。 呼び出し元は、結果が返されたときに停止する必要があります。NextLink が$nullになります。
$total = 0
$odataFilter = "Contains(Name, 'ABCD')"
$result = Get-AzEventGridDomain -Top 20 -ODataQuery $odataFilter
$total += $result.Count
while ($null -ne $result.NextLink)
{
$result = Get-AzEventGridDomain -NextLink $result.NextLink
$total += $result.Count
}
Write-Output "Total number of domains is $Total"
パラメーター
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
EventGrid doメイン name。
Type: | String |
Aliases: | DomainName |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NextLink
取得するリソースの次のページのリンク。 この値は、さらに多くのリソースを照会できる場合に、最初の Get-AzEventGrid コマンドレット呼び出しで取得されます。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ODataQuery
リストの結果をフィルター処理するために使用される OData クエリ。 現在、フィルター処理は Name プロパティでのみ許可されています。サポートされる操作には、CONTAINS、eq (等しい)、ne (等しくない場合)、AND、OR、NOT が含まれます。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
リソース グループの名前。
Type: | String |
Aliases: | ResourceGroup |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceId
Event Grid Doメイン を表すリソース識別子。
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Top
取得するリソースの最大数。 有効な値は 1 ~ 100 です。 上位の値が指定され、さらに多くの結果が使用できる場合、結果には NextLink でクエリを実行する次のページへのリンクが含まれます。 Top 値が指定されていない場合、リソースの完全な一覧が一度に返されます。
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
入力
出力
Azure PowerShell
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示