From a36719acfa6fcec62d9a897229ded3abdee4de45 Mon Sep 17 00:00:00 2001 From: "v-yuzhichen@microsoft.com" Date: Tue, 12 Apr 2022 21:55:40 +0800 Subject: [PATCH 1/2] Fix Az.ServiceBus Syntax Errors --- .../ServiceBus/help/Add-AzServiceBusIPRule.md | 4 ++-- .../help/Add-AzServiceBusVirtualNetworkRule.md | 4 ++-- .../help/Get-AzServiceBusAuthorizationRule.md | 8 ++++---- .../ServiceBus/help/Get-AzServiceBusKey.md | 8 ++++---- .../help/New-AzServiceBusAuthorizationRule.md | 6 +++--- .../ServiceBus/help/New-AzServiceBusKey.md | 12 ++++++------ .../ServiceBus/help/New-AzServiceBusNamespace.md | 2 +- .../help/Remove-AzServiceBusAuthorizationRule.md | 6 +++--- .../ServiceBus/help/Remove-AzServiceBusIPRule.md | 2 +- .../help/Remove-AzServiceBusNetworkRuleSet.md | 2 +- .../help/Remove-AzServiceBusVirtualNetworkRule.md | 4 ++-- .../help/Set-AzServiceBusAuthorizationRule.md | 12 ++++++------ .../help/Set-AzServiceBusNetworkRuleSet.md | 6 +++--- 13 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md index 32a39cdbacb3..b62720ce8612 100644 --- a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md +++ b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md @@ -32,7 +32,7 @@ Add a single IP rule to the NetworkRuleSet of the given Namespace ### Example 1 ```powershell -Add-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -IpMask "11.22.33.44" -Action Allow +Add-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -IpMask "11.22.33.44" -Action Allow ``` Name : default DefaultAction : Allow @@ -45,7 +45,7 @@ add the IPRule with IpMask "11.22.33.44" and Action Allow fro the given namespac ### Example 2 ```powershell -Add-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -IpRuleObject $ipruleObject +Add-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -IpRuleObject $ipruleObject ``` Name : default DefaultAction : Allow diff --git a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md index 594d8240c97d..9f38d4a33e4e 100644 --- a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md +++ b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md @@ -33,7 +33,7 @@ Add a single VirtualNetworkRule to NetworkRuleSet for the given Namespace ### Example 1 ```powershell -Add-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01" -IgnoreMissingVnetServiceEndpoint +Add-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01" -IgnoreMissingVnetServiceEndpoint ``` Name : default DefaultAction : Allow @@ -46,7 +46,7 @@ Adds the given Subnet and IgnoreMissingVnetServiceEndpoint (VirtualNetworkRule) ### Example 2 ```powershell -Add-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -VirtualNetworkRuleObject $virtualruleset1 +Add-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -VirtualNetworkRuleObject $virtualruleset1 ``` Name : default DefaultAction : Allow diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md index 33f60fe8a347..e079a2f26fc7 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusAuthorizationRule.md @@ -43,28 +43,28 @@ The **Get-AzServiceBusAuthorizationRule** cmdlet gets the description of the spe ### Example 1 ```powershell -Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 +Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 ``` Returns the specified authorization rule description for a specified namespace. ### Example 2 ```powershell -Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 +Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 ``` Returns the specified authorization rule description for a specified queue. ### Example 3 ```powershell -Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 +Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 ``` Returns the specified authorization rule description for a specified topic. ### Example 4 ```powershell -Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -AliasName SBAlias -Name AuthoRule1 +Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -AliasName SBAlias -Name AuthoRule1 ``` Returns the specified authorization rule description for a specified namespace and alias. diff --git a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md index ad235f30631f..e966c97a0764 100644 --- a/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md +++ b/src/ServiceBus/ServiceBus/help/Get-AzServiceBusKey.md @@ -43,28 +43,28 @@ The **Get-AzServiceBusKey** cmdlet returns the primary and secondary connection ### Example 1 ```powershell -Get-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 +Get-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 ``` Primary and secondary connection string to the specified namespace. ### Example 2 ```powershell -Get-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 +Get-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 ``` Primary and secondary connection string to the specified queue. ### Example 3 ```powershell -Get-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 +Get-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 ``` Primary and secondary connection string to the specified topic. ### Example 4 ```powershell -Get-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -AliasName SBAlias -Name AuthoRule1 +Get-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -AliasName SBAlias -Name AuthoRule1 ``` Primary and secondary connection string to the specified namespace and alias. diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md index 5018a4daa11a..a5c463bac846 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusAuthorizationRule.md @@ -39,21 +39,21 @@ The **New-AzServiceBusAuthorizationRule** cmdlet creates a new authorization rul ### Example 1 ```powershell -New-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -Rights @("Listen","Send") +New-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -Rights @("Listen","Send") ``` Creates `AuthoRule1` with **Listen** and **Send** rights for the namespace `SB-Example1`. ### Example 2 ```powershell -New-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -Rights @("Listen","Send") +New-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -Rights @("Listen","Send") ``` Creates `AuthoRule1` with **Listen** and **Send** rights for the queue `SBQueue`. ### Example 3 ```powershell -New-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -Rights @("Listen","Send") +New-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -Rights @("Listen","Send") ``` Creates `AuthoRule1` with **Listen** and **Send** rights for the topic `SBTopic`. diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md index 0118f9356e7e..5027a04961c9 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusKey.md @@ -40,42 +40,42 @@ The **New-AzServiceBusKey** cmdlet generates new primary or secondary connection ### Example 1 ```powershell -New-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -RegenerateKey PrimaryKey +New-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -RegenerateKey PrimaryKey ``` Regenerates the primary or secondary connection strings for the namespace. ### Example 2 ```powershell -New-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -RegenerateKey PrimaryKey -KeyValue {base64-encoded 256-bit key} +New-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -RegenerateKey PrimaryKey -KeyValue "base64-encoded 256-bit key" ``` Regenerates the primary or secondary connection strings with provided Key value for the namespace. ### Example 3 ```powershell -New-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -RegenerateKey PrimaryKey +New-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -RegenerateKey PrimaryKey ``` Regenerates the primary or secondary connection strings for the queue. ### Example 4 ```powershell -New-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -RegenerateKey PrimaryKey -KeyValue {base64-encoded 256-bit key} +New-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -RegenerateKey PrimaryKey -KeyValue "base64-encoded 256-bit key" ``` Regenerates the primary or secondary connection strings with provided Key value for the queue. ### Example 5 ```powershell -New-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -RegenerateKey PrimaryKey +New-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -RegenerateKey PrimaryKey ``` Regenerates the primary or secondary connection strings for the topic. ### Example 6 ```powershell -New-AzServiceBusKey -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -RegenerateKey PrimaryKey -KeyValue {base64-encoded 256-bit key} +New-AzServiceBusKey -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -RegenerateKey PrimaryKey -KeyValue "base64-encoded 256-bit key" ``` Regenerates the primary or secondary connection strings with provided Key value for the topic. diff --git a/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md b/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md index 18c3c7655fd5..cd6a09d67129 100644 --- a/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md +++ b/src/ServiceBus/ServiceBus/help/New-AzServiceBusNamespace.md @@ -46,7 +46,7 @@ Creates a new Service Bus namespace within the specified resource group. ### Example 2 - ZoneRedundant and DisableLocalAuth ```powershell -New-AzServiceBusNamespace -ResourceGroupName Default-ServiceBus-WestUS -Name SB-Example1 -Location WestUS2 -SkuName "Premium" -Tag @{Tag1="Tag1Value"} -ZoneRedundant - DisableLocalAuth +New-AzServiceBusNamespace -ResourceGroupName Default-ServiceBus-WestUS -Name SB-Example1 -Location WestUS2 -SkuName "Premium" -Tag @{Tag1="Tag1Value"} -ZoneRedundant -DisableLocalAuth ``` ```output diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md index d25035ee9731..68699670159f 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusAuthorizationRule.md @@ -40,21 +40,21 @@ The **Remove-AzServiceBusAuthorizationRule** cmdlet removes the authorization ru ### Example 1 ```powershell -Remove-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 +Remove-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 ``` Removes the authorization rule `SBAuthoRule1` of namespace `SB-Example1` from the specified resource group. ### Example 2 ```powershell -Remove-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 +Remove-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 ``` Removes the authorization rule `SBAuthoRule1` of queue `SBQueue` from the specified resource group. ### Example 3 ```powershell -Remove-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 +Remove-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 ``` Removes the authorization rule `SBAuthoRule1` of topic `SBTopic` from the specified resource group. diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusIPRule.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusIPRule.md index d1bf58cd6dbc..9ef910c12cd4 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusIPRule.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusIPRule.md @@ -32,7 +32,7 @@ Remove a single IP rule to the NetworkRuleSet of the given Namespace ### Example 1 ```powershell -Remove-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -IpMask "11.22.33.44" +Remove-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -IpMask "11.22.33.44" ``` Removes IpMask of the NetworkRuleSet of the given namespace diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNetworkRuleSet.md index 96ed8f0491f5..5bdc9af0e30a 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusNetworkRuleSet.md @@ -37,7 +37,7 @@ Removes the NetworkRuleSet for the Given Namespace ### Example 1 ```powershell -Remove-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 +Remove-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-1375 ``` ```output diff --git a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusVirtualNetworkRule.md b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusVirtualNetworkRule.md index 48702937e6a6..320e90072ac7 100644 --- a/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusVirtualNetworkRule.md +++ b/src/ServiceBus/ServiceBus/help/Remove-AzServiceBusVirtualNetworkRule.md @@ -32,14 +32,14 @@ Removes the single given VirtualNetworkRule for the NetworkRuleSet of the Namesp ### Example 1 ```powershell -Remove-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01" +Remove-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01" ``` Removes the single given VirtualNetworkRule for the NetworkRuleSet of the Namespace ### Example 2 ```powershell -Remove-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-2389 -VirtualNetworkRuleObject $virtualruleset1 +Remove-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -VirtualNetworkRuleObject $virtualruleset1 ``` Remove the $virtualruleset1 of NetworkRuleSet for the given Namespace diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md index 136e55152fd4..a5ab4ac8ed75 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md @@ -47,33 +47,33 @@ The **Set-AzServiceBusAuthorizationRule** cmdlet updates the description for the ### Example 1 ```powershell -$authRuleObj = Get-AzServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 +$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 $authRuleObj.Rights.Remove("Manage") -Set-AzServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -InputObj $authRuleObj +Set-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -InputObj $authRuleObj ``` Removes **Manage** from the access rights of the authorization rule `AuthoRule1` in namespace `SB-Example1`. ### Example 2 ```powershell -$authRuleObj = Get-AzServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 +$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 $authRuleObj.Rights.Remove("Manage") -Set-AzServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -InputObj $authRuleObj +Set-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -InputObj $authRuleObj ``` Removes **Manage** from the access rights of the authorization rule `AuthoRule1` in queue `SBQueue`. ### Example 3 ```powershell -$authRuleObj = Get-AzServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 +$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 $authRuleObj.Rights.Remove("Manage") -Set-AzServiceBusNamespaceAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -InputObj $authRuleObj +Set-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -InputObj $authRuleObj ``` Removes **Manage** from the access rights of the authorization rule `AuthoRule1` in topic `SBTopic`. diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md index 0d2b9ab3a76f..0e1eb8b931bc 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md @@ -41,7 +41,7 @@ Update the NetwrokruleSet of the given Namespace in the current Azure subscripti ```powershell $IpRules = @([Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "4.4.4.4";Action = "Allow"},[Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "3.3.3.3";Action = "Allow"}) $VirtualNetworkRules = @([Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetVirtualNetworkRulesAttributes]@{Subnet=@{Id="/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default"};IgnoreMissingVnetServiceEndpoint=$True}) -Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 -IPRule $IpRules -VirtualNetworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug +Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-1375 -IPRule $IpRules -VirtualNetworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug ``` @@ -57,7 +57,7 @@ Update the NetworkRuleSet using -IPRule and -VirtualNetworkRule parameters ### Example 2 ```powershell -$getresult = Get-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 +$getresult = Get-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-1375 Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 -InputObject $getresult ``` @@ -74,7 +74,7 @@ Update the NetworkRuleSet using -InputObject ### Example 3 ```powershell -Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 -ResourceId /subscriptions/SubscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace1-1375 +Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-1375 -ResourceId /subscriptions/SubscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace1-1375 ``` ```output From 60c65999b12e5794d757a4cf52b57ea6288e49dd Mon Sep 17 00:00:00 2001 From: "v-yuzhichen@microsoft.com" Date: Thu, 21 Apr 2022 17:43:19 +0800 Subject: [PATCH 2/2] Fix Az.ServicesBus Syntax Errors --- .../ServiceBus/help/Add-AzServiceBusIPRule.md | 6 ++++-- .../help/Add-AzServiceBusVirtualNetworkRule.md | 6 ++++-- .../help/Set-AzServiceBusAuthorizationRule.md | 12 ++++++------ .../help/Set-AzServiceBusNetworkRuleSet.md | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md index b62720ce8612..f92592c85126 100644 --- a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md +++ b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusIPRule.md @@ -34,26 +34,28 @@ Add a single IP rule to the NetworkRuleSet of the given Namespace ```powershell Add-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -IpMask "11.22.33.44" -Action Allow ``` +```output Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG-TestAzEventhub/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace-2389/networkRuleSets/default Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSet IpRules : {11.22.33.44, Allow} VirtualNetworkRules : - +``` add the IPRule with IpMask "11.22.33.44" and Action Allow fro the given namespace. ### Example 2 ```powershell Add-AzServiceBusIPRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -IpRuleObject $ipruleObject ``` +```output Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG-TestAzEventhub/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace-2389/networkRuleSets/default Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSet IpRules : {11.22.33.44, Allow} VirtualNetworkRules : - +``` add the IPRule with IpMask "11.22.33.44" and Action Allow fro the given namespace. ## PARAMETERS diff --git a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md index 9f38d4a33e4e..595d43dbee79 100644 --- a/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md +++ b/src/ServiceBus/ServiceBus/help/Add-AzServiceBusVirtualNetworkRule.md @@ -35,26 +35,28 @@ Add a single VirtualNetworkRule to NetworkRuleSet for the given Namespace ```powershell Add-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -SubnetId "/subscriptions/SubscriptionId/resourcegroups/ResourceGroup/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01" -IgnoreMissingVnetServiceEndpoint ``` +```output Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG-TestAzEventhub/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace-1122/networkRuleSets/default Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSet IpRules : VirtualNetworkRules : {/subscriptions/SubscriptionId/resourcegroups/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default, False} - +``` Adds the given Subnet and IgnoreMissingVnetServiceEndpoint (VirtualNetworkRule) to NetworkRuleSet for the given Namespace ### Example 2 ```powershell Add-AzServiceBusVirtualNetworkRule -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-2389 -VirtualNetworkRuleObject $virtualruleset1 ``` +```output Name : default DefaultAction : Allow Id : /subscriptions/SubscriptionId/resourceGroups/RSG-TestAzEventhub/providers/Microsoft.ServiceBus/namespaces/ServiceBus-Namespace-1122/networkRuleSets/default Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSet IpRules : VirtualNetworkRules : {/subscriptions/SubscriptionId/resourcegroups/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default, False} - +``` Adds the $virtualruleset1 to NetworkRuleSet for the given Namespace ## PARAMETERS diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md index a5ab4ac8ed75..2d7ecb9322d1 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusAuthorizationRule.md @@ -47,33 +47,33 @@ The **Set-AzServiceBusAuthorizationRule** cmdlet updates the description for the ### Example 1 ```powershell -$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 +$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 $authRuleObj.Rights.Remove("Manage") -Set-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -InputObj $authRuleObj +Set-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Name AuthoRule1 -InputObj $authRuleObj ``` Removes **Manage** from the access rights of the authorization rule `AuthoRule1` in namespace `SB-Example1`. ### Example 2 ```powershell -$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 +$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 $authRuleObj.Rights.Remove("Manage") -Set-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -InputObj $authRuleObj +Set-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Queue SBQueue -Name AuthoRule1 -InputObj $authRuleObj ``` Removes **Manage** from the access rights of the authorization rule `AuthoRule1` in queue `SBQueue`. ### Example 3 ```powershell -$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 +$authRuleObj = Get-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 $authRuleObj.Rights.Remove("Manage") -Set-AzServiceBusAuthorizationRule -ResourceGroup Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -InputObj $authRuleObj +Set-AzServiceBusAuthorizationRule -ResourceGroupName Default-ServiceBus-WestUS -Namespace SB-Example1 -Topic SBTopic -Name AuthoRule1 -InputObj $authRuleObj ``` Removes **Manage** from the access rights of the authorization rule `AuthoRule1` in topic `SBTopic`. diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md index 0e1eb8b931bc..8168ee717f43 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md @@ -58,7 +58,7 @@ Update the NetworkRuleSet using -IPRule and -VirtualNetworkRule parameters ### Example 2 ```powershell $getresult = Get-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-1375 -Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 -InputObject $getresult +Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Name ServiceBus-Namespace1-1375 -InputObject $getresult ``` ```output