Skip to content

Commit 10c139e

Browse files
committed
fix conflict
1 parent 5e6da5d commit 10c139e

14 files changed

Lines changed: 110 additions & 55 deletions

src/Databricks/Databricks.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Databricks")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.10.1")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("1.10.1")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.10.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("1.10.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

src/Databricks/Databricks.Autorest/custom/Az.Databricks.custom.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# region Generated
22
# Load the private module dll
3-
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.Databricks.private.dll')
3+
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Databricks.private.dll')
44

55
# Load the internal module
6-
$internalModulePath = Join-Path $PSScriptRoot '../internal/Az.Databricks.internal.psm1'
6+
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Databricks.internal.psm1'
77
if(Test-Path $internalModulePath) {
88
$null = Import-Module -Name $internalModulePath
99
}

src/Databricks/Databricks.Autorest/custom/New-AzDatabricksWorkspace.ps1

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ New-AzDatabricksWorkspace -Name azps-databricks-workspace-t3 -ResourceGroupName
3838
3939
4040
.Outputs
41-
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20240501.IWorkspace
41+
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace
4242
.Notes
4343
COMPLEX PARAMETER PROPERTIES
4444
@@ -52,6 +52,7 @@ https://learn.microsoft.com/powershell/module/az.databricks/new-azdatabrickswork
5252
#>
5353
function New-AzDatabricksWorkspace {
5454
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace])]
55+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace", "16.0.0", "2.0.0", "May 2026", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace", DeprecatedOutputProperties = ("PrivateEndpointConnection, ComplianceSecurityProfileComplianceStandard, Authorization"), NewOutputProperties = ("PrivateEndpointConnection, ComplianceSecurityProfileComplianceStandard, Authorization The types of the properties will be changed from object to 'List'"))]
5556
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5657
param(
5758
[Parameter(Mandatory)]
@@ -82,6 +83,14 @@ function New-AzDatabricksWorkspace {
8283
# The geo-location where the resource lives
8384
${Location},
8485

86+
[Parameter()]
87+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.PSArgumentCompleterAttribute("Hybrid", "Serverless")]
88+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
89+
[System.String]
90+
# The compute mode of the workspace.
91+
# Possible values (case-insensitive): Hybrid, Serverless
92+
${ComputeMode},
93+
8594
[Parameter(ParameterSetName='CreateExpanded')]
8695
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
8796
[System.String]
@@ -471,16 +480,27 @@ function New-AzDatabricksWorkspace {
471480
{
472481
$PSBoundParameters.Add('ComplianceSecurityProfileValue', $EnhancedSecurityCompliance)
473482
}
474-
if (-not $PSBoundParameters.ContainsKey('ManagedResourceGroupName')) {
475-
$randomStr = -join ((48..57) + (97..122) | Get-Random -Count 13 | % { [char]$_ })
476-
$manageResourceGroupName = "databricks-rg-{0}-{1}" -f $PSBoundParameters["Name"], $randomStr
483+
# Set default ComputeMode to Hybrid if not specified
484+
if (-not $PSBoundParameters.ContainsKey('ComputeMode')) {
485+
$PSBoundParameters.Add('ComputeMode', 'Hybrid')
477486
}
478-
else {
479-
$manageResourceGroupName = $PSBoundParameters["ManagedResourceGroupName"]
480-
$null = $PSBoundParameters.Remove("ManagedResourceGroupName")
487+
488+
if ($PSBoundParameters["ComputeMode"].ToString() -ine "Serverless") {
489+
if (-not $PSBoundParameters.ContainsKey('ManagedResourceGroupName')) {
490+
$randomStr = -join ((48..57) + (97..122) | Get-Random -Count 13 | % { [char]$_ })
491+
$manageResourceGroupName = "databricks-rg-{0}-{1}" -f $PSBoundParameters["Name"], $randomStr
492+
}
493+
else {
494+
$manageResourceGroupName = $PSBoundParameters["ManagedResourceGroupName"]
495+
$null = $PSBoundParameters.Remove("ManagedResourceGroupName")
496+
}
497+
$ManagedResourceGroupId = "/subscriptions/{0}/resourceGroups/{1}" -f (Get-AzContext).Subscription.Id, $manageResourceGroupName
498+
$null = $PSBoundParameters.Add("ManagedResourceGroupId", $ManagedResourceGroupId)
499+
} else {
500+
if ($PSBoundParameters.ContainsKey('ManagedResourceGroupName')) {
501+
$null = $PSBoundParameters.Remove("ManagedResourceGroupName")
502+
}
481503
}
482-
$ManagedResourceGroupId = "/subscriptions/{0}/resourceGroups/{1}" -f (Get-AzContext).Subscription.Id, $manageResourceGroupName
483-
$null = $PSBoundParameters.Add("ManagedResourceGroupId", $ManagedResourceGroupId)
484504
Az.Databricks.internal\New-AzDatabricksWorkspace @PSBoundParameters
485505
}
486506
catch {

src/Databricks/Databricks.Autorest/custom/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Custom
2-
This directory contains custom implementation for non-generated cmdlets for the `Az.Databricks` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.Databricks.custom.psm1`. This file should not be modified.
2+
This directory contains custom implementation for non-generated cmdlets for the `Az.Databricks` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Databricks.custom.psm1`. This file should not be modified.
33

44
## Info
55
- Modifiable: yes
@@ -15,10 +15,10 @@ For C# cmdlets, they are compiled with the rest of the generated low-level cmdle
1515
For script cmdlets, these are loaded via the `Az.Databricks.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
1616

1717
## Purpose
18-
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder.
18+
This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
1919

2020
## Usage
21-
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
21+
The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
2222
- Break
2323
- DefaultProfile
2424
- HttpPipelineAppend
@@ -36,6 +36,6 @@ For processing the cmdlets, we've created some additional attributes:
3636
- `Microsoft.Azure.PowerShell.Cmdlets.Databricks.DoNotExportAttribute`
3737
- Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Databricks`.
3838
- `Microsoft.Azure.PowerShell.Cmdlets.Databricks.InternalExportAttribute`
39-
- Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.Databricks`. For more information, see [README.md](../internal/README.md) in the `../internal` folder.
39+
- Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Databricks`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
4040
- `Microsoft.Azure.PowerShell.Cmdlets.Databricks.ProfileAttribute`
4141
- Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.

src/Databricks/Databricks.Autorest/custom/Update-AzDatabricksVNetPeering.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ Update-AzDatabricksVNetPeering -Name vnet-peering-t1 -WorkspaceName azps-databri
2424
Get-AzDatabricksVNetPeering -WorkspaceName azps-databricks-workspace-t1 -ResourceGroupName azps_test_gp_db -Name vnet-peering-t1 | Update-AzDatabricksVNetPeering -AllowGatewayTransit $true
2525
2626
.Outputs
27-
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20240501.IVirtualNetworkPeering
27+
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IVirtualNetworkPeering
2828
.Link
2929
https://learn.microsoft.com/powershell/module/az.databricks/update-azdatabricksvnetpeering
3030
#>
3131
function Update-AzDatabricksVNetPeering {
3232
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IVirtualNetworkPeering])]
33+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IVirtualNetworkPeering", "16.0.0", "2.0.0", "May 2026", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IVirtualNetworkPeering", DeprecatedOutputProperties = ("DatabrickAddressSpaceAddressPrefix, RemoteAddressSpaceAddressPrefix 'System.String[]'"), NewOutputProperties = ("DatabrickAddressSpaceAddressPrefix, RemoteAddressSpaceAddressPrefix 'System.Collections.Generic.List`1[System.String]'"))]
3334
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
3435
param(
3536
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]

