@azure/arm-keyvault 2.0.1-alpha.20220420.2 → 2.1.0-alpha.20220426.2

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.
Files changed (208) hide show
  1. package/CHANGELOG.md +23 -11
  2. package/README.md +12 -1
  3. package/dist/index.js +217 -12
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/keysCreateIfNotExistSample.d.ts +2 -0
  8. package/dist-esm/samples-dev/keysCreateIfNotExistSample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/keysCreateIfNotExistSample.js +33 -0
  10. package/dist-esm/samples-dev/keysCreateIfNotExistSample.js.map +1 -0
  11. package/dist-esm/samples-dev/keysGetSample.d.ts +2 -0
  12. package/dist-esm/samples-dev/keysGetSample.d.ts.map +1 -0
  13. package/dist-esm/samples-dev/keysGetSample.js +32 -0
  14. package/dist-esm/samples-dev/keysGetSample.js.map +1 -0
  15. package/dist-esm/samples-dev/keysGetVersionSample.d.ts +2 -0
  16. package/dist-esm/samples-dev/keysGetVersionSample.d.ts.map +1 -0
  17. package/dist-esm/samples-dev/keysGetVersionSample.js +33 -0
  18. package/dist-esm/samples-dev/keysGetVersionSample.js.map +1 -0
  19. package/dist-esm/samples-dev/keysListSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/keysListSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/keysListSample.js +45 -0
  22. package/dist-esm/samples-dev/keysListSample.js.map +1 -0
  23. package/dist-esm/samples-dev/keysListVersionsSample.d.ts +2 -0
  24. package/dist-esm/samples-dev/keysListVersionsSample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/keysListVersionsSample.js +46 -0
  26. package/dist-esm/samples-dev/keysListVersionsSample.js.map +1 -0
  27. package/dist-esm/samples-dev/managedHsmsCreateOrUpdateSample.d.ts +2 -0
  28. package/dist-esm/samples-dev/managedHsmsCreateOrUpdateSample.d.ts.map +1 -0
  29. package/dist-esm/samples-dev/managedHsmsCreateOrUpdateSample.js +43 -0
  30. package/dist-esm/samples-dev/managedHsmsCreateOrUpdateSample.js.map +1 -0
  31. package/dist-esm/samples-dev/managedHsmsDeleteSample.d.ts +2 -0
  32. package/dist-esm/samples-dev/managedHsmsDeleteSample.d.ts.map +1 -0
  33. package/dist-esm/samples-dev/managedHsmsDeleteSample.js +31 -0
  34. package/dist-esm/samples-dev/managedHsmsDeleteSample.js.map +1 -0
  35. package/dist-esm/samples-dev/managedHsmsGetDeletedSample.d.ts +2 -0
  36. package/dist-esm/samples-dev/managedHsmsGetDeletedSample.d.ts.map +1 -0
  37. package/dist-esm/samples-dev/managedHsmsGetDeletedSample.js +31 -0
  38. package/dist-esm/samples-dev/managedHsmsGetDeletedSample.js.map +1 -0
  39. package/dist-esm/samples-dev/managedHsmsGetSample.d.ts +2 -0
  40. package/dist-esm/samples-dev/managedHsmsGetSample.d.ts.map +1 -0
  41. package/dist-esm/samples-dev/managedHsmsGetSample.js +31 -0
  42. package/dist-esm/samples-dev/managedHsmsGetSample.js.map +1 -0
  43. package/dist-esm/samples-dev/managedHsmsListByResourceGroupSample.d.ts +2 -0
  44. package/dist-esm/samples-dev/managedHsmsListByResourceGroupSample.d.ts.map +1 -0
  45. package/dist-esm/samples-dev/managedHsmsListByResourceGroupSample.js +44 -0
  46. package/dist-esm/samples-dev/managedHsmsListByResourceGroupSample.js.map +1 -0
  47. package/dist-esm/samples-dev/managedHsmsListBySubscriptionSample.d.ts +2 -0
  48. package/dist-esm/samples-dev/managedHsmsListBySubscriptionSample.d.ts.map +1 -0
  49. package/dist-esm/samples-dev/managedHsmsListBySubscriptionSample.js +43 -0
  50. package/dist-esm/samples-dev/managedHsmsListBySubscriptionSample.js.map +1 -0
  51. package/dist-esm/samples-dev/managedHsmsListDeletedSample.d.ts +2 -0
  52. package/dist-esm/samples-dev/managedHsmsListDeletedSample.d.ts.map +1 -0
  53. package/dist-esm/samples-dev/managedHsmsListDeletedSample.js +43 -0
  54. package/dist-esm/samples-dev/managedHsmsListDeletedSample.js.map +1 -0
  55. package/dist-esm/samples-dev/managedHsmsPurgeDeletedSample.d.ts +2 -0
  56. package/dist-esm/samples-dev/managedHsmsPurgeDeletedSample.d.ts.map +1 -0
  57. package/dist-esm/samples-dev/managedHsmsPurgeDeletedSample.js +31 -0
  58. package/dist-esm/samples-dev/managedHsmsPurgeDeletedSample.js.map +1 -0
  59. package/dist-esm/samples-dev/managedHsmsUpdateSample.d.ts +2 -0
  60. package/dist-esm/samples-dev/managedHsmsUpdateSample.d.ts.map +1 -0
  61. package/dist-esm/samples-dev/managedHsmsUpdateSample.js +34 -0
  62. package/dist-esm/samples-dev/managedHsmsUpdateSample.js.map +1 -0
  63. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsDeleteSample.d.ts +2 -0
  64. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  65. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsDeleteSample.js +32 -0
  66. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsDeleteSample.js.map +1 -0
  67. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsGetSample.d.ts +2 -0
  68. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsGetSample.d.ts.map +1 -0
  69. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsGetSample.js +32 -0
  70. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsGetSample.js.map +1 -0
  71. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsListByResourceSample.d.ts +2 -0
  72. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsListByResourceSample.d.ts.map +1 -0
  73. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsListByResourceSample.js +45 -0
  74. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsListByResourceSample.js.map +1 -0
  75. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsPutSample.d.ts +2 -0
  76. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsPutSample.d.ts.map +1 -0
  77. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsPutSample.js +38 -0
  78. package/dist-esm/samples-dev/mhsmPrivateEndpointConnectionsPutSample.js.map +1 -0
  79. package/dist-esm/samples-dev/mhsmPrivateLinkResourcesListByMhsmResourceSample.d.ts +2 -0
  80. package/dist-esm/samples-dev/mhsmPrivateLinkResourcesListByMhsmResourceSample.d.ts.map +1 -0
  81. package/dist-esm/samples-dev/mhsmPrivateLinkResourcesListByMhsmResourceSample.js +31 -0
  82. package/dist-esm/samples-dev/mhsmPrivateLinkResourcesListByMhsmResourceSample.js.map +1 -0
  83. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  84. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  85. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  86. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  87. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  88. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  89. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +32 -0
  90. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  91. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  92. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  93. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +32 -0
  94. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  95. package/dist-esm/samples-dev/privateEndpointConnectionsListByResourceSample.d.ts +2 -0
  96. package/dist-esm/samples-dev/privateEndpointConnectionsListByResourceSample.d.ts.map +1 -0
  97. package/dist-esm/samples-dev/privateEndpointConnectionsListByResourceSample.js +45 -0
  98. package/dist-esm/samples-dev/privateEndpointConnectionsListByResourceSample.js.map +1 -0
  99. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.d.ts +2 -0
  100. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.d.ts.map +1 -0
  101. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js +39 -0
  102. package/dist-esm/samples-dev/privateEndpointConnectionsPutSample.js.map +1 -0
  103. package/dist-esm/samples-dev/privateLinkResourcesListByVaultSample.d.ts +2 -0
  104. package/dist-esm/samples-dev/privateLinkResourcesListByVaultSample.d.ts.map +1 -0
  105. package/dist-esm/samples-dev/privateLinkResourcesListByVaultSample.js +31 -0
  106. package/dist-esm/samples-dev/privateLinkResourcesListByVaultSample.js.map +1 -0
  107. package/dist-esm/samples-dev/secretsCreateOrUpdateSample.d.ts +2 -0
  108. package/dist-esm/samples-dev/secretsCreateOrUpdateSample.d.ts.map +1 -0
  109. package/dist-esm/samples-dev/secretsCreateOrUpdateSample.js +35 -0
  110. package/dist-esm/samples-dev/secretsCreateOrUpdateSample.js.map +1 -0
  111. package/dist-esm/samples-dev/secretsGetSample.d.ts +2 -0
  112. package/dist-esm/samples-dev/secretsGetSample.d.ts.map +1 -0
  113. package/dist-esm/samples-dev/secretsGetSample.js +32 -0
  114. package/dist-esm/samples-dev/secretsGetSample.js.map +1 -0
  115. package/dist-esm/samples-dev/secretsListSample.d.ts +2 -0
  116. package/dist-esm/samples-dev/secretsListSample.d.ts.map +1 -0
  117. package/dist-esm/samples-dev/secretsListSample.js +45 -0
  118. package/dist-esm/samples-dev/secretsListSample.js.map +1 -0
  119. package/dist-esm/samples-dev/secretsUpdateSample.d.ts +2 -0
  120. package/dist-esm/samples-dev/secretsUpdateSample.d.ts.map +1 -0
  121. package/dist-esm/samples-dev/secretsUpdateSample.js +35 -0
  122. package/dist-esm/samples-dev/secretsUpdateSample.js.map +1 -0
  123. package/dist-esm/samples-dev/vaultsCheckNameAvailabilitySample.d.ts +2 -0
  124. package/dist-esm/samples-dev/vaultsCheckNameAvailabilitySample.d.ts.map +1 -0
  125. package/dist-esm/samples-dev/vaultsCheckNameAvailabilitySample.js +33 -0
  126. package/dist-esm/samples-dev/vaultsCheckNameAvailabilitySample.js.map +1 -0
  127. package/dist-esm/samples-dev/vaultsCreateOrUpdateSample.d.ts +2 -0
  128. package/dist-esm/samples-dev/vaultsCreateOrUpdateSample.d.ts.map +1 -0
  129. package/dist-esm/samples-dev/vaultsCreateOrUpdateSample.js +132 -0
  130. package/dist-esm/samples-dev/vaultsCreateOrUpdateSample.js.map +1 -0
  131. package/dist-esm/samples-dev/vaultsDeleteSample.d.ts +2 -0
  132. package/dist-esm/samples-dev/vaultsDeleteSample.d.ts.map +1 -0
  133. package/dist-esm/samples-dev/vaultsDeleteSample.js +31 -0
  134. package/dist-esm/samples-dev/vaultsDeleteSample.js.map +1 -0
  135. package/dist-esm/samples-dev/vaultsGetDeletedSample.d.ts +2 -0
  136. package/dist-esm/samples-dev/vaultsGetDeletedSample.d.ts.map +1 -0
  137. package/dist-esm/samples-dev/vaultsGetDeletedSample.js +31 -0
  138. package/dist-esm/samples-dev/vaultsGetDeletedSample.js.map +1 -0
  139. package/dist-esm/samples-dev/vaultsGetSample.d.ts +2 -0
  140. package/dist-esm/samples-dev/vaultsGetSample.d.ts.map +1 -0
  141. package/dist-esm/samples-dev/vaultsGetSample.js +31 -0
  142. package/dist-esm/samples-dev/vaultsGetSample.js.map +1 -0
  143. package/dist-esm/samples-dev/vaultsListByResourceGroupSample.d.ts +2 -0
  144. package/dist-esm/samples-dev/vaultsListByResourceGroupSample.d.ts.map +1 -0
  145. package/dist-esm/samples-dev/vaultsListByResourceGroupSample.js +46 -0
  146. package/dist-esm/samples-dev/vaultsListByResourceGroupSample.js.map +1 -0
  147. package/dist-esm/samples-dev/vaultsListBySubscriptionSample.d.ts +2 -0
  148. package/dist-esm/samples-dev/vaultsListBySubscriptionSample.d.ts.map +1 -0
  149. package/dist-esm/samples-dev/vaultsListBySubscriptionSample.js +45 -0
  150. package/dist-esm/samples-dev/vaultsListBySubscriptionSample.js.map +1 -0
  151. package/dist-esm/samples-dev/vaultsListDeletedSample.d.ts +2 -0
  152. package/dist-esm/samples-dev/vaultsListDeletedSample.d.ts.map +1 -0
  153. package/dist-esm/samples-dev/vaultsListDeletedSample.js +43 -0
  154. package/dist-esm/samples-dev/vaultsListDeletedSample.js.map +1 -0
  155. package/dist-esm/samples-dev/vaultsListSample.d.ts +2 -0
  156. package/dist-esm/samples-dev/vaultsListSample.d.ts.map +1 -0
  157. package/dist-esm/samples-dev/vaultsListSample.js +45 -0
  158. package/dist-esm/samples-dev/vaultsListSample.js.map +1 -0
  159. package/dist-esm/samples-dev/vaultsPurgeDeletedSample.d.ts +2 -0
  160. package/dist-esm/samples-dev/vaultsPurgeDeletedSample.d.ts.map +1 -0
  161. package/dist-esm/samples-dev/vaultsPurgeDeletedSample.js +31 -0
  162. package/dist-esm/samples-dev/vaultsPurgeDeletedSample.js.map +1 -0
  163. package/dist-esm/samples-dev/vaultsUpdateAccessPolicySample.d.ts +2 -0
  164. package/dist-esm/samples-dev/vaultsUpdateAccessPolicySample.d.ts.map +1 -0
  165. package/dist-esm/samples-dev/vaultsUpdateAccessPolicySample.js +47 -0
  166. package/dist-esm/samples-dev/vaultsUpdateAccessPolicySample.js.map +1 -0
  167. package/dist-esm/samples-dev/vaultsUpdateSample.d.ts +2 -0
  168. package/dist-esm/samples-dev/vaultsUpdateSample.d.ts.map +1 -0
  169. package/dist-esm/samples-dev/vaultsUpdateSample.js +93 -0
  170. package/dist-esm/samples-dev/vaultsUpdateSample.js.map +1 -0
  171. package/dist-esm/src/keyVaultManagementClient.d.ts.map +1 -1
  172. package/dist-esm/src/keyVaultManagementClient.js +21 -3
  173. package/dist-esm/src/keyVaultManagementClient.js.map +1 -1
  174. package/dist-esm/src/models/index.d.ts +68 -6
  175. package/dist-esm/src/models/index.d.ts.map +1 -1
  176. package/dist-esm/src/models/index.js +5 -0
  177. package/dist-esm/src/models/index.js.map +1 -1
  178. package/dist-esm/src/models/mappers.d.ts +6 -0
  179. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  180. package/dist-esm/src/models/mappers.js +159 -0
  181. package/dist-esm/src/models/mappers.js.map +1 -1
  182. package/dist-esm/src/models/parameters.js +1 -1
  183. package/dist-esm/src/models/parameters.js.map +1 -1
  184. package/dist-esm/src/operations/managedHsms.d.ts.map +1 -1
  185. package/dist-esm/src/operations/managedHsms.js +12 -4
  186. package/dist-esm/src/operations/managedHsms.js.map +1 -1
  187. package/dist-esm/src/operations/mhsmPrivateEndpointConnections.d.ts.map +1 -1
  188. package/dist-esm/src/operations/mhsmPrivateEndpointConnections.js +3 -1
  189. package/dist-esm/src/operations/mhsmPrivateEndpointConnections.js.map +1 -1
  190. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  191. package/dist-esm/src/operations/privateEndpointConnections.js +3 -1
  192. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  193. package/dist-esm/src/operations/vaults.d.ts.map +1 -1
  194. package/dist-esm/src/operations/vaults.js +6 -2
  195. package/dist-esm/src/operations/vaults.js.map +1 -1
  196. package/package.json +25 -9
  197. package/review/arm-keyvault.api.md +53 -0
  198. package/rollup.config.js +6 -72
  199. package/src/keyVaultManagementClient.ts +28 -3
  200. package/src/models/index.ts +74 -6
  201. package/src/models/mappers.ts +167 -0
  202. package/src/models/parameters.ts +1 -1
  203. package/src/operations/managedHsms.ts +12 -4
  204. package/src/operations/mhsmPrivateEndpointConnections.ts +3 -1
  205. package/src/operations/privateEndpointConnections.ts +3 -1
  206. package/src/operations/vaults.ts +6 -2
  207. package/tsconfig.json +19 -5
  208. package/types/arm-keyvault.d.ts +75 -6
