Skip to content

Commit c216fcd

Browse files
Youri970410azurepowershell
andauthored
Using the latest version of autorest to generate code for 'Databricks' (#14049)
* Move Databricks to master * update the changelog * update the changelog file Co-authored-by: azurepowershell <[email protected]>
1 parent 91d9ee6 commit c216fcd

22 files changed

+191
-153
lines changed

src/Databricks/Az.Databricks.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 12/24/2020
6+
# Generated on: 1/28/2021
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
RootModule = './Az.Databricks.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.0.2'
15+
ModuleVersion = '0.2.0'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = 'Core', 'Desktop'
@@ -45,7 +45,7 @@ PowerShellVersion = '5.1'
4545
DotNetFrameworkVersion = '4.7.2'
4646

4747
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# CLRVersion = ''
48+
# ClrVersion = ''
4949

5050
# Processor architecture (None, X86, Amd64) required by this module
5151
# ProcessorArchitecture = ''
@@ -110,7 +110,7 @@ PrivateData = @{
110110
# IconUri = ''
111111

112112
# ReleaseNotes of this module
113-
ReleaseNotes = '* Fixed an issue that may cause ''New-AzDatabricksVNetPeering'' to return before it is fully provisioned (https://github.com/Azure/autorest.powershell/issues/610)'
113+
# ReleaseNotes = ''
114114

115115
# Prerelease string of this module
116116
# Prerelease = ''

src/Databricks/Az.Databricks.psm1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
}
2525
}
2626
if(-not $accountsModule) {
27-
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'1.8.1' } | Measure-Object).Count -gt 0
27+
$hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0
2828
if($hasAdequateVersion) {
29-
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 1.8.1 -Scope Global -PassThru
29+
$accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru
3030
}
3131
}
3232
}
3333

3434
if(-not $accountsModule) {
35-
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36-
} elseif (($accountsModule.Version -lt [System.Version]'1.8.1') -and (-not $localAccounts)) {
37-
Write-Error "`nThis module requires $accountsName version 1.8.1 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
35+
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://docs.microsoft.com/en-us/powershell/azure/install-az-ps" -ErrorAction Stop
36+
} elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) {
37+
Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to remove '.PSSharedModules' in your home directory. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
3838
}
3939
Write-Information "Loaded Module '$($accountsModule.Name)'"
4040

src/Databricks/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
Supported -EnableNoPublicIP when creating a databricks workspace
2122

2223
## Version 1.0.2
2324
* Fixed an issue that may cause `New-AzDatabricksVNetPeering` to return before it is fully provisioned (https://github.com/Azure/autorest.powershell/issues/610)

src/Databricks/check-dependencies.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if(Test-Path -Path $localModulesPath) {
4646
$env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
4747
}
4848

49-
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '1.8.1'
49+
DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3'
5050
DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
5151

5252
$tools = Join-Path $PSScriptRoot 'tools'
@@ -56,7 +56,7 @@ $resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestS
5656
if ($Resources.IsPresent -and (-not (Test-Path -Path $resourceModule))) {
5757
Write-Host -ForegroundColor Green "Building local Resource module used for test..."
5858
Set-Location $resourceDir
59-
$null = autorest-beta .\readme.md --output-folder=$HOME/.PSSharedModules/Resources
59+
$null = autorest .\readme.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
6060
$null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
6161
Set-Location $HOME/.PSSharedModules/Resources
6262
$null = .\build-module.ps1

src/Databricks/custom/New-AzDatabricksWorkspace.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ function New-AzDatabricksWorkspace {
5757
# The ID of the target subscription.
5858
${SubscriptionId},
5959

60+
[Parameter()]
61+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
62+
[System.Management.Automation.SwitchParameter]
63+
# The value which should be used for this field.
64+
${EnableNoPublicIP},
65+
6066
[Parameter(Mandatory)]
6167
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
6268
[System.String]

src/Databricks/exports/New-AzDatabricksWorkspace.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ param(
7979
# The geo-location where the resource lives
8080
${Location},
8181

82+
[Parameter()]
83+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
84+
[System.Management.Automation.SwitchParameter]
85+
# The value which should be used for this field.
86+
${EnableNoPublicIP},
87+
8288
[Parameter()]
8389
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
8490
[System.String]

src/Databricks/exports/ProxyCmdletDefinitions.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,12 @@ param(
10341034
# The geo-location where the resource lives
10351035
${Location},
10361036

1037+
[Parameter()]
1038+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
1039+
[System.Management.Automation.SwitchParameter]
1040+
# The value which should be used for this field.
1041+
${EnableNoPublicIP},
1042+
10371043
[Parameter()]
10381044
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
10391045
[System.String]

src/Databricks/generate-info.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"autorest_modelerfour": "4.15.414",
3-
"node": "v14.2.0",
4-
"autorest_powershell": "3.0.409",
5-
"swagger_commit": "ce64d347346dfcb8d7a1378dc269494f3adf7d21",
6-
"autorest_core": "3.0.6349",
7-
"autorest": "3.0.6187"
3+
"node": "v10.16.0",
4+
"autorest_powershell": "3.0.417",
5+
"autorest": "`-- (empty)",
6+
"autorest_core": "3.0.6369",
7+
"swagger_commit": "b3199b96ecc6d2e18216305385b13035e39df968"
88
}

src/Databricks/generated/api/Models/Api20180401/ErrorResponse.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ public partial class ErrorResponse :
1010

1111
/// <summary>A machine readable error code.</summary>
1212
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
13-
public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code = value; }
13+
public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Code = value ; }
1414

1515
/// <summary>error details.</summary>
1616
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
17-
public Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail = value; }
17+
public Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Detail = value ?? null /* arrayOf */; }
1818

1919
/// <summary>Backing field for <see cref="Error" /> property.</summary>
2020
private Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfo _error;
@@ -25,11 +25,11 @@ public partial class ErrorResponse :
2525

2626
/// <summary>Inner error details if they exist.</summary>
2727
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
28-
public string Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror = value; }
28+
public string Innererror { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Innererror = value ?? null; }
2929

3030
/// <summary>A human readable error message.</summary>
3131
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
32-
public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message = value; }
32+
public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfoInternal)Error).Message = value ; }
3333

3434
/// <summary>Internal Acessors for Error</summary>
3535
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorInfo Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.ErrorInfo()); set { {_error = value;} } }

src/Databricks/generated/api/Models/Api20180401/Operation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ public partial class Operation :
1717

1818
/// <summary>Operation type: Read, write, delete, etc.</summary>
1919
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
20-
public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation = value; }
20+
public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Operation = value ?? null; }
2121

2222
/// <summary>Service provider: Microsoft.ResourceProvider</summary>
2323
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
24-
public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider = value; }
24+
public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Provider = value ?? null; }
2525

2626
/// <summary>Resource on which the operation is performed.</summary>
2727
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Databricks.PropertyOrigin.Inlined)]
28-
public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource = value; }
28+
public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplayInternal)Display).Resource = value ?? null; }
2929

3030
/// <summary>Internal Acessors for Display</summary>
3131
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20180401.OperationDisplay()); set { {_display = value;} } }

0 commit comments

Comments
 (0)