Skip to content

Commit 2ff0aa0

Browse files
markcowlCopilot
andcommitted
Update DevCenter to use CustomerManagedKeyEncryptionV4 from Foundations
Replace direct usage of internal CommonTypes.CustomerManagedKeyEncryption with Azure.ResourceManager.Foundations.CustomerManagedKeyEncryptionV4 in DevCenter spec. Add clientName decorator in back-compatible.tsp to strip V4 suffix for OpenAPI compatibility. Depends on: Azure/typespec-azure#4627 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 711c07e commit 2ff0aa0

8 files changed

Lines changed: 899 additions & 402 deletions

File tree

package-lock.json

Lines changed: 657 additions & 380 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"@azure-tools/spec-gen-sdk": "~0.9.1",
77
"@azure-tools/specs-shared": "file:.github/shared",
88
"@azure-tools/typespec-apiview": "0.7.2",
9-
"@azure-tools/typespec-autorest": "next",
9+
"@azure-tools/typespec-autorest": "https://pkg.pr.new/@azure-tools/typespec-autorest@4627",
1010
"@azure-tools/typespec-azure-core": "next",
1111
"@azure-tools/typespec-azure-portal-core": "next",
12-
"@azure-tools/typespec-azure-resource-manager": "next",
13-
"@azure-tools/typespec-azure-rulesets": "next",
12+
"@azure-tools/typespec-azure-resource-manager": "https://pkg.pr.new/@azure-tools/typespec-azure-resource-manager@4627",
13+
"@azure-tools/typespec-azure-rulesets": "https://pkg.pr.new/@azure-tools/typespec-azure-rulesets@4627",
1414
"@azure-tools/typespec-client-generator-cli": "0.27.0",
1515
"@azure-tools/typespec-client-generator-core": "next",
1616
"@azure-tools/typespec-liftr-base": "0.13.0",
@@ -32,12 +32,12 @@
3232
"typescript": "~6.0.2"
3333
},
3434
"overrides": {
35-
"@azure-tools/typespec-autorest": "next",
35+
"@azure-tools/typespec-autorest": "https://pkg.pr.new/@azure-tools/typespec-autorest@4627",
3636
"@azure-tools/typespec-azure-core": "next",
3737
"@azure-tools/typespec-azure-portal-core": "next",
38-
"@azure-tools/typespec-azure-resource-manager": "next",
38+
"@azure-tools/typespec-azure-resource-manager": "https://pkg.pr.new/@azure-tools/typespec-azure-resource-manager@4627",
3939
"@azure-tools/typespec-client-generator-core": "next",
40-
"@azure-tools/typespec-azure-rulesets": "next",
40+
"@azure-tools/typespec-azure-rulesets": "https://pkg.pr.new/@azure-tools/typespec-azure-rulesets@4627",
4141
"@typespec/asset-emitter": "next",
4242
"@typespec/compiler": "next",
4343
"@typespec/http": "next",

specification/devcenter/DevCenter.Management/back-compatible.tsp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ import "@azure-tools/typespec-azure-resource-manager";
44
using Azure.ClientGenerator.Core;
55
using Microsoft.DevCenter;
66

7+
// Remove V4 suffix from new Foundations encryption types for OpenAPI compatibility
8+
@@clientName(
9+
Azure.ResourceManager.Foundations.CustomerManagedKeyEncryptionV4,
10+
"CustomerManagedKeyEncryption"
11+
);
12+
@@clientName(
13+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityV4,
14+
"KeyEncryptionKeyIdentity"
15+
);
16+
@@clientName(
17+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityTypeV4,
18+
"KeyEncryptionKeyIdentityType"
19+
);
20+
721
@@clientName(DevCenters.createOrUpdate::parameters.resource, "body");
822
@@clientName(DevCenters.update::parameters.properties, "body");
923
@@clientLocation(DevCenters.listByDevCenter, Images);
@@ -183,12 +197,12 @@ using Microsoft.DevCenter;
183197
);
184198

