@azure/arm-workloads 1.0.0-beta.2 → 1.0.0

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 (313) hide show
  1. package/CHANGELOG.md +1 -42
  2. package/LICENSE +1 -1
  3. package/README.md +3 -3
  4. package/dist/index.js +3677 -3904
  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/monitorsCreateSample.js +12 -4
  9. package/dist-esm/samples-dev/monitorsCreateSample.js.map +1 -1
  10. package/dist-esm/samples-dev/monitorsDeleteSample.js +12 -4
  11. package/dist-esm/samples-dev/monitorsDeleteSample.js.map +1 -1
  12. package/dist-esm/samples-dev/monitorsGetSample.js +12 -4
  13. package/dist-esm/samples-dev/monitorsGetSample.js.map +1 -1
  14. package/dist-esm/samples-dev/monitorsListByResourceGroupSample.js +24 -9
  15. package/dist-esm/samples-dev/monitorsListByResourceGroupSample.js.map +1 -1
  16. package/dist-esm/samples-dev/monitorsListSample.js +23 -8
  17. package/dist-esm/samples-dev/monitorsListSample.js.map +1 -1
  18. package/dist-esm/samples-dev/monitorsUpdateSample.js +17 -8
  19. package/dist-esm/samples-dev/monitorsUpdateSample.js.map +1 -1
  20. package/dist-esm/samples-dev/operationsListSample.js +23 -8
  21. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  22. package/dist-esm/samples-dev/providerInstancesCreateSample.js +250 -32
  23. package/dist-esm/samples-dev/providerInstancesCreateSample.js.map +1 -1
  24. package/dist-esm/samples-dev/providerInstancesDeleteSample.js +12 -4
  25. package/dist-esm/samples-dev/providerInstancesDeleteSample.js.map +1 -1
  26. package/dist-esm/samples-dev/providerInstancesGetSample.js +37 -24
  27. package/dist-esm/samples-dev/providerInstancesGetSample.js.map +1 -1
  28. package/dist-esm/samples-dev/providerInstancesListSample.js +24 -9
  29. package/dist-esm/samples-dev/providerInstancesListSample.js.map +1 -1
  30. package/dist-esm/samples-dev/sapApplicationServerInstancesCreateSample.js +39 -6
  31. package/dist-esm/samples-dev/sapApplicationServerInstancesCreateSample.js.map +1 -1
  32. package/dist-esm/samples-dev/sapApplicationServerInstancesDeleteSample.js +14 -6
  33. package/dist-esm/samples-dev/sapApplicationServerInstancesDeleteSample.js.map +1 -1
  34. package/dist-esm/samples-dev/sapApplicationServerInstancesGetSample.js +14 -6
  35. package/dist-esm/samples-dev/sapApplicationServerInstancesGetSample.js.map +1 -1
  36. package/dist-esm/samples-dev/sapApplicationServerInstancesListSample.js +26 -11
  37. package/dist-esm/samples-dev/sapApplicationServerInstancesListSample.js.map +1 -1
  38. package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.d.ts +2 -0
  39. package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.d.ts.map +1 -0
  40. package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.js +40 -0
  41. package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.js.map +1 -0
  42. package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.d.ts +2 -0
  43. package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.d.ts.map +1 -0
  44. package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.js +44 -0
  45. package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.js.map +1 -0
  46. package/dist-esm/samples-dev/sapApplicationServerInstancesUpdateSample.js +14 -6
  47. package/dist-esm/samples-dev/sapApplicationServerInstancesUpdateSample.js.map +1 -1
  48. package/dist-esm/samples-dev/sapAvailabilityZoneDetailsSample.js +19 -10
  49. package/dist-esm/samples-dev/sapAvailabilityZoneDetailsSample.js.map +1 -1
  50. package/dist-esm/samples-dev/sapCentralInstancesCreateSample.js +39 -6
  51. package/dist-esm/samples-dev/sapCentralInstancesCreateSample.js.map +1 -1
  52. package/dist-esm/samples-dev/sapCentralInstancesDeleteSample.js +14 -6
  53. package/dist-esm/samples-dev/sapCentralInstancesDeleteSample.js.map +1 -1
  54. package/dist-esm/samples-dev/sapCentralInstancesGetSample.js +14 -6
  55. package/dist-esm/samples-dev/sapCentralInstancesGetSample.js.map +1 -1
  56. package/dist-esm/samples-dev/sapCentralInstancesListSample.js +26 -11
  57. package/dist-esm/samples-dev/sapCentralInstancesListSample.js.map +1 -1
  58. package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.d.ts +2 -0
  59. package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.d.ts.map +1 -0
  60. package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.js +40 -0
  61. package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.js.map +1 -0
  62. package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.d.ts +2 -0
  63. package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.d.ts.map +1 -0
  64. package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.js +42 -0
  65. package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.js.map +1 -0
  66. package/dist-esm/samples-dev/sapCentralInstancesUpdateSample.js +14 -6
  67. package/dist-esm/samples-dev/sapCentralInstancesUpdateSample.js.map +1 -1
  68. package/dist-esm/samples-dev/sapDatabaseInstancesCreateSample.js +36 -6
  69. package/dist-esm/samples-dev/sapDatabaseInstancesCreateSample.js.map +1 -1
  70. package/dist-esm/samples-dev/sapDatabaseInstancesDeleteSample.js +14 -6
  71. package/dist-esm/samples-dev/sapDatabaseInstancesDeleteSample.js.map +1 -1
  72. package/dist-esm/samples-dev/sapDatabaseInstancesGetSample.js +14 -6
  73. package/dist-esm/samples-dev/sapDatabaseInstancesGetSample.js.map +1 -1
  74. package/dist-esm/samples-dev/sapDatabaseInstancesListSample.js +26 -11
  75. package/dist-esm/samples-dev/sapDatabaseInstancesListSample.js.map +1 -1
  76. package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.js +40 -0
  79. package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.js.map +1 -0
  80. package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.d.ts +2 -0
  81. package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.js +42 -0
  83. package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.js.map +1 -0
  84. package/dist-esm/samples-dev/sapDatabaseInstancesUpdateSample.js +14 -6
  85. package/dist-esm/samples-dev/sapDatabaseInstancesUpdateSample.js.map +1 -1
  86. package/dist-esm/samples-dev/sapDiskConfigurationsSample.js +19 -10
  87. package/dist-esm/samples-dev/sapDiskConfigurationsSample.js.map +1 -1
  88. package/dist-esm/samples-dev/sapLandscapeMonitorCreateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/sapLandscapeMonitorCreateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/sapLandscapeMonitorCreateSample.js +48 -0
  91. package/dist-esm/samples-dev/sapLandscapeMonitorCreateSample.js.map +1 -0
  92. package/dist-esm/samples-dev/sapLandscapeMonitorDeleteSample.d.ts +2 -0
  93. package/dist-esm/samples-dev/sapLandscapeMonitorDeleteSample.d.ts.map +1 -0
  94. package/dist-esm/samples-dev/sapLandscapeMonitorDeleteSample.js +39 -0
  95. package/dist-esm/samples-dev/sapLandscapeMonitorDeleteSample.js.map +1 -0
  96. package/dist-esm/samples-dev/sapLandscapeMonitorGetSample.d.ts +2 -0
  97. package/dist-esm/samples-dev/sapLandscapeMonitorGetSample.d.ts.map +1 -0
  98. package/dist-esm/samples-dev/sapLandscapeMonitorGetSample.js +39 -0
  99. package/dist-esm/samples-dev/sapLandscapeMonitorGetSample.js.map +1 -0
  100. package/dist-esm/samples-dev/sapLandscapeMonitorListSample.d.ts +2 -0
  101. package/dist-esm/samples-dev/sapLandscapeMonitorListSample.d.ts.map +1 -0
  102. package/dist-esm/samples-dev/sapLandscapeMonitorListSample.js +39 -0
  103. package/dist-esm/samples-dev/sapLandscapeMonitorListSample.js.map +1 -0
  104. package/dist-esm/samples-dev/sapLandscapeMonitorUpdateSample.d.ts +2 -0
  105. package/dist-esm/samples-dev/sapLandscapeMonitorUpdateSample.d.ts.map +1 -0
  106. package/dist-esm/samples-dev/sapLandscapeMonitorUpdateSample.js +48 -0
  107. package/dist-esm/samples-dev/sapLandscapeMonitorUpdateSample.js.map +1 -0
  108. package/dist-esm/samples-dev/sapSizingRecommendationsSample.js +31 -20
  109. package/dist-esm/samples-dev/sapSizingRecommendationsSample.js.map +1 -1
  110. package/dist-esm/samples-dev/sapSupportedSkuSample.js +31 -20
  111. package/dist-esm/samples-dev/sapSupportedSkuSample.js.map +1 -1
  112. package/dist-esm/samples-dev/sapVirtualInstancesCreateSample.js +2121 -178
  113. package/dist-esm/samples-dev/sapVirtualInstancesCreateSample.js.map +1 -1
  114. package/dist-esm/samples-dev/sapVirtualInstancesDeleteSample.js +14 -6
  115. package/dist-esm/samples-dev/sapVirtualInstancesDeleteSample.js.map +1 -1
  116. package/dist-esm/samples-dev/sapVirtualInstancesGetSample.js +14 -6
  117. package/dist-esm/samples-dev/sapVirtualInstancesGetSample.js.map +1 -1
  118. package/dist-esm/samples-dev/sapVirtualInstancesListByResourceGroupSample.js +26 -11
  119. package/dist-esm/samples-dev/sapVirtualInstancesListByResourceGroupSample.js.map +1 -1
  120. package/dist-esm/samples-dev/sapVirtualInstancesListBySubscriptionSample.js +25 -10
  121. package/dist-esm/samples-dev/sapVirtualInstancesListBySubscriptionSample.js.map +1 -1
  122. package/dist-esm/samples-dev/sapVirtualInstancesStartSample.js +14 -6
  123. package/dist-esm/samples-dev/sapVirtualInstancesStartSample.js.map +1 -1
  124. package/dist-esm/samples-dev/sapVirtualInstancesStopSample.js +15 -7
  125. package/dist-esm/samples-dev/sapVirtualInstancesStopSample.js.map +1 -1
  126. package/dist-esm/samples-dev/sapVirtualInstancesUpdateSample.js +14 -6
  127. package/dist-esm/samples-dev/sapVirtualInstancesUpdateSample.js.map +1 -1
  128. package/dist-esm/src/index.d.ts +1 -0
  129. package/dist-esm/src/index.d.ts.map +1 -1
  130. package/dist-esm/src/index.js +1 -0
  131. package/dist-esm/src/index.js.map +1 -1
  132. package/dist-esm/src/lroImpl.d.ts +6 -11
  133. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  134. package/dist-esm/src/lroImpl.js +12 -20
  135. package/dist-esm/src/lroImpl.js.map +1 -1
  136. package/dist-esm/src/models/index.d.ts +942 -1305
  137. package/dist-esm/src/models/index.d.ts.map +1 -1
  138. package/dist-esm/src/models/index.js +112 -246
  139. package/dist-esm/src/models/index.js.map +1 -1
  140. package/dist-esm/src/models/mappers.d.ts +51 -43
  141. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  142. package/dist-esm/src/models/mappers.js +1192 -1428
  143. package/dist-esm/src/models/mappers.js.map +1 -1
  144. package/dist-esm/src/models/parameters.d.ts +6 -10
  145. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  146. package/dist-esm/src/models/parameters.js +52 -82
  147. package/dist-esm/src/models/parameters.js.map +1 -1
  148. package/dist-esm/src/operations/index.d.ts +2 -4
  149. package/dist-esm/src/operations/index.d.ts.map +1 -1
  150. package/dist-esm/src/operations/index.js +2 -4
  151. package/dist-esm/src/operations/index.js.map +1 -1
  152. package/dist-esm/src/operations/monitors.d.ts +3 -3
  153. package/dist-esm/src/operations/monitors.d.ts.map +1 -1
  154. package/dist-esm/src/operations/monitors.js +83 -39
  155. package/dist-esm/src/operations/monitors.js.map +1 -1
  156. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  157. package/dist-esm/src/operations/operations.js +31 -13
  158. package/dist-esm/src/operations/operations.js.map +1 -1
  159. package/dist-esm/src/operations/providerInstances.d.ts +3 -3
  160. package/dist-esm/src/operations/providerInstances.d.ts.map +1 -1
  161. package/dist-esm/src/operations/providerInstances.js +58 -31
  162. package/dist-esm/src/operations/providerInstances.js.map +1 -1
  163. package/dist-esm/src/operations/sAPApplicationServerInstances.d.ts +70 -35
  164. package/dist-esm/src/operations/sAPApplicationServerInstances.d.ts.map +1 -1
  165. package/dist-esm/src/operations/sAPApplicationServerInstances.js +300 -77
  166. package/dist-esm/src/operations/sAPApplicationServerInstances.js.map +1 -1
  167. package/dist-esm/src/operations/sAPCentralInstances.d.ts +86 -42
  168. package/dist-esm/src/operations/sAPCentralInstances.d.ts.map +1 -1
  169. package/dist-esm/src/operations/sAPCentralInstances.js +316 -84
  170. package/dist-esm/src/operations/sAPCentralInstances.js.map +1 -1
  171. package/dist-esm/src/operations/sAPDatabaseInstances.d.ts +78 -42
  172. package/dist-esm/src/operations/sAPDatabaseInstances.d.ts.map +1 -1
  173. package/dist-esm/src/operations/sAPDatabaseInstances.js +308 -84
  174. package/dist-esm/src/operations/sAPDatabaseInstances.js.map +1 -1
  175. package/dist-esm/src/operations/sAPVirtualInstances.d.ts +31 -29
  176. package/dist-esm/src/operations/sAPVirtualInstances.d.ts.map +1 -1
  177. package/dist-esm/src/operations/sAPVirtualInstances.js +125 -72
  178. package/dist-esm/src/operations/sAPVirtualInstances.js.map +1 -1
  179. package/dist-esm/src/operations/sapLandscapeMonitorOperations.d.ts +57 -0
  180. package/dist-esm/src/operations/sapLandscapeMonitorOperations.d.ts.map +1 -0
  181. package/dist-esm/src/operations/sapLandscapeMonitorOperations.js +188 -0
  182. package/dist-esm/src/operations/sapLandscapeMonitorOperations.js.map +1 -0
  183. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -4
  184. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  185. package/dist-esm/src/operationsInterfaces/index.js +2 -4
  186. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  187. package/dist-esm/src/operationsInterfaces/monitors.d.ts +3 -3
  188. package/dist-esm/src/operationsInterfaces/monitors.d.ts.map +1 -1
  189. package/dist-esm/src/operationsInterfaces/providerInstances.d.ts +3 -3
  190. package/dist-esm/src/operationsInterfaces/providerInstances.d.ts.map +1 -1
  191. package/dist-esm/src/operationsInterfaces/sAPApplicationServerInstances.d.ts +66 -32
  192. package/dist-esm/src/operationsInterfaces/sAPApplicationServerInstances.d.ts.map +1 -1
  193. package/dist-esm/src/operationsInterfaces/sAPCentralInstances.d.ts +82 -39
  194. package/dist-esm/src/operationsInterfaces/sAPCentralInstances.d.ts.map +1 -1
  195. package/dist-esm/src/operationsInterfaces/sAPDatabaseInstances.d.ts +75 -39
  196. package/dist-esm/src/operationsInterfaces/sAPDatabaseInstances.d.ts.map +1 -1
  197. package/dist-esm/src/operationsInterfaces/sAPVirtualInstances.d.ts +29 -27
  198. package/dist-esm/src/operationsInterfaces/sAPVirtualInstances.d.ts.map +1 -1
  199. package/dist-esm/src/operationsInterfaces/sapLandscapeMonitorOperations.d.ts +49 -0
  200. package/dist-esm/src/operationsInterfaces/sapLandscapeMonitorOperations.d.ts.map +1 -0
  201. package/dist-esm/src/operationsInterfaces/{phpWorkloads.js → sapLandscapeMonitorOperations.js} +1 -1
  202. package/dist-esm/src/operationsInterfaces/sapLandscapeMonitorOperations.js.map +1 -0
  203. package/dist-esm/src/pagingHelper.d.ts +13 -0
  204. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  205. package/dist-esm/src/pagingHelper.js +32 -0
  206. package/dist-esm/src/pagingHelper.js.map +1 -0
  207. package/dist-esm/src/workloadsClient.d.ts +8 -9
  208. package/dist-esm/src/workloadsClient.d.ts.map +1 -1
  209. package/dist-esm/src/workloadsClient.js +33 -32
  210. package/dist-esm/src/workloadsClient.js.map +1 -1
  211. package/dist-esm/test/workloads_examples.js +116 -12
  212. package/dist-esm/test/workloads_examples.js.map +1 -1
  213. package/package.json +15 -13
  214. package/review/arm-workloads.api.md +384 -596
  215. package/src/index.ts +1 -0
  216. package/src/lroImpl.ts +31 -23
  217. package/src/models/index.ts +1087 -1477
  218. package/src/models/mappers.ts +1334 -1553
  219. package/src/models/parameters.ts +58 -94
  220. package/src/operations/index.ts +2 -4
  221. package/src/operations/monitors.ts +81 -43
  222. package/src/operations/operations.ts +21 -9
  223. package/src/operations/providerInstances.ts +61 -33
  224. package/src/operations/sAPApplicationServerInstances.ts +382 -81
  225. package/src/operations/sAPCentralInstances.ts +398 -88
  226. package/src/operations/sAPDatabaseInstances.ts +390 -88
  227. package/src/operations/sAPVirtualInstances.ts +134 -89
  228. package/src/operations/sapLandscapeMonitorOperations.ts +254 -0
  229. package/src/operationsInterfaces/index.ts +2 -4
  230. package/src/operationsInterfaces/monitors.ts +5 -5
  231. package/src/operationsInterfaces/providerInstances.ts +5 -5
  232. package/src/operationsInterfaces/sAPApplicationServerInstances.ts +103 -35
  233. package/src/operationsInterfaces/sAPCentralInstances.ts +119 -42
  234. package/src/operationsInterfaces/sAPDatabaseInstances.ts +112 -42
  235. package/src/operationsInterfaces/sAPVirtualInstances.ts +33 -31
  236. package/src/operationsInterfaces/sapLandscapeMonitorOperations.ts +90 -0
  237. package/src/pagingHelper.ts +39 -0
  238. package/src/workloadsClient.ts +46 -45
  239. package/types/arm-workloads.d.ts +972 -1316
  240. package/types/tsdoc-metadata.json +1 -1
  241. package/dist-esm/samples-dev/phpWorkloadsCreateOrUpdateSample.d.ts +0 -2
  242. package/dist-esm/samples-dev/phpWorkloadsCreateOrUpdateSample.d.ts.map +0 -1
  243. package/dist-esm/samples-dev/phpWorkloadsCreateOrUpdateSample.js +0 -111
  244. package/dist-esm/samples-dev/phpWorkloadsCreateOrUpdateSample.js.map +0 -1
  245. package/dist-esm/samples-dev/phpWorkloadsDeleteSample.d.ts +0 -2
  246. package/dist-esm/samples-dev/phpWorkloadsDeleteSample.d.ts.map +0 -1
  247. package/dist-esm/samples-dev/phpWorkloadsDeleteSample.js +0 -33
  248. package/dist-esm/samples-dev/phpWorkloadsDeleteSample.js.map +0 -1
  249. package/dist-esm/samples-dev/phpWorkloadsGetSample.d.ts +0 -2
  250. package/dist-esm/samples-dev/phpWorkloadsGetSample.d.ts.map +0 -1
  251. package/dist-esm/samples-dev/phpWorkloadsGetSample.js +0 -31
  252. package/dist-esm/samples-dev/phpWorkloadsGetSample.js.map +0 -1
  253. package/dist-esm/samples-dev/phpWorkloadsListByResourceGroupSample.d.ts +0 -2
  254. package/dist-esm/samples-dev/phpWorkloadsListByResourceGroupSample.d.ts.map +0 -1
  255. package/dist-esm/samples-dev/phpWorkloadsListByResourceGroupSample.js +0 -44
  256. package/dist-esm/samples-dev/phpWorkloadsListByResourceGroupSample.js.map +0 -1
  257. package/dist-esm/samples-dev/phpWorkloadsListBySubscriptionSample.d.ts +0 -2
  258. package/dist-esm/samples-dev/phpWorkloadsListBySubscriptionSample.d.ts.map +0 -1
  259. package/dist-esm/samples-dev/phpWorkloadsListBySubscriptionSample.js +0 -43
  260. package/dist-esm/samples-dev/phpWorkloadsListBySubscriptionSample.js.map +0 -1
  261. package/dist-esm/samples-dev/phpWorkloadsUpdateSample.d.ts +0 -2
  262. package/dist-esm/samples-dev/phpWorkloadsUpdateSample.d.ts.map +0 -1
  263. package/dist-esm/samples-dev/phpWorkloadsUpdateSample.js +0 -35
  264. package/dist-esm/samples-dev/phpWorkloadsUpdateSample.js.map +0 -1
  265. package/dist-esm/samples-dev/skusListSample.d.ts +0 -2
  266. package/dist-esm/samples-dev/skusListSample.d.ts.map +0 -1
  267. package/dist-esm/samples-dev/skusListSample.js +0 -43
  268. package/dist-esm/samples-dev/skusListSample.js.map +0 -1
  269. package/dist-esm/samples-dev/wordpressInstancesCreateOrUpdateSample.d.ts +0 -2
  270. package/dist-esm/samples-dev/wordpressInstancesCreateOrUpdateSample.d.ts.map +0 -1
  271. package/dist-esm/samples-dev/wordpressInstancesCreateOrUpdateSample.js +0 -36
  272. package/dist-esm/samples-dev/wordpressInstancesCreateOrUpdateSample.js.map +0 -1
  273. package/dist-esm/samples-dev/wordpressInstancesDeleteSample.d.ts +0 -2
  274. package/dist-esm/samples-dev/wordpressInstancesDeleteSample.d.ts.map +0 -1
  275. package/dist-esm/samples-dev/wordpressInstancesDeleteSample.js +0 -31
  276. package/dist-esm/samples-dev/wordpressInstancesDeleteSample.js.map +0 -1
  277. package/dist-esm/samples-dev/wordpressInstancesGetSample.d.ts +0 -2
  278. package/dist-esm/samples-dev/wordpressInstancesGetSample.d.ts.map +0 -1
  279. package/dist-esm/samples-dev/wordpressInstancesGetSample.js +0 -31
  280. package/dist-esm/samples-dev/wordpressInstancesGetSample.js.map +0 -1
  281. package/dist-esm/samples-dev/wordpressInstancesListSample.d.ts +0 -2
  282. package/dist-esm/samples-dev/wordpressInstancesListSample.d.ts.map +0 -1
  283. package/dist-esm/samples-dev/wordpressInstancesListSample.js +0 -45
  284. package/dist-esm/samples-dev/wordpressInstancesListSample.js.map +0 -1
  285. package/dist-esm/src/operations/phpWorkloads.d.ts +0 -99
  286. package/dist-esm/src/operations/phpWorkloads.d.ts.map +0 -1
  287. package/dist-esm/src/operations/phpWorkloads.js +0 -455
  288. package/dist-esm/src/operations/phpWorkloads.js.map +0 -1
  289. package/dist-esm/src/operations/skus.d.ts +0 -32
  290. package/dist-esm/src/operations/skus.d.ts.map +0 -1
  291. package/dist-esm/src/operations/skus.js +0 -124
  292. package/dist-esm/src/operations/skus.js.map +0 -1
  293. package/dist-esm/src/operations/wordpressInstances.d.ts +0 -69
  294. package/dist-esm/src/operations/wordpressInstances.d.ts.map +0 -1
  295. package/dist-esm/src/operations/wordpressInstances.js +0 -288
  296. package/dist-esm/src/operations/wordpressInstances.js.map +0 -1
  297. package/dist-esm/src/operationsInterfaces/phpWorkloads.d.ts +0 -63
  298. package/dist-esm/src/operationsInterfaces/phpWorkloads.d.ts.map +0 -1
  299. package/dist-esm/src/operationsInterfaces/phpWorkloads.js.map +0 -1
  300. package/dist-esm/src/operationsInterfaces/skus.d.ts +0 -11
  301. package/dist-esm/src/operationsInterfaces/skus.d.ts.map +0 -1
  302. package/dist-esm/src/operationsInterfaces/skus.js +0 -9
  303. package/dist-esm/src/operationsInterfaces/skus.js.map +0 -1
  304. package/dist-esm/src/operationsInterfaces/wordpressInstances.d.ts +0 -44
  305. package/dist-esm/src/operationsInterfaces/wordpressInstances.d.ts.map +0 -1
  306. package/dist-esm/src/operationsInterfaces/wordpressInstances.js +0 -9
  307. package/dist-esm/src/operationsInterfaces/wordpressInstances.js.map +0 -1
  308. package/src/operations/phpWorkloads.ts +0 -599
  309. package/src/operations/skus.ts +0 -139
  310. package/src/operations/wordpressInstances.ts +0 -395
  311. package/src/operationsInterfaces/phpWorkloads.ts +0 -121
  312. package/src/operationsInterfaces/skus.ts +0 -22
  313. package/src/operationsInterfaces/wordpressInstances.ts +0 -88