@@ -37,6 +37,10 @@ export interface KeyProperties {
37
37
  * NOTE: This property will not be serialized. It can only be populated by the server.
38
38
  */
39
39
  readonly keyUriWithVersion?: string;
40
+ /** Key rotation policy in response. It will be used for both output and input. Omitted if empty */
41
+ rotationPolicy?: RotationPolicy;
42
+ /** Key release policy in response. It will be used for both output and input. Omitted if empty */
43
+ releasePolicy?: KeyReleasePolicy;
40
44
  }
41
45
 
42
46
  /** The object attributes managed by the Azure Key Vault service. */
@@ -66,6 +70,54 @@ export interface KeyAttributes {
66
70
  exportable?: boolean;
67
71
  }
68
72
 
73
+ export interface RotationPolicy {
74
+ /** The attributes of key rotation policy. */
75
+ attributes?: KeyRotationPolicyAttributes;
76
+ /** The lifetimeActions for key rotation action. */
77
+ lifetimeActions?: LifetimeAction[];
78
+ }
79
+
80
+ export interface KeyRotationPolicyAttributes {
81
+ /**
82
+ * Creation time in seconds since 1970-01-01T00:00:00Z.
83
+ * NOTE: This property will not be serialized. It can only be populated by the server.
84
+ */
85
+ readonly created?: number;
86
+ /**
87
+ * Last updated time in seconds since 1970-01-01T00:00:00Z.
88
+ * NOTE: This property will not be serialized. It can only be populated by the server.
89
+ */
90
+ readonly updated?: number;
91
+ /** The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. */
92
+ expiryTime?: string;
93
+ }
94
+
95
+ export interface LifetimeAction {
96
+ /** The trigger of key rotation policy lifetimeAction. */
97
+ trigger?: Trigger;
98
+ /** The action of key rotation policy lifetimeAction. */
99
+ action?: Action;
100
+ }
101
+
102
+ export interface Trigger {
103
+ /** The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. */
104
+ timeAfterCreate?: string;
105
+ /** The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. */
106
+ timeBeforeExpiry?: string;
107
+ }
108
+
109
+ export interface Action {
110
+ /** The type of action. */
111
+ type?: KeyRotationPolicyActionType;
112
+ }
113
+
114
+ export interface KeyReleasePolicy {
115
+ /** Content type and version of key release policy */
116
+ contentType?: string;
117
+ /** Blob encoding the policy rules under which the key can be released. */
118
+ data?: Uint8Array;
119
+ }
120
+
69
121
  /** Key Vault resource */
