Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User/ranhoudine/2024 04 13 #26791

Merged
2 changes: 2 additions & 0 deletions src/Kusto/Kusto.Autorest/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ tools
custom/*.psm1
custom/autogen-model-cmdlets
test/*-TestResults.xml
license.txt
/*.ps1
/*.psd1
/*.ps1xml
/*.psm1
/*.snk
Expand Down
2 changes: 1 addition & 1 deletion src/Kusto/Kusto.Autorest/Az.Kusto.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Kusto.private.dll'
FormatsToProcess = './Az.Kusto.format.ps1xml'
FunctionsToExport = 'Add-AzKustoClusterLanguageExtension', 'Add-AzKustoDatabasePrincipal', 'Get-AzKustoAttachedDatabaseConfiguration', 'Get-AzKustoCluster', 'Get-AzKustoClusterFollowerDatabase', 'Get-AzKustoClusterLanguageExtension', 'Get-AzKustoClusterOutboundNetworkDependencyEndpoint', 'Get-AzKustoClusterPrincipalAssignment', 'Get-AzKustoClusterSku', 'Get-AzKustoDatabase', 'Get-AzKustoDatabasePrincipal', 'Get-AzKustoDatabasePrincipalAssignment', 'Get-AzKustoDataConnection', 'Get-AzKustoManagedPrivateEndpoint', 'Get-AzKustoOperationsResult', 'Get-AzKustoOperationsResultLocation', 'Get-AzKustoPrivateEndpointConnection', 'Get-AzKustoPrivateLinkResource', 'Get-AzKustoSandboxCustomImage', 'Get-AzKustoScript', 'Get-AzKustoSku', 'Invoke-AzKustoClusterMigration', 'Invoke-AzKustoDataConnectionValidation', 'Invoke-AzKustoDetachClusterFollowerDatabase', 'Invoke-AzKustoDiagnoseClusterVirtualNetwork', 'Invoke-AzKustoInviteDatabaseFollower', 'New-AzKustoAttachedDatabaseConfiguration', 'New-AzKustoCluster', 'New-AzKustoClusterPrincipalAssignment', 'New-AzKustoDatabase', 'New-AzKustoDatabasePrincipalAssignment', 'New-AzKustoDataConnection', 'New-AzKustoManagedPrivateEndpoint', 'New-AzKustoPrivateEndpointConnection', 'New-AzKustoSandboxCustomImage', 'New-AzKustoScript', 'Remove-AzKustoAttachedDatabaseConfiguration', 'Remove-AzKustoCluster', 'Remove-AzKustoClusterLanguageExtension', 'Remove-AzKustoClusterPrincipalAssignment', 'Remove-AzKustoDatabase', 'Remove-AzKustoDatabasePrincipal', 'Remove-AzKustoDatabasePrincipalAssignment', 'Remove-AzKustoDataConnection', 'Remove-AzKustoManagedPrivateEndpoint', 'Remove-AzKustoPrivateEndpointConnection', 'Remove-AzKustoSandboxCustomImage', 'Remove-AzKustoScript', 'Start-AzKustoCluster', 'Stop-AzKustoCluster', 'Test-AzKustoAttachedDatabaseConfigurationNameAvailability', 'Test-AzKustoClusterNameAvailability', 'Test-AzKustoClusterPrincipalAssignmentNameAvailability', 'Test-AzKustoDatabaseNameAvailability', 'Test-AzKustoDatabasePrincipalAssignmentNameAvailability', 'Test-AzKustoDataConnectionNameAvailability', 'Test-AzKustoManagedPrivateEndpointNameAvailability', 'Test-AzKustoSandboxCustomImageNameAvailability', 'Test-AzKustoScriptNameAvailability', 'Update-AzKustoCluster', 'Update-AzKustoDatabase', 'Update-AzKustoDataConnection', 'Update-AzKustoManagedPrivateEndpoint', 'Update-AzKustoSandboxCustomImage', 'Update-AzKustoScript', '*'
FunctionsToExport = 'Add-AzKustoClusterCalloutPolicy', 'Add-AzKustoClusterLanguageExtension', 'Add-AzKustoDatabasePrincipal', 'Get-AzKustoAttachedDatabaseConfiguration', 'Get-AzKustoCluster', 'Get-AzKustoClusterCalloutPolicy', 'Get-AzKustoClusterFollowerDatabase', 'Get-AzKustoClusterFollowerDatabaseGet', 'Get-AzKustoClusterLanguageExtension', 'Get-AzKustoClusterOutboundNetworkDependencyEndpoint', 'Get-AzKustoClusterPrincipalAssignment', 'Get-AzKustoClusterSku', 'Get-AzKustoDatabase', 'Get-AzKustoDatabasePrincipal', 'Get-AzKustoDatabasePrincipalAssignment', 'Get-AzKustoDataConnection', 'Get-AzKustoManagedPrivateEndpoint', 'Get-AzKustoOperationsResult', 'Get-AzKustoOperationsResultLocation', 'Get-AzKustoPrivateEndpointConnection', 'Get-AzKustoPrivateLinkResource', 'Get-AzKustoSandboxCustomImage', 'Get-AzKustoScript', 'Get-AzKustoSku', 'Invoke-AzKustoClusterMigration', 'Invoke-AzKustoDataConnectionValidation', 'Invoke-AzKustoDetachClusterFollowerDatabase', 'Invoke-AzKustoDiagnoseClusterVirtualNetwork', 'Invoke-AzKustoInviteDatabaseFollower', 'New-AzKustoAttachedDatabaseConfiguration', 'New-AzKustoCluster', 'New-AzKustoClusterPrincipalAssignment', 'New-AzKustoDatabase', 'New-AzKustoDatabasePrincipalAssignment', 'New-AzKustoDataConnection', 'New-AzKustoManagedPrivateEndpoint', 'New-AzKustoPrivateEndpointConnection', 'New-AzKustoSandboxCustomImage', 'New-AzKustoScript', 'Remove-AzKustoAttachedDatabaseConfiguration', 'Remove-AzKustoCluster', 'Remove-AzKustoClusterCalloutPolicy', 'Remove-AzKustoClusterLanguageExtension', 'Remove-AzKustoClusterPrincipalAssignment', 'Remove-AzKustoDatabase', 'Remove-AzKustoDatabasePrincipal', 'Remove-AzKustoDatabasePrincipalAssignment', 'Remove-AzKustoDataConnection', 'Remove-AzKustoManagedPrivateEndpoint', 'Remove-AzKustoPrivateEndpointConnection', 'Remove-AzKustoSandboxCustomImage', 'Remove-AzKustoScript', 'Start-AzKustoCluster', 'Stop-AzKustoCluster', 'Test-AzKustoAttachedDatabaseConfigurationNameAvailability', 'Test-AzKustoClusterNameAvailability', 'Test-AzKustoClusterPrincipalAssignmentNameAvailability', 'Test-AzKustoDatabaseNameAvailability', 'Test-AzKustoDatabasePrincipalAssignmentNameAvailability', 'Test-AzKustoDataConnectionNameAvailability', 'Test-AzKustoManagedPrivateEndpointNameAvailability', 'Test-AzKustoSandboxCustomImageNameAvailability', 'Test-AzKustoScriptNameAvailability', 'Update-AzKustoCluster', 'Update-AzKustoDatabase', 'Update-AzKustoDataConnection', 'Update-AzKustoManagedPrivateEndpoint', 'Update-AzKustoSandboxCustomImage', 'Update-AzKustoScript', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{
Expand Down
26 changes: 26 additions & 0 deletions src/Kusto/Kusto.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an ""AS IS"" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
// is regenerated.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Kusto")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
9 changes: 3 additions & 6 deletions src/Kusto/Kusto.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
This directory contains the PowerShell module for the Kusto service.

---
## Status
[![Az.Kusto](https://img.shields.io/powershellgallery/v/Az.Kusto.svg?style=flat-square&label=Az.Kusto "Az.Kusto")](https://www.powershellgallery.com/packages/Az.Kusto/)

## Info
- Modifiable: yes
- Generated: all
Expand Down Expand Up @@ -53,8 +50,8 @@ require:
- $(this-folder)/../../readme.azure.noprofile.md
# lock the commit
input-file:
- $(repo)/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2023-08-15/kusto.json
commit: 4c38cb9966cd6afbb03c7e9b14997720a728baee
- $(repo)/specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2024-04-13/kusto.json
commit: 9a38736f10946d4e41ea40b3ba43d85a738f3263

```

Expand Down Expand Up @@ -153,5 +150,5 @@ directive:
# Correct some generated code
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.IDataConnection Property', 'public Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.IDataConnection Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.IDataConnection Property', 'public Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.IDataConnection Property');
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/AttachedDatabaseConfigurations",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/Databases/DataConnections",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/Databases/PrincipalAssignments",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/Databases/scripts",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/Databases",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/PrincipalAssignments",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/managedPrivateEndpoints",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/privateEndpointConnections",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/privateLinkResources",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters/sandboxCustomImages",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
40 changes: 39 additions & 1 deletion src/Kusto/Kusto.Autorest/UX/Microsoft.Kusto/Clusters.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "Clusters",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down Expand Up @@ -119,6 +119,44 @@
}
]
},
{
"name": "Remove-AzKustoClusterCalloutPolicy",
"description": "Removes callout policy for engine services.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/Clusters/{clusterName}/removeCalloutPolicy",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto/remove-azkustoclustercalloutpolicy"
},
"parameterSets": [
{
"parameters": [
"-ClusterName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Removes callout policy for engine services.",
"parameters": [
{
"name": "-ClusterName",
"value": "[Path.clusterName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzKustoCluster",
"description": "Deletes a Kusto cluster.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "locations/operationResults",
"apiVersion": "2023-08-15",
"apiVersion": "2024-04-13",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Checks that the data connection parameters are valid.
.Description
Checks that the data connection parameters are valid.
.Example
$dataConnectionProperties = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.EventHubDataConnection -Property @{Location=$location; Kind=$kind; EventHubResourceId=$eventHubResourceId; DataFormat=$dataFormat; ConsumerGroup='Default'; Compression= "None"; TableName = $tableName; MappingRuleName = $tableMappingName}
$dataConnectionValidation = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.DataConnectionValidation -Property @{DataConnectionName=$dataConnectionName; Property=$dataConnectionProperties}
$dataConnectionProperties = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.EventHubDataConnection -Property @{Location=$location; Kind=$kind; EventHubResourceId=$eventHubResourceId; DataFormat=$dataFormat; ConsumerGroup='Default'; Compression= "None"; TableName = $tableName; MappingRuleName = $tableMappingName}
$dataConnectionValidation = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.DataConnectionValidation -Property @{DataConnectionName=$dataConnectionName; Property=$dataConnectionProperties}
Invoke-AzKustoDataConnectionValidation -ResourceGroupName $resourceGroupName -ClusterName $clusterName -DatabaseName $databaseName -Parameter $dataConnectionValidation

ErrorMessage
Expand All @@ -31,7 +31,7 @@ event hub resource id and consumer group tuple provided are already used
https://learn.microsoft.com/powershell/module/az.kusto/invoke-azkustodataconnectionvalidation
#>
function Invoke-AzKustoDataConnectionValidation {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.IDataConnectionValidationResult])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.IDataConnectionValidationResult])]
[CmdletBinding(DefaultParameterSetName = 'DataExpandedEventHub', PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')]
param(
[Parameter(ParameterSetName = 'DataExpandedEventHub', Mandatory)]
Expand Down Expand Up @@ -267,13 +267,13 @@ function Invoke-AzKustoDataConnectionValidation {

process {
try {
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.DataConnectionValidation]::new()
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.DataConnectionValidation]::new()

$Parameter.DataConnectionName = $PSBoundParameters['DataConnectionName']
$null = $PSBoundParameters.Remove('DataConnectionName')

if ($PSBoundParameters['Kind'] -eq 'EventHub') {
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.EventHubDataConnection]::new()
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.EventHubDataConnection]::new()

$Parameter.Property.EventHubResourceId = $PSBoundParameters['EventHubResourceId']
$null = $PSBoundParameters.Remove('EventHubResourceId')
Expand Down Expand Up @@ -304,7 +304,7 @@ function Invoke-AzKustoDataConnectionValidation {
}
}
elseif ($PSBoundParameters['Kind'] -eq 'EventGrid') {
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.EventGridDataConnection]::new()
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.EventGridDataConnection]::new()

$Parameter.Property.EventHubResourceId = $PSBoundParameters['EventHubResourceId']
$null = $PSBoundParameters.Remove('EventHubResourceId')
Expand Down Expand Up @@ -338,7 +338,7 @@ function Invoke-AzKustoDataConnectionValidation {
}
}
else {
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20230815.IotHubDataConnection]::new()
$Parameter.Property = [Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.IotHubDataConnection]::new()

$Parameter.Property.IotHubResourceId = $PSBoundParameters['IotHubResourceId']
$null = $PSBoundParameters.Remove('IotHubResourceId')
Expand Down
Loading