@@ -10,39 +10,42 @@ import { __awaiter } from "tslib";
10
10
  // Licensed under the MIT License.
11
11
  import { WorkloadsClient } from "@azure/arm-workloads";
12
12
  import { DefaultAzureCredential } from "@azure/identity";
13
+ import * as dotenv from "dotenv";
14
+ dotenv.config();
13
15
  /**
14
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
16
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
15
17
  *
16
- * @summary Creates an Virtual Instance for SAP.
17
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json
18
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
19
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.json
18
20
  */
19
- function sapVirtualInstancesCreateDistributed() {
21
+ function createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem() {
20
22
  return __awaiter(this, void 0, void 0, function* () {
21
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
22
- const resourceGroupName = "test-rg";
23
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
24
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
25
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
23
26
  const sapVirtualInstanceName = "X00";
24
27
  const body = {
25
28
  configuration: {
26
29
  appLocation: "eastus",
27
- configurationType: "Deployment",
30
+ configurationType: "DeploymentWithOSConfig",
28
31
  infrastructureConfiguration: {
29
32
  appResourceGroup: "X00-RG",
30
33
  applicationServer: {
31
34
  instanceCount: 6,
32
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
35
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
33
36
  virtualMachineConfiguration: {
34
37
  imageReference: {
35
38
  offer: "RHEL-SAP",
36
39
  publisher: "RedHat",
37
- sku: "7.4",
38
- version: "7.4.2019062505"
40
+ sku: "84sapha-gen2",
41
+ version: "latest"
39
42
  },
40
43
  osProfile: {
41
44
  adminUsername: "{your-username}",
42
45
  osConfiguration: {
43
46
  disablePasswordAuthentication: true,
44
47
  osType: "Linux",
45
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
48
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
46
49
  }
47
50
  },
48
51
  vmSize: "Standard_E32ds_v4"
@@ -50,49 +53,103 @@ function sapVirtualInstancesCreateDistributed() {
50
53
  },
51
54
  centralServer: {
52
55
  instanceCount: 1,
53
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
56
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
54
57
  virtualMachineConfiguration: {
55
58
  imageReference: {
56
59
  offer: "RHEL-SAP",
57
60
  publisher: "RedHat",
58
- sku: "7.4",
59
- version: "7.4.2019062505"
61
+ sku: "84sapha-gen2",
62
+ version: "latest"
60
63
  },
61
64
  osProfile: {
62
65
  adminUsername: "{your-username}",
63
66
  osConfiguration: {
64
67
  disablePasswordAuthentication: true,
65
68
  osType: "Linux",
66
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
69
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
67
70
  }
68
71
  },
69
72
  vmSize: "Standard_E16ds_v4"
70
73
  }
71
74
  },
75
+ customResourceNames: {
76
+ applicationServer: {
77
+ availabilitySetName: "appAvSet",
78
+ virtualMachines: [
79
+ {
80
+ dataDiskNames: { default: ["app0disk0"] },
81
+ hostName: "apphostName0",
82
+ networkInterfaces: [{ networkInterfaceName: "appnic0" }],
83
+ osDiskName: "app0osdisk",
84
+ vmName: "appvm0"
85
+ },
86
+ {
87
+ dataDiskNames: { default: ["app1disk0"] },
88
+ hostName: "apphostName1",
89
+ networkInterfaces: [{ networkInterfaceName: "appnic1" }],
90
+ osDiskName: "app1osdisk",
91
+ vmName: "appvm1"
92
+ }
93
+ ]
94
+ },
95
+ centralServer: {
96
+ virtualMachines: [
97
+ {
98
+ dataDiskNames: { default: ["ascsdisk0"] },
99
+ hostName: "ascshostName",
100
+ networkInterfaces: [{ networkInterfaceName: "ascsnic" }],
101
+ osDiskName: "ascsosdisk",
102
+ vmName: "ascsvm"
103
+ }
104
+ ]
105
+ },
106
+ databaseServer: {
107
+ virtualMachines: [
108
+ {
109
+ dataDiskNames: {
110
+ hanaData: ["hanadata0", "hanadata1"],
111
+ hanaLog: ["hanalog0", "hanalog1", "hanalog2"],
112
+ hanaShared: ["hanashared0", "hanashared1"],
113
+ usrSap: ["usrsap0"]
114
+ },
115
+ hostName: "dbhostName",
116
+ networkInterfaces: [{ networkInterfaceName: "dbnic" }],
117
+ osDiskName: "dbosdisk",
118
+ vmName: "dbvm"
119
+ }
120
+ ]
121
+ },
122
+ namingPatternType: "FullResourceName",
123
+ sharedStorage: {
124
+ sharedStorageAccountName: "storageacc",
125
+ sharedStorageAccountPrivateEndPointName: "peForxNFS"
126
+ }
127
+ },
72
128
  databaseServer: {
73
129
  databaseType: "HANA",
74
130
  instanceCount: 1,
75
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
131
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
76
132
  virtualMachineConfiguration: {
77
133
  imageReference: {
78
134
  offer: "RHEL-SAP",
79
135
  publisher: "RedHat",
80
- sku: "7.4",
81
- version: "7.4.2019062505"
136
+ sku: "84sapha-gen2",
137
+ version: "latest"
82
138
  },
83
139
  osProfile: {
84
140
  adminUsername: "{your-username}",
85
141
  osConfiguration: {
86
142
  disablePasswordAuthentication: true,
87
143
  osType: "Linux",
88
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
144
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
89
145
  }
90
146
  },
91
147
  vmSize: "Standard_M32ts"
92
148
  }
93
149
  },
94
150
  deploymentType: "ThreeTier"
95
- }
151
+ },
152
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
96
153
  },
97
154
  environment: "Prod",
98
155
  location: "westcentralus",
@@ -106,40 +163,40 @@ function sapVirtualInstancesCreateDistributed() {
106
163
  console.log(result);
107
164
  });
108
165
  }
109
- sapVirtualInstancesCreateDistributed().catch(console.error);
110
166
  /**
111
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
167
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
112
168
  *
113
- * @summary Creates an Virtual Instance for SAP.
114
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json
169
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
170
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.json
115
171
  */
116
- function sapVirtualInstancesCreateHaAvSet() {
172
+ function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet() {
117
173
  return __awaiter(this, void 0, void 0, function* () {
118
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
119
- const resourceGroupName = "test-rg";
174
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
175
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
176
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
120
177
  const sapVirtualInstanceName = "X00";
121
178
  const body = {
122
179
  configuration: {
123
180
  appLocation: "eastus",
124
- configurationType: "Deployment",
181
+ configurationType: "DeploymentWithOSConfig",
125
182
  infrastructureConfiguration: {
126
183
  appResourceGroup: "X00-RG",
127
184
  applicationServer: {
128
- instanceCount: 5,
129
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
185
+ instanceCount: 6,
186
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
130
187
  virtualMachineConfiguration: {
131
188
  imageReference: {
132
189
  offer: "RHEL-SAP",
133
190
  publisher: "RedHat",
134
- sku: "7.4",
135
- version: "7.4.2019062505"
191
+ sku: "84sapha-gen2",
192
+ version: "latest"
136
193
  },
137
194
  osProfile: {
138
195
  adminUsername: "{your-username}",
139
196
  osConfiguration: {
140
197
  disablePasswordAuthentication: true,
141
198
  osType: "Linux",
142
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
199
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
143
200
  }
144
201
  },
145
202
  vmSize: "Standard_E32ds_v4"
@@ -147,42 +204,126 @@ function sapVirtualInstancesCreateHaAvSet() {
147
204
  },
148
205
  centralServer: {
149
206
  instanceCount: 2,
150
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
207
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
151
208
  virtualMachineConfiguration: {
152
209
  imageReference: {
153
210
  offer: "RHEL-SAP",
154
211
  publisher: "RedHat",
155
- sku: "7.4",
156
- version: "7.4.2019062505"
212
+ sku: "84sapha-gen2",
213
+ version: "latest"
157
214
  },
158
215
  osProfile: {
159
216
  adminUsername: "{your-username}",
160
217
  osConfiguration: {
161
218
  disablePasswordAuthentication: true,
162
219
  osType: "Linux",
163
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
220
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
164
221
  }
165
222
  },
166
223
  vmSize: "Standard_E16ds_v4"
167
224
  }
168
225
  },
226
+ customResourceNames: {
227
+ applicationServer: {
228
+ availabilitySetName: "appAvSet",
229
+ virtualMachines: [
230
+ {
231
+ dataDiskNames: { default: ["app0disk0"] },
232
+ hostName: "apphostName0",
233
+ networkInterfaces: [{ networkInterfaceName: "appnic0" }],
234
+ osDiskName: "app0osdisk",
235
+ vmName: "appvm0"
236
+ },
237
+ {
238
+ dataDiskNames: { default: ["app1disk0"] },
239
+ hostName: "apphostName1",
240
+ networkInterfaces: [{ networkInterfaceName: "appnic1" }],
241
+ osDiskName: "app1osdisk",
242
+ vmName: "appvm1"
243
+ }
244
+ ]
245
+ },
246
+ centralServer: {
247
+ availabilitySetName: "csAvSet",
248
+ loadBalancer: {
249
+ backendPoolNames: ["ascsBackendPool"],
250
+ frontendIpConfigurationNames: ["ascsip0", "ersip0"],
251
+ healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"],
252
+ loadBalancerName: "ascslb"
253
+ },
254
+ virtualMachines: [
255
+ {
256
+ hostName: "ascshostName",
257
+ networkInterfaces: [{ networkInterfaceName: "ascsnic" }],
258
+ osDiskName: "ascsosdisk",
259
+ vmName: "ascsvm"
260
+ },
261
+ {
262
+ hostName: "ershostName",
263
+ networkInterfaces: [{ networkInterfaceName: "ersnic" }],
264
+ osDiskName: "ersosdisk",
265
+ vmName: "ersvm"
266
+ }
267
+ ]
268
+ },
269
+ databaseServer: {
270
+ availabilitySetName: "dbAvSet",
271
+ loadBalancer: {
272
+ backendPoolNames: ["dbBackendPool"],
273
+ frontendIpConfigurationNames: ["dbip"],
274
+ healthProbeNames: ["dbHealthProbe"],
275
+ loadBalancerName: "dblb"
276
+ },
277
+ virtualMachines: [
278
+ {
279
+ dataDiskNames: {
280
+ hanaData: ["hanadatapr0", "hanadatapr1"],
281
+ hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"],
282
+ hanaShared: ["hanasharedpr0", "hanasharedpr1"],
283
+ usrSap: ["usrsappr0"]
284
+ },
285
+ hostName: "dbprhostName",
286
+ networkInterfaces: [{ networkInterfaceName: "dbprnic" }],
287
+ osDiskName: "dbprosdisk",
288
+ vmName: "dbvmpr"
289
+ },
290
+ {
291
+ dataDiskNames: {
292
+ hanaData: ["hanadatasr0", "hanadatasr1"],
293
+ hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"],
294
+ hanaShared: ["hanasharedsr0", "hanasharedsr1"],
295
+ usrSap: ["usrsapsr0"]
296
+ },
297
+ hostName: "dbsrhostName",
298
+ networkInterfaces: [{ networkInterfaceName: "dbsrnic" }],
299
+ osDiskName: "dbsrosdisk",
300
+ vmName: "dbvmsr"
301
+ }
302
+ ]
303
+ },
304
+ namingPatternType: "FullResourceName",
305
+ sharedStorage: {
306
+ sharedStorageAccountName: "storageacc",
307
+ sharedStorageAccountPrivateEndPointName: "peForxNFS"
308
+ }
309
+ },
169
310
  databaseServer: {
170
311
  databaseType: "HANA",
171
312
  instanceCount: 2,
172
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
313
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
173
314
  virtualMachineConfiguration: {
174
315
  imageReference: {
175
316
  offer: "RHEL-SAP",
176
317
  publisher: "RedHat",
177
- sku: "7.4",
178
- version: "7.4.2019062505"
318
+ sku: "84sapha-gen2",
319
+ version: "latest"
179
320
  },
180
321
  osProfile: {
181
322
  adminUsername: "{your-username}",
182
323
  osConfiguration: {
183
324
  disablePasswordAuthentication: true,
184
325
  osType: "Linux",
185
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
326
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
186
327
  }
187
328
  },
188
329
  vmSize: "Standard_M32ts"
@@ -190,7 +331,8 @@ function sapVirtualInstancesCreateHaAvSet() {
190
331
  },
191
332
  deploymentType: "ThreeTier",
192
333
  highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }
193
- }
334
+ },
335
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
194
336
  },
195
337
  environment: "Prod",
196
338
  location: "westcentralus",
@@ -204,40 +346,40 @@ function sapVirtualInstancesCreateHaAvSet() {
204
346
  console.log(result);
205
347
  });
206
348
  }
207
- sapVirtualInstancesCreateHaAvSet().catch(console.error);
208
349
  /**
209
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
350
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
210
351
  *
211
- * @summary Creates an Virtual Instance for SAP.
212
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json
352
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
353
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.json
213
354
  */
214
- function sapVirtualInstancesCreateHaAvZone() {
355
+ function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone() {
215
356
  return __awaiter(this, void 0, void 0, function* () {
216
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
217
- const resourceGroupName = "test-rg";
357
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
358
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
359
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
218
360
  const sapVirtualInstanceName = "X00";
219
361
  const body = {
220
362
  configuration: {
221
363
  appLocation: "eastus",
222
- configurationType: "Deployment",
364
+ configurationType: "DeploymentWithOSConfig",
223
365
  infrastructureConfiguration: {
224
366
  appResourceGroup: "X00-RG",
225
367
  applicationServer: {
226
368
  instanceCount: 6,
227
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
369
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
228
370
  virtualMachineConfiguration: {
229
371
  imageReference: {
230
372
  offer: "RHEL-SAP",
231
373
  publisher: "RedHat",
232
- sku: "7.4",
233
- version: "7.4.2019062505"
374
+ sku: "84sapha-gen2",
375
+ version: "latest"
234
376
  },
235
377
  osProfile: {
236
378
  adminUsername: "{your-username}",
237
379
  osConfiguration: {
238
380
  disablePasswordAuthentication: true,
239
381
  osType: "Linux",
240
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
382
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
241
383
  }
242
384
  },
243
385
  vmSize: "Standard_E32ds_v4"
@@ -245,42 +387,123 @@ function sapVirtualInstancesCreateHaAvZone() {
245
387
  },
246
388
  centralServer: {
247
389
  instanceCount: 2,
248
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
390
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
249
391
  virtualMachineConfiguration: {
250
392
  imageReference: {
251
393
  offer: "RHEL-SAP",
252
394
  publisher: "RedHat",
253
- sku: "7.4",
254
- version: "7.4.2019062505"
395
+ sku: "84sapha-gen2",
396
+ version: "latest"
255
397
  },
256
398
  osProfile: {
257
399
  adminUsername: "{your-username}",
258
400
  osConfiguration: {
259
401
  disablePasswordAuthentication: true,
260
402
  osType: "Linux",
261
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
403
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
262
404
  }
263
405
  },
264
406
  vmSize: "Standard_E16ds_v4"
265
407
  }
266
408
  },
409
+ customResourceNames: {
410
+ applicationServer: {
411
+ virtualMachines: [
412
+ {
413
+ dataDiskNames: { default: ["app0disk0"] },
414
+ hostName: "apphostName0",
415
+ networkInterfaces: [{ networkInterfaceName: "appnic0" }],
416
+ osDiskName: "app0osdisk",
417
+ vmName: "appvm0"
418
+ },
419
+ {
420
+ dataDiskNames: { default: ["app1disk0"] },
421
+ hostName: "apphostName1",
422
+ networkInterfaces: [{ networkInterfaceName: "appnic1" }],
423
+ osDiskName: "app1osdisk",
424
+ vmName: "appvm1"
425
+ }
426
+ ]
427
+ },
428
+ centralServer: {
429
+ loadBalancer: {
430
+ backendPoolNames: ["ascsBackendPool"],
431
+ frontendIpConfigurationNames: ["ascsip0", "ersip0"],
432
+ healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"],
433
+ loadBalancerName: "ascslb"
434
+ },
435
+ virtualMachines: [
436
+ {
437
+ hostName: "ascshostName",
438
+ networkInterfaces: [{ networkInterfaceName: "ascsnic" }],
439
+ osDiskName: "ascsosdisk",
440
+ vmName: "ascsvm"
441
+ },
442
+ {
443
+ hostName: "ershostName",
444
+ networkInterfaces: [{ networkInterfaceName: "ersnic" }],
445
+ osDiskName: "ersosdisk",
446
+ vmName: "ersvm"
447
+ }
448
+ ]
449
+ },
450
+ databaseServer: {
451
+ loadBalancer: {
452
+ backendPoolNames: ["dbBackendPool"],
453
+ frontendIpConfigurationNames: ["dbip"],
454
+ healthProbeNames: ["dbHealthProbe"],
455
+ loadBalancerName: "dblb"
456
+ },
457
+ virtualMachines: [
458
+ {
459
+ dataDiskNames: {
460
+ hanaData: ["hanadatapr0", "hanadatapr1"],
461
+ hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"],
462
+ hanaShared: ["hanasharedpr0", "hanasharedpr1"],
463
+ usrSap: ["usrsappr0"]
464
+ },
465
+ hostName: "dbprhostName",
466
+ networkInterfaces: [{ networkInterfaceName: "dbprnic" }],
467
+ osDiskName: "dbprosdisk",
468
+ vmName: "dbvmpr"
469
+ },
470
+ {
471
+ dataDiskNames: {
472
+ hanaData: ["hanadatasr0", "hanadatasr1"],
473
+ hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"],
474
+ hanaShared: ["hanasharedsr0", "hanasharedsr1"],
475
+ usrSap: ["usrsapsr0"]
476
+ },
477
+ hostName: "dbsrhostName",
478
+ networkInterfaces: [{ networkInterfaceName: "dbsrnic" }],
479
+ osDiskName: "dbsrosdisk",
480
+ vmName: "dbvmsr"
481
+ }
482
+ ]
483
+ },
484
+ namingPatternType: "FullResourceName",
485
+ sharedStorage: {
486
+ sharedStorageAccountName: "storageacc",
487
+ sharedStorageAccountPrivateEndPointName: "peForxNFS"
488
+ }
489
+ },
267
490
  databaseServer: {
268
491
  databaseType: "HANA",
269
492
  instanceCount: 2,
270
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
493
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
271
494
  virtualMachineConfiguration: {
272
495
  imageReference: {
273
496
  offer: "RHEL-SAP",
274
497
  publisher: "RedHat",
275
- sku: "7.4",
276
- version: "7.4.2019062505"
498
+ sku: "84sapha-gen2",
499
+ version: "latest"
277
500
  },
278
501
  osProfile: {
279
502
  adminUsername: "{your-username}",
280
503
  osConfiguration: {
281
504
  disablePasswordAuthentication: true,
282
505
  osType: "Linux",
283
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
506
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
284
507
  }
285
508
  },
286
509
  vmSize: "Standard_M32ts"
@@ -288,7 +511,8 @@ function sapVirtualInstancesCreateHaAvZone() {
288
511
  },
289
512
  deploymentType: "ThreeTier",
290
513
  highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }
291
- }
514
+ },
515
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
292
516
  },
293
517
  environment: "Prod",
294
518
  location: "westcentralus",
@@ -302,46 +526,47 @@ function sapVirtualInstancesCreateHaAvZone() {
302
526
  console.log(result);
303
527
  });
304
528
  }
305
- sapVirtualInstancesCreateHaAvZone().catch(console.error);
306
529
  /**
307
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
530
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
308
531
  *
309
- * @summary Creates an Virtual Instance for SAP.
310
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json
532
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
533
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.json
311
534
  */
312
- function sapVirtualInstancesCreateSingleServer() {
535
+ function createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem() {
313
536
  return __awaiter(this, void 0, void 0, function* () {
314
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
315
- const resourceGroupName = "test-rg";
537
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
538
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
539
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
316
540
  const sapVirtualInstanceName = "X00";
317
541
  const body = {
318
542
  configuration: {
319
543
  appLocation: "eastus",
320
- configurationType: "Deployment",
544
+ configurationType: "DeploymentWithOSConfig",
321
545
  infrastructureConfiguration: {
322
546
  appResourceGroup: "X00-RG",
323
547
  databaseType: "HANA",
324
548
  deploymentType: "SingleServer",
325
549
  networkConfiguration: { isSecondaryIpEnabled: true },
326
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
550
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
327
551
  virtualMachineConfiguration: {
328
552
  imageReference: {
329
553
  offer: "RHEL-SAP",
330
554
  publisher: "RedHat",
331
- sku: "7.4",
332
- version: "7.4.2019062505"
555
+ sku: "84sapha-gen2",
556
+ version: "latest"
333
557
  },
334
558
  osProfile: {
335
559
  adminUsername: "{your-username}",
336
560
  osConfiguration: {
337
561
  disablePasswordAuthentication: true,
338
562
  osType: "Linux",
339
- ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
563
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
340
564
  }
341
565
  },
342
566
  vmSize: "Standard_E32ds_v4"
343
567
  }
344
- }
568
+ },
569
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
345
570
  },
346
571
  environment: "NonProd",
347
572
  location: "westcentralus",
@@ -355,40 +580,40 @@ function sapVirtualInstancesCreateSingleServer() {
355
580
  console.log(result);
356
581
  });
357
582
  }
358
- sapVirtualInstancesCreateSingleServer().catch(console.error);
359
583
  /**
360
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
584
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
361
585
  *
362
- * @summary Creates an Virtual Instance for SAP.
363
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json
586
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
587
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json
364
588
  */
365
- function sapVirtualInstancesCreateWithOsconfigDistributed() {
589
+ function createInfrastructureOnlyForDistributedSystem() {
366
590
  return __awaiter(this, void 0, void 0, function* () {
367
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
368
- const resourceGroupName = "test-rg";
591
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
592
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
593
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
369
594
  const sapVirtualInstanceName = "X00";
370
595
  const body = {
371
596
  configuration: {
372
597
  appLocation: "eastus",
373
- configurationType: "DeploymentWithOSConfig",
598
+ configurationType: "Deployment",
374
599
  infrastructureConfiguration: {
375
600
  appResourceGroup: "X00-RG",
376
601
  applicationServer: {
377
602
  instanceCount: 6,
378
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
603
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
379
604
  virtualMachineConfiguration: {
380
605
  imageReference: {
381
606
  offer: "RHEL-SAP",
382
607
  publisher: "RedHat",
383
- sku: "7.4",
384
- version: "7.4.2019062505"
608
+ sku: "84sapha-gen2",
609
+ version: "latest"
385
610
  },
386
611
  osProfile: {
387
612
  adminUsername: "{your-username}",
388
613
  osConfiguration: {
389
614
  disablePasswordAuthentication: true,
390
615
  osType: "Linux",
391
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
616
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
392
617
  }
393
618
  },
394
619
  vmSize: "Standard_E32ds_v4"
@@ -396,20 +621,20 @@ function sapVirtualInstancesCreateWithOsconfigDistributed() {
396
621
  },
397
622
  centralServer: {
398
623
  instanceCount: 1,
399
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
624
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
400
625
  virtualMachineConfiguration: {
401
626
  imageReference: {
402
627
  offer: "RHEL-SAP",
403
628
  publisher: "RedHat",
404
- sku: "7.4",
405
- version: "7.4.2019062505"
629
+ sku: "84sapha-gen2",
630
+ version: "latest"
406
631
  },
407
632
  osProfile: {
408
633
  adminUsername: "{your-username}",
409
634
  osConfiguration: {
410
635
  disablePasswordAuthentication: true,
411
636
  osType: "Linux",
412
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
637
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
413
638
  }
414
639
  },
415
640
  vmSize: "Standard_E16ds_v4"
@@ -418,33 +643,26 @@ function sapVirtualInstancesCreateWithOsconfigDistributed() {
418
643
  databaseServer: {
419
644
  databaseType: "HANA",
420
645
  instanceCount: 1,
421
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
646
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
422
647
  virtualMachineConfiguration: {
423
648
  imageReference: {
424
649
  offer: "RHEL-SAP",
425
650
  publisher: "RedHat",
426
- sku: "7.4",
427
- version: "7.4.2019062505"
651
+ sku: "84sapha-gen2",
652
+ version: "latest"
428
653
  },
429
654
  osProfile: {
430
655
  adminUsername: "{your-username}",
431
656
  osConfiguration: {
432
657
  disablePasswordAuthentication: true,
433
658
  osType: "Linux",
434
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
659
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
435
660
  }
436
661
  },
437
662
  vmSize: "Standard_M32ts"
438
663
  }
439
664
  },
440
665
  deploymentType: "ThreeTier"
441
- },
442
- osSapConfiguration: {
443
- deployerVmPackages: {
444
- storageAccountId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount",
445
- url: "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip"
446
- },
447
- sapFqdn: "xyz.test.com"
448
666
  }
449
667
  },
450
668
  environment: "Prod",
@@ -459,40 +677,40 @@ function sapVirtualInstancesCreateWithOsconfigDistributed() {
459
677
  console.log(result);
460
678
  });
461
679
  }
462
- sapVirtualInstancesCreateWithOsconfigDistributed().catch(console.error);
463
680
  /**
464
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
681
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
465
682
  *
466
- * @summary Creates an Virtual Instance for SAP.
467
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json
683
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
684
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json
468
685
  */
469
- function sapVirtualInstancesCreateWithOsconfigHaAvSet() {
686
+ function createInfrastructureOnlyForHaSystemWithAvailabilitySet() {
470
687
  return __awaiter(this, void 0, void 0, function* () {
471
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
472
- const resourceGroupName = "test-rg";
688
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
689
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
690
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
473
691
  const sapVirtualInstanceName = "X00";
474
692
  const body = {
475
693
  configuration: {
476
694
  appLocation: "eastus",
477
- configurationType: "DeploymentWithOSConfig",
695
+ configurationType: "Deployment",
478
696
  infrastructureConfiguration: {
479
697
  appResourceGroup: "X00-RG",
480
698
  applicationServer: {
481
- instanceCount: 6,
482
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
699
+ instanceCount: 5,
700
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
483
701
  virtualMachineConfiguration: {
484
702
  imageReference: {
485
703
  offer: "RHEL-SAP",
486
704
  publisher: "RedHat",
487
- sku: "7.4",
488
- version: "7.4.2019062505"
705
+ sku: "84sapha-gen2",
706
+ version: "latest"
489
707
  },
490
708
  osProfile: {
491
709
  adminUsername: "{your-username}",
492
710
  osConfiguration: {
493
711
  disablePasswordAuthentication: true,
494
712
  osType: "Linux",
495
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
713
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
496
714
  }
497
715
  },
498
716
  vmSize: "Standard_E32ds_v4"
@@ -500,20 +718,20 @@ function sapVirtualInstancesCreateWithOsconfigHaAvSet() {
500
718
  },
501
719
  centralServer: {
502
720
  instanceCount: 2,
503
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
721
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
504
722
  virtualMachineConfiguration: {
505
723
  imageReference: {
506
724
  offer: "RHEL-SAP",
507
725
  publisher: "RedHat",
508
- sku: "7.4",
509
- version: "7.4.2019062505"
726
+ sku: "84sapha-gen2",
727
+ version: "latest"
510
728
  },
511
729
  osProfile: {
512
730
  adminUsername: "{your-username}",
513
731
  osConfiguration: {
514
732
  disablePasswordAuthentication: true,
515
733
  osType: "Linux",
516
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
734
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
517
735
  }
518
736
  },
519
737
  vmSize: "Standard_E16ds_v4"
@@ -522,20 +740,20 @@ function sapVirtualInstancesCreateWithOsconfigHaAvSet() {
522
740
  databaseServer: {
523
741
  databaseType: "HANA",
524
742
  instanceCount: 2,
525
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
743
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
526
744
  virtualMachineConfiguration: {
527
745
  imageReference: {
528
746
  offer: "RHEL-SAP",
529
747
  publisher: "RedHat",
530
- sku: "7.4",
531
- version: "7.4.2019062505"
748
+ sku: "84sapha-gen2",
749
+ version: "latest"
532
750
  },
533
751
  osProfile: {
534
752
  adminUsername: "{your-username}",
535
753
  osConfiguration: {
536
754
  disablePasswordAuthentication: true,
537
755
  osType: "Linux",
538
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
756
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
539
757
  }
540
758
  },
541
759
  vmSize: "Standard_M32ts"
@@ -543,13 +761,6 @@ function sapVirtualInstancesCreateWithOsconfigHaAvSet() {
543
761
  },
544
762
  deploymentType: "ThreeTier",
545
763
  highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }
546
- },
547
- osSapConfiguration: {
548
- deployerVmPackages: {
549
- storageAccountId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount",
550
- url: "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip"
551
- },
552
- sapFqdn: "xyz.test.com"
553
764
  }
554
765
  },
555
766
  environment: "Prod",
@@ -564,40 +775,40 @@ function sapVirtualInstancesCreateWithOsconfigHaAvSet() {
564
775
  console.log(result);
565
776
  });
566
777
  }
567
- sapVirtualInstancesCreateWithOsconfigHaAvSet().catch(console.error);
568
778
  /**
569
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
779
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
570
780
  *
571
- * @summary Creates an Virtual Instance for SAP.
572
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json
781
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
782
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json
573
783
  */
574
- function sapVirtualInstancesCreateWithOsconfigHaAvZone() {
784
+ function createInfrastructureOnlyForHaSystemWithAvailabilityZone() {
575
785
  return __awaiter(this, void 0, void 0, function* () {
576
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
577
- const resourceGroupName = "test-rg";
786
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
787
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
788
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
578
789
  const sapVirtualInstanceName = "X00";
579
790
  const body = {
580
791
  configuration: {
581
792
  appLocation: "eastus",
582
- configurationType: "DeploymentWithOSConfig",
793
+ configurationType: "Deployment",
583
794
  infrastructureConfiguration: {
584
795
  appResourceGroup: "X00-RG",
585
796
  applicationServer: {
586
797
  instanceCount: 6,
587
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
798
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
588
799
  virtualMachineConfiguration: {
589
800
  imageReference: {
590
801
  offer: "RHEL-SAP",
591
802
  publisher: "RedHat",
592
- sku: "7.4",
593
- version: "7.4.2019062505"
803
+ sku: "84sapha-gen2",
804
+ version: "latest"
594
805
  },
595
806
  osProfile: {
596
807
  adminUsername: "{your-username}",
597
808
  osConfiguration: {
598
809
  disablePasswordAuthentication: true,
599
810
  osType: "Linux",
600
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
811
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
601
812
  }
602
813
  },
603
814
  vmSize: "Standard_E32ds_v4"
@@ -605,20 +816,20 @@ function sapVirtualInstancesCreateWithOsconfigHaAvZone() {
605
816
  },
606
817
  centralServer: {
607
818
  instanceCount: 2,
608
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
819
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
609
820
  virtualMachineConfiguration: {
610
821
  imageReference: {
611
822
  offer: "RHEL-SAP",
612
823
  publisher: "RedHat",
613
- sku: "7.4",
614
- version: "7.4.2019062505"
824
+ sku: "84sapha-gen2",
825
+ version: "latest"
615
826
  },
616
827
  osProfile: {
617
828
  adminUsername: "{your-username}",
618
829
  osConfiguration: {
619
830
  disablePasswordAuthentication: true,
620
831
  osType: "Linux",
621
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
832
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
622
833
  }
623
834
  },
624
835
  vmSize: "Standard_E16ds_v4"
@@ -627,20 +838,20 @@ function sapVirtualInstancesCreateWithOsconfigHaAvZone() {
627
838
  databaseServer: {
628
839
  databaseType: "HANA",
629
840
  instanceCount: 2,
630
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
841
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
631
842
  virtualMachineConfiguration: {
632
843
  imageReference: {
633
844
  offer: "RHEL-SAP",
634
845
  publisher: "RedHat",
635
- sku: "7.4",
636
- version: "7.4.2019062505"
846
+ sku: "84sapha-gen2",
847
+ version: "latest"
637
848
  },
638
849
  osProfile: {
639
850
  adminUsername: "{your-username}",
640
851
  osConfiguration: {
641
852
  disablePasswordAuthentication: true,
642
853
  osType: "Linux",
643
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
854
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
644
855
  }
645
856
  },
646
857
  vmSize: "Standard_M32ts"
@@ -648,13 +859,6 @@ function sapVirtualInstancesCreateWithOsconfigHaAvZone() {
648
859
  },
649
860
  deploymentType: "ThreeTier",
650
861
  highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }
651
- },
652
- osSapConfiguration: {
653
- deployerVmPackages: {
654
- storageAccountId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount",
655
- url: "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip"
656
- },
657
- sapFqdn: "xyz.test.com"
658
862
  }
659
863
  },
660
864
  environment: "Prod",
@@ -669,52 +873,45 @@ function sapVirtualInstancesCreateWithOsconfigHaAvZone() {
669
873
  console.log(result);
670
874
  });
671
875
  }
672
- sapVirtualInstancesCreateWithOsconfigHaAvZone().catch(console.error);
673
876
  /**
674
- * This sample demonstrates how to Creates an Virtual Instance for SAP.
877
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
675
878
  *
676
- * @summary Creates an Virtual Instance for SAP.
677
- * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/preview/2021-12-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json
879
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
880
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json
678
881
  */
679
- function sapVirtualInstancesCreateWithOsconfigSingleServer() {
882
+ function createInfrastructureOnlyForSingleServerSystem() {
680
883
  return __awaiter(this, void 0, void 0, function* () {
681
- const subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
682
- const resourceGroupName = "test-rg";
884
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
885
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
886
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
683
887
  const sapVirtualInstanceName = "X00";
684
888
  const body = {
685
889
  configuration: {
686
890
  appLocation: "eastus",
687
- configurationType: "DeploymentWithOSConfig",
891
+ configurationType: "Deployment",
688
892
  infrastructureConfiguration: {
689
893
  appResourceGroup: "X00-RG",
690
894
  databaseType: "HANA",
691
895
  deploymentType: "SingleServer",
692
896
  networkConfiguration: { isSecondaryIpEnabled: true },
693
- subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
897
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
694
898
  virtualMachineConfiguration: {
695
899
  imageReference: {
696
900
  offer: "RHEL-SAP",
697
901
  publisher: "RedHat",
698
- sku: "7.4",
699
- version: "7.4.2019062505"
902
+ sku: "84sapha-gen2",
903
+ version: "latest"
700
904
  },
701
905
  osProfile: {
702
906
  adminUsername: "{your-username}",
703
907
  osConfiguration: {
704
908
  disablePasswordAuthentication: true,
705
909
  osType: "Linux",
706
- sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
910
+ ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }
707
911
  }
708
912
  },
709
913
  vmSize: "Standard_E32ds_v4"
710
914
  }
711
- },
712
- osSapConfiguration: {
713
- deployerVmPackages: {
714
- storageAccountId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/yb-SapInstall/providers/Microsoft.Storage/storageAccounts/ybteststorageaccount",
715
- url: "https://ybteststorageaccount.blob.core.windows.net/sapbits/deployervmpackages/DeployerVMPackages.zip"
716
- },
717
- sapFqdn: "xyz.test.com"
718
915
  }
719
916
  },
720
917
  environment: "NonProd",
@@ -729,5 +926,1751 @@ function sapVirtualInstancesCreateWithOsconfigSingleServer() {
729
926
  console.log(result);
730
927
  });
731
928
  }
732
- sapVirtualInstancesCreateWithOsconfigSingleServer().catch(console.error);
929
+ /**
930
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
931
+ *
932
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
933
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.json
934
+ */
935
+ function createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended() {
936
+ return __awaiter(this, void 0, void 0, function* () {
937
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
938
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
939
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
940
+ const sapVirtualInstanceName = "X00";
941
+ const body = {
942
+ configuration: {
943
+ appLocation: "eastus",
944
+ configurationType: "DeploymentWithOSConfig",
945
+ infrastructureConfiguration: {
946
+ appResourceGroup: "X00-RG",
947
+ applicationServer: {
948
+ instanceCount: 6,
949
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
950
+ virtualMachineConfiguration: {
951
+ imageReference: {
952
+ offer: "RHEL-SAP",
953
+ publisher: "RedHat",
954
+ sku: "84sapha-gen2",
955
+ version: "latest"
956
+ },
957
+ osProfile: {
958
+ adminUsername: "{your-username}",
959
+ osConfiguration: {
960
+ disablePasswordAuthentication: true,
961
+ osType: "Linux",
962
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
963
+ }
964
+ },
965
+ vmSize: "Standard_E32ds_v4"
966
+ }
967
+ },
968
+ centralServer: {
969
+ instanceCount: 1,
970
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
971
+ virtualMachineConfiguration: {
972
+ imageReference: {
973
+ offer: "RHEL-SAP",
974
+ publisher: "RedHat",
975
+ sku: "84sapha-gen2",
976
+ version: "latest"
977
+ },
978
+ osProfile: {
979
+ adminUsername: "{your-username}",
980
+ osConfiguration: {
981
+ disablePasswordAuthentication: true,
982
+ osType: "Linux",
983
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
984
+ }
985
+ },
986
+ vmSize: "Standard_E16ds_v4"
987
+ }
988
+ },
989
+ databaseServer: {
990
+ databaseType: "HANA",
991
+ diskConfiguration: {
992
+ diskVolumeConfigurations: {
993
+ backup: {
994
+ count: 2,
995
+ sizeGB: 256,
996
+ sku: { name: "StandardSSD_LRS" }
997
+ },
998
+ "hana/data": {
999
+ count: 4,
1000
+ sizeGB: 128,
1001
+ sku: { name: "Premium_LRS" }
1002
+ },
1003
+ "hana/log": {
1004
+ count: 3,
1005
+ sizeGB: 128,
1006
+ sku: { name: "Premium_LRS" }
1007
+ },
1008
+ "hana/shared": {
1009
+ count: 1,
1010
+ sizeGB: 256,
1011
+ sku: { name: "StandardSSD_LRS" }
1012
+ },
1013
+ os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } },
1014
+ "usr/sap": { count: 1, sizeGB: 128, sku: { name: "Premium_LRS" } }
1015
+ }
1016
+ },
1017
+ instanceCount: 1,
1018
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1019
+ virtualMachineConfiguration: {
1020
+ imageReference: {
1021
+ offer: "RHEL-SAP",
1022
+ publisher: "RedHat",
1023
+ sku: "84sapha-gen2",
1024
+ version: "latest"
1025
+ },
1026
+ osProfile: {
1027
+ adminUsername: "{your-username}",
1028
+ osConfiguration: {
1029
+ disablePasswordAuthentication: true,
1030
+ osType: "Linux",
1031
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1032
+ }
1033
+ },
1034
+ vmSize: "Standard_M32ts"
1035
+ }
1036
+ },
1037
+ deploymentType: "ThreeTier"
1038
+ },
1039
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1040
+ },
1041
+ environment: "Prod",
1042
+ location: "westcentralus",
1043
+ sapProduct: "S4HANA",
1044
+ tags: {}
1045
+ };
1046
+ const options = { body };
1047
+ const credential = new DefaultAzureCredential();
1048
+ const client = new WorkloadsClient(credential, subscriptionId);
1049
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1050
+ console.log(result);
1051
+ });
1052
+ }
1053
+ /**
1054
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1055
+ *
1056
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1057
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.json
1058
+ */
1059
+ function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended() {
1060
+ return __awaiter(this, void 0, void 0, function* () {
1061
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1062
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1063
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1064
+ const sapVirtualInstanceName = "X00";
1065
+ const body = {
1066
+ configuration: {
1067
+ appLocation: "eastus",
1068
+ configurationType: "DeploymentWithOSConfig",
1069
+ infrastructureConfiguration: {
1070
+ appResourceGroup: "X00-RG",
1071
+ applicationServer: {
1072
+ instanceCount: 6,
1073
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1074
+ virtualMachineConfiguration: {
1075
+ imageReference: {
1076
+ offer: "RHEL-SAP",
1077
+ publisher: "RedHat",
1078
+ sku: "84sapha-gen2",
1079
+ version: "latest"
1080
+ },
1081
+ osProfile: {
1082
+ adminUsername: "{your-username}",
1083
+ osConfiguration: {
1084
+ disablePasswordAuthentication: true,
1085
+ osType: "Linux",
1086
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1087
+ }
1088
+ },
1089
+ vmSize: "Standard_E32ds_v4"
1090
+ }
1091
+ },
1092
+ centralServer: {
1093
+ instanceCount: 2,
1094
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1095
+ virtualMachineConfiguration: {
1096
+ imageReference: {
1097
+ offer: "RHEL-SAP",
1098
+ publisher: "RedHat",
1099
+ sku: "84sapha-gen2",
1100
+ version: "latest"
1101
+ },
1102
+ osProfile: {
1103
+ adminUsername: "{your-username}",
1104
+ osConfiguration: {
1105
+ disablePasswordAuthentication: true,
1106
+ osType: "Linux",
1107
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1108
+ }
1109
+ },
1110
+ vmSize: "Standard_E16ds_v4"
1111
+ }
1112
+ },
1113
+ databaseServer: {
1114
+ databaseType: "HANA",
1115
+ diskConfiguration: {
1116
+ diskVolumeConfigurations: {
1117
+ backup: {
1118
+ count: 2,
1119
+ sizeGB: 256,
1120
+ sku: { name: "StandardSSD_LRS" }
1121
+ },
1122
+ "hana/data": {
1123
+ count: 4,
1124
+ sizeGB: 128,
1125
+ sku: { name: "Premium_LRS" }
1126
+ },
1127
+ "hana/log": {
1128
+ count: 3,
1129
+ sizeGB: 128,
1130
+ sku: { name: "Premium_LRS" }
1131
+ },
1132
+ "hana/shared": {
1133
+ count: 1,
1134
+ sizeGB: 256,
1135
+ sku: { name: "StandardSSD_LRS" }
1136
+ },
1137
+ os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } },
1138
+ "usr/sap": { count: 1, sizeGB: 128, sku: { name: "Premium_LRS" } }
1139
+ }
1140
+ },
1141
+ instanceCount: 2,
1142
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1143
+ virtualMachineConfiguration: {
1144
+ imageReference: {
1145
+ offer: "RHEL-SAP",
1146
+ publisher: "RedHat",
1147
+ sku: "84sapha-gen2",
1148
+ version: "latest"
1149
+ },
1150
+ osProfile: {
1151
+ adminUsername: "{your-username}",
1152
+ osConfiguration: {
1153
+ disablePasswordAuthentication: true,
1154
+ osType: "Linux",
1155
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1156
+ }
1157
+ },
1158
+ vmSize: "Standard_M32ts"
1159
+ }
1160
+ },
1161
+ deploymentType: "ThreeTier",
1162
+ highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }
1163
+ },
1164
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1165
+ },
1166
+ environment: "Prod",
1167
+ location: "westcentralus",
1168
+ sapProduct: "S4HANA",
1169
+ tags: {}
1170
+ };
1171
+ const options = { body };
1172
+ const credential = new DefaultAzureCredential();
1173
+ const client = new WorkloadsClient(credential, subscriptionId);
1174
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1175
+ console.log(result);
1176
+ });
1177
+ }
1178
+ /**
1179
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1180
+ *
1181
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1182
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.json
1183
+ */
1184
+ function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended() {
1185
+ return __awaiter(this, void 0, void 0, function* () {
1186
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1187
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1188
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1189
+ const sapVirtualInstanceName = "X00";
1190
+ const body = {
1191
+ configuration: {
1192
+ appLocation: "eastus",
1193
+ configurationType: "DeploymentWithOSConfig",
1194
+ infrastructureConfiguration: {
1195
+ appResourceGroup: "X00-RG",
1196
+ applicationServer: {
1197
+ instanceCount: 6,
1198
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1199
+ virtualMachineConfiguration: {
1200
+ imageReference: {
1201
+ offer: "RHEL-SAP",
1202
+ publisher: "RedHat",
1203
+ sku: "84sapha-gen2",
1204
+ version: "latest"
1205
+ },
1206
+ osProfile: {
1207
+ adminUsername: "{your-username}",
1208
+ osConfiguration: {
1209
+ disablePasswordAuthentication: true,
1210
+ osType: "Linux",
1211
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1212
+ }
1213
+ },
1214
+ vmSize: "Standard_E32ds_v4"
1215
+ }
1216
+ },
1217
+ centralServer: {
1218
+ instanceCount: 2,
1219
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1220
+ virtualMachineConfiguration: {
1221
+ imageReference: {
1222
+ offer: "RHEL-SAP",
1223
+ publisher: "RedHat",
1224
+ sku: "84sapha-gen2",
1225
+ version: "latest"
1226
+ },
1227
+ osProfile: {
1228
+ adminUsername: "{your-username}",
1229
+ osConfiguration: {
1230
+ disablePasswordAuthentication: true,
1231
+ osType: "Linux",
1232
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1233
+ }
1234
+ },
1235
+ vmSize: "Standard_E16ds_v4"
1236
+ }
1237
+ },
1238
+ databaseServer: {
1239
+ databaseType: "HANA",
1240
+ diskConfiguration: {
1241
+ diskVolumeConfigurations: {
1242
+ backup: {
1243
+ count: 2,
1244
+ sizeGB: 256,
1245
+ sku: { name: "StandardSSD_LRS" }
1246
+ },
1247
+ "hana/data": {
1248
+ count: 4,
1249
+ sizeGB: 128,
1250
+ sku: { name: "Premium_LRS" }
1251
+ },
1252
+ "hana/log": {
1253
+ count: 3,
1254
+ sizeGB: 128,
1255
+ sku: { name: "Premium_LRS" }
1256
+ },
1257
+ "hana/shared": {
1258
+ count: 1,
1259
+ sizeGB: 256,
1260
+ sku: { name: "StandardSSD_LRS" }
1261
+ },
1262
+ os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } },
1263
+ "usr/sap": { count: 1, sizeGB: 128, sku: { name: "Premium_LRS" } }
1264
+ }
1265
+ },
1266
+ instanceCount: 2,
1267
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1268
+ virtualMachineConfiguration: {
1269
+ imageReference: {
1270
+ offer: "RHEL-SAP",
1271
+ publisher: "RedHat",
1272
+ sku: "84sapha-gen2",
1273
+ version: "latest"
1274
+ },
1275
+ osProfile: {
1276
+ adminUsername: "{your-username}",
1277
+ osConfiguration: {
1278
+ disablePasswordAuthentication: true,
1279
+ osType: "Linux",
1280
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1281
+ }
1282
+ },
1283
+ vmSize: "Standard_M32ts"
1284
+ }
1285
+ },
1286
+ deploymentType: "ThreeTier",
1287
+ highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }
1288
+ },
1289
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1290
+ },
1291
+ environment: "Prod",
1292
+ location: "westcentralus",
1293
+ sapProduct: "S4HANA",
1294
+ tags: {}
1295
+ };
1296
+ const options = { body };
1297
+ const credential = new DefaultAzureCredential();
1298
+ const client = new WorkloadsClient(credential, subscriptionId);
1299
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1300
+ console.log(result);
1301
+ });
1302
+ }
1303
+ /**
1304
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1305
+ *
1306
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1307
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.json
1308
+ */
1309
+ function createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended() {
1310
+ return __awaiter(this, void 0, void 0, function* () {
1311
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1312
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1313
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1314
+ const sapVirtualInstanceName = "X00";
1315
+ const body = {
1316
+ configuration: {
1317
+ appLocation: "eastus",
1318
+ configurationType: "DeploymentWithOSConfig",
1319
+ infrastructureConfiguration: {
1320
+ appResourceGroup: "X00-RG",
1321
+ databaseType: "HANA",
1322
+ dbDiskConfiguration: {
1323
+ diskVolumeConfigurations: {
1324
+ backup: { count: 2, sizeGB: 256, sku: { name: "StandardSSD_LRS" } },
1325
+ "hana/data": {
1326
+ count: 4,
1327
+ sizeGB: 128,
1328
+ sku: { name: "Premium_LRS" }
1329
+ },
1330
+ "hana/log": { count: 3, sizeGB: 128, sku: { name: "Premium_LRS" } },
1331
+ "hana/shared": {
1332
+ count: 1,
1333
+ sizeGB: 256,
1334
+ sku: { name: "StandardSSD_LRS" }
1335
+ },
1336
+ os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } },
1337
+ "usr/sap": { count: 1, sizeGB: 128, sku: { name: "Premium_LRS" } }
1338
+ }
1339
+ },
1340
+ deploymentType: "SingleServer",
1341
+ networkConfiguration: { isSecondaryIpEnabled: true },
1342
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1343
+ virtualMachineConfiguration: {
1344
+ imageReference: {
1345
+ offer: "RHEL-SAP",
1346
+ publisher: "RedHat",
1347
+ sku: "84sapha-gen2",
1348
+ version: "latest"
1349
+ },
1350
+ osProfile: {
1351
+ adminUsername: "{your-username}",
1352
+ osConfiguration: {
1353
+ disablePasswordAuthentication: true,
1354
+ osType: "Linux",
1355
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1356
+ }
1357
+ },
1358
+ vmSize: "Standard_E32ds_v4"
1359
+ }
1360
+ },
1361
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1362
+ },
1363
+ environment: "NonProd",
1364
+ location: "westcentralus",
1365
+ sapProduct: "S4HANA",
1366
+ tags: {}
1367
+ };
1368
+ const options = { body };
1369
+ const credential = new DefaultAzureCredential();
1370
+ const client = new WorkloadsClient(credential, subscriptionId);
1371
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1372
+ console.log(result);
1373
+ });
1374
+ }
1375
+ /**
1376
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1377
+ *
1378
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1379
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json
1380
+ */
1381
+ function createInfrastructureWithOSConfigurationForDistributedSystemRecommended() {
1382
+ return __awaiter(this, void 0, void 0, function* () {
1383
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1384
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1385
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1386
+ const sapVirtualInstanceName = "X00";
1387
+ const body = {
1388
+ configuration: {
1389
+ appLocation: "eastus",
1390
+ configurationType: "DeploymentWithOSConfig",
1391
+ infrastructureConfiguration: {
1392
+ appResourceGroup: "X00-RG",
1393
+ applicationServer: {
1394
+ instanceCount: 6,
1395
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1396
+ virtualMachineConfiguration: {
1397
+ imageReference: {
1398
+ offer: "RHEL-SAP",
1399
+ publisher: "RedHat",
1400
+ sku: "84sapha-gen2",
1401
+ version: "latest"
1402
+ },
1403
+ osProfile: {
1404
+ adminUsername: "{your-username}",
1405
+ osConfiguration: {
1406
+ disablePasswordAuthentication: true,
1407
+ osType: "Linux",
1408
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1409
+ }
1410
+ },
1411
+ vmSize: "Standard_E32ds_v4"
1412
+ }
1413
+ },
1414
+ centralServer: {
1415
+ instanceCount: 1,
1416
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1417
+ virtualMachineConfiguration: {
1418
+ imageReference: {
1419
+ offer: "RHEL-SAP",
1420
+ publisher: "RedHat",
1421
+ sku: "84sapha-gen2",
1422
+ version: "latest"
1423
+ },
1424
+ osProfile: {
1425
+ adminUsername: "{your-username}",
1426
+ osConfiguration: {
1427
+ disablePasswordAuthentication: true,
1428
+ osType: "Linux",
1429
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1430
+ }
1431
+ },
1432
+ vmSize: "Standard_E16ds_v4"
1433
+ }
1434
+ },
1435
+ databaseServer: {
1436
+ databaseType: "HANA",
1437
+ instanceCount: 1,
1438
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1439
+ virtualMachineConfiguration: {
1440
+ imageReference: {
1441
+ offer: "RHEL-SAP",
1442
+ publisher: "RedHat",
1443
+ sku: "84sapha-gen2",
1444
+ version: "latest"
1445
+ },
1446
+ osProfile: {
1447
+ adminUsername: "{your-username}",
1448
+ osConfiguration: {
1449
+ disablePasswordAuthentication: true,
1450
+ osType: "Linux",
1451
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1452
+ }
1453
+ },
1454
+ vmSize: "Standard_M32ts"
1455
+ }
1456
+ },
1457
+ deploymentType: "ThreeTier"
1458
+ },
1459
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1460
+ },
1461
+ environment: "Prod",
1462
+ location: "westcentralus",
1463
+ sapProduct: "S4HANA",
1464
+ tags: {}
1465
+ };
1466
+ const options = { body };
1467
+ const credential = new DefaultAzureCredential();
1468
+ const client = new WorkloadsClient(credential, subscriptionId);
1469
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1470
+ console.log(result);
1471
+ });
1472
+ }
1473
+ /**
1474
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1475
+ *
1476
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1477
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json
1478
+ */
1479
+ function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended() {
1480
+ return __awaiter(this, void 0, void 0, function* () {
1481
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1482
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1483
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1484
+ const sapVirtualInstanceName = "X00";
1485
+ const body = {
1486
+ configuration: {
1487
+ appLocation: "eastus",
1488
+ configurationType: "DeploymentWithOSConfig",
1489
+ infrastructureConfiguration: {
1490
+ appResourceGroup: "X00-RG",
1491
+ applicationServer: {
1492
+ instanceCount: 6,
1493
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1494
+ virtualMachineConfiguration: {
1495
+ imageReference: {
1496
+ offer: "RHEL-SAP",
1497
+ publisher: "RedHat",
1498
+ sku: "84sapha-gen2",
1499
+ version: "latest"
1500
+ },
1501
+ osProfile: {
1502
+ adminUsername: "{your-username}",
1503
+ osConfiguration: {
1504
+ disablePasswordAuthentication: true,
1505
+ osType: "Linux",
1506
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1507
+ }
1508
+ },
1509
+ vmSize: "Standard_E32ds_v4"
1510
+ }
1511
+ },
1512
+ centralServer: {
1513
+ instanceCount: 2,
1514
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1515
+ virtualMachineConfiguration: {
1516
+ imageReference: {
1517
+ offer: "RHEL-SAP",
1518
+ publisher: "RedHat",
1519
+ sku: "84sapha-gen2",
1520
+ version: "latest"
1521
+ },
1522
+ osProfile: {
1523
+ adminUsername: "{your-username}",
1524
+ osConfiguration: {
1525
+ disablePasswordAuthentication: true,
1526
+ osType: "Linux",
1527
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1528
+ }
1529
+ },
1530
+ vmSize: "Standard_E16ds_v4"
1531
+ }
1532
+ },
1533
+ databaseServer: {
1534
+ databaseType: "HANA",
1535
+ instanceCount: 2,
1536
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1537
+ virtualMachineConfiguration: {
1538
+ imageReference: {
1539
+ offer: "RHEL-SAP",
1540
+ publisher: "RedHat",
1541
+ sku: "84sapha-gen2",
1542
+ version: "latest"
1543
+ },
1544
+ osProfile: {
1545
+ adminUsername: "{your-username}",
1546
+ osConfiguration: {
1547
+ disablePasswordAuthentication: true,
1548
+ osType: "Linux",
1549
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1550
+ }
1551
+ },
1552
+ vmSize: "Standard_M32ts"
1553
+ }
1554
+ },
1555
+ deploymentType: "ThreeTier",
1556
+ highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }
1557
+ },
1558
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1559
+ },
1560
+ environment: "Prod",
1561
+ location: "westcentralus",
1562
+ sapProduct: "S4HANA",
1563
+ tags: {}
1564
+ };
1565
+ const options = { body };
1566
+ const credential = new DefaultAzureCredential();
1567
+ const client = new WorkloadsClient(credential, subscriptionId);
1568
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1569
+ console.log(result);
1570
+ });
1571
+ }
1572
+ /**
1573
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1574
+ *
1575
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1576
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json
1577
+ */
1578
+ function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended() {
1579
+ return __awaiter(this, void 0, void 0, function* () {
1580
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1581
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1582
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1583
+ const sapVirtualInstanceName = "X00";
1584
+ const body = {
1585
+ configuration: {
1586
+ appLocation: "eastus",
1587
+ configurationType: "DeploymentWithOSConfig",
1588
+ infrastructureConfiguration: {
1589
+ appResourceGroup: "X00-RG",
1590
+ applicationServer: {
1591
+ instanceCount: 6,
1592
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1593
+ virtualMachineConfiguration: {
1594
+ imageReference: {
1595
+ offer: "RHEL-SAP",
1596
+ publisher: "RedHat",
1597
+ sku: "84sapha-gen2",
1598
+ version: "latest"
1599
+ },
1600
+ osProfile: {
1601
+ adminUsername: "{your-username}",
1602
+ osConfiguration: {
1603
+ disablePasswordAuthentication: true,
1604
+ osType: "Linux",
1605
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1606
+ }
1607
+ },
1608
+ vmSize: "Standard_E32ds_v4"
1609
+ }
1610
+ },
1611
+ centralServer: {
1612
+ instanceCount: 2,
1613
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1614
+ virtualMachineConfiguration: {
1615
+ imageReference: {
1616
+ offer: "RHEL-SAP",
1617
+ publisher: "RedHat",
1618
+ sku: "84sapha-gen2",
1619
+ version: "latest"
1620
+ },
1621
+ osProfile: {
1622
+ adminUsername: "{your-username}",
1623
+ osConfiguration: {
1624
+ disablePasswordAuthentication: true,
1625
+ osType: "Linux",
1626
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1627
+ }
1628
+ },
1629
+ vmSize: "Standard_E16ds_v4"
1630
+ }
1631
+ },
1632
+ databaseServer: {
1633
+ databaseType: "HANA",
1634
+ instanceCount: 2,
1635
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1636
+ virtualMachineConfiguration: {
1637
+ imageReference: {
1638
+ offer: "RHEL-SAP",
1639
+ publisher: "RedHat",
1640
+ sku: "84sapha-gen2",
1641
+ version: "latest"
1642
+ },
1643
+ osProfile: {
1644
+ adminUsername: "{your-username}",
1645
+ osConfiguration: {
1646
+ disablePasswordAuthentication: true,
1647
+ osType: "Linux",
1648
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1649
+ }
1650
+ },
1651
+ vmSize: "Standard_M32ts"
1652
+ }
1653
+ },
1654
+ deploymentType: "ThreeTier",
1655
+ highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }
1656
+ },
1657
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1658
+ },
1659
+ environment: "Prod",
1660
+ location: "westcentralus",
1661
+ sapProduct: "S4HANA",
1662
+ tags: {}
1663
+ };
1664
+ const options = { body };
1665
+ const credential = new DefaultAzureCredential();
1666
+ const client = new WorkloadsClient(credential, subscriptionId);
1667
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1668
+ console.log(result);
1669
+ });
1670
+ }
1671
+ /**
1672
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1673
+ *
1674
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1675
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json
1676
+ */
1677
+ function createInfrastructureWithOSConfigurationForSingleServerSystemRecommended() {
1678
+ return __awaiter(this, void 0, void 0, function* () {
1679
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1680
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1681
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1682
+ const sapVirtualInstanceName = "X00";
1683
+ const body = {
1684
+ configuration: {
1685
+ appLocation: "eastus",
1686
+ configurationType: "DeploymentWithOSConfig",
1687
+ infrastructureConfiguration: {
1688
+ appResourceGroup: "X00-RG",
1689
+ databaseType: "HANA",
1690
+ deploymentType: "SingleServer",
1691
+ networkConfiguration: { isSecondaryIpEnabled: true },
1692
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1693
+ virtualMachineConfiguration: {
1694
+ imageReference: {
1695
+ offer: "RHEL-SAP",
1696
+ publisher: "RedHat",
1697
+ sku: "84sapha-gen2",
1698
+ version: "latest"
1699
+ },
1700
+ osProfile: {
1701
+ adminUsername: "{your-username}",
1702
+ osConfiguration: {
1703
+ disablePasswordAuthentication: true,
1704
+ osType: "Linux",
1705
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1706
+ }
1707
+ },
1708
+ vmSize: "Standard_E32ds_v4"
1709
+ }
1710
+ },
1711
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1712
+ },
1713
+ environment: "NonProd",
1714
+ location: "westcentralus",
1715
+ sapProduct: "S4HANA",
1716
+ tags: {}
1717
+ };
1718
+ const options = { body };
1719
+ const credential = new DefaultAzureCredential();
1720
+ const client = new WorkloadsClient(credential, subscriptionId);
1721
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1722
+ console.log(result);
1723
+ });
1724
+ }
1725
+ /**
1726
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1727
+ *
1728
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1729
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_CreateTransport.json
1730
+ */
1731
+ function createInfrastructureWithANewSapTransportDirectoryFileshare() {
1732
+ return __awaiter(this, void 0, void 0, function* () {
1733
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1734
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1735
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1736
+ const sapVirtualInstanceName = "X00";
1737
+ const body = {
1738
+ configuration: {
1739
+ appLocation: "eastus",
1740
+ configurationType: "DeploymentWithOSConfig",
1741
+ infrastructureConfiguration: {
1742
+ appResourceGroup: "X00-RG",
1743
+ applicationServer: {
1744
+ instanceCount: 6,
1745
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1746
+ virtualMachineConfiguration: {
1747
+ imageReference: {
1748
+ offer: "RHEL-SAP",
1749
+ publisher: "RedHat",
1750
+ sku: "84sapha-gen2",
1751
+ version: "latest"
1752
+ },
1753
+ osProfile: {
1754
+ adminUsername: "{your-username}",
1755
+ osConfiguration: {
1756
+ disablePasswordAuthentication: true,
1757
+ osType: "Linux",
1758
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1759
+ }
1760
+ },
1761
+ vmSize: "Standard_E32ds_v4"
1762
+ }
1763
+ },
1764
+ centralServer: {
1765
+ instanceCount: 1,
1766
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1767
+ virtualMachineConfiguration: {
1768
+ imageReference: {
1769
+ offer: "RHEL-SAP",
1770
+ publisher: "RedHat",
1771
+ sku: "84sapha-gen2",
1772
+ version: "latest"
1773
+ },
1774
+ osProfile: {
1775
+ adminUsername: "{your-username}",
1776
+ osConfiguration: {
1777
+ disablePasswordAuthentication: true,
1778
+ osType: "Linux",
1779
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1780
+ }
1781
+ },
1782
+ vmSize: "Standard_E16ds_v4"
1783
+ }
1784
+ },
1785
+ databaseServer: {
1786
+ databaseType: "HANA",
1787
+ instanceCount: 1,
1788
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1789
+ virtualMachineConfiguration: {
1790
+ imageReference: {
1791
+ offer: "RHEL-SAP",
1792
+ publisher: "RedHat",
1793
+ sku: "84sapha-gen2",
1794
+ version: "latest"
1795
+ },
1796
+ osProfile: {
1797
+ adminUsername: "{your-username}",
1798
+ osConfiguration: {
1799
+ disablePasswordAuthentication: true,
1800
+ osType: "Linux",
1801
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1802
+ }
1803
+ },
1804
+ vmSize: "Standard_M32ts"
1805
+ }
1806
+ },
1807
+ deploymentType: "ThreeTier",
1808
+ storageConfiguration: {
1809
+ transportFileShareConfiguration: {
1810
+ configurationType: "CreateAndMount",
1811
+ resourceGroup: "rgName",
1812
+ storageAccountName: "storageName"
1813
+ }
1814
+ }
1815
+ },
1816
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1817
+ },
1818
+ environment: "Prod",
1819
+ location: "westcentralus",
1820
+ sapProduct: "S4HANA",
1821
+ tags: {}
1822
+ };
1823
+ const options = { body };
1824
+ const credential = new DefaultAzureCredential();
1825
+ const client = new WorkloadsClient(credential, subscriptionId);
1826
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1827
+ console.log(result);
1828
+ });
1829
+ }
1830
+ /**
1831
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1832
+ *
1833
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1834
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_MountTransport.json
1835
+ */
1836
+ function createInfrastructureWithAnExistingSapTransportDirectoryFileshare() {
1837
+ return __awaiter(this, void 0, void 0, function* () {
1838
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1839
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1840
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1841
+ const sapVirtualInstanceName = "X00";
1842
+ const body = {
1843
+ configuration: {
1844
+ appLocation: "eastus",
1845
+ configurationType: "DeploymentWithOSConfig",
1846
+ infrastructureConfiguration: {
1847
+ appResourceGroup: "X00-RG",
1848
+ applicationServer: {
1849
+ instanceCount: 6,
1850
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1851
+ virtualMachineConfiguration: {
1852
+ imageReference: {
1853
+ offer: "RHEL-SAP",
1854
+ publisher: "RedHat",
1855
+ sku: "84sapha-gen2",
1856
+ version: "latest"
1857
+ },
1858
+ osProfile: {
1859
+ adminUsername: "{your-username}",
1860
+ osConfiguration: {
1861
+ disablePasswordAuthentication: true,
1862
+ osType: "Linux",
1863
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1864
+ }
1865
+ },
1866
+ vmSize: "Standard_E32ds_v4"
1867
+ }
1868
+ },
1869
+ centralServer: {
1870
+ instanceCount: 1,
1871
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1872
+ virtualMachineConfiguration: {
1873
+ imageReference: {
1874
+ offer: "RHEL-SAP",
1875
+ publisher: "RedHat",
1876
+ sku: "84sapha-gen2",
1877
+ version: "latest"
1878
+ },
1879
+ osProfile: {
1880
+ adminUsername: "{your-username}",
1881
+ osConfiguration: {
1882
+ disablePasswordAuthentication: true,
1883
+ osType: "Linux",
1884
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1885
+ }
1886
+ },
1887
+ vmSize: "Standard_E16ds_v4"
1888
+ }
1889
+ },
1890
+ databaseServer: {
1891
+ databaseType: "HANA",
1892
+ instanceCount: 1,
1893
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1894
+ virtualMachineConfiguration: {
1895
+ imageReference: {
1896
+ offer: "RHEL-SAP",
1897
+ publisher: "RedHat",
1898
+ sku: "84sapha-gen2",
1899
+ version: "latest"
1900
+ },
1901
+ osProfile: {
1902
+ adminUsername: "{your-username}",
1903
+ osConfiguration: {
1904
+ disablePasswordAuthentication: true,
1905
+ osType: "Linux",
1906
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1907
+ }
1908
+ },
1909
+ vmSize: "Standard_M32ts"
1910
+ }
1911
+ },
1912
+ deploymentType: "ThreeTier",
1913
+ storageConfiguration: {
1914
+ transportFileShareConfiguration: {
1915
+ configurationType: "Mount",
1916
+ id: "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint",
1917
+ privateEndpointId: "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"
1918
+ }
1919
+ }
1920
+ },
1921
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
1922
+ },
1923
+ environment: "Prod",
1924
+ location: "westcentralus",
1925
+ sapProduct: "S4HANA",
1926
+ tags: {}
1927
+ };
1928
+ const options = { body };
1929
+ const credential = new DefaultAzureCredential();
1930
+ const client = new WorkloadsClient(credential, subscriptionId);
1931
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
1932
+ console.log(result);
1933
+ });
1934
+ }
1935
+ /**
1936
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
1937
+ *
1938
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
1939
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_SkipTransport.json
1940
+ */
1941
+ function createInfrastructureWithoutASapTransportDirectoryFileshare() {
1942
+ return __awaiter(this, void 0, void 0, function* () {
1943
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
1944
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
1945
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
1946
+ const sapVirtualInstanceName = "X00";
1947
+ const body = {
1948
+ configuration: {
1949
+ appLocation: "eastus",
1950
+ configurationType: "DeploymentWithOSConfig",
1951
+ infrastructureConfiguration: {
1952
+ appResourceGroup: "X00-RG",
1953
+ applicationServer: {
1954
+ instanceCount: 6,
1955
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1956
+ virtualMachineConfiguration: {
1957
+ imageReference: {
1958
+ offer: "RHEL-SAP",
1959
+ publisher: "RedHat",
1960
+ sku: "84sapha-gen2",
1961
+ version: "latest"
1962
+ },
1963
+ osProfile: {
1964
+ adminUsername: "{your-username}",
1965
+ osConfiguration: {
1966
+ disablePasswordAuthentication: true,
1967
+ osType: "Linux",
1968
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1969
+ }
1970
+ },
1971
+ vmSize: "Standard_E32ds_v4"
1972
+ }
1973
+ },
1974
+ centralServer: {
1975
+ instanceCount: 1,
1976
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
1977
+ virtualMachineConfiguration: {
1978
+ imageReference: {
1979
+ offer: "RHEL-SAP",
1980
+ publisher: "RedHat",
1981
+ sku: "84sapha-gen2",
1982
+ version: "latest"
1983
+ },
1984
+ osProfile: {
1985
+ adminUsername: "{your-username}",
1986
+ osConfiguration: {
1987
+ disablePasswordAuthentication: true,
1988
+ osType: "Linux",
1989
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
1990
+ }
1991
+ },
1992
+ vmSize: "Standard_E16ds_v4"
1993
+ }
1994
+ },
1995
+ databaseServer: {
1996
+ databaseType: "HANA",
1997
+ instanceCount: 1,
1998
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
1999
+ virtualMachineConfiguration: {
2000
+ imageReference: {
2001
+ offer: "RHEL-SAP",
2002
+ publisher: "RedHat",
2003
+ sku: "84sapha-gen2",
2004
+ version: "latest"
2005
+ },
2006
+ osProfile: {
2007
+ adminUsername: "{your-username}",
2008
+ osConfiguration: {
2009
+ disablePasswordAuthentication: true,
2010
+ osType: "Linux",
2011
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2012
+ }
2013
+ },
2014
+ vmSize: "Standard_M32ts"
2015
+ }
2016
+ },
2017
+ deploymentType: "ThreeTier",
2018
+ storageConfiguration: {
2019
+ transportFileShareConfiguration: { configurationType: "Skip" }
2020
+ }
2021
+ },
2022
+ osSapConfiguration: { sapFqdn: "xyz.test.com" }
2023
+ },
2024
+ environment: "Prod",
2025
+ location: "westcentralus",
2026
+ sapProduct: "S4HANA",
2027
+ tags: {}
2028
+ };
2029
+ const options = { body };
2030
+ const credential = new DefaultAzureCredential();
2031
+ const client = new WorkloadsClient(credential, subscriptionId);
2032
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2033
+ console.log(result);
2034
+ });
2035
+ }
2036
+ /**
2037
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2038
+ *
2039
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2040
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.json
2041
+ */
2042
+ function detectSapSoftwareInstallationOnADistributedSystem() {
2043
+ return __awaiter(this, void 0, void 0, function* () {
2044
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2045
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2046
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2047
+ const sapVirtualInstanceName = "X00";
2048
+ const body = {
2049
+ configuration: {
2050
+ appLocation: "eastus",
2051
+ configurationType: "DeploymentWithOSConfig",
2052
+ infrastructureConfiguration: {
2053
+ appResourceGroup: "{{resourcegrp}}",
2054
+ applicationServer: {
2055
+ instanceCount: 2,
2056
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app",
2057
+ virtualMachineConfiguration: {
2058
+ imageReference: {
2059
+ offer: "RHEL-SAP-HA",
2060
+ publisher: "RedHat",
2061
+ sku: "84sapha-gen2",
2062
+ version: "latest"
2063
+ },
2064
+ osProfile: {
2065
+ adminUsername: "azureuser",
2066
+ osConfiguration: {
2067
+ disablePasswordAuthentication: true,
2068
+ osType: "Linux",
2069
+ sshKeyPair: {
2070
+ privateKey: "{{privateKey}}",
2071
+ publicKey: "{{sshkey}}"
2072
+ }
2073
+ }
2074
+ },
2075
+ vmSize: "Standard_E4ds_v4"
2076
+ }
2077
+ },
2078
+ centralServer: {
2079
+ instanceCount: 1,
2080
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app",
2081
+ virtualMachineConfiguration: {
2082
+ imageReference: {
2083
+ offer: "RHEL-SAP-HA",
2084
+ publisher: "RedHat",
2085
+ sku: "84sapha-gen2",
2086
+ version: "latest"
2087
+ },
2088
+ osProfile: {
2089
+ adminUsername: "azureuser",
2090
+ osConfiguration: {
2091
+ disablePasswordAuthentication: true,
2092
+ osType: "Linux",
2093
+ sshKeyPair: {
2094
+ privateKey: "{{privateKey}}",
2095
+ publicKey: "{{sshkey}}"
2096
+ }
2097
+ }
2098
+ },
2099
+ vmSize: "Standard_E4ds_v4"
2100
+ }
2101
+ },
2102
+ databaseServer: {
2103
+ instanceCount: 1,
2104
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app",
2105
+ virtualMachineConfiguration: {
2106
+ imageReference: {
2107
+ offer: "RHEL-SAP-HA",
2108
+ publisher: "RedHat",
2109
+ sku: "84sapha-gen2",
2110
+ version: "latest"
2111
+ },
2112
+ osProfile: {
2113
+ adminUsername: "azureuser",
2114
+ osConfiguration: {
2115
+ disablePasswordAuthentication: true,
2116
+ osType: "Linux",
2117
+ sshKeyPair: {
2118
+ privateKey: "{{privateKey}}",
2119
+ publicKey: "{{sshkey}}"
2120
+ }
2121
+ }
2122
+ },
2123
+ vmSize: "Standard_M32ts"
2124
+ }
2125
+ },
2126
+ deploymentType: "ThreeTier",
2127
+ networkConfiguration: { isSecondaryIpEnabled: true }
2128
+ },
2129
+ osSapConfiguration: { sapFqdn: "sap.bpaas.com" },
2130
+ softwareConfiguration: {
2131
+ centralServerVmId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0",
2132
+ softwareInstallationType: "External"
2133
+ }
2134
+ },
2135
+ environment: "Prod",
2136
+ location: "eastus2",
2137
+ sapProduct: "S4HANA",
2138
+ tags: { createdBy: "azureuser" }
2139
+ };
2140
+ const options = { body };
2141
+ const credential = new DefaultAzureCredential();
2142
+ const client = new WorkloadsClient(credential, subscriptionId);
2143
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2144
+ console.log(result);
2145
+ });
2146
+ }
2147
+ /**
2148
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2149
+ *
2150
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2151
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.json
2152
+ */
2153
+ function detectSapSoftwareInstallationOnASingleServerSystem() {
2154
+ return __awaiter(this, void 0, void 0, function* () {
2155
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2156
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2157
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2158
+ const sapVirtualInstanceName = "X00";
2159
+ const body = {
2160
+ configuration: {
2161
+ appLocation: "eastus",
2162
+ configurationType: "DeploymentWithOSConfig",
2163
+ infrastructureConfiguration: {
2164
+ appResourceGroup: "X00-RG",
2165
+ databaseType: "HANA",
2166
+ deploymentType: "SingleServer",
2167
+ networkConfiguration: { isSecondaryIpEnabled: true },
2168
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
2169
+ virtualMachineConfiguration: {
2170
+ imageReference: {
2171
+ offer: "RHEL-SAP-HA",
2172
+ publisher: "RedHat",
2173
+ sku: "84sapha-gen2",
2174
+ version: "latest"
2175
+ },
2176
+ osProfile: {
2177
+ adminUsername: "{your-username}",
2178
+ osConfiguration: {
2179
+ disablePasswordAuthentication: true,
2180
+ osType: "Linux",
2181
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2182
+ }
2183
+ },
2184
+ vmSize: "Standard_E32ds_v4"
2185
+ }
2186
+ },
2187
+ osSapConfiguration: { sapFqdn: "xyz.test.com" },
2188
+ softwareConfiguration: {
2189
+ centralServerVmId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0",
2190
+ softwareInstallationType: "External"
2191
+ }
2192
+ },
2193
+ environment: "NonProd",
2194
+ location: "westcentralus",
2195
+ sapProduct: "S4HANA",
2196
+ tags: {}
2197
+ };
2198
+ const options = { body };
2199
+ const credential = new DefaultAzureCredential();
2200
+ const client = new WorkloadsClient(credential, subscriptionId);
2201
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2202
+ console.log(result);
2203
+ });
2204
+ }
2205
+ /**
2206
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2207
+ *
2208
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2209
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.json
2210
+ */
2211
+ function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet() {
2212
+ return __awaiter(this, void 0, void 0, function* () {
2213
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2214
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2215
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2216
+ const sapVirtualInstanceName = "X00";
2217
+ const body = {
2218
+ configuration: {
2219
+ appLocation: "eastus",
2220
+ configurationType: "DeploymentWithOSConfig",
2221
+ infrastructureConfiguration: {
2222
+ appResourceGroup: "X00-RG",
2223
+ applicationServer: {
2224
+ instanceCount: 6,
2225
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
2226
+ virtualMachineConfiguration: {
2227
+ imageReference: {
2228
+ offer: "RHEL-SAP-HA",
2229
+ publisher: "RedHat",
2230
+ sku: "84sapha-gen2",
2231
+ version: "latest"
2232
+ },
2233
+ osProfile: {
2234
+ adminUsername: "{your-username}",
2235
+ osConfiguration: {
2236
+ disablePasswordAuthentication: true,
2237
+ osType: "Linux",
2238
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2239
+ }
2240
+ },
2241
+ vmSize: "Standard_E32ds_v4"
2242
+ }
2243
+ },
2244
+ centralServer: {
2245
+ instanceCount: 2,
2246
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
2247
+ virtualMachineConfiguration: {
2248
+ imageReference: {
2249
+ offer: "RHEL-SAP-HA",
2250
+ publisher: "RedHat",
2251
+ sku: "84sapha-gen2",
2252
+ version: "latest"
2253
+ },
2254
+ osProfile: {
2255
+ adminUsername: "{your-username}",
2256
+ osConfiguration: {
2257
+ disablePasswordAuthentication: true,
2258
+ osType: "Linux",
2259
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2260
+ }
2261
+ },
2262
+ vmSize: "Standard_E16ds_v4"
2263
+ }
2264
+ },
2265
+ databaseServer: {
2266
+ databaseType: "HANA",
2267
+ instanceCount: 2,
2268
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
2269
+ virtualMachineConfiguration: {
2270
+ imageReference: {
2271
+ offer: "RHEL-SAP-HA",
2272
+ publisher: "RedHat",
2273
+ sku: "84sapha-gen2",
2274
+ version: "latest"
2275
+ },
2276
+ osProfile: {
2277
+ adminUsername: "{your-username}",
2278
+ osConfiguration: {
2279
+ disablePasswordAuthentication: true,
2280
+ osType: "Linux",
2281
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2282
+ }
2283
+ },
2284
+ vmSize: "Standard_M32ts"
2285
+ }
2286
+ },
2287
+ deploymentType: "ThreeTier",
2288
+ highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }
2289
+ },
2290
+ osSapConfiguration: { sapFqdn: "xyz.test.com" },
2291
+ softwareConfiguration: {
2292
+ centralServerVmId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0",
2293
+ softwareInstallationType: "External"
2294
+ }
2295
+ },
2296
+ environment: "Prod",
2297
+ location: "westcentralus",
2298
+ sapProduct: "S4HANA",
2299
+ tags: {}
2300
+ };
2301
+ const options = { body };
2302
+ const credential = new DefaultAzureCredential();
2303
+ const client = new WorkloadsClient(credential, subscriptionId);
2304
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2305
+ console.log(result);
2306
+ });
2307
+ }
2308
+ /**
2309
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2310
+ *
2311
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2312
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.json
2313
+ */
2314
+ function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone() {
2315
+ return __awaiter(this, void 0, void 0, function* () {
2316
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2317
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2318
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2319
+ const sapVirtualInstanceName = "X00";
2320
+ const body = {
2321
+ configuration: {
2322
+ appLocation: "eastus",
2323
+ configurationType: "DeploymentWithOSConfig",
2324
+ infrastructureConfiguration: {
2325
+ appResourceGroup: "X00-RG",
2326
+ applicationServer: {
2327
+ instanceCount: 6,
2328
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
2329
+ virtualMachineConfiguration: {
2330
+ imageReference: {
2331
+ offer: "RHEL-SAP-HA",
2332
+ publisher: "RedHat",
2333
+ sku: "84sapha-gen2",
2334
+ version: "latest"
2335
+ },
2336
+ osProfile: {
2337
+ adminUsername: "{your-username}",
2338
+ osConfiguration: {
2339
+ disablePasswordAuthentication: true,
2340
+ osType: "Linux",
2341
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2342
+ }
2343
+ },
2344
+ vmSize: "Standard_E32ds_v4"
2345
+ }
2346
+ },
2347
+ centralServer: {
2348
+ instanceCount: 2,
2349
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet",
2350
+ virtualMachineConfiguration: {
2351
+ imageReference: {
2352
+ offer: "RHEL-SAP-HA",
2353
+ publisher: "RedHat",
2354
+ sku: "84sapha-gen2",
2355
+ version: "latest"
2356
+ },
2357
+ osProfile: {
2358
+ adminUsername: "{your-username}",
2359
+ osConfiguration: {
2360
+ disablePasswordAuthentication: true,
2361
+ osType: "Linux",
2362
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2363
+ }
2364
+ },
2365
+ vmSize: "Standard_E16ds_v4"
2366
+ }
2367
+ },
2368
+ databaseServer: {
2369
+ databaseType: "HANA",
2370
+ instanceCount: 2,
2371
+ subnetId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet",
2372
+ virtualMachineConfiguration: {
2373
+ imageReference: {
2374
+ offer: "RHEL-SAP-HA",
2375
+ publisher: "RedHat",
2376
+ sku: "84sapha-gen2",
2377
+ version: "latest"
2378
+ },
2379
+ osProfile: {
2380
+ adminUsername: "{your-username}",
2381
+ osConfiguration: {
2382
+ disablePasswordAuthentication: true,
2383
+ osType: "Linux",
2384
+ sshKeyPair: { privateKey: "xyz", publicKey: "abc" }
2385
+ }
2386
+ },
2387
+ vmSize: "Standard_M32ts"
2388
+ }
2389
+ },
2390
+ deploymentType: "ThreeTier",
2391
+ highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }
2392
+ },
2393
+ osSapConfiguration: { sapFqdn: "xyz.test.com" },
2394
+ softwareConfiguration: {
2395
+ centralServerVmId: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0",
2396
+ softwareInstallationType: "External"
2397
+ }
2398
+ },
2399
+ environment: "Prod",
2400
+ location: "westcentralus",
2401
+ sapProduct: "S4HANA",
2402
+ tags: {}
2403
+ };
2404
+ const options = { body };
2405
+ const credential = new DefaultAzureCredential();
2406
+ const client = new WorkloadsClient(credential, subscriptionId);
2407
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2408
+ console.log(result);
2409
+ });
2410
+ }
2411
+ /**
2412
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2413
+ *
2414
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2415
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.json
2416
+ */
2417
+ function installSapSoftwareOnDistributedSystem() {
2418
+ return __awaiter(this, void 0, void 0, function* () {
2419
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2420
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2421
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2422
+ const sapVirtualInstanceName = "X00";
2423
+ const body = {
2424
+ configuration: {
2425
+ appLocation: "eastus",
2426
+ configurationType: "DeploymentWithOSConfig",
2427
+ infrastructureConfiguration: {
2428
+ appResourceGroup: "{{resourcegrp}}",
2429
+ applicationServer: {
2430
+ instanceCount: 2,
2431
+ subnetId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app",
2432
+ virtualMachineConfiguration: {
2433
+ imageReference: {
2434
+ offer: "RHEL-SAP-HA",
2435
+ publisher: "RedHat",
2436
+ sku: "8.2",
2437
+ version: "8.2.2021091201"
2438
+ },
2439
+ osProfile: {
2440
+ adminUsername: "azureuser",
2441
+ osConfiguration: {
2442
+ disablePasswordAuthentication: true,
2443
+ osType: "Linux",
2444
+ sshKeyPair: {
2445
+ privateKey: "{{privateKey}}",
2446
+ publicKey: "{{sshkey}}"
2447
+ }
2448
+ }
2449
+ },
2450
+ vmSize: "Standard_E4ds_v4"
2451
+ }
2452
+ },
2453
+ centralServer: {
2454
+ instanceCount: 1,
2455
+ subnetId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app",
2456
+ virtualMachineConfiguration: {
2457
+ imageReference: {
2458
+ offer: "RHEL-SAP-HA",
2459
+ publisher: "RedHat",
2460
+ sku: "8.2",
2461
+ version: "8.2.2021091201"
2462
+ },
2463
+ osProfile: {
2464
+ adminUsername: "azureuser",
2465
+ osConfiguration: {
2466
+ disablePasswordAuthentication: true,
2467
+ osType: "Linux",
2468
+ sshKeyPair: {
2469
+ privateKey: "{{privateKey}}",
2470
+ publicKey: "{{sshkey}}"
2471
+ }
2472
+ }
2473
+ },
2474
+ vmSize: "Standard_E4ds_v4"
2475
+ }
2476
+ },
2477
+ databaseServer: {
2478
+ instanceCount: 1,
2479
+ subnetId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app",
2480
+ virtualMachineConfiguration: {
2481
+ imageReference: {
2482
+ offer: "RHEL-SAP-HA",
2483
+ publisher: "RedHat",
2484
+ sku: "8.2",
2485
+ version: "8.2.2021091201"
2486
+ },
2487
+ osProfile: {
2488
+ adminUsername: "azureuser",
2489
+ osConfiguration: {
2490
+ disablePasswordAuthentication: true,
2491
+ osType: "Linux",
2492
+ sshKeyPair: {
2493
+ privateKey: "{{privateKey}}",
2494
+ publicKey: "{{sshkey}}"
2495
+ }
2496
+ }
2497
+ },
2498
+ vmSize: "Standard_M32ts"
2499
+ }
2500
+ },
2501
+ deploymentType: "ThreeTier",
2502
+ networkConfiguration: { isSecondaryIpEnabled: true }
2503
+ },
2504
+ osSapConfiguration: { sapFqdn: "sap.bpaas.com" },
2505
+ softwareConfiguration: {
2506
+ bomUrl: "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml",
2507
+ sapBitsStorageAccountId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount",
2508
+ softwareInstallationType: "SAPInstallWithoutOSConfig",
2509
+ softwareVersion: "SAP S/4HANA 1909 SPS 03"
2510
+ }
2511
+ },
2512
+ environment: "Prod",
2513
+ location: "eastus2",
2514
+ sapProduct: "S4HANA",
2515
+ tags: { createdBy: "azureuser" }
2516
+ };
2517
+ const options = { body };
2518
+ const credential = new DefaultAzureCredential();
2519
+ const client = new WorkloadsClient(credential, subscriptionId);
2520
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2521
+ console.log(result);
2522
+ });
2523
+ }
2524
+ /**
2525
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2526
+ *
2527
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2528
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.json
2529
+ */
2530
+ function installSapSoftwareOnSingleServerSystem() {
2531
+ return __awaiter(this, void 0, void 0, function* () {
2532
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2533
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2534
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2535
+ const sapVirtualInstanceName = "X00";
2536
+ const body = {
2537
+ configuration: {
2538
+ appLocation: "eastus",
2539
+ configurationType: "DeploymentWithOSConfig",
2540
+ infrastructureConfiguration: {
2541
+ appResourceGroup: "test-rg",
2542
+ deploymentType: "SingleServer",
2543
+ subnetId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet",
2544
+ virtualMachineConfiguration: {
2545
+ imageReference: {
2546
+ offer: "SLES-SAP",
2547
+ publisher: "SUSE",
2548
+ sku: "12-sp4-gen2",
2549
+ version: "2022.02.01"
2550
+ },
2551
+ osProfile: {
2552
+ adminUsername: "azureappadmin",
2553
+ osConfiguration: {
2554
+ disablePasswordAuthentication: true,
2555
+ osType: "Linux",
2556
+ sshKeyPair: {
2557
+ privateKey: "{{privateKey}}",
2558
+ publicKey: "{{sshkey}}"
2559
+ }
2560
+ }
2561
+ },
2562
+ vmSize: "Standard_E32ds_v4"
2563
+ }
2564
+ },
2565
+ osSapConfiguration: { sapFqdn: "sap.bpaas.com" },
2566
+ softwareConfiguration: {
2567
+ bomUrl: "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml",
2568
+ sapBitsStorageAccountId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount",
2569
+ softwareInstallationType: "SAPInstallWithoutOSConfig",
2570
+ softwareVersion: "SAP S/4HANA 1909 SPS 03"
2571
+ }
2572
+ },
2573
+ environment: "NonProd",
2574
+ location: "eastus2",
2575
+ sapProduct: "S4HANA",
2576
+ tags: {}
2577
+ };
2578
+ const options = { body };
2579
+ const credential = new DefaultAzureCredential();
2580
+ const client = new WorkloadsClient(credential, subscriptionId);
2581
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2582
+ console.log(result);
2583
+ });
2584
+ }
2585
+ /**
2586
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2587
+ *
2588
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2589
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.json
2590
+ */
2591
+ function registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations() {
2592
+ return __awaiter(this, void 0, void 0, function* () {
2593
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2594
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2595
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2596
+ const sapVirtualInstanceName = "X00";
2597
+ const body = {
2598
+ configuration: {
2599
+ centralServerVmId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0",
2600
+ configurationType: "Discovery",
2601
+ managedRgStorageAccountName: "q20saacssgrs"
2602
+ },
2603
+ environment: "NonProd",
2604
+ location: "northeurope",
2605
+ sapProduct: "S4HANA",
2606
+ tags: { createdby: "abc@microsoft.com", test: "abc" }
2607
+ };
2608
+ const options = { body };
2609
+ const credential = new DefaultAzureCredential();
2610
+ const client = new WorkloadsClient(credential, subscriptionId);
2611
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2612
+ console.log(result);
2613
+ });
2614
+ }
2615
+ /**
2616
+ * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource
2617
+ *
2618
+ * @summary Creates a Virtual Instance for SAP solutions (VIS) resource
2619
+ * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/stable/2023-04-01/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.json
2620
+ */
2621
+ function registerExistingSapSystemAsVirtualInstanceForSapSolutions() {
2622
+ return __awaiter(this, void 0, void 0, function* () {
2623
+ const subscriptionId = process.env["WORKLOADS_SUBSCRIPTION_ID"] ||
2624
+ "8e17e36c-42e9-4cd5-a078-7b44883414e0";
2625
+ const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg";
2626
+ const sapVirtualInstanceName = "X00";
2627
+ const body = {
2628
+ configuration: {
2629
+ centralServerVmId: "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0",
2630
+ configurationType: "Discovery"
2631
+ },
2632
+ environment: "NonProd",
2633
+ location: "northeurope",
2634
+ sapProduct: "S4HANA",
2635
+ tags: { createdby: "abc@microsoft.com", test: "abc" }
2636
+ };
2637
+ const options = { body };
2638
+ const credential = new DefaultAzureCredential();
2639
+ const client = new WorkloadsClient(credential, subscriptionId);
2640
+ const result = yield client.sAPVirtualInstances.beginCreateAndWait(resourceGroupName, sapVirtualInstanceName, options);
2641
+ console.log(result);
2642
+ });
2643
+ }
2644
+ function main() {
2645
+ return __awaiter(this, void 0, void 0, function* () {
2646
+ createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem();
2647
+ createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet();
2648
+ createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone();
2649
+ createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem();
2650
+ createInfrastructureOnlyForDistributedSystem();
2651
+ createInfrastructureOnlyForHaSystemWithAvailabilitySet();
2652
+ createInfrastructureOnlyForHaSystemWithAvailabilityZone();
2653
+ createInfrastructureOnlyForSingleServerSystem();
2654
+ createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended();
2655
+ createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended();
2656
+ createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended();
2657
+ createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended();
2658
+ createInfrastructureWithOSConfigurationForDistributedSystemRecommended();
2659
+ createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended();
2660
+ createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended();
2661
+ createInfrastructureWithOSConfigurationForSingleServerSystemRecommended();
2662
+ createInfrastructureWithANewSapTransportDirectoryFileshare();
2663
+ createInfrastructureWithAnExistingSapTransportDirectoryFileshare();
2664
+ createInfrastructureWithoutASapTransportDirectoryFileshare();
2665
+ detectSapSoftwareInstallationOnADistributedSystem();
2666
+ detectSapSoftwareInstallationOnASingleServerSystem();
2667
+ detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet();
2668
+ detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone();
2669
+ installSapSoftwareOnDistributedSystem();
2670
+ installSapSoftwareOnSingleServerSystem();
2671
+ registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations();
2672
+ registerExistingSapSystemAsVirtualInstanceForSapSolutions();
2673
+ });
2674
+ }
2675
+ main().catch(console.error);
733
2676
  //# sourceMappingURL=sapVirtualInstancesCreateSample.js.map