@azure/arm-workloadssapvirtualinstance 1.0.0-alpha.20240322.1

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