185199
@@clientName(
186-
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentity,
200+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityV4,
187201
"CustomerManagedKeyEncryptionKeyIdentity",
188202
"python,javascript"
189203
);
190204
@@clientName(
191-
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType,
205+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityTypeV4,
192206
"IdentityType",
193207
"python,javascript"
194208
);

specification/devcenter/DevCenter.Management/client.tsp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ using Microsoft.DevCenter;
1717
@@clientName(Microsoft.DevCenter.UserRoleAssignment, "UserRoleAssignmentValue");
1818

1919
@@clientName(
20-
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentity,
20+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityV4,
2121
"CustomerManagedKeyEncryptionKeyIdentity",
2222
"java,go"
2323
);
2424

2525
@@clientName(
26-
Microsoft.DevCenter.KeyEncryptionKeyIdentity,
26+
Microsoft.DevCenter.KeyEncryptionKeyIdentityUpdate,
2727
"DevCenterKeyEncryptionKeyIdentity",
2828
"csharp"
2929
);
3030

3131
@@clientName(
32-
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType,
32+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityTypeV4,
3333
"IdentityType",
3434
"java"
3535
);
@@ -224,7 +224,7 @@ using Microsoft.DevCenter;
224224
@@clientName(CatalogSyncError, "DevCenterCatalogSyncError", "csharp");
225225
@@clientName(ConfigurationPolicies, "DevCenterConfigurationPolicies", "csharp");
226226
@@clientName(
227-
Azure.ResourceManager.CommonTypes.CustomerManagedKeyEncryption,
227+
Azure.ResourceManager.Foundations.CustomerManagedKeyEncryptionV4,
228228
"DevCenterCustomerManagedKeyEncryption",
229229
"csharp"
230230
);
@@ -385,7 +385,7 @@ using Microsoft.DevCenter;
385385
);
386386
@@clientName(KeepAwakeEnableStatus, "DevCenterKeepAwakeEnableStatus", "csharp");
387387
@@clientName(
388-
Azure.ResourceManager.CommonTypes.KeyEncryptionKeyIdentityType,
388+
Azure.ResourceManager.Foundations.KeyEncryptionKeyIdentityTypeV4,
389389
"DevCenterKeyEncryptionKeyIdentityType",
390390
"csharp"
391391
);

