@azure-tools/typespec-azure-resource-manager 0.36.0-dev.1 → 0.36.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/arm.tsp CHANGED
@@ -15,6 +15,7 @@ import "./interfaces.tsp";
15
15
  import "./responses.tsp";
16
16
  import "./parameters.tsp";
17
17
  import "./private-links.tsp";
18
+ import "./customer-managed-keys.tsp";
18
19
 
19
20
  using TypeSpec.Http;
20
21
  using TypeSpec.Rest;
@@ -0,0 +1,73 @@
1
+ using Azure.Core;
2
+ using Azure.ResourceManager.Private;
3
+
4
+ namespace Azure.ResourceManager;
5
+
6
+ @doc("(Optional) Discouraged to include in resource definition. Only needed where it is possible to disable platform (AKA infrastructure) encryption. Azure SQL TDE is an example of this. Values are enabled and disabled.")
7
+ enum InfrastructureEncryption {
8
+ @doc("Encryption is enabled")
9
+ Enabled: "enabled",
10
+
11
+ @doc("Encryption is disabled")
12
+ Disabled: "disabled",
13
+ }
14
+
15
+ @doc("The type of identity to use.")
16
+ enum KeyEncryptionIdentity {
17
+ @doc("System assigned identity")
18
+ SystemAssignedIdentity: "systemAssignedIdentity",
19
+
20
+ @doc("User assigned identity")
21
+ UserAssignedIdentity: "userAssignedIdentity",
22
+
23
+ @doc("Delegated identity")
24
+ DelegatedResourceIdentity: "delegatedResourceIdentity",
25
+ }
26
+
27
+ @doc("Customer-managed key encryption properties for the resource.")
28
+ model CustomerManagedKeyEncryption {
29
+ @doc("The type of identity to use. Values can be systemAssignedIdentity, userAssignedIdentity, or delegatedResourceIdentity.")
30
+ keyEncryptionIdentity?: KeyEncryptionIdentity;
31
+
32
+ @doc("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.")
33
+ userAssignedIdentityResourceId?: ResourceIdentifier<[
34
+ {
35
+ type: "Microsoft.ManagedIdentity/userAssignedIdentities";
36
+ }
37
+ ]>;
38
+
39
+ @doc("application client identity to use for accessing key encryption key Url in a different tenant. Ex: f83c6b1b-4d34-47e4-bb34-9d83df58b540")
40
+ federatedClientId?: uuid;
41
+
42
+ @doc("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.")
43
+ delegatedIdentityClientId: uuid;
44
+ }
45
+
46
+ @doc("All encryption configuration for a resource.")
47
+ @armCommonDefinition("encryption", "v5", "customermanagedkeys.json")
48
+ model EncryptionConfiguration {
49
+ @doc("Indicates if infrastructure encryption is enabled or disabled.")
50
+ infrastructureEncryption?: InfrastructureEncryption;
51
+
52
+ @doc("All customer-managed key encryption properties for the resource.")
53
+ customerManagedKeyEncryption?: CustomerManagedKeyEncryption;
54
+
55
+ @doc("key encryption key Url, versioned or unversioned. Ex: https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78 or https://contosovault.vault.azure.net/keys/contosokek.")
56
+ keyEncryptionKeyUrl?: string;
57
+ }
58
+
59
+ /**
60
+ * Model used only to spread in the `encryption` envelope property for a resource.
61
+ * @example
62
+ *
63
+ * ```typespec
64
+ * model Foo is TrackedResource<FooProperties> {
65
+ * ...Encryption;
66
+ * }
67
+ * ```
68
+ */
69
+ @doc("All encryption configuration for a resource.")
70
+ model Encryption {
71
+ @doc("All encryption configuration for a resource.")
72
+ encryption: EncryptionConfiguration;
73
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-tools/typespec-azure-resource-manager",
3
- "version": "0.36.0-dev.1",
3
+ "version": "0.36.0-dev.3",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec Azure Resource Manager library",
6
6
  "homepage": "https://azure.github.io/typespec-azure",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "type": "module",
36
36
  "engines": {
37
- "node": ">=16.0.0"
37
+ "node": ">=18.0.0"
38
38
  },
39
39
  "files": [
40
40
  "lib/*.tsp",