Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)]
49 changes: 35 additions & 14 deletions src/Kusto/Kusto.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,9 @@ subject-prefix: $(service-name)
clear-output-folder: true
output-folder: .
```

<!--
> Directives
``` yaml
identity-correction-for-post: true
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
# Fix the error in swagger, RP actually returns 200 when deletion succeeds
- from: swagger-document
Expand All @@ -97,58 +92,84 @@ directive:
- from: swagger-document
where: $
transform: return $.replace(/\/principalAssignments\//g, "/PrincipalAssignments/")
# Remove the unexpanded parameter set

# Remove the non-expanded parameter set
- where:
variant: ^(Add|Check|Detach)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true

- where:
variant: ^Add$|^AddViaIdentity$|^Check$|^CheckViaIdentity$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Detach$|^DetachViaIdentity$
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$
remove: true

# Remove the unexpanded parameter set for specific commands
- where:
subject: ^AttachedDatabaseConfiguration$|^Cluster$|^ClusterPrincipalAssignment$|^DatabasePrincipalAssignment$
variant: ^Create$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true

- where:
verb: Remove
subject: DatabasePrincipal|ClusterLanguageExtension
variant: ^Remove$|^RemoveViaIdentity$
variant: ^(Remove)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true

# Custom commands
- where:
subject: ^DataConnectionValidation$
hide: true

- where:
subject: ^Database$|^DataConnection$
variant: ^Create$|^CreateExpanded$|^Update$|^UpdateExpanded$|^UpdateViaIdentity$|^UpdateViaIdentityExpanded$
hide: true

# Autorest V4 generated variants, but need customise, can be added back upon service team request
- where:
subject: ^Database$|^DataConnection$
variant: ^CreateViaIdentityCluster$|^CreateViaIdentityClusterExpanded$|^CreateViaIdentityDatabase$|^CreateViaIdentityDatabaseExpanded$|^UpdateViaIdentityCluster$|^UpdateViaIdentityClusterExpanded$|^UpdateViaIdentityDatabase$|^UpdateViaIdentityDatabaseExpanded$
remove: true

# Hide the operation API
- where:
subject: Operation
hide: true

# Remove the set-* cmdlet
- where:
verb: Set
remove: true

# Rename cmdlet from Get-AzKustoOperationsResultsLocation to Get-AzKustoOperationsResultLocation so it's consistent with Get-AzKustoOperationsResult
- where:
verb: Get
subject: OperationsResultsLocation
variant: ^Get$|^GetViaIdentity$
set:
subject: OperationsResultLocation

# For Get-AzKustoOperationResult no particular need for -PassThru parameter
- where:
verb: Get
subject: OperationsResultLocation
parameter-name: ^PassThru$
hide: true
# Rename Move-AzKustoCluster -> Invoke-AzKustoClusterMigration

# Rename Move-AzKustoCluster -> Invoke-AzKustoClusterMigration
- where:
verb: Move
subject: Cluster
set:
verb: Invoke
subject: ClusterMigration

# Autorest V4 generated GET+PUT api Update cmdlets, can be added upon service team request
- where:
verb: Update
subject: DatabasePrincipalAssignment|ClusterPrincipalAssignment|AttachedDatabaseConfiguration
remove: true

# Correct some generated code
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.IDataConnection Property', 'public Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.Api20240413.IDataConnection Property');
```
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.IDataConnection Property', 'public Microsoft.Azure.PowerShell.Cmdlets.Kusto.Models.IDataConnection Property');
``` -->
Original file line number Diff line number Diff line change
Expand Up @@ -48,49 +48,6 @@
}
]
},
{
"name": "Invoke-AzKustoInviteDatabaseFollower",
"description": "Generates an invitation token that allows attaching a follower database to this database.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kusto/Clusters/{clusterName}/Databases/{databaseName}/inviteFollower",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.kusto/invoke-azkustoinvitedatabasefollower"
},
"parameterSets": [
{
"parameters": [
"-ClusterName <String>",
"-DatabaseName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Generates an invitation token that allows attaching a follower database to this database.",
"parameters": [
{
"name": "-ClusterName",
"value": "[Path.clusterName]"
},
{
"name": "-DatabaseName",
"value": "[Path.databaseName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzKustoDatabase",
"description": "Deletes the database with the given name.",
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading