@azure/arm-hardwaresecuritymodules 2.0.0-alpha.20240110.1 → 2.0.0-beta.1

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 (175) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/LICENSE +1 -1
  3. package/README.md +14 -14
  4. package/dist/index.js +2215 -425
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js +46 -0
  11. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js +40 -0
  15. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.js +40 -0
  19. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js +39 -0
  23. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js.map +1 -0
  24. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js +53 -0
  27. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.js +39 -0
  31. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.js.map +1 -0
  32. package/dist-esm/samples-dev/cloudHsmClustersGetSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/cloudHsmClustersGetSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/cloudHsmClustersGetSample.js +39 -0
  35. package/dist-esm/samples-dev/cloudHsmClustersGetSample.js.map +1 -0
  36. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js +54 -0
  39. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js.map +1 -0
  40. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js +53 -0
  43. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js.map +1 -0
  44. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js +47 -0
  47. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js +23 -13
  49. package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js.map +1 -1
  50. package/dist-esm/samples-dev/dedicatedHsmDeleteSample.js +13 -5
  51. package/dist-esm/samples-dev/dedicatedHsmDeleteSample.js.map +1 -1
  52. package/dist-esm/samples-dev/dedicatedHsmGetSample.js +23 -13
  53. package/dist-esm/samples-dev/dedicatedHsmGetSample.js.map +1 -1
  54. package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js +18 -9
  55. package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js.map +1 -1
  56. package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js +16 -7
  57. package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js.map +1 -1
  58. package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js +13 -5
  59. package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js.map +1 -1
  60. package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js +18 -9
  61. package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js.map +1 -1
  62. package/dist-esm/samples-dev/operationsListSample.js +16 -7
  63. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  64. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js +55 -0
  67. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js.map +1 -0
  68. package/dist-esm/src/azureHSMResourceProvider.d.ts +22 -0
  69. package/dist-esm/src/azureHSMResourceProvider.d.ts.map +1 -0
  70. package/dist-esm/src/{azureDedicatedHSMResourceProvider.js → azureHSMResourceProvider.js} +10 -37
  71. package/dist-esm/src/azureHSMResourceProvider.js.map +1 -0
  72. package/dist-esm/src/index.d.ts +1 -1
  73. package/dist-esm/src/index.d.ts.map +1 -1
  74. package/dist-esm/src/index.js +1 -1
  75. package/dist-esm/src/index.js.map +1 -1
  76. package/dist-esm/src/lroImpl.d.ts +6 -11
  77. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  78. package/dist-esm/src/lroImpl.js +12 -20
  79. package/dist-esm/src/lroImpl.js.map +1 -1
  80. package/dist-esm/src/models/index.d.ts +538 -8
  81. package/dist-esm/src/models/index.d.ts.map +1 -1
  82. package/dist-esm/src/models/index.js +72 -0
  83. package/dist-esm/src/models/index.js.map +1 -1
  84. package/dist-esm/src/models/mappers.d.ts +28 -2
  85. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  86. package/dist-esm/src/models/mappers.js +692 -7
  87. package/dist-esm/src/models/mappers.js.map +1 -1
  88. package/dist-esm/src/models/parameters.d.ts +27 -5
  89. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  90. package/dist-esm/src/models/parameters.js +161 -29
  91. package/dist-esm/src/models/parameters.js.map +1 -1
  92. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts +55 -0
  93. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -0
  94. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js +193 -0
  95. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js.map +1 -0
  96. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts +21 -0
  97. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -0
  98. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js +54 -0
  99. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js.map +1 -0
  100. package/dist-esm/src/operations/cloudHsmClusters.d.ts +114 -0
  101. package/dist-esm/src/operations/cloudHsmClusters.d.ts.map +1 -0
  102. package/dist-esm/src/operations/cloudHsmClusters.js +580 -0
  103. package/dist-esm/src/operations/cloudHsmClusters.js.map +1 -0
  104. package/dist-esm/src/operations/dedicatedHsmOperations.d.ts +6 -6
  105. package/dist-esm/src/operations/dedicatedHsmOperations.d.ts.map +1 -1
  106. package/dist-esm/src/operations/dedicatedHsmOperations.js +51 -39
  107. package/dist-esm/src/operations/dedicatedHsmOperations.js.map +1 -1
  108. package/dist-esm/src/operations/index.d.ts +4 -0
  109. package/dist-esm/src/operations/index.d.ts.map +1 -1
  110. package/dist-esm/src/operations/index.js +4 -0
  111. package/dist-esm/src/operations/index.js.map +1 -1
  112. package/dist-esm/src/operations/operations.d.ts +2 -2
  113. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  114. package/dist-esm/src/operations/operations.js +1 -1
  115. package/dist-esm/src/operations/operations.js.map +1 -1
  116. package/dist-esm/src/operations/privateEndpointConnections.d.ts +43 -0
  117. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  118. package/dist-esm/src/operations/privateEndpointConnections.js +155 -0
  119. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts +47 -0
  121. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts +13 -0
  125. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts +77 -0
  129. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts +4 -4
  133. package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts.map +1 -1
  134. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  135. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  136. package/dist-esm/src/operationsInterfaces/index.js +4 -0
  137. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  138. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +15 -0
  139. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  141. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  142. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.d.ts +4 -0
  143. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.d.ts.map +1 -0
  144. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js +73 -0
  145. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js.map +1 -0
  146. package/package.json +15 -12
  147. package/review/arm-hardwaresecuritymodules.api.md +426 -19
  148. package/src/{azureDedicatedHSMResourceProvider.ts → azureHSMResourceProvider.ts} +35 -46
  149. package/src/index.ts +1 -1
  150. package/src/lroImpl.ts +31 -23
  151. package/src/models/index.ts +599 -8
  152. package/src/models/mappers.ts +751 -7
  153. package/src/models/parameters.ts +187 -30
  154. package/src/operations/cloudHsmClusterPrivateEndpointConnections.ts +263 -0
  155. package/src/operations/cloudHsmClusterPrivateLinkResources.ts +74 -0
  156. package/src/operations/cloudHsmClusters.ts +750 -0
  157. package/src/operations/dedicatedHsmOperations.ts +69 -59
  158. package/src/operations/index.ts +4 -0
  159. package/src/operations/operations.ts +4 -4
  160. package/src/operations/privateEndpointConnections.ts +208 -0
  161. package/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.ts +83 -0
  162. package/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.ts +28 -0
  163. package/src/operationsInterfaces/cloudHsmClusters.ts +142 -0
  164. package/src/operationsInterfaces/dedicatedHsmOperations.ts +6 -6
  165. package/src/operationsInterfaces/index.ts +4 -0
  166. package/src/operationsInterfaces/privateEndpointConnections.ts +31 -0
  167. package/types/arm-hardwaresecuritymodules.d.ts +773 -34
  168. package/types/tsdoc-metadata.json +1 -1
  169. package/dist-esm/src/azureDedicatedHSMResourceProvider.d.ts +0 -22
  170. package/dist-esm/src/azureDedicatedHSMResourceProvider.d.ts.map +0 -1
  171. package/dist-esm/src/azureDedicatedHSMResourceProvider.js.map +0 -1
  172. package/dist-esm/test/sampleTest.d.ts +0 -2
  173. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  174. package/dist-esm/test/sampleTest.js +0 -38
  175. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -12,10 +12,25 @@ import {
12
12
  OperationQueryParameter
13
13
  } from "@azure/core-client";