src/Databricks/Databricks.Autorest/custom/Update-AzDatabricksWorkspace.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Update-AzDatabricksWorkspace -ResourceGroupName azps_test_gp_db -Name azps-datab
3434
.Inputs
3535
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IDatabricksIdentity
3636
.Outputs
37-
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20240501.IWorkspace
37+
Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace
3838
.Notes
3939
COMPLEX PARAMETER PROPERTIES
4040
@@ -54,6 +54,7 @@ https://learn.microsoft.com/powershell/module/az.databricks/update-azdatabricksw
5454
#>
5555
function Update-AzDatabricksWorkspace {
5656
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace])]
57+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.OutputBreakingChangeAttribute("Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace", "16.0.0", "2.0.0", "May 2026", ReplacementCmdletOutputType = "Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IWorkspace", DeprecatedOutputProperties = ("PrivateEndpointConnection, ComplianceSecurityProfileComplianceStandard, Authorization"), NewOutputProperties = ("PrivateEndpointConnection, ComplianceSecurityProfileComplianceStandard, Authorization The types of the properties will be changed from object to 'List'"))]
5758
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5859
param(
5960
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]

src/Databricks/Databricks.Autorest/docs/Az.Databricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Databricks
3-
Module Guid: e0a08b95-d7ef-448b-81d0-1d6f62750575
3+
Module Guid: b5f7bf84-2742-4cda-8375-3a0cb2e78145
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.databricks
55
Help Version: 1.0.0.0
66
Locale: en-US

