Skip to content

Commit 5af1f12

Browse files
azure-pipelines[bot]azure-powershell-botlijinpei2008
authored
Migrate Databricks from generation to main (#25925)
* Move Databricks to main * update changelog and BreakingChangeIssues.csv --------- Co-authored-by: azure-powershell-bot <[email protected]> Co-authored-by: Jinpei Li <[email protected]>
1 parent 6aa2c87 commit 5af1f12

File tree

44 files changed

+986
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+986
-167
lines changed

src/Databricks/Databricks.Autorest/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ use-extension:
5151
"@autorest/powershell": "3.x"
5252

5353
directive:
54+
- from: swagger-document
55+
where: $.definitions.EncryptionV2
56+
transform: delete $.required
57+
58+
- from: swagger-document
59+
where: $.definitions.ManagedDiskEncryption
60+
transform: delete $.required
61+
5462
# Worked around this issue: https://github.com/Azure/autorest.powershell/issues/1258
5563
- from: EncryptionEntitiesDefinition.json.cs
5664
where: $

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function New-AzDatabricksWorkspace {
7373
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')]
7474
[System.String]
7575
# The ID of the target subscription.
76+
# The value must be an UUID.
7677
${SubscriptionId},
7778

7879
[Parameter(Mandatory)]
@@ -101,6 +102,14 @@ function New-AzDatabricksWorkspace {
101102
# To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
102103
${Authorization},
103104

105+
[Parameter()]
106+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType])]
107+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
108+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType]
109+
# Defines the initial type of the default catalog.
110+
# Possible values (case-insensitive): HiveMetastore, UnityCatalog
111+
${DefaultCatalogInitialType},
112+
104113
[Parameter()]
105114
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
106115
[System.Management.Automation.SwitchParameter]
@@ -145,6 +154,14 @@ function New-AzDatabricksWorkspace {
145154
# The value which should be used for this field.
146155
${LoadBalancerId},
147156

157+
[Parameter()]
158+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
159+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
160+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
161+
# The encryption keySource (provider).
162+
# Possible values (case-insensitive): Microsoft.Keyvault
163+
${ManagedDiskKeySource},
164+
148165
[Parameter()]
149166
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
150167
[System.String]
@@ -169,6 +186,14 @@ function New-AzDatabricksWorkspace {
169186
# Indicate whether the latest key version should be automatically used for Managed Disk Encryption.
170187
${ManagedDiskRotationToLatestKeyVersionEnabled},
171188

189+
[Parameter()]
190+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
191+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
192+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
193+
# The encryption keySource (provider).
194+
# Possible values (case-insensitive): Microsoft.Keyvault
195+
${ManagedServiceKeySource},
196+
172197
[Parameter()]
173198
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
174199
[System.String]

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,22 @@ function Update-AzDatabricksWorkspace {
154154
# To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
155155
${Authorization},
156156

157+
[Parameter()]
158+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType])]
159+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
160+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType]
161+
# Defines the initial type of the default catalog.
162+
# Possible values (case-insensitive): HiveMetastore, UnityCatalog
163+
${DefaultCatalogInitialType},
164+
165+
[Parameter()]
166+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
167+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
168+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
169+
# The encryption keySource (provider).
170+
# Possible values (case-insensitive): Microsoft.Keyvault
171+
${ManagedDiskKeySource},
172+
157173
[Parameter()]
158174
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
159175
[System.String]
@@ -178,6 +194,14 @@ function Update-AzDatabricksWorkspace {
178194
# Indicate whether the latest key version should be automatically used for Managed Disk Encryption.
179195
${ManagedDiskRotationToLatestKeyVersionEnabled},
180196

197+
[Parameter()]
198+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
199+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
200+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
201+
# The encryption keySource (provider).
202+
# Possible values (case-insensitive): Microsoft.Keyvault
203+
${ManagedServiceKeySource},
204+
181205
[Parameter()]
182206
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
183207
[System.String]
@@ -363,11 +387,14 @@ function Update-AzDatabricksWorkspace {
363387
$hasAmlWorkspaceId = $PSBoundParameters.Remove('AmlWorkspaceId')
364388
$hasSkuTier = $PSBoundParameters.Remove('SkuTier')
365389
$hasAuthorization = $PSBoundParameters.Remove('Authorization')
390+
$hasDefaultCatalogInitialType = $PSBoundParameters.Remove('DefaultCatalogInitialType')
391+
$hasManagedDiskKeySource = $PSBoundParameters.Remove('ManagedDiskKeySource')
366392
$hasManagedDiskKeyVaultPropertiesKeyName = $PSBoundParameters.Remove('ManagedDiskKeyVaultPropertiesKeyName')
367393
$hasManagedDiskKeyVaultPropertiesKeyVaultUri = $PSBoundParameters.Remove('ManagedDiskKeyVaultPropertiesKeyVaultUri')
368394
$hasManagedDiskKeyVaultPropertiesKeyVersion = $PSBoundParameters.Remove('ManagedDiskKeyVaultPropertiesKeyVersion')
369395
$hasManagedDiskRotationToLatestKeyVersionEnabled = $PSBoundParameters.Remove('ManagedDiskRotationToLatestKeyVersionEnabled')
370396
$hasManagedServicesKeyVaultPropertiesKeyName = $PSBoundParameters.Remove('ManagedServicesKeyVaultPropertiesKeyName')
397+
$hasManagedServiceKeySource = $PSBoundParameters.Remove('ManagedServiceKeySource')
371398
$hasManagedServicesKeyVaultPropertiesKeyVaultUri = $PSBoundParameters.Remove('ManagedServicesKeyVaultPropertiesKeyVaultUri')
372399
$hasManagedServicesKeyVaultPropertiesKeyVersion = $PSBoundParameters.Remove('ManagedServicesKeyVaultPropertiesKeyVersion')
373400
$hasUiDefinitionUri = $PSBoundParameters.Remove('UiDefinitionUri')
@@ -436,6 +463,12 @@ function Update-AzDatabricksWorkspace {
436463
if ($hasAuthorization) {
437464
$workspace.Authorization = $Authorization
438465
}
466+
if ($hasDefaultCatalogInitialType) {
467+
$workspace.DefaultCatalogInitialType = $DefaultCatalogInitialType
468+
}
469+
if ($hasManagedDiskKeySource) {
470+
$workspace.ManagedDiskKeySource = $ManagedDiskKeySource
471+
}
439472
if ($hasManagedDiskKeyVaultPropertiesKeyName) {
440473
$workspace.ManagedDiskKeyVaultPropertiesKeyName = $ManagedDiskKeyVaultPropertiesKeyName
441474
}
@@ -451,6 +484,9 @@ function Update-AzDatabricksWorkspace {
451484
if ($hasManagedServicesKeyVaultPropertiesKeyName) {
452485
$workspace.ManagedServicesKeyVaultPropertiesKeyName = $ManagedServicesKeyVaultPropertiesKeyName
453486
}
487+
if ($hasManagedServiceKeySource) {
488+
$workspace.ManagedServiceKeySource = $ManagedServiceKeySource
489+
}
454490
if ($hasManagedServicesKeyVaultPropertiesKeyVaultUri) {
455491
$workspace.ManagedServicesKeyVaultPropertiesKeyVaultUri = $ManagedServicesKeyVaultPropertiesKeyVaultUri
456492
}

src/Databricks/Databricks.Autorest/examples/Update-AzDatabricksWorkspace.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Enabling encryption on a Databricks workspace takes three steps:
3434
- `-EncryptionKeyVaultUri`
3535
- `-EncryptionKeyName`
3636
- `-EncryptionKeyVersion`
37+
5.Important! Please read the information in the following document in detail: https://learn.microsoft.com/en-us/azure/databricks/security/keys/cmk-managed-services-azure/customer-managed-key-managed-services-azure?WT.mc_id=Portal-Microsoft_Azure_Databricks#--use-the-azure-portal
3738

3839
### Example 3: Disable encryption on a Databricks workspace.
3940
```powershell

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ param(
7272
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
7373
[System.String]
7474
# The ID of the target subscription.
75+
# The value must be an UUID.
7576
${SubscriptionId},
7677

7778
[Parameter(Mandatory)]
@@ -100,6 +101,14 @@ param(
100101
# To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
101102
${Authorization},
102103

104+
[Parameter()]
105+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType])]
106+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
107+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType]
108+
# Defines the initial type of the default catalog.
109+
# Possible values (case-insensitive): HiveMetastore, UnityCatalog
110+
${DefaultCatalogInitialType},
111+
103112
[Parameter()]
104113
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
105114
[System.Management.Automation.SwitchParameter]
@@ -144,6 +153,14 @@ param(
144153
# The value which should be used for this field.
145154
${LoadBalancerId},
146155

156+
[Parameter()]
157+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
158+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
159+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
160+
# The encryption keySource (provider).
161+
# Possible values (case-insensitive): Microsoft.Keyvault
162+
${ManagedDiskKeySource},
163+
147164
[Parameter()]
148165
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
149166
[System.String]
@@ -168,6 +185,14 @@ param(
168185
# Indicate whether the latest key version should be automatically used for Managed Disk Encryption.
169186
${ManagedDiskRotationToLatestKeyVersionEnabled},
170187

188+
[Parameter()]
189+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
190+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
191+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
192+
# The encryption keySource (provider).
193+
# Possible values (case-insensitive): Microsoft.Keyvault
194+
${ManagedServiceKeySource},
195+
171196
[Parameter()]
172197
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
173198
[System.String]

src/Databricks/Databricks.Autorest/exports/ProxyCmdletDefinitions.ps1

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,6 +2245,7 @@ param(
22452245
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
22462246
[System.String]
22472247
# The ID of the target subscription.
2248+
# The value must be an UUID.
22482249
${SubscriptionId},
22492250

22502251
[Parameter(Mandatory)]
@@ -2273,6 +2274,14 @@ param(
22732274
# To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
22742275
${Authorization},
22752276

2277+
[Parameter()]
2278+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType])]
2279+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
2280+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType]
2281+
# Defines the initial type of the default catalog.
2282+
# Possible values (case-insensitive): HiveMetastore, UnityCatalog
2283+
${DefaultCatalogInitialType},
2284+
22762285
[Parameter()]
22772286
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
22782287
[System.Management.Automation.SwitchParameter]
@@ -2317,6 +2326,14 @@ param(
23172326
# The value which should be used for this field.
23182327
${LoadBalancerId},
23192328

2329+
[Parameter()]
2330+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
2331+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
2332+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
2333+
# The encryption keySource (provider).
2334+
# Possible values (case-insensitive): Microsoft.Keyvault
2335+
${ManagedDiskKeySource},
2336+
23202337
[Parameter()]
23212338
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
23222339
[System.String]
@@ -2341,6 +2358,14 @@ param(
23412358
# Indicate whether the latest key version should be automatically used for Managed Disk Encryption.
23422359
${ManagedDiskRotationToLatestKeyVersionEnabled},
23432360

2361+
[Parameter()]
2362+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
2363+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
2364+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
2365+
# The encryption keySource (provider).
2366+
# Possible values (case-insensitive): Microsoft.Keyvault
2367+
${ManagedServiceKeySource},
2368+
23442369
[Parameter()]
23452370
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
23462371
[System.String]
@@ -3196,6 +3221,22 @@ param(
31963221
# To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
31973222
${Authorization},
31983223

3224+
[Parameter()]
3225+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType])]
3226+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
3227+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType]
3228+
# Defines the initial type of the default catalog.
3229+
# Possible values (case-insensitive): HiveMetastore, UnityCatalog
3230+
${DefaultCatalogInitialType},
3231+
3232+
[Parameter()]
3233+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
3234+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
3235+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
3236+
# The encryption keySource (provider).
3237+
# Possible values (case-insensitive): Microsoft.Keyvault
3238+
${ManagedDiskKeySource},
3239+
31993240
[Parameter()]
32003241
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
32013242
[System.String]
@@ -3220,6 +3261,14 @@ param(
32203261
# Indicate whether the latest key version should be automatically used for Managed Disk Encryption.
32213262
${ManagedDiskRotationToLatestKeyVersionEnabled},
32223263

3264+
[Parameter()]
3265+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
3266+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
3267+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
3268+
# The encryption keySource (provider).
3269+
# Possible values (case-insensitive): Microsoft.Keyvault
3270+
${ManagedServiceKeySource},
3271+
32233272
[Parameter()]
32243273
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
32253274
[System.String]

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,22 @@ param(
159159
# To construct, see NOTES section for AUTHORIZATION properties and create a hash table.
160160
${Authorization},
161161

162+
[Parameter()]
163+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType])]
164+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
165+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.InitialType]
166+
# Defines the initial type of the default catalog.
167+
# Possible values (case-insensitive): HiveMetastore, UnityCatalog
168+
${DefaultCatalogInitialType},
169+
170+
[Parameter()]
171+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
172+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
173+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
174+
# The encryption keySource (provider).
175+
# Possible values (case-insensitive): Microsoft.Keyvault
176+
${ManagedDiskKeySource},
177+
162178
[Parameter()]
163179
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
164180
[System.String]
@@ -183,6 +199,14 @@ param(
183199
# Indicate whether the latest key version should be automatically used for Managed Disk Encryption.
184200
${ManagedDiskRotationToLatestKeyVersionEnabled},
185201

202+
[Parameter()]
203+
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource])]
204+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
205+
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Support.EncryptionKeySource]
206+
# The encryption keySource (provider).
207+
# Possible values (case-insensitive): Microsoft.Keyvault
208+
${ManagedServiceKeySource},
209+
186210
[Parameter()]
187211
[Microsoft.Azure.PowerShell.Cmdlets.Databricks.Category('Body')]
188212
[System.String]

0 commit comments

Comments
 (0)