70
122
  export interface Resource {
71
123
  /**
@@ -152,7 +204,7 @@ export interface VaultProperties {
152
204
  enableSoftDelete?: boolean;
153
205
  /** softDelete data retention days. It accepts >=7 and <=90. */
154
206
  softDeleteRetentionInDays?: number;
155
- /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value of false. Note that management actions are always authorized with RBAC. */
207
+ /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored (warning: this is a preview feature). When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value of false. Note that management actions are always authorized with RBAC. */
156
208
  enableRbacAuthorization?: boolean;
157
209
  /** The vault's create mode to indicate whether the vault need to be recovered or not. */
158
210
  createMode?: CreateMode;
@@ -332,7 +384,7 @@ export interface VaultPatchProperties {
332
384
  enabledForTemplateDeployment?: boolean;
333
385
  /** Property to specify whether the 'soft delete' functionality is enabled for this key vault. Once set to true, it cannot be reverted to false. */
334
386
  enableSoftDelete?: boolean;
335
- /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the value of this property will not change. */
387
+ /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored (warning: this is a preview feature). When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the value of this property will not change. */
336
388
  enableRbacAuthorization?: boolean;
337
389
  /** softDelete data retention days. It accepts >=7 and <=90. */
338
390
  softDeleteRetentionInDays?: number;
@@ -929,6 +981,10 @@ export type Key = Resource & {
929
981
  * NOTE: This property will not be serialized. It can only be populated by the server.
930
982
  */
931
983
  readonly keyUriWithVersion?: string;
984
+ /** Key rotation policy in response. It will be used for both output and input. Omitted if empty */
985
+ rotationPolicy?: RotationPolicy;
986
+ /** Key release policy in response. It will be used for both output and input. Omitted if empty */
987
+ releasePolicy?: KeyReleasePolicy;
932
988
  };
933
989
 
934
990
  /** Private endpoint connection resource. */
@@ -1082,7 +1138,8 @@ export enum KnownJsonWebKeyOperation {
1082
1138
  Verify = "verify",
1083
1139
  WrapKey = "wrapKey",
1084
1140
  UnwrapKey = "unwrapKey",
1085
- Import = "import"
1141
+ Import = "import",
1142
+ Release = "release"
1086
1143
  }
1087
1144
 
1088
1145
  /**
@@ -1096,7 +1153,8 @@ export enum KnownJsonWebKeyOperation {
1096
1153
  * **verify** \
1097
1154
  * **wrapKey** \
1098
1155
  * **unwrapKey** \
1099
- * **import**
1156
+ * **import** \
1157
+ * **release**
1100
1158
  */
1101
1159
  export type JsonWebKeyOperation = string;
1102
1160
 
@@ -1152,7 +1210,11 @@ export enum KnownKeyPermissions {
1152
1210
  Backup = "backup",
1153
1211
  Restore = "restore",
1154
1212
  Recover = "recover",
1155
- Purge = "purge"
1213
+ Purge = "purge",
1214
+ Release = "release",
1215
+ Rotate = "rotate",
1216
+ Getrotationpolicy = "getrotationpolicy",
1217
+ Setrotationpolicy = "setrotationpolicy"
1156
1218
  }
1157
1219
 
1158
1220
  /**
@@ -1176,7 +1238,11 @@ export enum KnownKeyPermissions {
1176
1238
  * **backup** \
1177
1239
  * **restore** \
1178
1240
  * **recover** \
1179
- * **purge**
1241
+ * **purge** \
1242
+ * **release** \
1243
+ * **rotate** \
1244
+ * **getrotationpolicy** \
1245
+ * **setrotationpolicy**
1180
1246
  */
1181
1247
  export type KeyPermissions = string;
1182
1248
 
@@ -1489,6 +1555,8 @@ export enum KnownManagedHsmSkuFamily {
1489
1555
  * **B**
1490
1556
  */
1491
1557
  export type ManagedHsmSkuFamily = string;
1558
+ /** Defines values for KeyRotationPolicyActionType. */
1559
+ export type KeyRotationPolicyActionType = "rotate" | "notify";
1492
1560
  /** Defines values for SkuName. */
1493
1561
  export type SkuName = "standard" | "premium";
1494
1562
  /** Defines values for CreateMode. */
@@ -85,6 +85,20 @@ export const KeyProperties: coreClient.CompositeMapper = {
85
85
  type: {
86
86
  name: "String"
87
87
  }
88
+ },
89
+ rotationPolicy: {
90
+ serializedName: "rotationPolicy",
91
+ type: {
92
+ name: "Composite",
93
+ className: "RotationPolicy"
94
+ }
95
+ },
96
+ releasePolicy: {
97
+ serializedName: "release_policy",
98
+ type: {
99
+ name: "Composite",
100
+ className: "KeyReleasePolicy"
101
+ }
88
102
  }
89
103
  }
90
104
  }
@@ -144,6 +158,145 @@ export const KeyAttributes: coreClient.CompositeMapper = {
144
158
  }
145
159
  };