14
14
  import {
15
+ CloudHsmCluster as CloudHsmClusterMapper,
16
+ CloudHsmClusterPatchParameters as CloudHsmClusterPatchParametersMapper,
17
+ PrivateEndpointConnection as PrivateEndpointConnectionMapper,
15
18
  DedicatedHsm as DedicatedHsmMapper,
16
19
  DedicatedHsmPatchParameters as DedicatedHsmPatchParametersMapper
17
20
  } from "../models/mappers";
18
21
 
22
+ export const contentType: OperationParameter = {
23
+ parameterPath: ["options", "contentType"],
24
+ mapper: {
25
+ defaultValue: "application/json",
26
+ isConstant: true,
27
+ serializedName: "Content-Type",
28
+ type: {
29
+ name: "String"
30
+ }
31
+ }
32
+ };
33
+
19
34
  export const accept: OperationParameter = {
20
35
  parameterPath: "accept",
21
36
  mapper: {
@@ -28,6 +43,66 @@ export const accept: OperationParameter = {
28
43
  }
29
44
  };
30
45
 
46
+ export const tags: OperationParameter = {
47
+ parameterPath: ["options", "tags"],
48
+ mapper: CloudHsmClusterMapper
49
+ };
50
+
51
+ export const location: OperationParameter = {
52
+ parameterPath: "location",
53
+ mapper: CloudHsmClusterMapper
54
+ };
55
+
56
+ export const sku: OperationParameter = {
57
+ parameterPath: ["options", "sku"],
58
+ mapper: CloudHsmClusterMapper
59
+ };
60
+
61
+ export const identity: OperationParameter = {
62
+ parameterPath: ["options", "identity"],
63
+ mapper: CloudHsmClusterMapper
64
+ };
65
+
66
+ export const provisioningState: OperationParameter = {
67
+ parameterPath: ["options", "provisioningState"],
68
+ mapper: CloudHsmClusterMapper
69
+ };
70
+
71
+ export const autoGeneratedDomainNameLabelScope: OperationParameter = {
72
+ parameterPath: ["options", "autoGeneratedDomainNameLabelScope"],
73
+ mapper: CloudHsmClusterMapper
74
+ };
75
+
76
+ export const securityDomain: OperationParameter = {
77
+ parameterPath: ["options", "securityDomain"],
78
+ mapper: CloudHsmClusterMapper
79
+ };
80
+
81
+ export const hsms: OperationParameter = {
82
+ parameterPath: ["options", "hsms"],
83
+ mapper: CloudHsmClusterMapper
84
+ };
85
+
86
+ export const publicNetworkAccess: OperationParameter = {
87
+ parameterPath: ["options", "publicNetworkAccess"],
88
+ mapper: CloudHsmClusterMapper
89
+ };
90
+
91
+ export const privateEndpointConnections: OperationParameter = {
92
+ parameterPath: ["options", "privateEndpointConnections"],
93
+ mapper: CloudHsmClusterMapper
94
+ };
95
+
96
+ export const restoreProperties: OperationParameter = {
97
+ parameterPath: ["options", "restoreProperties"],
98
+ mapper: CloudHsmClusterMapper
99
+ };
100
+
101
+ export const backupProperties: OperationParameter = {
102
+ parameterPath: ["options", "backupProperties"],
103
+ mapper: CloudHsmClusterMapper
104
+ };
105
+
31
106
  export const $host: OperationURLParameter = {
32
107
  parameterPath: "$host",
33
108
  mapper: {
@@ -40,10 +115,52 @@ export const $host: OperationURLParameter = {
40
115
  skipEncoding: true
41
116
  };
42
117
 
118
+ export const subscriptionId: OperationURLParameter = {
119
+ parameterPath: "subscriptionId",
120
+ mapper: {
121
+ serializedName: "subscriptionId",
122
+ required: true,
123
+ type: {
124
+ name: "Uuid"
125
+ }
126
+ }
127
+ };
128
+
129
+ export const resourceGroupName: OperationURLParameter = {
130
+ parameterPath: "resourceGroupName",
131
+ mapper: {
132
+ constraints: {
133
+ MaxLength: 90,
134
+ MinLength: 1
135
+ },
136
+ serializedName: "resourceGroupName",
137
+ required: true,
138
+ type: {
139
+ name: "String"
140
+ }
141
+ }
142
+ };
143
+
144
+ export const cloudHsmClusterName: OperationURLParameter = {
145
+ parameterPath: "cloudHsmClusterName",
146
+ mapper: {
147
+ constraints: {
148
+ Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$"),
149
+ MaxLength: 24,
150
+ MinLength: 3
151
+ },
152
+ serializedName: "cloudHsmClusterName",
153
+ required: true,
154
+ type: {
155
+ name: "String"
156
+ }
157
+ }
158
+ };
159
+
43
160
  export const apiVersion: OperationQueryParameter = {
44
161
  parameterPath: "apiVersion",
45
162
  mapper: {
46
- defaultValue: "2021-11-30",
163
+ defaultValue: "2023-12-10-preview",
47
164
  isConstant: true,
48
165
  serializedName: "api-version",
49
166
  type: {
@@ -52,12 +169,75 @@ export const apiVersion: OperationQueryParameter = {
52
169
  }
53
170
  };
54
171
 
55
- export const contentType: OperationParameter = {
56
- parameterPath: ["options", "contentType"],
172
+ export const tags1: OperationParameter = {
173
+ parameterPath: ["options", "tags"],
174
+ mapper: CloudHsmClusterPatchParametersMapper
175
+ };
176
+
177
+ export const sku1: OperationParameter = {
178
+ parameterPath: ["options", "sku"],
179
+ mapper: CloudHsmClusterPatchParametersMapper
180
+ };
181
+
182
+ export const identity1: OperationParameter = {
183
+ parameterPath: ["options", "identity"],
184
+ mapper: CloudHsmClusterPatchParametersMapper
185
+ };
186
+
187
+ export const backupProperties1: OperationParameter = {
188
+ parameterPath: ["options", "backupProperties"],
189
+ mapper: CloudHsmClusterPatchParametersMapper
190
+ };
191
+
192
+ export const skiptoken: OperationQueryParameter = {
193
+ parameterPath: ["options", "skiptoken"],
57
194
  mapper: {
58
- defaultValue: "application/json",
195
+ serializedName: "$skiptoken",
196
+ type: {
197
+ name: "String"
198
+ }
199
+ }
200
+ };
201
+
202
+ export const nextLink: OperationURLParameter = {
203
+ parameterPath: "nextLink",
204
+ mapper: {
205
+ serializedName: "nextLink",
206
+ required: true,
207
+ type: {
208
+ name: "String"
209
+ }
210
+ },
211
+ skipEncoding: true
212
+ };
213
+
214
+ export const properties: OperationParameter = {
215
+ parameterPath: "properties",
216
+ mapper: PrivateEndpointConnectionMapper
217
+ };
218
+
219
+ export const peConnectionName: OperationURLParameter = {
220
+ parameterPath: "peConnectionName",
221
+ mapper: {
222
+ constraints: {
223
+ Pattern: new RegExp("^[a-zA-Z0-9-]{3,24}$"),
224
+ MaxLength: 24,
225
+ MinLength: 3
226
+ },
227
+ serializedName: "peConnectionName",
228
+ required: true,
229
+ type: {
230
+ name: "String"
231
+ }
232
+ }
233
+ };
234
+
235
+ export const apiVersion1: OperationQueryParameter = {
236
+ parameterPath: "apiVersion",
237
+ mapper: {
238
+ defaultValue: "2021-11-30",
59
239
  isConstant: true,
60
- serializedName: "Content-Type",
240
+ serializedName: "api-version",
61
241
  type: {
62
242
  name: "String"
63
243
  }
@@ -69,7 +249,7 @@ export const parameters: OperationParameter = {
69
249
  mapper: DedicatedHsmMapper
70
250
  };
71
251
 
72
- export const resourceGroupName: OperationURLParameter = {
252
+ export const resourceGroupName1: OperationURLParameter = {
73
253
  parameterPath: "resourceGroupName",
74
254
  mapper: {
75
255
  serializedName: "resourceGroupName",
@@ -94,18 +274,7 @@ export const name: OperationURLParameter = {
94
274
  }
95
275
  };
96
276
 
97
- export const subscriptionId: OperationURLParameter = {
98
- parameterPath: "subscriptionId",
99
- mapper: {
100
- serializedName: "subscriptionId",
101
- required: true,
102
- type: {
103
- name: "String"
104
- }
105
- }
106
- };
107
-
108
- export const tags: OperationParameter = {
277
+ export const tags2: OperationParameter = {
109
278
  parameterPath: ["options", "tags"],
110
279
  mapper: DedicatedHsmPatchParametersMapper
111
280
  };
@@ -130,15 +299,3 @@ export const top: OperationQueryParameter = {
130
299
  }
131
300
  }
132
301
  };
133
-
134
- export const nextLink: OperationURLParameter = {
135
- parameterPath: "nextLink",
136
- mapper: {
137
- serializedName: "nextLink",
138
- required: true,
139
- type: {
140
- name: "String"
141
- }
142
- },
143
- skipEncoding: true
144
- };
@@ -0,0 +1,263 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { CloudHsmClusterPrivateEndpointConnections } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { AzureHSMResourceProvider } from "../azureHSMResourceProvider";
14
+ import {
15
+ SimplePollerLike,
16
+ OperationState,
17
+ createHttpPoller
18
+ } from "@azure/core-lro";
19
+ import { createLroSpec } from "../lroImpl";
20
+ import {
21
+ PrivateEndpointConnection,
22
+ CloudHsmClusterPrivateEndpointConnectionsCreateOptionalParams,
23
+ CloudHsmClusterPrivateEndpointConnectionsCreateResponse,
24
+ CloudHsmClusterPrivateEndpointConnectionsDeleteOptionalParams,
25
+ CloudHsmClusterPrivateEndpointConnectionsGetOptionalParams,
26
+ CloudHsmClusterPrivateEndpointConnectionsGetResponse
27
+ } from "../models";
28
+
29
+ /** Class containing CloudHsmClusterPrivateEndpointConnections operations. */
30
+ export class CloudHsmClusterPrivateEndpointConnectionsImpl
31
+ implements CloudHsmClusterPrivateEndpointConnections {
32
+ private readonly client: AzureHSMResourceProvider;
33
+
34
+ /**
35
+ * Initialize a new instance of the class CloudHsmClusterPrivateEndpointConnections class.
36
+ * @param client Reference to the service client
37
+ */
38
+ constructor(client: AzureHSMResourceProvider) {
39
+ this.client = client;
40
+ }
41
+
42
+ /**
43
+ * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
44
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
45
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
46
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
47
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
48
+ * Cluster.
49
+ * @param properties Parameters of the PrivateEndpointConnection
50
+ * @param options The options parameters.
51
+ */
52
+ create(
53
+ resourceGroupName: string,
54
+ cloudHsmClusterName: string,
55
+ peConnectionName: string,
56
+ properties: PrivateEndpointConnection,
57
+ options?: CloudHsmClusterPrivateEndpointConnectionsCreateOptionalParams
58
+ ): Promise<CloudHsmClusterPrivateEndpointConnectionsCreateResponse> {
59
+ return this.client.sendOperationRequest(
60
+ {
61
+ resourceGroupName,
62
+ cloudHsmClusterName,
63
+ peConnectionName,
64
+ properties,
65
+ options
66
+ },
67
+ createOperationSpec
68
+ );
69
+ }
70
+
71
+ /**
72
+ * Deletes the private endpoint connection for the Cloud Hsm Cluster.
73
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
74
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
75
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
76
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
77
+ * Cluster.
78
+ * @param options The options parameters.
79
+ */
80
+ async beginDelete(
81
+ resourceGroupName: string,
82
+ cloudHsmClusterName: string,
83
+ peConnectionName: string,
84
+ options?: CloudHsmClusterPrivateEndpointConnectionsDeleteOptionalParams
85
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
86
+ const directSendOperation = async (
87
+ args: coreClient.OperationArguments,
88
+ spec: coreClient.OperationSpec
89
+ ): Promise<void> => {
90
+ return this.client.sendOperationRequest(args, spec);
91
+ };
92
+ const sendOperationFn = async (
93
+ args: coreClient.OperationArguments,
94
+ spec: coreClient.OperationSpec
95
+ ) => {
96
+ let currentRawResponse:
97
+ | coreClient.FullOperationResponse
98
+ | undefined = undefined;
99
+ const providedCallback = args.options?.onResponse;
100
+ const callback: coreClient.RawResponseCallback = (
101
+ rawResponse: coreClient.FullOperationResponse,
102
+ flatResponse: unknown
103
+ ) => {
104
+ currentRawResponse = rawResponse;
105
+ providedCallback?.(rawResponse, flatResponse);
106
+ };
107
+ const updatedArgs = {
108
+ ...args,
109
+ options: {
110
+ ...args.options,
111
+ onResponse: callback
112
+ }
113
+ };
114
+ const flatResponse = await directSendOperation(updatedArgs, spec);
115
+ return {
116
+ flatResponse,
117
+ rawResponse: {
118
+ statusCode: currentRawResponse!.status,
119
+ body: currentRawResponse!.parsedBody,
120
+ headers: currentRawResponse!.headers.toJSON()
121
+ }
122
+ };
123
+ };
124
+
125
+ const lro = createLroSpec({
126
+ sendOperationFn,
127
+ args: {
128
+ resourceGroupName,
129
+ cloudHsmClusterName,
130
+ peConnectionName,
131
+ options
132
+ },
133
+ spec: deleteOperationSpec
134
+ });
135
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
136
+ restoreFrom: options?.resumeFrom,
137
+ intervalInMs: options?.updateIntervalInMs,
138
+ resourceLocationConfig: "location"
139
+ });
140
+ await poller.poll();
141
+ return poller;
142
+ }
143
+
144
+ /**
145
+ * Deletes the private endpoint connection for the Cloud Hsm Cluster.
146
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
147
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
148
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
149
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
150
+ * Cluster.
151
+ * @param options The options parameters.
152
+ */
153
+ async beginDeleteAndWait(
154
+ resourceGroupName: string,
155
+ cloudHsmClusterName: string,
156
+ peConnectionName: string,
157
+ options?: CloudHsmClusterPrivateEndpointConnectionsDeleteOptionalParams
158
+ ): Promise<void> {
159
+ const poller = await this.beginDelete(
160
+ resourceGroupName,
161
+ cloudHsmClusterName,
162
+ peConnectionName,
163
+ options
164
+ );
165
+ return poller.pollUntilDone();
166
+ }
167
+
168
+ /**
169
+ * Gets the private endpoint connection for the Cloud Hsm Cluster.
170
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
171
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
172
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
173
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
174
+ * Cluster.
175
+ * @param options The options parameters.
176
+ */
177
+ get(
178
+ resourceGroupName: string,
179
+ cloudHsmClusterName: string,
180
+ peConnectionName: string,
181
+ options?: CloudHsmClusterPrivateEndpointConnectionsGetOptionalParams
182
+ ): Promise<CloudHsmClusterPrivateEndpointConnectionsGetResponse> {
183
+ return this.client.sendOperationRequest(
184
+ { resourceGroupName, cloudHsmClusterName, peConnectionName, options },
185
+ getOperationSpec
186
+ );
187
+ }
188
+ }
189
+ // Operation Specifications
190
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
191
+
192
+ const createOperationSpec: coreClient.OperationSpec = {
193
+ path:
194
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}",
195
+ httpMethod: "PUT",
196
+ responses: {
197
+ 200: {
198
+ bodyMapper: Mappers.PrivateEndpointConnection
199
+ },
200
+ default: {
201
+ bodyMapper: Mappers.CloudHsmClusterError
202
+ }
203
+ },
204
+ requestBody: Parameters.properties,
205
+ queryParameters: [Parameters.apiVersion],
206
+ urlParameters: [
207
+ Parameters.$host,
208
+ Parameters.subscriptionId,
209
+ Parameters.resourceGroupName,
210
+ Parameters.cloudHsmClusterName,
211
+ Parameters.peConnectionName
212
+ ],
213
+ headerParameters: [Parameters.contentType, Parameters.accept],
214
+ mediaType: "json",
215
+ serializer
216
+ };
217
+ const deleteOperationSpec: coreClient.OperationSpec = {
218
+ path:
219
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}",
220
+ httpMethod: "DELETE",
221
+ responses: {
222
+ 200: {},
223
+ 201: {},
224
+ 202: {},
225
+ 204: {},
226
+ default: {
227
+ bodyMapper: Mappers.CloudHsmClusterError
228
+ }
229
+ },
230
+ queryParameters: [Parameters.apiVersion],
231
+ urlParameters: [
232
+ Parameters.$host,
233
+ Parameters.subscriptionId,
234
+ Parameters.resourceGroupName,
235
+ Parameters.cloudHsmClusterName,
236
+ Parameters.peConnectionName
237
+ ],
238
+ headerParameters: [Parameters.accept],
239
+ serializer
240
+ };
241
+ const getOperationSpec: coreClient.OperationSpec = {
242
+ path:
243
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections/{peConnectionName}",
244
+ httpMethod: "GET",
245
+ responses: {
246
+ 200: {
247
+ bodyMapper: Mappers.PrivateEndpointConnection
248
+ },
249
+ default: {
250
+ bodyMapper: Mappers.CloudHsmClusterError
251
+ }
252
+ },
253
+ queryParameters: [Parameters.apiVersion],
254
+ urlParameters: [
255
+ Parameters.$host,
256
+ Parameters.subscriptionId,
257
+ Parameters.resourceGroupName,
258
+ Parameters.cloudHsmClusterName,
259
+ Parameters.peConnectionName
260
+ ],
261
+ headerParameters: [Parameters.accept],
262
+ serializer
263
+ };
@@ -0,0 +1,74 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { CloudHsmClusterPrivateLinkResources } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { AzureHSMResourceProvider } from "../azureHSMResourceProvider";
14
+ import {
15
+ CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterOptionalParams,
16
+ CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterResponse
17
+ } from "../models";
18
+
19
+ /** Class containing CloudHsmClusterPrivateLinkResources operations. */
20
+ export class CloudHsmClusterPrivateLinkResourcesImpl
21
+ implements CloudHsmClusterPrivateLinkResources {
22
+ private readonly client: AzureHSMResourceProvider;
23
+
24
+ /**
25
+ * Initialize a new instance of the class CloudHsmClusterPrivateLinkResources class.
26
+ * @param client Reference to the service client
27
+ */
28
+ constructor(client: AzureHSMResourceProvider) {
29
+ this.client = client;
30
+ }
31
+
32
+ /**
33
+ * Gets the private link resources supported for the Cloud Hsm Cluster.
34
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
35
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
36
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
37
+ * @param options The options parameters.
38
+ */
39
+ listByCloudHsmCluster(
40
+ resourceGroupName: string,
41
+ cloudHsmClusterName: string,
42
+ options?: CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterOptionalParams
43
+ ): Promise<CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterResponse> {
44
+ return this.client.sendOperationRequest(
45
+ { resourceGroupName, cloudHsmClusterName, options },
46
+ listByCloudHsmClusterOperationSpec
47
+ );
48
+ }
49
+ }
50
+ // Operation Specifications
51
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
52
+
53
+ const listByCloudHsmClusterOperationSpec: coreClient.OperationSpec = {
54
+ path:
55
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateLinkResources",
56
+ httpMethod: "GET",
57
+ responses: {
58
+ 200: {
59
+ bodyMapper: Mappers.PrivateLinkResourceListResult
60
+ },
61
+ default: {
62
+ bodyMapper: Mappers.CloudHsmClusterError
63
+ }
64
+ },
65
+ queryParameters: [Parameters.apiVersion],
66
+ urlParameters: [
67
+ Parameters.$host,
68
+ Parameters.subscriptionId,
69
+ Parameters.resourceGroupName,
70
+ Parameters.cloudHsmClusterName
71
+ ],
72
+ headerParameters: [Parameters.accept],
73
+ serializer
74
+ };