diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridDomain.md b/src/EventGrid/EventGrid/help/Get-AzEventGridDomain.md index 1386edcc68aa..fdcc20b407da 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridDomain.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridDomain.md @@ -49,8 +49,10 @@ Finally, ODataQuery parameter is used to perform filtering for the search result Gets the details of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1 +Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1 +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 Id : /subscriptions//resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain1 @@ -66,8 +68,10 @@ Tags : {[Tag1, Value1], [Tag2, Value2]} Gets the details of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\` using ResourceId option. ```powershell -PS C:\> Get-AzEventGridDomain -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1" +Get-AzEventGridDomain -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1" +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 Id : /subscriptions//resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain1 @@ -83,9 +87,11 @@ Tags : {[Tag1, Value1], [Tag2, Value2]} List all the Event Grid domains in resource group \`MyResourceGroupName\` without pagination (all domains are returned in one shot) ```powershell -PS C:\> $result=Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -PS C:\> Write-Output $result.PsDomainsList +$result=Get-AzEventGridDomain -ResourceGroup MyResourceGroupName +Write-Output $result.PsDomainsList +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 Id : /subscriptions//resourceGroups/myresourcegroupname/providers/Microsoft.EventGrid/domains/domain1 @@ -128,17 +134,17 @@ Tags : List the Event Grid domains (if any) in resource group \`MyResourceGroupName\` that satisfies the $odataFilter query 10 domains at a time. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of domains, user is expected to re-call Get-AzEventGridDomain and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ```powershell -PS C:\> $total = 0 -PS C:\> $odataFilter = "Name ne 'ABCD'" -PS C:\> $result = Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Top 10 -ODataQuery $odataFilter -PS C:\> $total += $result.Count -PS C:\> while ($null -ne $result.NextLink) +$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 } -PS C:\> Write-Output "Total number of domains is $Total" +Write-Output "Total number of domains is $Total" ``` ### Example 5 @@ -146,9 +152,11 @@ PS C:\> Write-Output "Total number of domains is $Total" List all the Event Grid domains in Azure Subscription without pagination (all domains are returned in one shot) ```powershell -PS C:\> $result=Get-AzEventGridDomain -PS C:\> Write-Output $result.PsDomainsList +$result=Get-AzEventGridDomain +Write-Output $result.PsDomainsList +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 Id : /subscriptions//resourceGroups/myresourcegroupname1/providers/Microsoft.EventGrid/domains/domain1 @@ -191,16 +199,16 @@ Tags : List the Event Grid domains (if any) in Azure Subscription that satisfies the $odataFilter query 20 domains at a time. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of domains, user is expected to re-call Get-AzEventGridDomain and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ```powershell -PS C:\> $total = 0 -PS C:\> $odataFilter = "Contains(Name, 'ABCD')" -PS C:\> $result = Get-AzEventGridDomain -Top 20 -ODataQuery $odataFilter -PS C:\> $total += $result.Count -PS C:\> while ($null -ne $result.NextLink) +$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 } -PS C:\> Write-Output "Total number of domains is $Total" +Write-Output "Total number of domains is $Total" ``` ## PARAMETERS diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridDomainKey.md b/src/EventGrid/EventGrid/help/Get-AzEventGridDomainKey.md index eaf96023df1b..4c72c85e922f 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridDomainKey.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridDomainKey.md @@ -40,8 +40,10 @@ Gets the shared access keys used to publish events to an Event Grid domain. Gets the shared access keys of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> Get-AzEventGridDomainKey -ResourceGroup MyResourceGroupName -Name Domain1 +Get-AzEventGridDomainKey -ResourceGroup MyResourceGroupName -Name Domain1 +``` +```output Key1 Key2 ---- ---- @@ -52,8 +54,10 @@ Key1 Key2 Gets the shared access keys of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1 | Get-AzEventGridDomainKey +Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1 | Get-AzEventGridDomainKey +``` +```output Key1 Key2 ---- ---- diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridDomainTopic.md b/src/EventGrid/EventGrid/help/Get-AzEventGridDomainTopic.md index 21f53fa935b9..40930be78656 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridDomainTopic.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridDomainTopic.md @@ -43,8 +43,10 @@ Finally, ODataQuery parameter is used to perform filtering for the search result Gets the details of Event Grid domain topic \`DomainTopic1\` under Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> Get-AzEventGridDomainTopic -ResourceGroup MyResourceGroupName -DomainName Domain1 -DomainTopicName DomainTopic1 +Get-AzEventGridDomainTopic -ResourceGroup MyResourceGroupName -DomainName Domain1 -DomainTopicName DomainTopic1 +``` +```output ResourceGroupName : MyResourceGroupName DomainName : DomainTopic1 DomainTopicName : Topic1 @@ -58,8 +60,10 @@ ProvisioningState : Succeeded Gets the details of Event Grid domain topic \`DomainTopic1\` under Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\` using the ResourceId option. ```powershell -PS C:\> Get-AzEventGridDomainTopic -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1/topics/DomainTopic1" +Get-AzEventGridDomainTopic -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1/topics/DomainTopic1" +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 DomainTopicName : DomainTopic1 @@ -73,10 +77,11 @@ ProvisioningState : Succeeded List all the Event Grid domain topics under Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\` without pagination (all results are returned in one shot). ```powershell -PS C:\> $result=Get-AzEventGridDomainTopic -ResourceGroup MyResourceGroupName -DomainName Domain1 -PS C:\> echo $result.PsDomainTopicsList - +$result=Get-AzEventGridDomainTopic -ResourceGroup MyResourceGroupName -DomainName Domain1 +echo $result.PsDomainTopicsList +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 DomainTopicName : DomainTopic1 @@ -106,10 +111,11 @@ ProvisioningState : Succeeded List all the Event Grid domain topics under Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\` without pagination (all results are returned in one shot) using ResourceId option ```powershell -PS C:\> $result=Get-AzEventGridDomainTopic -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1" -PS C:\> echo $result.PsDomainTopicsList - +$result=Get-AzEventGridDomainTopic -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1" +echo $result.PsDomainTopicsList +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 DomainTopicName : DomainTopic1 @@ -139,17 +145,17 @@ ProvisioningState : Succeeded List the Event Grid domain topics (if any) under domain \`Domain1\` in resource group \`MyResourceGroupName\` that satisfies the $odataFilter query 10 domain topics at a time. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of domain topics, user is expected to re-call Get-AzEventGridDomainTopic and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ```powershell -PS C:\> $total = 0 -PS C:\> $odataFilter = "Name ne 'ABCD'" -PS C:\> $result = Get-AzEventGridDomainTopic -ResourceGroup MyResourceGroupName -DomainName Domain1 -Top 10 -ODataQuery $odataFilter -PS C:\> $total += $result.Count -PS C:\> while ($result.NextLink -ne $Null) +$total = 0 +$odataFilter = "Name ne 'ABCD'" +$result = Get-AzEventGridDomainTopic -ResourceGroup MyResourceGroupName -DomainName Domain1 -Top 10 -ODataQuery $odataFilter +$total += $result.Count +while ($result.NextLink -ne $Null) { $result = Get-AzEventGridDomainTopic -NextLink $result.NextLink $total += $result.Count } -PS C:\> echo "Total number of domain topics is $Total" +echo "Total number of domain topics is $Total" ``` ## PARAMETERS diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridSubscription.md b/src/EventGrid/EventGrid/help/Get-AzEventGridSubscription.md index ad15d6c42645..8ea39de99068 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridSubscription.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridSubscription.md @@ -74,21 +74,21 @@ Finally, ODataQuery parameter is used to perform filtering for the search result ### Example 1 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1 +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1 ``` Gets the details of event subscription \`EventSubscription1\` created for topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1 -IncludeFullEndpointUrl +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -EventSubscriptionName EventSubscription1 -IncludeFullEndpointUrl ``` Gets the details of event subscription \`EventSubscription1\` created for topic \`Topic1\` in resource group \`MyResourceGroupName\`, including the full endpoint URL if it is a webhook based event subscription. ### Example 3 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 ``` Get a list of all the event subscriptions created for topic \`Topic1\` in resource group \`MyResourceGroupName\` without pagination. @@ -96,29 +96,29 @@ Get a list of all the event subscriptions created for topic \`Topic1\` in resour ### Example 4 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -Top 10 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -TopicName Topic1 -Top 10 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 10 event subscriptions (if any) created for topic \`Topic1\` in resource group \`MyResourceGroupName\` that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 5 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1 +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1 ``` Gets the details of event subscription \`EventSubscription1\` created for resource group \`MyResourceGroupName\`. ### Example 6 ```powershell -PS C:\> Get-AzEventGridSubscription -EventSubscriptionName EventSubscription1 +Get-AzEventGridSubscription -EventSubscriptionName EventSubscription1 ``` Gets the details of event subscription \`EventSubscription1\` created for the currently selected Azure subscription. ### Example 7 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName ``` Gets the list of all global event subscriptions created under the resource group \`MyResourceGroupName\` without pagination. @@ -126,15 +126,15 @@ Gets the list of all global event subscriptions created under the resource group ### Example 8 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Top 5 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Top 5 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 5 event subscriptions (if any) created under resource group \`MyResourceGroupName\` that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 9 ```powershell -PS C:\> Get-AzEventGridSubscription +Get-AzEventGridSubscription ``` Gets the list of all global event subscriptions created under the currently selected Azure subscription without pagination. @@ -142,15 +142,15 @@ Gets the list of all global event subscriptions created under the currently sele ### Example 10 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -Top 15 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -Top 15 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 15 global event subscriptions (if any) created under the currently selected Azure subscription that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 11 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2 +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2 ``` Gets the list of all regional event subscriptions created under resource group \`MyResourceGroupName\` in the specified location \`westus2\` without pagination. @@ -158,15 +158,15 @@ Gets the list of all regional event subscriptions created under resource group \ ### Example 12 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2 -Top 15 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -Location westus2 -Top 15 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 15 regional event subscriptions (if any) created under resource group \`MyResourceGroupName\` in the specified location \`westus2\` that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 13 ```powershell -PS C:\> Get-AzEventGridSubscription -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" +Get-AzEventGridSubscription -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" ``` Gets the list of all event subscriptions created for the specified EventHub namespace without pagination. @@ -174,15 +174,15 @@ Gets the list of all event subscriptions created for the specified EventHub name ### Example 14 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" -Top 25 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" -Top 25 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 25 event subscriptions (if any) created for the specified EventHub namespace that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 15 ```powershell -PS C:\> Get-AzEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location +Get-AzEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location ``` Gets the list of all event subscriptions created for the specified topic type (EventHub namespaces) in the specified location without pagination. @@ -190,15 +190,15 @@ Gets the list of all event subscriptions created for the specified topic type (E ### Example 16 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location -Top 15 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -TopicTypeName "Microsoft.EventHub.Namespaces" -Location $location -Top 15 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 15 event subscriptions (if any) created for the specified topic type (EventHub namespaces) in the specified location that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 17 ```powershell -PS C:\> Get-AzEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName MyResourceGroupName +Get-AzEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName MyResourceGroupName ``` Gets the list of all event subscriptions created for the specific resource group without pagination. @@ -206,8 +206,8 @@ Gets the list of all event subscriptions created for the specific resource group ### Example 18 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> Get-AzEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName MyResourceGroupName -Top 100 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridSubscription $result.NextLink +Get-AzEventGridSubscription -TopicTypeName "Microsoft.Resources.ResourceGroups" -ResourceGroupName MyResourceGroupName -Top 100 -ODataQuery $odataFilter +Get-AzEventGridSubscription $result.NextLink ``` List the first 100 event subscriptions (if any) created for the specific resource group that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of event subscriptions, user is expected to re-call Get-AzEventGridSubscription and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridTopic.md b/src/EventGrid/EventGrid/help/Get-AzEventGridTopic.md index b7a9d8847e48..1a902c5fe101 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridTopic.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridTopic.md @@ -46,21 +46,21 @@ Finally, ODataQuery parameter is used to perform filtering for the search result ### Example 1 ```powershell -PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 +Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 ``` Gets the details of Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzEventGridTopic -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/topics/Topic1" +Get-AzEventGridTopic -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/topics/Topic1" ``` Gets the details of Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 3 ```powershell -PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName +Get-AzEventGridTopic -ResourceGroup MyResourceGroupName ``` List all the Event Grid topics in resource group \`MyResourceGroupName\` without pagination. @@ -68,15 +68,15 @@ List all the Event Grid topics in resource group \`MyResourceGroupName\` without ### Example 4 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> $result = Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Top 10 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridTopic $result.NextLink +$result = Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Top 10 -ODataQuery $odataFilter +Get-AzEventGridTopic $result.NextLink ``` List the first 10 Event Grid topics (if any) in resource group \`MyResourceGroupName\` that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of topics, user is expected to re-call Get-AzEventGridTopic and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. ### Example 5 ```powershell -PS C:\> Get-AzEventGridTopic +Get-AzEventGridTopic ``` List all the Event Grid topics in the subscription without pagination. @@ -84,8 +84,8 @@ List all the Event Grid topics in the subscription without pagination. ### Example 6 ```powershell $odataFilter = "Name ne 'ABCD'" -PS C:\> $result = Get-AzEventGridTopic -Top 10 -ODataQuery $odataFilter -PS C:\> Get-AzEventGridTopic $result.NextLink +$result = Get-AzEventGridTopic -Top 10 -ODataQuery $odataFilter +Get-AzEventGridTopic $result.NextLink ``` List the first 10 Event Grid topics (if any) in the subscription that satisfies the $odataFilter query. If more results are available, the $result.NextLink will not be $null. In order to get next page(s) of topics, user is expected to re-call Get-AzEventGridTopic and uses result.NextLink obtained from the previous call. Caller should stop when result.NextLink becomes $null. diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridTopicKey.md b/src/EventGrid/EventGrid/help/Get-AzEventGridTopicKey.md index 58d6088f8b68..9c1431dd4f10 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridTopicKey.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridTopicKey.md @@ -36,14 +36,14 @@ Gets the shared access keys used to publish events to an Event Grid topic. ### Example 1 ```powershell -PS C:\> Get-AzEventGridTopicKey -ResourceGroup MyResourceGroupName -Name Topic1 +Get-AzEventGridTopicKey -ResourceGroup MyResourceGroupName -Name Topic1 ``` Gets the shared access keys of Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 | Get-AzEventGridTopicKey +Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 | Get-AzEventGridTopicKey ``` Gets the shared access keys of Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. diff --git a/src/EventGrid/EventGrid/help/Get-AzEventGridTopicType.md b/src/EventGrid/EventGrid/help/Get-AzEventGridTopicType.md index de72eff2d45c..4a1b0e8fc328 100644 --- a/src/EventGrid/EventGrid/help/Get-AzEventGridTopicType.md +++ b/src/EventGrid/EventGrid/help/Get-AzEventGridTopicType.md @@ -27,21 +27,21 @@ If IncludeEventTypes is specified, information about event types supported by ea ### Example 1 ```powershell -PS C:\> Get-AzEventGridTopicType +Get-AzEventGridTopicType ``` Gets a list of the topic types. ### Example 2 ```powershell -PS C:\> Get-AzEventGridTopicType -Name "Microsoft.Storage.StorageAccounts" +Get-AzEventGridTopicType -Name "Microsoft.Storage.StorageAccounts" ``` Gets information about the StorageAccounts topic type. ### Example 3 ```powershell -PS C:\> Get-AzEventGridTopicType -Name "Microsoft.Storage.StorageAccounts" -IncludeEventTypeData +Get-AzEventGridTopicType -Name "Microsoft.Storage.StorageAccounts" -IncludeEventTypeData ``` Gets information about the StorageAccounts topic type, including the event types supported by StorageAccounts. diff --git a/src/EventGrid/EventGrid/help/New-AzEventGridDomain.md b/src/EventGrid/EventGrid/help/New-AzEventGridDomain.md index f7d04a53132d..e0c93a7033d7 100644 --- a/src/EventGrid/EventGrid/help/New-AzEventGridDomain.md +++ b/src/EventGrid/EventGrid/help/New-AzEventGridDomain.md @@ -29,8 +29,10 @@ Creates a new Azure Event Grid Domain. Once the domain is created, an applicatio Creates an Event Grid domain \`Domain1\` in the specified geographic location \`westus2\`, in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 +New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 Id : /subscriptions//resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/domain1 @@ -46,8 +48,10 @@ Tags : Creates an Event Grid domain \`Domain1\` in the specified geographic location \`westus2\`, in resource group \`MyResourceGroupName\` with the specified tags "Department" and "Environment". ```powershell -PS C:\> New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 -Tag @{ Department="Finance"; Environment="Test" } +New-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 -Location westus2 -Tag @{ Department="Finance"; Environment="Test" } +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 Id : /subscriptions//resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/domain1 diff --git a/src/EventGrid/EventGrid/help/New-AzEventGridDomainKey.md b/src/EventGrid/EventGrid/help/New-AzEventGridDomainKey.md index a45d4bf229fb..673383bc85ae 100644 --- a/src/EventGrid/EventGrid/help/New-AzEventGridDomainKey.md +++ b/src/EventGrid/EventGrid/help/New-AzEventGridDomainKey.md @@ -40,8 +40,10 @@ Regenerates the shared access key for an Azure Event Grid Domain. Regenerate the key corresponding to key \'key1'\ of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> New-AzEventGridDomainKey -ResourceGroup MyResourceGroupName -DomainName Domain1 -Name key1 +New-AzEventGridDomainKey -ResourceGroup MyResourceGroupName -DomainName Domain1 -Name key1 +``` +```output Key1 Key2 ---- ---- @@ -52,8 +54,10 @@ Key1 Key2 Regenerate the key corresponding to key \'key1'\ of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\`. ```powershell -PS C:\> Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1 | New-AzEventGridTopicKey -KeyName "key1" +Get-AzEventGridDomain -ResourceGroup MyResourceGroupName -Name Domain1 | New-AzEventGridTopicKey -KeyName "key1" +``` +```output Key1 Key2 ---- ---- @@ -64,8 +68,10 @@ Key1 Key2 Regenerate the key corresponding to key \'key2'\ of Event Grid domain \`Domain1\` in resource group \`MyResourceGroupName\` using its full resource Id. ```powershell -PS C:\> New-AzEventGridDomainKey -ResourceId /subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1 -KeyName Key2 +New-AzEventGridDomainKey -ResourceId /subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1 -KeyName Key2 +``` +```output Key1 Key2 ---- ---- diff --git a/src/EventGrid/EventGrid/help/New-AzEventGridDomainTopic.md b/src/EventGrid/EventGrid/help/New-AzEventGridDomainTopic.md index fb42d646181b..5de4c40fd45d 100644 --- a/src/EventGrid/EventGrid/help/New-AzEventGridDomainTopic.md +++ b/src/EventGrid/EventGrid/help/New-AzEventGridDomainTopic.md @@ -27,8 +27,10 @@ Creates a new Azure Event Grid Domain Topic. Creates an Event Grid Domain Topic \`Topic1\` in Domain \`Domain1\` under resource group \`MyResourceGroupName\`. ```powershell -PS C:\> New-AzEventGridDomainTopic -ResourceGroupName MyResourceGroupName -DomainName Domain1 -Name Topic1 +New-AzEventGridDomainTopic -ResourceGroupName MyResourceGroupName -DomainName Domain1 -Name Topic1 +``` +```output ResourceGroupName : MyResourceGroupName DomainName : Domain1 DomainTopicName : topic1 diff --git a/src/EventGrid/EventGrid/help/New-AzEventGridSubscription.md b/src/EventGrid/EventGrid/help/New-AzEventGridSubscription.md index 31f812ab0844..a6a6e2f47bce 100644 --- a/src/EventGrid/EventGrid/help/New-AzEventGridSubscription.md +++ b/src/EventGrid/EventGrid/help/New-AzEventGridSubscription.md @@ -117,44 +117,44 @@ To create an event subscription to a supported Azure resource, specify the full ### Example 1 ```powershell -PS C:\> New-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 +New-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 ``` Creates a new event subscription \`EventSubscription1\` to an Azure Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\` with the webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription uses default filters. ### Example 2 ```powershell -PS C:\> New-AzEventGridSubscription -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 +New-AzEventGridSubscription -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 ``` Creates a new event subscription \`EventSubscription1\` to a resource group \`MyResourceGroupName\` with the webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription uses default filters. ### Example 3 ```powershell -PS C:\> New-AzEventGridSubscription -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 +New-AzEventGridSubscription -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 ``` Creates a new event subscription \`EventSubscription1\` to the currently selected Azure subscription with the webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription uses default filters. ### Example 4 ```powershell -PS C:\> $includedEventTypes = "Microsoft.Resources.ResourceWriteFailure", "Microsoft.Resources.ResourceWriteSuccess" -PS C:\> $labels = "Finance", "HR" -PS C:\> New-AzEventGridSubscription -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 -SubjectBeginsWith "TestPrefix" -SubjectEndsWith "TestSuffix" -IncludedEventType $includedEventTypes -Label $labels +$includedEventTypes = "Microsoft.Resources.ResourceWriteFailure", "Microsoft.Resources.ResourceWriteSuccess" +$labels = "Finance", "HR" +New-AzEventGridSubscription -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 -SubjectBeginsWith "TestPrefix" -SubjectEndsWith "TestSuffix" -IncludedEventType $includedEventTypes -Label $labels ``` Creates a new event subscription \`EventSubscription1\` to the currently selected Azure subscription with the webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription specifies the additional filters for event types and subject, and only events matching those filters will be delivered to the destination endpoint. ### Example 5 ```powershell -PS C:\> New-AzEventGridSubscription -EventSubscriptionName EventSubscription1 -EndpointType "eventhub" -Endpoint "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1" +New-AzEventGridSubscription -EventSubscriptionName EventSubscription1 -EndpointType "eventhub" -Endpoint "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1" ``` Creates a new event subscription \`EventSubscription1\` to the currently selected Azure subscription with the specified event hub as the destination for events. This event subscription uses default filters. ### Example 6 ```powershell -PS C:\> New-AzEventGridSubscription -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 +New-AzEventGridSubscription -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/19qlscd1 -EventSubscriptionName EventSubscription1 ``` Creates a new event subscription \`EventSubscription1\` to an EventHub namespace with the specified webhook destination endpoint `https://requestb.in/19qlscd1`. This event subscription uses default filters. diff --git a/src/EventGrid/EventGrid/help/New-AzEventGridTopic.md b/src/EventGrid/EventGrid/help/New-AzEventGridTopic.md index 753dfbd73d5d..19e399156ebe 100644 --- a/src/EventGrid/EventGrid/help/New-AzEventGridTopic.md +++ b/src/EventGrid/EventGrid/help/New-AzEventGridTopic.md @@ -26,14 +26,14 @@ Creates a new Azure Event Grid Topic. Once the topic is created, an application ### Example 1 ```powershell -PS C:\> New-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Location westus2 +New-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Location westus2 ``` Creates an Event Grid topic \`Topic1\` in the specified geographic location \`westus2\`, in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> New-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Location westus2 -Tag @{ Department="Finance"; Environment="Test" } +New-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 -Location westus2 -Tag @{ Department="Finance"; Environment="Test" } ``` Creates an Event Grid topic \`Topic1\` in the specified geographic location \`westus2\`, in resource group \`MyResourceGroupName\` with the specified tags "Department" and "Environment". diff --git a/src/EventGrid/EventGrid/help/New-AzEventGridTopicKey.md b/src/EventGrid/EventGrid/help/New-AzEventGridTopicKey.md index a539ea15a56e..9608b4661572 100644 --- a/src/EventGrid/EventGrid/help/New-AzEventGridTopicKey.md +++ b/src/EventGrid/EventGrid/help/New-AzEventGridTopicKey.md @@ -37,14 +37,14 @@ Regenerates the shared access key for an Azure Event Grid Topic. ### Example 1 ```powershell -PS C:\> New-AzEventGridTopicKey -ResourceGroup MyResourceGroupName -TopicName Topic1 -KeyName key1 +New-AzEventGridTopicKey -ResourceGroup MyResourceGroupName -TopicName Topic1 -KeyName key1 ``` Regenerate the key corresponding to key \'key1'\ of Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 | New-AzEventGridTopicKey -KeyName "key1" +Get-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 | New-AzEventGridTopicKey -KeyName "key1" ``` Regenerate the key corresponding to key \'key1'\ of Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. diff --git a/src/EventGrid/EventGrid/help/Remove-AzEventGridDomain.md b/src/EventGrid/EventGrid/help/Remove-AzEventGridDomain.md index 5ea0b2dc80c8..61cbb5a1bc4f 100644 --- a/src/EventGrid/EventGrid/help/Remove-AzEventGridDomain.md +++ b/src/EventGrid/EventGrid/help/Remove-AzEventGridDomain.md @@ -37,14 +37,14 @@ Removes an Azure Event Grid Domain. ### Example 1 ```powershell -PS C:\> Remove-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 +Remove-AzEventGridDomain -ResourceGroupName MyResourceGroupName -Name Domain1 ``` Removes the Event Grid Domain \`Domain1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/Domains/Domain1" | Remove-AzEventGridDomain +Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/Domains/Domain1" | Remove-AzEventGridDomain ``` Removes the Event Grid Domain \`Domain1\` in resource group \`MyResourceGroupName\`. diff --git a/src/EventGrid/EventGrid/help/Remove-AzEventGridDomainTopic.md b/src/EventGrid/EventGrid/help/Remove-AzEventGridDomainTopic.md index ac33d5366752..0c3c302fb12c 100644 --- a/src/EventGrid/EventGrid/help/Remove-AzEventGridDomainTopic.md +++ b/src/EventGrid/EventGrid/help/Remove-AzEventGridDomainTopic.md @@ -37,14 +37,14 @@ Removes an Azure Event Grid Domain Topic. ### Example 1 ```powershell -PS C:\> Remove-AzEventGridDomainTopic -ResourceGroupName MyResourceGroupName -DomainName Domain1 -Name Topic1 +Remove-AzEventGridDomainTopic -ResourceGroupName MyResourceGroupName -DomainName Domain1 -Name Topic1 ``` Removes the Event Grid Domain Topic \`Topic1\` under Domain \`Domain1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1/topics/Topic1" | Remove-AzEventGridDomainTopic +Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/domains/Domain1/topics/Topic1" | Remove-AzEventGridDomainTopic ``` Removes the Event Grid Domain Topic \`Topic1\` under Domain \`Domain1\` in resource group \`MyResourceGroupName\`. diff --git a/src/EventGrid/EventGrid/help/Remove-AzEventGridSubscription.md b/src/EventGrid/EventGrid/help/Remove-AzEventGridSubscription.md index 30fc8a26744f..9cdfc228acfd 100644 --- a/src/EventGrid/EventGrid/help/Remove-AzEventGridSubscription.md +++ b/src/EventGrid/EventGrid/help/Remove-AzEventGridSubscription.md @@ -75,35 +75,35 @@ Removes an Azure Event Grid event subscription for an Azure Event Grid topic, a ### Example 1 ```powershell -PS C:\> Remove-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -EventSubscriptionName EventSubscription1 +Remove-AzEventGridSubscription -ResourceGroup MyResourceGroup -TopicName Topic1 -EventSubscriptionName EventSubscription1 ``` Removes the event subscription \`EventSubscription1\` to an Azure Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Remove-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1 +Remove-AzEventGridSubscription -ResourceGroupName MyResourceGroupName -EventSubscriptionName EventSubscription1 ``` Removes the event subscription \`EventSubscription1\` to a resource group \`MyResourceGroupName\`. ### Example 3 ```powershell -PS C:\> Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1 +Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1 ``` Removes the event subscription \`EventSubscription1\` to the default Azure subscription. ### Example 4 ```powershell -PS C:\> Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1 +Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.EventHub/namespaces/$namespaceName" | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1 ``` Removes the event subscription \`EventSubscription1\` to an Event Hub namespace. ### Example 5 ```powershell -PS C:\> Get-AzEventGridTopic -ResourceGroup MyResourceGroup -TopicName Topic1 | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1 +Get-AzEventGridTopic -ResourceGroup MyResourceGroup -TopicName Topic1 | Remove-AzEventGridSubscription -EventSubscriptionName EventSubscription1 ``` Removes the event subscription \`EventSubscription1\` to an Event Grid Topic. diff --git a/src/EventGrid/EventGrid/help/Remove-AzEventGridTopic.md b/src/EventGrid/EventGrid/help/Remove-AzEventGridTopic.md index 42f9a1cba8c7..35c778b4d342 100644 --- a/src/EventGrid/EventGrid/help/Remove-AzEventGridTopic.md +++ b/src/EventGrid/EventGrid/help/Remove-AzEventGridTopic.md @@ -37,14 +37,14 @@ Removes an Azure Event Grid Topic. ### Example 1 ```powershell -PS C:\> Remove-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 +Remove-AzEventGridTopic -ResourceGroupName MyResourceGroupName -Name Topic1 ``` Removes the Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. ### Example 2 ```powershell -PS C:\> Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/topics/Topic1" | Remove-AzEventGridTopic +Get-AzResource -ResourceId "/subscriptions/$subscriptionId/resourceGroups/MyResourceGroupName/providers/Microsoft.EventGrid/topics/Topic1" | Remove-AzEventGridTopic ``` Removes the Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\`. diff --git a/src/EventGrid/EventGrid/help/Set-AzEventGridTopic.md b/src/EventGrid/EventGrid/help/Set-AzEventGridTopic.md index edcd7102509d..225e62c47a29 100644 --- a/src/EventGrid/EventGrid/help/Set-AzEventGridTopic.md +++ b/src/EventGrid/EventGrid/help/Set-AzEventGridTopic.md @@ -40,7 +40,7 @@ Sets the properties of an Event Grid topic. This can be used to replace the tags ### Example 1 ```powershell -PS C:\> Set-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 -Tag @{ Department="Finance"; Environment="Test" } +Set-AzEventGridTopic -ResourceGroup MyResourceGroupName -Name Topic1 -Tag @{ Department="Finance"; Environment="Test" } ``` Sets the properties of the Event Grid topic \`Topic1\` in resource group \`MyResourceGroupName\` to replace the tags with the specified tags "Department" and "Environment". diff --git a/src/EventGrid/EventGrid/help/Update-AzEventGridSubscription.md b/src/EventGrid/EventGrid/help/Update-AzEventGridSubscription.md index bf2002ec91bb..a3db3d6b090a 100644 --- a/src/EventGrid/EventGrid/help/Update-AzEventGridSubscription.md +++ b/src/EventGrid/EventGrid/help/Update-AzEventGridSubscription.md @@ -85,29 +85,29 @@ Update the properties of an Event Grid event subscription. This can be used to u ### Example 1 ```powershell -PS C:\> Update-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/1kxxoui1 +Update-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName -Endpoint https://requestb.in/1kxxoui1 ``` Updates the endpoint of the event subscription \`ES1\` for topic \`Topic1\` in resource group \`MyResourceGroupName\` to \`https://requestb.in/1kxxoui1\` ### Example 2 ```powershell -PS C:\> Get-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName | Update-AzEventGridSubscription -Endpoint https://requestb.in/1kxxoui1 +Get-AzEventGridSubscription -EventSubscriptionName ES1 -TopicName Topic1 -ResourceGroup MyResourceGroupName | Update-AzEventGridSubscription -Endpoint https://requestb.in/1kxxoui1 ``` Updates the endpoint of the event subscription \`ES1\` for topic \`Topic1\` in resource group \`MyResourceGroupName\` to \`https://requestb.in/1kxxoui1\` ### Example 3 ```powershell -PS C:\> Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/1kxxoui1 -SubjectEndsWith "jpg" +Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceId "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace" -Endpoint https://requestb.in/1kxxoui1 -SubjectEndsWith "jpg" ``` Updates the properties of the event subscription \`ES1\` for the EventHub namespace ContosoNamespace with the new endpoint as \`https://requestb.in/1kxxoui1\` and the new SubjectEndsWith filter as \`jpg\` ### Example 4 ```powershell -PS C:\> $labels = "Finance", "HR" -PS C:\> Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceGroup MyResourceGroupName -Label $labels +$labels = "Finance", "HR" +Update-AzEventGridSubscription -EventSubscriptionName ES1 -ResourceGroup MyResourceGroupName -Label $labels ``` Updates the properties of the event subscription \`ES1\` for the resource group \`MyResourceGroupName\` with the new labels $labels.