146
160
 
161
+ export const RotationPolicy: coreClient.CompositeMapper = {
162
+ type: {
163
+ name: "Composite",
164
+ className: "RotationPolicy",
165
+ modelProperties: {
166
+ attributes: {
167
+ serializedName: "attributes",
168
+ type: {
169
+ name: "Composite",
170
+ className: "KeyRotationPolicyAttributes"
171
+ }
172
+ },
173
+ lifetimeActions: {
174
+ serializedName: "lifetimeActions",
175
+ type: {
176
+ name: "Sequence",
177
+ element: {
178
+ type: {
179
+ name: "Composite",
180
+ className: "LifetimeAction"
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ };
188
+
189
+ export const KeyRotationPolicyAttributes: coreClient.CompositeMapper = {
190
+ type: {
191
+ name: "Composite",
192
+ className: "KeyRotationPolicyAttributes",
193
+ modelProperties: {
194
+ created: {
195
+ serializedName: "created",
196
+ readOnly: true,
197
+ type: {
198
+ name: "Number"
199
+ }
200
+ },
201
+ updated: {
202
+ serializedName: "updated",
203
+ readOnly: true,
204
+ type: {
205
+ name: "Number"
206
+ }
207
+ },
208
+ expiryTime: {
209
+ serializedName: "expiryTime",
210
+ type: {
211
+ name: "String"
212
+ }
213
+ }
214
+ }
215
+ }
216
+ };
217
+
218
+ export const LifetimeAction: coreClient.CompositeMapper = {
219
+ type: {
220
+ name: "Composite",
221
+ className: "LifetimeAction",
222
+ modelProperties: {
223
+ trigger: {
224
+ serializedName: "trigger",
225
+ type: {
226
+ name: "Composite",
227
+ className: "Trigger"
228
+ }
229
+ },
230
+ action: {
231
+ serializedName: "action",
232
+ type: {
233
+ name: "Composite",
234
+ className: "Action"
235
+ }
236
+ }
237
+ }
238
+ }
239
+ };
240
+
241
+ export const Trigger: coreClient.CompositeMapper = {
242
+ type: {
243
+ name: "Composite",
244
+ className: "Trigger",
245
+ modelProperties: {
246
+ timeAfterCreate: {
247
+ serializedName: "timeAfterCreate",
248
+ type: {
249
+ name: "String"
250
+ }
251
+ },
252
+ timeBeforeExpiry: {
253
+ serializedName: "timeBeforeExpiry",
254
+ type: {
255
+ name: "String"
256
+ }
257
+ }
258
+ }
259
+ }
260
+ };
261
+
262
+ export const Action: coreClient.CompositeMapper = {
263
+ type: {
264
+ name: "Composite",
265
+ className: "Action",
266
+ modelProperties: {
267
+ type: {
268
+ serializedName: "type",
269
+ type: {
270
+ name: "Enum",
271
+ allowedValues: ["rotate", "notify"]
272
+ }
273
+ }
274
+ }
275
+ }
276
+ };
277
+
278
+ export const KeyReleasePolicy: coreClient.CompositeMapper = {
279
+ type: {
280
+ name: "Composite",
281
+ className: "KeyReleasePolicy",
282
+ modelProperties: {
283
+ contentType: {
284
+ defaultValue: "application/json; charset=utf-8",
285
+ serializedName: "contentType",
286
+ type: {
287
+ name: "String"
288
+ }
289
+ },
290
+ data: {
291
+ serializedName: "data",
292
+ type: {
293
+ name: "Base64Url"
294
+ }
295
+ }
296
+ }
297
+ }
298
+ };
299
+
147
300
  export const Resource: coreClient.CompositeMapper = {
148
301
  type: {
149
302
  name: "Composite",
@@ -2349,6 +2502,20 @@ export const Key: coreClient.CompositeMapper = {
2349
2502
  type: {
2350
2503
  name: "String"
2351
2504
  }
2505
+ },
2506
+ rotationPolicy: {
2507
+ serializedName: "properties.rotationPolicy",
2508
+ type: {
2509
+ name: "Composite",
2510
+ className: "RotationPolicy"
2511
+ }
2512
+ },
2513
+ releasePolicy: {
2514
+ serializedName: "properties.release_policy",
2515
+ type: {
2516
+ name: "Composite",
2517
+ className: "KeyReleasePolicy"
2518
+ }
2352
2519
  }
2353
2520
  }
2354
2521
  }
@@ -118,7 +118,7 @@ export const keyName: OperationURLParameter = {
118
118
  export const apiVersion: OperationQueryParameter = {
119
119
  parameterPath: "apiVersion",
120
120
  mapper: {
121
- defaultValue: "2021-10-01",
121
+ defaultValue: "2021-11-01-preview",
122
122
  isConstant: true,
123
123
  serializedName: "api-version",
124
124
  type: {
@@ -254,10 +254,12 @@ export class ManagedHsmsImpl implements ManagedHsms {
254
254
  { resourceGroupName, name, parameters, options },
255
255
  createOrUpdateOperationSpec
256
256
  );
257
- return new LroEngine(lro, {
257
+ const poller = new LroEngine(lro, {
258
258
  resumeFrom: options?.resumeFrom,
259
259
  intervalInMs: options?.updateIntervalInMs
260
260
  });
261
+ await poller.poll();
262
+ return poller;
261
263
  }
262
264
 
263
265
  /**
@@ -344,10 +346,12 @@ export class ManagedHsmsImpl implements ManagedHsms {
344
346
  { resourceGroupName, name, parameters, options },
345
347
  updateOperationSpec
346
348
  );
347
- return new LroEngine(lro, {
349
+ const poller = new LroEngine(lro, {
348
350
  resumeFrom: options?.resumeFrom,
349
351
  intervalInMs: options?.updateIntervalInMs
350
352
  });
353
+ await poller.poll();
354
+ return poller;
351
355
  }
352
356
 
353
357
  /**
@@ -427,10 +431,12 @@ export class ManagedHsmsImpl implements ManagedHsms {
427
431
  { resourceGroupName, name, options },
428
432
  deleteOperationSpec
429
433
  );
430
- return new LroEngine(lro, {
434
+ const poller = new LroEngine(lro, {
431
435
  resumeFrom: options?.resumeFrom,
432
436
  intervalInMs: options?.updateIntervalInMs
433
437
  });
438
+ await poller.poll();
439
+ return poller;
434
440
  }
435
441
 
436
442
  /**
@@ -579,10 +585,12 @@ export class ManagedHsmsImpl implements ManagedHsms {
579
585
  { name, location, options },
580
586
  purgeDeletedOperationSpec
581
587
  );
582
- return new LroEngine(lro, {
588
+ const poller = new LroEngine(lro, {
583
589
  resumeFrom: options?.resumeFrom,
584
590
  intervalInMs: options?.updateIntervalInMs
585
591
  });
592
+ await poller.poll();
593
+ return poller;
586
594
  }
587
595
 
588
596
  /**
@@ -231,10 +231,12 @@ export class MhsmPrivateEndpointConnectionsImpl
231
231
  { resourceGroupName, name, privateEndpointConnectionName, options },
232
232
  deleteOperationSpec
233
233
  );
234
- return new LroEngine(lro, {
234
+ const poller = new LroEngine(lro, {
235
235
  resumeFrom: options?.resumeFrom,
236
236
  intervalInMs: options?.updateIntervalInMs
237
237
  });
238
+ await poller.poll();
239
+ return poller;
238
240
  }
239
241
 
240
242
  /**
@@ -225,10 +225,12 @@ export class PrivateEndpointConnectionsImpl
225
225
  { resourceGroupName, vaultName, privateEndpointConnectionName, options },
226
226
  deleteOperationSpec
227
227
  );
228
- return new LroEngine(lro, {
228
+ const poller = new LroEngine(lro, {
229
229
  resumeFrom: options?.resumeFrom,
230
230
  intervalInMs: options?.updateIntervalInMs
231
231
  });
232
+ await poller.poll();
233
+ return poller;
232
234
  }
233
235
 
234
236
  /**
@@ -310,10 +310,12 @@ export class VaultsImpl implements Vaults {
310
310
  { resourceGroupName, vaultName, parameters, options },
311
311
  createOrUpdateOperationSpec
312
312
  );
313
- return new LroEngine(lro, {
313
+ const poller = new LroEngine(lro, {
314
314
  resumeFrom: options?.resumeFrom,
315
315
  intervalInMs: options?.updateIntervalInMs
316
316
  });
317
+ await poller.poll();
318
+ return poller;
317
319
  }
318
320
 
319
321
  /**
@@ -526,10 +528,12 @@ export class VaultsImpl implements Vaults {
526
528
  { vaultName, location, options },
527
529
  purgeDeletedOperationSpec
528
530
  );
529
- return new LroEngine(lro, {
531
+ const poller = new LroEngine(lro, {
530
532
  resumeFrom: options?.resumeFrom,
531
533
  intervalInMs: options?.updateIntervalInMs
532
534
  });
535
+ await poller.poll();
536
+ return poller;
533
537
  }
534
538
 
535
539
  /**
package/tsconfig.json CHANGED
@@ -9,11 +9,25 @@
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6", "dom"],
12
+ "lib": [
13
+ "es6",
14
+ "dom"
15
+ ],
13
16
  "declaration": true,
14
17
  "outDir": "./dist-esm",
15
- "importHelpers": true
18
+ "importHelpers": true,
19
+ "paths": {
20
+ "@azure/arm-keyvault": [
21
+ "./src/index"
22
+ ]
23
+ }
16
24
  },
17
- "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
- "exclude": ["node_modules"]
19
- }
25
+ "include": [
26
+ "./src/**/*.ts",
27
+ "./test/**/*.ts",
28
+ "samples-dev/**/*.ts"
29
+ ],
30
+ "exclude": [
31
+ "node_modules"
32
+ ]
33
+ }
@@ -19,6 +19,11 @@ export declare interface AccessPolicyEntry {
19
19
  /** Defines values for AccessPolicyUpdateKind. */
20
20
  export declare type AccessPolicyUpdateKind = "add" | "replace" | "remove";
21
21
 
22
+ export declare interface Action {
23
+ /** The type of action. */
24
+ type?: KeyRotationPolicyActionType;
25
+ }
26
+
22
27
  /**
23
28
  * Defines values for ActionsRequired. \
24
29
  * {@link KnownActionsRequired} can be used interchangeably with ActionsRequired,
@@ -320,7 +325,8 @@ export declare type JsonWebKeyCurveName = string;
320
325
  * **verify** \
321
326
  * **wrapKey** \
322
327
  * **unwrapKey** \
323
- * **import**
328
+ * **import** \
329
+ * **release**
324
330
  */
325
331
  export declare type JsonWebKeyOperation = string;
326
332
 
@@ -357,6 +363,10 @@ export declare type Key = Resource & {
357
363
  * NOTE: This property will not be serialized. It can only be populated by the server.
358
364
  */
359
365
  readonly keyUriWithVersion?: string;
366
+ /** Key rotation policy in response. It will be used for both output and input. Omitted if empty */
367
+ rotationPolicy?: RotationPolicy;
368
+ /** Key release policy in response. It will be used for both output and input. Omitted if empty */
369
+ releasePolicy?: KeyReleasePolicy;
360
370
  };
361
371
 
362
372
  /** The object attributes managed by the Azure Key Vault service. */
@@ -425,7 +435,11 @@ export declare interface KeyListResult {
425
435
  * **backup** \
426
436
  * **restore** \
427
437
  * **recover** \
428
- * **purge**
438
+ * **purge** \
439
+ * **release** \
440
+ * **rotate** \
441
+ * **getrotationpolicy** \
442
+ * **setrotationpolicy**
429
443
  */
430
444
  export declare type KeyPermissions = string;
431
445
 
@@ -450,6 +464,35 @@ export declare interface KeyProperties {
450
464
  * NOTE: This property will not be serialized. It can only be populated by the server.
451
465
  */
452
466
  readonly keyUriWithVersion?: string;
467
+ /** Key rotation policy in response. It will be used for both output and input. Omitted if empty */
468
+ rotationPolicy?: RotationPolicy;
469
+ /** Key release policy in response. It will be used for both output and input. Omitted if empty */
470
+ releasePolicy?: KeyReleasePolicy;
471
+ }
472
+
473
+ export declare interface KeyReleasePolicy {
474
+ /** Content type and version of key release policy */
475
+ contentType?: string;
476
+ /** Blob encoding the policy rules under which the key can be released. */
477
+ data?: Uint8Array;
478
+ }
479
+
480
+ /** Defines values for KeyRotationPolicyActionType. */
481
+ export declare type KeyRotationPolicyActionType = "rotate" | "notify";
482
+
483
+ export declare interface KeyRotationPolicyAttributes {
484
+ /**
485
+ * Creation time in seconds since 1970-01-01T00:00:00Z.
486
+ * NOTE: This property will not be serialized. It can only be populated by the server.
487
+ */
488
+ readonly created?: number;
489
+ /**
490
+ * Last updated time in seconds since 1970-01-01T00:00:00Z.
491
+ * NOTE: This property will not be serialized. It can only be populated by the server.
492
+ */
493
+ readonly updated?: number;
494
+ /** The expiration time for the new key version. It should be in ISO8601 format. Eg: 'P90D', 'P1Y'. */
495
+ expiryTime?: string;
453
496
  }
454
497
 
455
498
  /** Interface representing a Keys. */
@@ -639,7 +682,8 @@ export declare enum KnownJsonWebKeyOperation {
639
682
  Verify = "verify",
640
683
  WrapKey = "wrapKey",
641
684
  UnwrapKey = "unwrapKey",
642
- Import = "import"
685
+ Import = "import",
686
+ Release = "release"
643
687
  }
644
688
 
645
689
  /** Known values of {@link JsonWebKeyType} that the service accepts. */
@@ -668,7 +712,11 @@ export declare enum KnownKeyPermissions {
668
712
  Backup = "backup",
669
713
  Restore = "restore",
670
714
  Recover = "recover",
671
- Purge = "purge"
715
+ Purge = "purge",
716
+ Release = "release",
717
+ Rotate = "rotate",
718
+ Getrotationpolicy = "getrotationpolicy",
719
+ Setrotationpolicy = "setrotationpolicy"
672
720
  }
673
721
 
674
722
  /** Known values of {@link ManagedHsmSkuFamily} that the service accepts. */
@@ -775,6 +823,13 @@ export declare enum KnownVaultProvisioningState {
775
823
  RegisteringDns = "RegisteringDns"
776
824
  }
777
825
 
826
+ export declare interface LifetimeAction {
827
+ /** The trigger of key rotation policy lifetimeAction. */
828
+ trigger?: Trigger;
829
+ /** The action of key rotation policy lifetimeAction. */
830
+ action?: Action;
831
+ }
832
+
778
833
  /** Log specification of operation. */
779
834
  export declare interface LogSpecification {
780
835
  /** Name of log specification. */
@@ -1738,6 +1793,13 @@ export declare interface ResourceListResult {
1738
1793
  nextLink?: string;
1739
1794
  }
1740
1795
 
1796
+ export declare interface RotationPolicy {
1797
+ /** The attributes of key rotation policy. */
1798
+ attributes?: KeyRotationPolicyAttributes;
1799
+ /** The lifetimeActions for key rotation action. */
1800
+ lifetimeActions?: LifetimeAction[];
1801
+ }
1802
+
1741
1803
  /** Resource information with extended details. */
1742
1804
  export declare type Secret = Resource & {
1743
1805
  /** Properties of the secret */
@@ -1971,6 +2033,13 @@ export declare interface SystemData {
1971
2033
  lastModifiedAt?: Date;
1972
2034
  }
1973
2035
 
2036
+ export declare interface Trigger {
2037
+ /** The time duration after key creation to rotate the key. It only applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. */
2038
+ timeAfterCreate?: string;
2039
+ /** The time duration before key expiring to rotate or notify. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. */
2040
+ timeBeforeExpiry?: string;
2041
+ }
2042
+
1974
2043
  /** Resource information with extended details. */
1975
2044
  export declare interface Vault {
1976
2045
  /**
@@ -2089,7 +2158,7 @@ export declare interface VaultPatchProperties {
2089
2158
  enabledForTemplateDeployment?: boolean;
2090
2159
  /** Property to specify whether the 'soft delete' functionality is enabled for this key vault. Once set to true, it cannot be reverted to false. */
2091
2160
  enableSoftDelete?: boolean;
2092
- /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the value of this property will not change. */
2161
+ /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored (warning: this is a preview feature). When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the value of this property will not change. */
2093
2162
  enableRbacAuthorization?: boolean;
2094
2163
  /** softDelete data retention days. It accepts >=7 and <=90. */
2095
2164
  softDeleteRetentionInDays?: number;
@@ -2128,7 +2197,7 @@ export declare interface VaultProperties {
2128
2197
  enableSoftDelete?: boolean;
2129
2198
  /** softDelete data retention days. It accepts >=7 and <=90. */
2130
2199
  softDeleteRetentionInDays?: number;
2131
- /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored. When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value of false. Note that management actions are always authorized with RBAC. */
2200
+ /** Property that controls how data actions are authorized. When true, the key vault will use Role Based Access Control (RBAC) for authorization of data actions, and the access policies specified in vault properties will be ignored (warning: this is a preview feature). When false, the key vault will use the access policies specified in vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or not specified, the vault is created with the default value of false. Note that management actions are always authorized with RBAC. */
2132
2201
  enableRbacAuthorization?: boolean;
2133
2202
  /** The vault's create mode to indicate whether the vault need to be recovered or not. */
2134
2203
  createMode?: CreateMode;