src/Databricks/Databricks.Autorest/docs/New-AzDatabricksWorkspace.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ New-AzDatabricksWorkspace -Name <String> -ResourceGroupName <String> -Location <
1818
[-SubscriptionId <String>] [-AccessConnectorId <String>] [-AccessConnectorIdentityType <String>]
1919
[-AccessConnectorUserAssignedIdentityId <String>] [-AmlWorkspaceId <String>]
2020
[-Authorization <IWorkspaceProviderAuthorization[]>] [-AutomaticClusterUpdate <String>]
21-
[-ComplianceStandard <String[]>] [-DefaultCatalogInitialName <String>] [-DefaultCatalogInitialType <String>]
22-
[-DefaultStorageFirewall <String>] [-EnableNoPublicIP] [-EncryptionKeyName <String>]
23-
[-EncryptionKeySource <String>] [-EncryptionKeyVaultUri <String>] [-EncryptionKeyVersion <String>]
24-
[-EnhancedSecurityCompliance <String>] [-EnhancedSecurityMonitoring <String>]
25-
[-LoadBalancerBackendPoolName <String>] [-LoadBalancerId <String>] [-ManagedDiskKeySource <String>]
26-
[-ManagedDiskKeyVaultPropertiesKeyName <String>] [-ManagedDiskKeyVaultPropertiesKeyVaultUri <String>]
27-
[-ManagedDiskKeyVaultPropertiesKeyVersion <String>] [-ManagedDiskRotationToLatestKeyVersionEnabled]
28-
[-ManagedResourceGroupName <String>] [-ManagedServiceKeySource <String>]
29-
[-ManagedServicesKeyVaultPropertiesKeyName <String>] [-ManagedServicesKeyVaultPropertiesKeyVaultUri <String>]
21+
[-ComplianceStandard <String[]>] [-ComputeMode <String>] [-DefaultCatalogInitialName <String>]
22+
[-DefaultCatalogInitialType <String>] [-DefaultStorageFirewall <String>] [-EnableNoPublicIP]
23+
[-EncryptionKeyName <String>] [-EncryptionKeySource <String>] [-EncryptionKeyVaultUri <String>]
24+
[-EncryptionKeyVersion <String>] [-EnhancedSecurityCompliance <String>]
25+
[-EnhancedSecurityMonitoring <String>] [-LoadBalancerBackendPoolName <String>] [-LoadBalancerId <String>]
26+
[-ManagedDiskKeySource <String>] [-ManagedDiskKeyVaultPropertiesKeyName <String>]
27+
[-ManagedDiskKeyVaultPropertiesKeyVaultUri <String>] [-ManagedDiskKeyVaultPropertiesKeyVersion <String>]
28+
[-ManagedDiskRotationToLatestKeyVersionEnabled] [-ManagedResourceGroupName <String>]
29+
[-ManagedServiceKeySource <String>] [-ManagedServicesKeyVaultPropertiesKeyName <String>]
30+
[-ManagedServicesKeyVaultPropertiesKeyVaultUri <String>]
3031
[-ManagedServicesKeyVaultPropertiesKeyVersion <String>] [-NatGatewayName <String>] [-PrepareEncryption]
3132
[-PrivateSubnetName <String>] [-PublicIPName <String>] [-PublicNetworkAccess <String>]
3233
[-PublicSubnetName <String>] [-RequiredNsgRule <String>] [-RequireInfrastructureEncryption] [-Sku <String>]
@@ -38,15 +39,15 @@ New-AzDatabricksWorkspace -Name <String> -ResourceGroupName <String> -Location <
3839
### CreateViaJsonFilePath
3940
```
4041
New-AzDatabricksWorkspace -Name <String> -ResourceGroupName <String> -JsonFilePath <String>
41-
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
42-
[<CommonParameters>]
42+
[-SubscriptionId <String>] [-ComputeMode <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
43+
[-WhatIf] [<CommonParameters>]
4344
```
4445

4546
### CreateViaJsonString
4647
```
4748
New-AzDatabricksWorkspace -Name <String> -ResourceGroupName <String> -JsonString <String>
48-
[-SubscriptionId <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm] [-WhatIf]
49-
[<CommonParameters>]
49+
[-SubscriptionId <String>] [-ComputeMode <String>] [-DefaultProfile <PSObject>] [-AsJob] [-NoWait] [-Confirm]
50+
[-WhatIf] [<CommonParameters>]
5051
```
5152

5253
## DESCRIPTION
@@ -227,6 +228,22 @@ Accept pipeline input: False
227228
Accept wildcard characters: False
228229
```
229230
231+
### -ComputeMode
232+
The compute mode of the workspace.
233+
Possible values (case-insensitive): Hybrid, Serverless
234+
235+
```yaml
236+
Type: System.String
237+
Parameter Sets: (All)
238+
Aliases:
239+
240+
Required: False
241+
Position: Named
242+
Default value: None
243+
Accept pipeline input: False
244+
Accept wildcard characters: False
245+
```
246+
230247
### -DefaultCatalogInitialName
231248
Specifies the initial Name of default catalog.
232249
If not specified, the name of the workspace will be used.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Docs
2-
This directory contains the documentation of the cmdlets for the `Az.Databricks` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `../examples` folder.
2+
This directory contains the documentation of the cmdlets for the `Az.Databricks` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder.
33

44
## Info
55
- Modifiable: no
@@ -8,4 +8,4 @@ This directory contains the documentation of the cmdlets for the `Az.Databricks`
88
- Packaged: yes
99

1010
## Details
11-
The process of documentation generation loads `Az.Databricks` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder.
11+
The process of documentation generation loads `Az.Databricks` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "60a06509-497c-44ec-9098-160296f238c9"
2+
"generate_Id": "81ebbe61-ea3c-4f52-98e8-ee30b89d6f96"
33
}

0 commit comments

Comments
 (0)