specification/devcenter/DevCenter.Management/models.tsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ model DevCenterUpdateProperties {
685685
@doc("Encryption properties.")
686686
model Encryption {
687687
@doc("All Customer-managed key encryption properties for the resource.")
688-
customerManagedKeyEncryption?: CustomerManagedKeyEncryption;
688+
customerManagedKeyEncryption?: CustomerManagedKeyEncryptionV4;
689689
}
690690

691691
@doc("Project catalog settings for project catalogs under a project associated to this dev center.")
@@ -771,11 +771,11 @@ model DevCenterEncryptionSetUpdateProperties {
771771
keyEncryptionKeyUrl?: url;
772772

773773
@doc("The managed identity configuration used for key vault access.")
774-
keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentity;
774+
keyEncryptionKeyIdentity?: KeyEncryptionKeyIdentityUpdate;
775775
}
776776

777777
@doc("The managed identity configuration used for key vault access.")
778-
model KeyEncryptionKeyIdentity {
778+
model KeyEncryptionKeyIdentityUpdate {
779779
@doc("The type of managed identity to use for key vault access.")
780780
type?: CmkIdentityType;
781781

specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-07-01-preview/DevCenterRP.json

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8978,6 +8978,11 @@
89788978
]
89798979
}
89808980
},
8981+
"Azure.Core.uuid": {
8982+
"type": "string",
8983+
"format": "uuid",
8984+
"description": "Universally Unique Identifier"
8985+
},
89818986
"AzureAiServicesMode": {
89828987
"type": "string",
89838988
"description": "Indicates whether Azure AI services are enabled for a project.",
@@ -9427,6 +9432,20 @@
94279432
]
94289433
}
94299434
},
9435+
"CustomerManagedKeyEncryption": {
9436+
"type": "object",
9437+
"description": "Customer-managed key encryption properties for the resource.",
9438+
"properties": {
9439+
"keyEncryptionKeyIdentity": {
9440+
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
9441+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault."
9442+
},
9443+
"keyEncryptionKeyUrl": {
9444+
"type": "string",
9445+
"description": "key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
9446+
}
9447+
}
9448+
},
94309449
"CustomizationTask": {
94319450
"type": "object",
94329451
"description": "Represents a Task to be used in customizing a Dev Box.",
@@ -9919,7 +9938,7 @@
99199938
"description": "Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
99209939
},
99219940
"keyEncryptionKeyIdentity": {
9922-
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
9941+
"$ref": "#/definitions/KeyEncryptionKeyIdentityUpdate",
99239942
"description": "The managed identity configuration used for key vault access."
99249943
}
99259944
}
@@ -10170,7 +10189,7 @@
1017010189
"description": "Encryption properties.",
1017110190
"properties": {
1017210191
"customerManagedKeyEncryption": {
10173-
"$ref": "../../../../../common-types/resource-management/v4/customermanagedkeys.json#/definitions/customerManagedKeyEncryption",
10192+
"$ref": "#/definitions/CustomerManagedKeyEncryption",
1017410193
"description": "All Customer-managed key encryption properties for the resource."
1017510194
}
1017610195
}
@@ -11527,6 +11546,59 @@
1152711546
}
1152811547
},
1152911548
"KeyEncryptionKeyIdentity": {
11549+
"type": "object",
11550+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.",
11551+
"properties": {
11552+
"identityType": {
11553+
"$ref": "#/definitions/KeyEncryptionKeyIdentityType",
11554+
"description": "The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity."
11555+
},
11556+
"userAssignedIdentityResourceId": {
11557+
"type": "string",
11558+
"format": "arm-id",
11559+
"description": "User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity."
11560+
},
11561+
"federatedClientId": {
11562+
"$ref": "#/definitions/Azure.Core.uuid",
11563+
"description": "application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540"
11564+
},
11565+
"delegatedIdentityClientId": {
11566+
"$ref": "#/definitions/Azure.Core.uuid",
11567+
"description": "delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only."
11568+
}
11569+
}
11570+
},
11571+
"KeyEncryptionKeyIdentityType": {
11572+
"type": "string",
11573+
"description": "The type of identity to use.",
11574+
"enum": [
11575+
"systemAssignedIdentity",
11576+
"userAssignedIdentity",
11577+
"delegatedResourceIdentity"
11578+
],
11579+
"x-ms-enum": {
11580+
"name": "KeyEncryptionKeyIdentityType",
11581+
"modelAsString": true,
11582+
"values": [
11583+
{
11584+
"name": "SystemAssignedIdentity",
11585+
"value": "systemAssignedIdentity",
11586+
"description": "System assigned identity"
11587+
},
11588+
{
11589+
"name": "UserAssignedIdentity",
11590+
"value": "userAssignedIdentity",
11591+
"description": "User assigned identity"
11592+
},
11593+
{
11594+
"name": "DelegatedResourceIdentity",
11595+
"value": "delegatedResourceIdentity",
11596+
"description": "Delegated identity"
11597+
}
11598+
]
11599+
}
11600+
},
11601+
"KeyEncryptionKeyIdentityUpdate": {
1153011602
"type": "object",
1153111603
"description": "The managed identity configuration used for key vault access.",
1153211604
"properties": {

specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2025-10-01-preview/DevCenterRP.json

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9558,6 +9558,20 @@
95589558
}
95599559
}
95609560
},
9561+
"CustomerManagedKeyEncryption": {
9562+
"type": "object",
9563+
"description": "Customer-managed key encryption properties for the resource.",
9564+
"properties": {
9565+
"keyEncryptionKeyIdentity": {
9566+
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
9567+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault."
9568+
},
9569+
"keyEncryptionKeyUrl": {
9570+
"type": "string",
9571+
"description": "key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
9572+
}
9573+
}
9574+
},
95619575
"CustomizationTask": {
95629576
"type": "object",
95639577
"description": "Represents a Task to be used in customizing a Dev Box.",
@@ -10070,7 +10084,7 @@
1007010084
"description": "Key encryption key Url, versioned or non-versioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek."
1007110085
},
1007210086
"keyEncryptionKeyIdentity": {
10073-
"$ref": "#/definitions/KeyEncryptionKeyIdentity",
10087+
"$ref": "#/definitions/KeyEncryptionKeyIdentityUpdate",
1007410088
"description": "The managed identity configuration used for key vault access."
1007510089
}
1007610090
}
@@ -10321,7 +10335,7 @@
1032110335
"description": "Encryption properties.",
1032210336
"properties": {
1032310337
"customerManagedKeyEncryption": {
10324-
"$ref": "../../../../../common-types/resource-management/v4/customermanagedkeys.json#/definitions/customerManagedKeyEncryption",
10338+
"$ref": "#/definitions/CustomerManagedKeyEncryption",
1032510339
"description": "All Customer-managed key encryption properties for the resource."
1032610340
}
1032710341
}
@@ -11826,6 +11840,59 @@
1182611840
}
1182711841
},
1182811842
"KeyEncryptionKeyIdentity": {
11843+
"type": "object",
11844+
"description": "All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault.",
11845+
"properties": {
11846+
"identityType": {
11847+
"$ref": "#/definitions/KeyEncryptionKeyIdentityType",
11848+
"description": "The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity."
11849+
},
11850+
"userAssignedIdentityResourceId": {
11851+
"type": "string",
11852+
"format": "arm-id",
11853+
"description": "User assigned identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity."
11854+
},
11855+
"federatedClientId": {
11856+
"$ref": "#/definitions/Azure.Core.uuid",
11857+
"description": "application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540"
11858+
},
11859+
"delegatedIdentityClientId": {
11860+
"$ref": "#/definitions/Azure.Core.uuid",
11861+
"description": "delegated identity to use for accessing key encryption key Url. Ex: /subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myId. Mutually exclusive with identityType systemAssignedIdentity and userAssignedIdentity - internal use only."
11862+
}
11863+
}
11864+
},
11865+
"KeyEncryptionKeyIdentityType": {
11866+
"type": "string",
11867+
"description": "The type of identity to use.",
11868+
"enum": [
11869+
"systemAssignedIdentity",
11870+
"userAssignedIdentity",
11871+
"delegatedResourceIdentity"
11872+
],
11873+
"x-ms-enum": {
11874+
"name": "KeyEncryptionKeyIdentityType",
11875+
"modelAsString": true,
11876+
"values": [
11877+
{
11878+
"name": "SystemAssignedIdentity",
11879+
"value": "systemAssignedIdentity",
11880+
"description": "System assigned identity"
11881+
},
11882+
{
11883+
"name": "UserAssignedIdentity",
11884+
"value": "userAssignedIdentity",
11885+
"description": "User assigned identity"
11886+
},
11887+
{
11888+
"name": "DelegatedResourceIdentity",
11889+
"value": "delegatedResourceIdentity",
11890+
"description": "Delegated identity"
11891+
}
11892+
]
11893+
}
11894+
},
11895+
"KeyEncryptionKeyIdentityUpdate": {
1182911896
"type": "object",
1183011897
"description": "The managed identity configuration used for key vault access.",
1183111898
"properties": {

0 commit comments

Comments
 (0)