From 0822e305d76635a097ff87dad9071bc195b2889f Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Fri, 6 Dec 2024 13:45:22 +0800 Subject: [PATCH] fix incorrect examples (#26844) --- .../docs/Add-AzKustoClusterCalloutPolicy.md | 2 +- .../docs/Get-AzKustoClusterCalloutPolicy.md | 2 +- .../Get-AzKustoClusterCalloutPolicy.md | 29 ++++++++++--------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Kusto/Kusto.Autorest/docs/Add-AzKustoClusterCalloutPolicy.md b/src/Kusto/Kusto.Autorest/docs/Add-AzKustoClusterCalloutPolicy.md index a91e43482a1d..a523bd4701c2 100644 --- a/src/Kusto/Kusto.Autorest/docs/Add-AzKustoClusterCalloutPolicy.md +++ b/src/Kusto/Kusto.Autorest/docs/Add-AzKustoClusterCalloutPolicy.md @@ -30,7 +30,7 @@ Adds a list of callout policies for engine services. ## EXAMPLES -### Example 1: +### Example 1: Adding two callout policies to a cluster ```powershell $kustoCalloutPolicy = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.ICalloutPolicy]@{ calloutType = "kusto" diff --git a/src/Kusto/Kusto.Autorest/docs/Get-AzKustoClusterCalloutPolicy.md b/src/Kusto/Kusto.Autorest/docs/Get-AzKustoClusterCalloutPolicy.md index dea63a495089..4e6aa6ee05f9 100644 --- a/src/Kusto/Kusto.Autorest/docs/Get-AzKustoClusterCalloutPolicy.md +++ b/src/Kusto/Kusto.Autorest/docs/Get-AzKustoClusterCalloutPolicy.md @@ -22,7 +22,7 @@ Returns the allowed callout policies for the specified service. ## EXAMPLES -### Example 1: +### Example 1: List callout policies to a cluster ```powershell Get-AzKustoClusterCalloutPolicy -ResourceGroupName rg1 -ClusterName cluster1 -SubscriptionId sub diff --git a/src/Kusto/Kusto.Autorest/examples/Get-AzKustoClusterCalloutPolicy.md b/src/Kusto/Kusto.Autorest/examples/Get-AzKustoClusterCalloutPolicy.md index 3a9a2ada200b..308c0f956bda 100644 --- a/src/Kusto/Kusto.Autorest/examples/Get-AzKustoClusterCalloutPolicy.md +++ b/src/Kusto/Kusto.Autorest/examples/Get-AzKustoClusterCalloutPolicy.md @@ -1,16 +1,19 @@ -### Example 1: Adding two callout policies to a cluster +### Example 1: List callout policies to a cluster ```powershell -$kustoCalloutPolicy = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.ICalloutPolicy]@{ - calloutType = "kusto" - outboundAccess = "Allow" - calloutUriRegex = "*" -} -$sqlCalloutPolicy = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.ICalloutPolicy]@{ - calloutType = "sql" - outboundAccess = "Deny" - calloutUriRegex = "*" -} -Add-AzKustoClusterCalloutPolicy -ResourceGroupName rg1 -ClusterName cluster1 -SubscriptionId sub -Value -Value @($kustoCalloutPolicy, $sqlCalloutPolicy) + +Get-AzKustoClusterCalloutPolicy -ResourceGroupName rg1 -ClusterName cluster1 -SubscriptionId sub + +``` + +```output +CalloutId CalloutType CalloutUriRegex OutboundAccess +--------- ----------- --------------- -------------- +*_cosmosdb cosmosdb * Allow +*_postgresql postgresql * Deny +*_sandbox_artifacts sandbox_artifacts * Allow +*_genevametrics genevametrics * Deny +*_kusto kusto * Allow +*_sql sql * Deny ``` -The above command adds the two defined callout policies to cluster1 in rg1. +The above command returns a list of the callout policies of cluster1 in rg1. \ No newline at end of file