From 8c54103f9dce3d06f5bef17f0f0d19930a73fa98 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 4 Mar 2025 22:04:17 +0000 Subject: [PATCH] CodeGen from PR 32992 in Azure/azure-rest-api-specs Merge e33b8bfe81f6cf113e1d5fe38c28db45da219841 into 64b39af620f9326da0db6e012414838453be016c --- .../CHANGELOG.md | 15 - .../arm-workloadssapvirtualinstance/LICENSE | 21 - .../arm-workloadssapvirtualinstance/README.md | 118 - .../_meta.json | 8 - .../api-extractor.json | 31 - .../assets.json | 6 - .../package.json | 142 - .../arm-workloadssapvirtualinstance.api.md | 1558 ------- .../sample.env | 4 - .../samples-dev/operationsListSample.ts | 34 - ...pApplicationServerInstancesCreateSample.ts | 79 - ...pApplicationServerInstancesDeleteSample.ts | 38 - .../sapApplicationServerInstancesGetSample.ts | 38 - ...sapApplicationServerInstancesListSample.ts | 39 - ...ationServerInstancesStartInstanceSample.ts | 70 - ...cationServerInstancesStopInstanceSample.ts | 75 - ...pApplicationServerInstancesUpdateSample.ts | 47 - .../sapAvailabilityZoneDetailsSample.ts | 49 - .../sapCentralInstancesCreateSample.ts | 79 - .../sapCentralInstancesDeleteSample.ts | 38 - .../sapCentralInstancesGetSample.ts | 38 - .../sapCentralInstancesListSample.ts | 39 - .../sapCentralInstancesStartInstanceSample.ts | 68 - .../sapCentralInstancesStopInstanceSample.ts | 71 - .../sapCentralInstancesUpdateSample.ts | 45 - .../sapDatabaseInstancesCreateSample.ts | 79 - .../sapDatabaseInstancesDeleteSample.ts | 38 - .../sapDatabaseInstancesGetSample.ts | 38 - .../sapDatabaseInstancesListSample.ts | 39 - ...sapDatabaseInstancesStartInstanceSample.ts | 68 - .../sapDatabaseInstancesStopInstanceSample.ts | 71 - .../sapDatabaseInstancesUpdateSample.ts | 45 - .../sapDiskConfigurationsSample.ts | 49 - .../sapSizingRecommendationsSample.ts | 83 - .../samples-dev/sapSupportedSkuSample.ts | 83 - .../sapVirtualInstancesCreateSample.ts | 3163 -------------- .../sapVirtualInstancesDeleteSample.ts | 36 - .../sapVirtualInstancesGetSample.ts | 51 - ...rtualInstancesListByResourceGroupSample.ts | 35 - ...irtualInstancesListBySubscriptionSample.ts | 34 - .../sapVirtualInstancesStartSample.ts | 64 - .../sapVirtualInstancesStopSample.ts | 67 - .../sapVirtualInstancesUpdateSample.ts | 74 - .../samples/v1-beta/javascript/README.md | 116 - .../javascript/operationsListSample.js | 37 - .../samples/v1-beta/javascript/package.json | 32 - .../samples/v1-beta/javascript/sample.env | 4 - ...pApplicationServerInstancesCreateSample.js | 78 - ...pApplicationServerInstancesDeleteSample.js | 41 - .../sapApplicationServerInstancesGetSample.js | 41 - ...sapApplicationServerInstancesListSample.js | 42 - ...ationServerInstancesStartInstanceSample.js | 69 - ...cationServerInstancesStopInstanceSample.js | 74 - ...pApplicationServerInstancesUpdateSample.js | 46 - .../sapAvailabilityZoneDetailsSample.js | 52 - .../sapCentralInstancesCreateSample.js | 78 - .../sapCentralInstancesDeleteSample.js | 41 - .../sapCentralInstancesGetSample.js | 41 - .../sapCentralInstancesListSample.js | 42 - .../sapCentralInstancesStartInstanceSample.js | 67 - .../sapCentralInstancesStopInstanceSample.js | 70 - .../sapCentralInstancesUpdateSample.js | 44 - .../sapDatabaseInstancesCreateSample.js | 78 - .../sapDatabaseInstancesDeleteSample.js | 41 - .../sapDatabaseInstancesGetSample.js | 41 - .../sapDatabaseInstancesListSample.js | 42 - ...sapDatabaseInstancesStartInstanceSample.js | 67 - .../sapDatabaseInstancesStopInstanceSample.js | 70 - .../sapDatabaseInstancesUpdateSample.js | 44 - .../javascript/sapDiskConfigurationsSample.js | 52 - .../sapSizingRecommendationsSample.js | 86 - .../javascript/sapSupportedSkuSample.js | 86 - .../sapVirtualInstancesCreateSample.js | 3162 -------------- .../sapVirtualInstancesDeleteSample.js | 39 - .../sapVirtualInstancesGetSample.js | 54 - ...rtualInstancesListByResourceGroupSample.js | 38 - ...irtualInstancesListBySubscriptionSample.js | 37 - .../sapVirtualInstancesStartSample.js | 63 - .../sapVirtualInstancesStopSample.js | 66 - .../sapVirtualInstancesUpdateSample.js | 73 - .../samples/v1-beta/typescript/README.md | 129 - .../samples/v1-beta/typescript/package.json | 41 - .../samples/v1-beta/typescript/sample.env | 4 - .../typescript/src/operationsListSample.ts | 35 - ...pApplicationServerInstancesCreateSample.ts | 83 - ...pApplicationServerInstancesDeleteSample.ts | 40 - .../sapApplicationServerInstancesGetSample.ts | 40 - ...sapApplicationServerInstancesListSample.ts | 41 - ...ationServerInstancesStartInstanceSample.ts | 76 - ...cationServerInstancesStopInstanceSample.ts | 81 - ...pApplicationServerInstancesUpdateSample.ts | 49 - .../src/sapAvailabilityZoneDetailsSample.ts | 51 - .../src/sapCentralInstancesCreateSample.ts | 83 - .../src/sapCentralInstancesDeleteSample.ts | 40 - .../src/sapCentralInstancesGetSample.ts | 40 - .../src/sapCentralInstancesListSample.ts | 41 - .../sapCentralInstancesStartInstanceSample.ts | 72 - .../sapCentralInstancesStopInstanceSample.ts | 75 - .../src/sapCentralInstancesUpdateSample.ts | 47 - .../src/sapDatabaseInstancesCreateSample.ts | 83 - .../src/sapDatabaseInstancesDeleteSample.ts | 40 - .../src/sapDatabaseInstancesGetSample.ts | 40 - .../src/sapDatabaseInstancesListSample.ts | 41 - ...sapDatabaseInstancesStartInstanceSample.ts | 72 - .../sapDatabaseInstancesStopInstanceSample.ts | 75 - .../src/sapDatabaseInstancesUpdateSample.ts | 47 - .../src/sapDiskConfigurationsSample.ts | 51 - .../src/sapSizingRecommendationsSample.ts | 87 - .../typescript/src/sapSupportedSkuSample.ts | 87 - .../src/sapVirtualInstancesCreateSample.ts | 3223 --------------- .../src/sapVirtualInstancesDeleteSample.ts | 38 - .../src/sapVirtualInstancesGetSample.ts | 61 - ...rtualInstancesListByResourceGroupSample.ts | 39 - ...irtualInstancesListBySubscriptionSample.ts | 35 - .../src/sapVirtualInstancesStartSample.ts | 68 - .../src/sapVirtualInstancesStopSample.ts | 71 - .../src/sapVirtualInstancesUpdateSample.ts | 78 - .../samples/v1-beta/typescript/tsconfig.json | 17 - .../src/index.ts | 13 - .../src/lroImpl.ts | 38 - .../src/models/index.ts | 2476 ----------- .../src/models/mappers.ts | 3615 ----------------- .../src/models/parameters.ts | 258 -- .../src/operations/index.ts | 13 - .../src/operations/operations.ts | 149 - .../sAPApplicationServerInstances.ts | 852 ---- .../src/operations/sAPCentralInstances.ts | 863 ---- .../src/operations/sAPDatabaseInstances.ts | 856 ---- .../src/operations/sAPVirtualInstances.ts | 964 ----- .../src/operationsInterfaces/index.ts | 13 - .../src/operationsInterfaces/operations.ts | 22 - .../sAPApplicationServerInstances.ts | 199 - .../sAPCentralInstances.ts | 212 - .../sAPDatabaseInstances.ts | 206 - .../sAPVirtualInstances.ts | 196 - .../src/pagingHelper.ts | 39 - .../src/workloadsClient.ts | 327 -- .../test/snippets.spec.ts | 27 - ...sapvirtualinstance_operations_test.spec.ts | 59 - .../tsconfig.browser.config.json | 6 - .../tsconfig.json | 13 - .../tsconfig.samples.json | 10 - .../tsconfig.src.json | 3 - .../tsconfig.test.json | 6 - .../tsp-location.yaml | 4 + .../vitest.browser.config.ts | 17 - .../vitest.config.ts | 16 - .../vitest.esm.config.ts | 12 - 148 files changed, 4 insertions(+), 28822 deletions(-) delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/CHANGELOG.md delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/LICENSE delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/README.md delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/_meta.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/api-extractor.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/assets.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/package.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/review/arm-workloadssapvirtualinstance.api.md delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/sample.env delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/operationsListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStartInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStopInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapAvailabilityZoneDetailsSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStartInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStopInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStartInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStopInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDiskConfigurationsSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSizingRecommendationsSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSupportedSkuSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListByResourceGroupSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListBySubscriptionSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStartSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStopSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/README.md delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/operationsListSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/package.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesCreateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesDeleteSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesGetSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesListSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStartInstanceSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStopInstanceSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesUpdateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapAvailabilityZoneDetailsSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesCreateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesDeleteSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesGetSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesListSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStartInstanceSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStopInstanceSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesUpdateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesCreateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesDeleteSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesGetSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesListSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStartInstanceSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStopInstanceSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesUpdateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDiskConfigurationsSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSizingRecommendationsSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSupportedSkuSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesCreateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesDeleteSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesGetSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListByResourceGroupSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListBySubscriptionSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStartSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStopSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesUpdateSample.js delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/README.md delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/operationsListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStartInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStopInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapAvailabilityZoneDetailsSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStartInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStopInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesListSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStartInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStopInstanceSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDiskConfigurationsSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSizingRecommendationsSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSupportedSkuSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesCreateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesDeleteSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesGetSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListByResourceGroupSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListBySubscriptionSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStartSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStopSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesUpdateSample.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/tsconfig.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/index.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/lroImpl.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/models/index.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/models/mappers.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/models/parameters.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operations/index.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operations/operations.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPApplicationServerInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPCentralInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPDatabaseInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPVirtualInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/index.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/operations.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPApplicationServerInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPCentralInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPDatabaseInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPVirtualInstances.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/pagingHelper.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/src/workloadsClient.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/test/snippets.spec.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/test/workloadssapvirtualinstance_operations_test.spec.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.browser.config.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.samples.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.src.json delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.test.json create mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/tsp-location.yaml delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/vitest.browser.config.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/vitest.config.ts delete mode 100644 sdk/workloads/arm-workloadssapvirtualinstance/vitest.esm.config.ts diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/CHANGELOG.md b/sdk/workloads/arm-workloadssapvirtualinstance/CHANGELOG.md deleted file mode 100644 index 01a8eac6ef40..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# Release History - -## 1.0.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 1.0.0-beta.1 (2024-02-29) - -The package of @azure/arm-workloadssapvirtualinstance is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/LICENSE b/sdk/workloads/arm-workloadssapvirtualinstance/LICENSE deleted file mode 100644 index b2f52a2bad4e..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Microsoft Corporation. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/README.md b/sdk/workloads/arm-workloadssapvirtualinstance/README.md deleted file mode 100644 index 05b021ed8a9e..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# Azure Workloads client library for JavaScript - -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Workloads client. - -Workloads client provides access to various workload operations. - -[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloadssapvirtualinstance) | -[Package (NPM)](https://www.npmjs.com/package/@azure/arm-workloadssapvirtualinstance) | -[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-workloadssapvirtualinstance?view=azure-node-preview) | -[Samples](https://github.com/Azure-Samples/azure-samples-js-management) - -## Getting started - -### Currently supported environments - -- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule) -- Latest versions of Safari, Chrome, Edge and Firefox. - -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - -### Prerequisites - -- An [Azure subscription][azure_sub]. - -### Install the `@azure/arm-workloadssapvirtualinstance` package - -Install the Azure Workloads client library for JavaScript with `npm`: - -```bash -npm install @azure/arm-workloadssapvirtualinstance -``` - -### Create and authenticate a `WorkloadsClient` - -To create a client object to access the Azure Workloads API, you will need the `endpoint` of your Azure Workloads resource and a `credential`. The Azure Workloads client can use Azure Active Directory credentials to authenticate. -You can find the endpoint for your Azure Workloads resource in the [Azure Portal][azure_portal]. - -You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token). - -To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package: - -```bash -npm install @azure/identity -``` - -You will also need to **register a new AAD application and grant access to Azure Workloads** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. - -For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). - -Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client. - -```ts snippet:ReadmeSampleCreateClient_Node -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const client = new WorkloadsClient(new DefaultAzureCredential(), subscriptionId); -``` - -For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate. - -```ts snippet:ReadmeSampleCreateClient_Browser -import { InteractiveBrowserCredential } from "@azure/identity"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; - -const subscriptionId = "00000000-0000-0000-0000-000000000000"; -const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", -}); -const client = new WorkloadsClient(credential, subscriptionId); -``` - -### JavaScript Bundle - -To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). - -## Key concepts - -### WorkloadsClient - -`WorkloadsClient` is the primary interface for developers using the Azure Workloads client library. Explore the methods on this client object to understand the different features of the Azure Workloads service that you can access. - -## Troubleshooting - -### Logging - -Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`: - -```ts snippet:SetLogLevel -import { setLogLevel } from "@azure/logger"; - -setLogLevel("info"); -``` - -For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). - -## Next steps - -Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library. - -## Contributing - -If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code. - -## Related projects - -- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - - - -[azure_cli]: https://learn.microsoft.com/cli/azure -[azure_sub]: https://azure.microsoft.com/free/ -[azure_sub]: https://azure.microsoft.com/free/ -[azure_portal]: https://portal.azure.com -[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity -[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/_meta.json b/sdk/workloads/arm-workloadssapvirtualinstance/_meta.json deleted file mode 100644 index 04908ba663bc..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "commit": "ea95dc025eef49e82a7fa88f991fb9ce328a4c30", - "readme": "specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\workloads\\resource-manager\\Microsoft.Workloads\\SAPVirtualInstance\\readme.md --use=@autorest/typescript@6.0.15 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", - "use": "@autorest/typescript@6.0.15" -} \ No newline at end of file diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/api-extractor.json b/sdk/workloads/arm-workloadssapvirtualinstance/api-extractor.json deleted file mode 100644 index dba4b73ce135..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/api-extractor.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "dist/esm/index.d.ts", - "docModel": { - "enabled": true - }, - "apiReport": { - "enabled": true, - "reportFolder": "./review" - }, - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "", - "publicTrimmedFilePath": "dist/arm-workloadssapvirtualinstance.d.ts" - }, - "messages": { - "tsdocMessageReporting": { - "default": { - "logLevel": "none" - } - }, - "extractorMessageReporting": { - "ae-missing-release-tag": { - "logLevel": "none" - }, - "ae-unresolved-link": { - "logLevel": "none" - } - } - } -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/assets.json b/sdk/workloads/arm-workloadssapvirtualinstance/assets.json deleted file mode 100644 index 0c07df5db49d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/workloads/arm-workloadssapvirtualinstance", - "Tag": "js/workloads/arm-workloadssapvirtualinstance_59cc33bbc4" -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/package.json b/sdk/workloads/arm-workloadssapvirtualinstance/package.json deleted file mode 100644 index d887aac7ad45..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/package.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "name": "@azure/arm-workloadssapvirtualinstance", - "sdk-type": "mgmt", - "author": "Microsoft Corporation", - "description": "A generated SDK for WorkloadsClient.", - "version": "1.0.0-beta.2", - "engines": { - "node": ">=18.0.0" - }, - "dependencies": { - "@azure/abort-controller": "^2.1.2", - "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", - "@azure/core-lro": "^2.7.2", - "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.18.2", - "tslib": "^2.2.0" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic", - "cloud" - ], - "license": "MIT", - "main": "./dist/commonjs/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/commonjs/index.d.ts", - "devDependencies": { - "@azure-tools/test-credential": "^2.0.0", - "@azure-tools/test-recorder": "^4.1.0", - "@azure-tools/test-utils-vitest": "^1.0.0", - "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.5.0", - "@azure/logger": "^1.1.4", - "@types/node": "^18.0.0", - "@vitest/browser": "^3.0.3", - "@vitest/coverage-istanbul": "^3.0.3", - "dotenv": "^16.0.0", - "playwright": "^1.49.1", - "typescript": "~5.7.2", - "vitest": "^3.0.3" - }, - "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "files": [ - "dist/", - "README.md", - "LICENSE", - "review/", - "CHANGELOG.md" - ], - "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:browser": "echo skipped", - "build:node": "echo skipped", - "build:samples": "echo skipped.", - "build:test": "echo skipped", - "check-format": "echo skipped", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "echo skipped", - "extract-api": "dev-tool run extract-api", - "format": "echo skipped", - "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:vitest --esm", - "lint": "echo skipped", - "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", - "pack": "npm pack 2>&1", - "prepack": "npm run build", - "test": "npm run integration-test", - "test:browser": "echo skipped", - "test:node": "echo skipped", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run test:vitest", - "update-snippets": "dev-tool run update-snippets" - }, - "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/workloadsClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloadssapvirtualinstance", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-workloadssapvirtualinstance?view=azure-node-preview" - }, - "type": "module", - "tshy": { - "project": "./tsconfig.src.json", - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - }, - "dialects": [ - "esm", - "commonjs" - ], - "esmDialects": [ - "browser", - "react-native" - ], - "selfLink": false - }, - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", - "exports": { - "./package.json": "./package.json", - ".": { - "browser": { - "types": "./dist/browser/index.d.ts", - "default": "./dist/browser/index.js" - }, - "react-native": { - "types": "./dist/react-native/index.d.ts", - "default": "./dist/react-native/index.js" - }, - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - } -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/review/arm-workloadssapvirtualinstance.api.md b/sdk/workloads/arm-workloadssapvirtualinstance/review/arm-workloadssapvirtualinstance.api.md deleted file mode 100644 index 4aaf105188f1..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/review/arm-workloadssapvirtualinstance.api.md +++ /dev/null @@ -1,1558 +0,0 @@ -## API Report File for "@azure/arm-workloadssapvirtualinstance" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -import * as coreAuth from '@azure/core-auth'; -import * as coreClient from '@azure/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { SimplePollerLike } from '@azure/core-lro'; - -// @public -export type ActionType = string; - -// @public -export interface ApplicationServerConfiguration { - instanceCount: number; - subnetId: string; - virtualMachineConfiguration: VirtualMachineConfiguration; -} - -// @public -export interface ApplicationServerFullResourceNames { - availabilitySetName?: string; - virtualMachines?: VirtualMachineResourceNames[]; -} - -// @public -export type ApplicationServerVirtualMachineType = string; - -// @public -export interface ApplicationServerVmDetails { - readonly storageDetails?: StorageInformation[]; - readonly type?: ApplicationServerVirtualMachineType; - readonly virtualMachineId?: string; -} - -// @public -export interface CentralServerConfiguration { - instanceCount: number; - subnetId: string; - virtualMachineConfiguration: VirtualMachineConfiguration; -} - -// @public -export interface CentralServerFullResourceNames { - availabilitySetName?: string; - loadBalancer?: LoadBalancerResourceNames; - virtualMachines?: VirtualMachineResourceNames[]; -} - -// @public -export type CentralServerVirtualMachineType = string; - -// @public -export interface CentralServerVmDetails { - readonly storageDetails?: StorageInformation[]; - readonly type?: CentralServerVirtualMachineType; - readonly virtualMachineId?: string; -} - -// @public -export type ConfigurationType = string; - -// @public -export interface CreateAndMountFileShareConfiguration extends FileShareConfiguration { - configurationType: "CreateAndMount"; - resourceGroup?: string; - storageAccountName?: string; -} - -// @public -export type CreatedByType = string; - -// @public -export interface DatabaseConfiguration { - databaseType?: SAPDatabaseType; - diskConfiguration?: DiskConfiguration; - instanceCount: number; - subnetId: string; - virtualMachineConfiguration: VirtualMachineConfiguration; -} - -// @public -export interface DatabaseServerFullResourceNames { - availabilitySetName?: string; - loadBalancer?: LoadBalancerResourceNames; - virtualMachines?: VirtualMachineResourceNames[]; -} - -// @public -export interface DatabaseVmDetails { - readonly status?: SAPVirtualInstanceStatus; - readonly storageDetails?: StorageInformation[]; - readonly virtualMachineId?: string; -} - -// @public -export interface DeployerVmPackages { - storageAccountId?: string; - url?: string; -} - -// @public -export interface DeploymentConfiguration extends SAPConfiguration { - appLocation?: string; - configurationType: "Deployment"; - infrastructureConfiguration?: InfrastructureConfigurationUnion; - softwareConfiguration?: SoftwareConfigurationUnion; -} - -// @public -export interface DeploymentWithOSConfiguration extends SAPConfiguration { - appLocation?: string; - configurationType: "DeploymentWithOSConfig"; - infrastructureConfiguration?: InfrastructureConfigurationUnion; - osSapConfiguration?: OsSapConfiguration; - softwareConfiguration?: SoftwareConfigurationUnion; -} - -// @public -export interface DiscoveryConfiguration extends SAPConfiguration { - readonly appLocation?: string; - centralServerVmId?: string; - configurationType: "Discovery"; - managedRgStorageAccountName?: string; -} - -// @public -export interface DiskConfiguration { - diskVolumeConfigurations?: { - [propertyName: string]: DiskVolumeConfiguration; - }; -} - -// @public -export interface DiskDetails { - diskTier?: string; - iopsReadWrite?: number; - maximumSupportedDiskCount?: number; - mbpsReadWrite?: number; - minimumSupportedDiskCount?: number; - sizeGB?: number; - sku?: DiskSku; -} - -// @public -export interface DiskSku { - name?: DiskSkuName; -} - -// @public -export type DiskSkuName = string; - -// @public -export interface DiskVolumeConfiguration { - count?: number; - sizeGB?: number; - sku?: DiskSku; -} - -// @public -export interface EnqueueReplicationServerProperties { - readonly ersVersion?: EnqueueReplicationServerType; - readonly health?: SAPHealthState; - readonly hostname?: string; - readonly instanceNo?: string; - readonly ipAddress?: string; - readonly kernelPatch?: string; - readonly kernelVersion?: string; -} - -// @public -export type EnqueueReplicationServerType = string; - -// @public -export interface EnqueueServerProperties { - readonly health?: SAPHealthState; - readonly hostname?: string; - readonly ipAddress?: string; - readonly port?: number; -} - -// @public -export interface ErrorAdditionalInfo { - readonly info?: Record; - readonly type?: string; -} - -// @public -export interface ErrorDefinition { - readonly code?: string; - readonly details?: ErrorDefinition[]; - readonly message?: string; -} - -// @public -export interface ErrorDetail { - readonly additionalInfo?: ErrorAdditionalInfo[]; - readonly code?: string; - readonly details?: ErrorDetail[]; - readonly message?: string; - readonly target?: string; -} - -// @public -export interface ErrorResponse { - error?: ErrorDetail; -} - -// @public -export interface ExternalInstallationSoftwareConfiguration extends SoftwareConfiguration { - centralServerVmId?: string; - softwareInstallationType: "External"; -} - -// @public -export interface FileShareConfiguration { - configurationType: "Skip" | "CreateAndMount" | "Mount"; -} - -// @public (undocumented) -export type FileShareConfigurationUnion = FileShareConfiguration | SkipFileShareConfiguration | CreateAndMountFileShareConfiguration | MountFileShareConfiguration; - -// @public -export interface GatewayServerProperties { - readonly health?: SAPHealthState; - readonly port?: number; -} - -// @public -export function getContinuationToken(page: unknown): string | undefined; - -// @public -export interface HighAvailabilityConfiguration { - highAvailabilityType: SAPHighAvailabilityType; -} - -// @public -export interface HighAvailabilitySoftwareConfiguration { - fencingClientId: string; - fencingClientPassword: string; -} - -// @public -export interface ImageReference { - id?: string; - offer?: string; - publisher?: string; - sku?: string; - version?: string; -} - -// @public -export interface InfrastructureConfiguration { - appResourceGroup: string; - deploymentType: "SingleServer" | "ThreeTier"; -} - -// @public (undocumented) -export type InfrastructureConfigurationUnion = InfrastructureConfiguration | SingleServerConfiguration | ThreeTierConfiguration; - -// @public -export enum KnownActionType { - Internal = "Internal" -} - -// @public -export enum KnownApplicationServerVirtualMachineType { - Active = "Active", - Standby = "Standby", - Unknown = "Unknown" -} - -// @public -export enum KnownCentralServerVirtualMachineType { - Ascs = "ASCS", - ERS = "ERS", - ERSInactive = "ERSInactive", - Primary = "Primary", - Secondary = "Secondary", - Standby = "Standby", - Unknown = "Unknown" -} - -// @public -export enum KnownConfigurationType { - CreateAndMount = "CreateAndMount", - Mount = "Mount", - Skip = "Skip" -} - -// @public -export enum KnownCreatedByType { - Application = "Application", - Key = "Key", - ManagedIdentity = "ManagedIdentity", - User = "User" -} - -// @public -export enum KnownDiskSkuName { - PremiumLRS = "Premium_LRS", - PremiumV2LRS = "PremiumV2_LRS", - PremiumZRS = "Premium_ZRS", - StandardLRS = "Standard_LRS", - StandardSSDLRS = "StandardSSD_LRS", - StandardSSDZRS = "StandardSSD_ZRS", - UltraSSDLRS = "UltraSSD_LRS" -} - -// @public -export enum KnownEnqueueReplicationServerType { - EnqueueReplicator1 = "EnqueueReplicator1", - EnqueueReplicator2 = "EnqueueReplicator2" -} - -// @public -export enum KnownManagedResourcesNetworkAccessType { - Private = "Private", - Public = "Public" -} - -// @public -export enum KnownManagedServiceIdentityType { - None = "None", - UserAssigned = "UserAssigned" -} - -// @public -export enum KnownNamingPatternType { - FullResourceName = "FullResourceName" -} - -// @public -export enum KnownOrigin { - System = "system", - User = "user", - UserSystem = "user,system" -} - -// @public -export enum KnownOSType { - Linux = "Linux", - Windows = "Windows" -} - -// @public -export enum KnownSAPConfigurationType { - Deployment = "Deployment", - DeploymentWithOSConfig = "DeploymentWithOSConfig", - Discovery = "Discovery" -} - -// @public -export enum KnownSAPDatabaseScaleMethod { - ScaleUp = "ScaleUp" -} - -// @public -export enum KnownSAPDatabaseType { - DB2 = "DB2", - Hana = "HANA" -} - -// @public -export enum KnownSAPDeploymentType { - SingleServer = "SingleServer", - ThreeTier = "ThreeTier" -} - -// @public -export enum KnownSAPEnvironmentType { - NonProd = "NonProd", - Prod = "Prod" -} - -// @public -export enum KnownSAPHealthState { - Degraded = "Degraded", - Healthy = "Healthy", - Unhealthy = "Unhealthy", - Unknown = "Unknown" -} - -// @public -export enum KnownSAPHighAvailabilityType { - AvailabilitySet = "AvailabilitySet", - AvailabilityZone = "AvailabilityZone" -} - -// @public -export enum KnownSAPProductType { - ECC = "ECC", - Other = "Other", - S4Hana = "S4HANA" -} - -// @public -export enum KnownSAPSoftwareInstallationType { - External = "External", - SAPInstallWithoutOSConfig = "SAPInstallWithoutOSConfig", - ServiceInitiated = "ServiceInitiated" -} - -// @public -export enum KnownSapVirtualInstanceProvisioningState { - Canceled = "Canceled", - Creating = "Creating", - Deleting = "Deleting", - Failed = "Failed", - Succeeded = "Succeeded", - Updating = "Updating" -} - -// @public -export enum KnownSAPVirtualInstanceState { - AcssInstallationBlocked = "ACSSInstallationBlocked", - DiscoveryFailed = "DiscoveryFailed", - DiscoveryInProgress = "DiscoveryInProgress", - DiscoveryPending = "DiscoveryPending", - InfrastructureDeploymentFailed = "InfrastructureDeploymentFailed", - InfrastructureDeploymentInProgress = "InfrastructureDeploymentInProgress", - InfrastructureDeploymentPending = "InfrastructureDeploymentPending", - RegistrationComplete = "RegistrationComplete", - SoftwareDetectionFailed = "SoftwareDetectionFailed", - SoftwareDetectionInProgress = "SoftwareDetectionInProgress", - SoftwareInstallationFailed = "SoftwareInstallationFailed", - SoftwareInstallationInProgress = "SoftwareInstallationInProgress", - SoftwareInstallationPending = "SoftwareInstallationPending" -} - -// @public -export enum KnownSAPVirtualInstanceStatus { - Offline = "Offline", - PartiallyRunning = "PartiallyRunning", - Running = "Running", - SoftShutdown = "SoftShutdown", - Starting = "Starting", - Stopping = "Stopping", - Unavailable = "Unavailable" -} - -// @public -export interface LinuxConfiguration extends OSConfiguration { - disablePasswordAuthentication?: boolean; - osType: "Linux"; - ssh?: SshConfiguration; - sshKeyPair?: SshKeyPair; -} - -// @public -export interface LoadBalancerDetails { - readonly id?: string; -} - -// @public -export interface LoadBalancerResourceNames { - backendPoolNames?: string[]; - frontendIpConfigurationNames?: string[]; - healthProbeNames?: string[]; - loadBalancerName?: string; -} - -// @public -export type ManagedResourcesNetworkAccessType = string; - -// @public -export interface ManagedRGConfiguration { - name?: string; -} - -// @public -export type ManagedServiceIdentityType = string; - -// @public -export interface MessageServerProperties { - readonly health?: SAPHealthState; - readonly hostname?: string; - readonly httpPort?: number; - readonly httpsPort?: number; - readonly internalMsPort?: number; - readonly ipAddress?: string; - readonly msPort?: number; -} - -// @public -export interface MountFileShareConfiguration extends FileShareConfiguration { - configurationType: "Mount"; - id: string; - privateEndpointId: string; -} - -// @public -export type NamingPatternType = string; - -// @public -export interface NetworkConfiguration { - isSecondaryIpEnabled?: boolean; -} - -// @public -export interface NetworkInterfaceResourceNames { - networkInterfaceName?: string; -} - -// @public -export interface Operation { - readonly actionType?: ActionType; - display?: OperationDisplay; - readonly isDataAction?: boolean; - readonly name?: string; - readonly origin?: Origin; -} - -// @public -export interface OperationDisplay { - readonly description?: string; - readonly operation?: string; - readonly provider?: string; - readonly resource?: string; -} - -// @public -export interface OperationListResult { - readonly nextLink?: string; - readonly value?: Operation[]; -} - -// @public -export interface Operations { - list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsListResponse = OperationListResult; - -// @public -export interface OperationStatusResult { - endTime?: Date; - error?: ErrorDetail; - id?: string; - name?: string; - operations?: OperationStatusResult[]; - percentComplete?: number; - startTime?: Date; - status: string; -} - -// @public -export type Origin = string; - -// @public -export interface OSConfiguration { - osType: "Windows" | "Linux"; -} - -// @public (undocumented) -export type OSConfigurationUnion = OSConfiguration | WindowsConfiguration | LinuxConfiguration; - -// @public -export interface OSProfile { - adminPassword?: string; - adminUsername?: string; - osConfiguration?: OSConfigurationUnion; -} - -// @public -export interface OsSapConfiguration { - deployerVmPackages?: DeployerVmPackages; - sapFqdn?: string; -} - -// @public -export type OSType = string; - -// @public -export interface Resource { - readonly id?: string; - readonly name?: string; - readonly systemData?: SystemData; - readonly type?: string; -} - -// @public -export interface SAPApplicationServerInstance extends TrackedResource { - properties?: SAPApplicationServerProperties; -} - -// @public -export interface SAPApplicationServerInstanceList { - nextLink?: string; - value?: SAPApplicationServerInstance[]; -} - -// @public -export interface SAPApplicationServerInstances { - beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesCreateOptionalParams): Promise, SAPApplicationServerInstancesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesDeleteOptionalParams): Promise, SAPApplicationServerInstancesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesDeleteOptionalParams): Promise; - beginStartInstance(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesStartInstanceOptionalParams): Promise, SAPApplicationServerInstancesStartInstanceResponse>>; - beginStartInstanceAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesStartInstanceOptionalParams): Promise; - beginStopInstance(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesStopInstanceOptionalParams): Promise, SAPApplicationServerInstancesStopInstanceResponse>>; - beginStopInstanceAndWait(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesStopInstanceOptionalParams): Promise; - get(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesGetOptionalParams): Promise; - list(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPApplicationServerInstancesListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, sapVirtualInstanceName: string, applicationInstanceName: string, options?: SAPApplicationServerInstancesUpdateOptionalParams): Promise; -} - -// @public -export interface SAPApplicationServerInstancesCreateOptionalParams extends coreClient.OperationOptions { - body?: SAPApplicationServerInstance; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPApplicationServerInstancesCreateResponse = SAPApplicationServerInstance; - -// @public -export interface SAPApplicationServerInstancesDeleteHeaders { - location?: string; -} - -// @public -export interface SAPApplicationServerInstancesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPApplicationServerInstancesDeleteResponse = SAPApplicationServerInstancesDeleteHeaders; - -// @public -export interface SAPApplicationServerInstancesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPApplicationServerInstancesGetResponse = SAPApplicationServerInstance; - -// @public -export interface SAPApplicationServerInstancesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPApplicationServerInstancesListNextResponse = SAPApplicationServerInstanceList; - -// @public -export interface SAPApplicationServerInstancesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPApplicationServerInstancesListResponse = SAPApplicationServerInstanceList; - -// @public -export interface SAPApplicationServerInstancesStartInstanceHeaders { - location?: string; -} - -// @public -export interface SAPApplicationServerInstancesStartInstanceOptionalParams extends coreClient.OperationOptions { - body?: StartRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPApplicationServerInstancesStartInstanceResponse = OperationStatusResult; - -// @public -export interface SAPApplicationServerInstancesStopInstanceHeaders { - location?: string; -} - -// @public -export interface SAPApplicationServerInstancesStopInstanceOptionalParams extends coreClient.OperationOptions { - body?: StopRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPApplicationServerInstancesStopInstanceResponse = OperationStatusResult; - -// @public -export interface SAPApplicationServerInstancesUpdateOptionalParams extends coreClient.OperationOptions { - body?: UpdateSAPApplicationInstanceRequest; -} - -// @public -export type SAPApplicationServerInstancesUpdateResponse = SAPApplicationServerInstance; - -// @public -export interface SAPApplicationServerProperties { - readonly dispatcherStatus?: string; - readonly errors?: SAPVirtualInstanceError; - readonly gatewayPort?: number; - readonly health?: SAPHealthState; - readonly hostname?: string; - readonly icmHttpPort?: number; - readonly icmHttpsPort?: number; - readonly instanceNo?: string; - readonly ipAddress?: string; - readonly kernelPatch?: string; - readonly kernelVersion?: string; - readonly loadBalancerDetails?: LoadBalancerDetails; - readonly provisioningState?: SapVirtualInstanceProvisioningState; - readonly status?: SAPVirtualInstanceStatus; - readonly subnet?: string; - readonly vmDetails?: ApplicationServerVmDetails[]; -} - -// @public -export interface SAPAvailabilityZoneDetailsOptionalParams extends coreClient.OperationOptions { - sAPAvailabilityZoneDetails?: SAPAvailabilityZoneDetailsRequest; -} - -// @public -export interface SAPAvailabilityZoneDetailsRequest { - appLocation: string; - databaseType: SAPDatabaseType; - sapProduct: SAPProductType; -} - -// @public -export type SAPAvailabilityZoneDetailsResponse = SAPAvailabilityZoneDetailsResult; - -// @public -export interface SAPAvailabilityZoneDetailsResult { - availabilityZonePairs?: SAPAvailabilityZonePair[]; -} - -// @public -export interface SAPAvailabilityZonePair { - zoneA?: number; - zoneB?: number; -} - -// @public -export interface SAPCentralInstanceList { - nextLink?: string; - value?: SAPCentralServerInstance[]; -} - -// @public -export interface SAPCentralInstances { - beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesCreateOptionalParams): Promise, SAPCentralInstancesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesDeleteOptionalParams): Promise, SAPCentralInstancesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesDeleteOptionalParams): Promise; - beginStartInstance(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesStartInstanceOptionalParams): Promise, SAPCentralInstancesStartInstanceResponse>>; - beginStartInstanceAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesStartInstanceOptionalParams): Promise; - beginStopInstance(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesStopInstanceOptionalParams): Promise, SAPCentralInstancesStopInstanceResponse>>; - beginStopInstanceAndWait(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesStopInstanceOptionalParams): Promise; - get(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesGetOptionalParams): Promise; - list(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPCentralInstancesListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, sapVirtualInstanceName: string, centralInstanceName: string, options?: SAPCentralInstancesUpdateOptionalParams): Promise; -} - -// @public -export interface SAPCentralInstancesCreateOptionalParams extends coreClient.OperationOptions { - body?: SAPCentralServerInstance; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPCentralInstancesCreateResponse = SAPCentralServerInstance; - -// @public -export interface SAPCentralInstancesDeleteHeaders { - location?: string; -} - -// @public -export interface SAPCentralInstancesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPCentralInstancesDeleteResponse = SAPCentralInstancesDeleteHeaders; - -// @public -export interface SAPCentralInstancesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPCentralInstancesGetResponse = SAPCentralServerInstance; - -// @public -export interface SAPCentralInstancesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPCentralInstancesListNextResponse = SAPCentralInstanceList; - -// @public -export interface SAPCentralInstancesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPCentralInstancesListResponse = SAPCentralInstanceList; - -// @public -export interface SAPCentralInstancesStartInstanceHeaders { - location?: string; -} - -// @public -export interface SAPCentralInstancesStartInstanceOptionalParams extends coreClient.OperationOptions { - body?: StartRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPCentralInstancesStartInstanceResponse = OperationStatusResult; - -// @public -export interface SAPCentralInstancesStopInstanceHeaders { - location?: string; -} - -// @public -export interface SAPCentralInstancesStopInstanceOptionalParams extends coreClient.OperationOptions { - body?: StopRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPCentralInstancesStopInstanceResponse = OperationStatusResult; - -// @public -export interface SAPCentralInstancesUpdateOptionalParams extends coreClient.OperationOptions { - body?: UpdateSAPCentralInstanceRequest; -} - -// @public -export type SAPCentralInstancesUpdateResponse = SAPCentralServerInstance; - -// @public -export interface SAPCentralServerInstance extends TrackedResource { - properties?: SAPCentralServerProperties; -} - -// @public -export interface SAPCentralServerProperties { - enqueueReplicationServerProperties?: EnqueueReplicationServerProperties; - enqueueServerProperties?: EnqueueServerProperties; - readonly errors?: SAPVirtualInstanceError; - gatewayServerProperties?: GatewayServerProperties; - readonly health?: SAPHealthState; - readonly instanceNo?: string; - readonly kernelPatch?: string; - readonly kernelVersion?: string; - readonly loadBalancerDetails?: LoadBalancerDetails; - messageServerProperties?: MessageServerProperties; - readonly provisioningState?: SapVirtualInstanceProvisioningState; - readonly status?: SAPVirtualInstanceStatus; - readonly subnet?: string; - readonly vmDetails?: CentralServerVmDetails[]; -} - -// @public -export interface SAPConfiguration { - configurationType: "Discovery" | "Deployment" | "DeploymentWithOSConfig"; -} - -// @public -export type SAPConfigurationType = string; - -// @public (undocumented) -export type SAPConfigurationUnion = SAPConfiguration | DiscoveryConfiguration | DeploymentConfiguration | DeploymentWithOSConfiguration; - -// @public -export interface SAPDatabaseInstance extends TrackedResource { - properties?: SAPDatabaseProperties; -} - -// @public -export interface SAPDatabaseInstanceList { - nextLink?: string; - value?: SAPDatabaseInstance[]; -} - -// @public -export interface SAPDatabaseInstances { - beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesCreateOptionalParams): Promise, SAPDatabaseInstancesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesDeleteOptionalParams): Promise, SAPDatabaseInstancesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesDeleteOptionalParams): Promise; - beginStartInstance(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesStartInstanceOptionalParams): Promise, SAPDatabaseInstancesStartInstanceResponse>>; - beginStartInstanceAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesStartInstanceOptionalParams): Promise; - beginStopInstance(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesStopInstanceOptionalParams): Promise, SAPDatabaseInstancesStopInstanceResponse>>; - beginStopInstanceAndWait(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesStopInstanceOptionalParams): Promise; - get(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesGetOptionalParams): Promise; - list(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPDatabaseInstancesListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, sapVirtualInstanceName: string, databaseInstanceName: string, options?: SAPDatabaseInstancesUpdateOptionalParams): Promise; -} - -// @public -export interface SAPDatabaseInstancesCreateOptionalParams extends coreClient.OperationOptions { - body?: SAPDatabaseInstance; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPDatabaseInstancesCreateResponse = SAPDatabaseInstance; - -// @public -export interface SAPDatabaseInstancesDeleteHeaders { - location?: string; -} - -// @public -export interface SAPDatabaseInstancesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPDatabaseInstancesDeleteResponse = SAPDatabaseInstancesDeleteHeaders; - -// @public -export interface SAPDatabaseInstancesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPDatabaseInstancesGetResponse = SAPDatabaseInstance; - -// @public -export interface SAPDatabaseInstancesListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPDatabaseInstancesListNextResponse = SAPDatabaseInstanceList; - -// @public -export interface SAPDatabaseInstancesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPDatabaseInstancesListResponse = SAPDatabaseInstanceList; - -// @public -export interface SAPDatabaseInstancesStartInstanceHeaders { - location?: string; -} - -// @public -export interface SAPDatabaseInstancesStartInstanceOptionalParams extends coreClient.OperationOptions { - body?: StartRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPDatabaseInstancesStartInstanceResponse = OperationStatusResult; - -// @public -export interface SAPDatabaseInstancesStopInstanceHeaders { - location?: string; -} - -// @public -export interface SAPDatabaseInstancesStopInstanceOptionalParams extends coreClient.OperationOptions { - body?: StopRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPDatabaseInstancesStopInstanceResponse = OperationStatusResult; - -// @public -export interface SAPDatabaseInstancesUpdateOptionalParams extends coreClient.OperationOptions { - body?: UpdateSAPDatabaseInstanceRequest; -} - -// @public -export type SAPDatabaseInstancesUpdateResponse = SAPDatabaseInstance; - -// @public -export interface SAPDatabaseProperties { - readonly databaseSid?: string; - readonly databaseType?: string; - readonly errors?: SAPVirtualInstanceError; - readonly ipAddress?: string; - readonly loadBalancerDetails?: LoadBalancerDetails; - readonly provisioningState?: SapVirtualInstanceProvisioningState; - readonly status?: SAPVirtualInstanceStatus; - readonly subnet?: string; - readonly vmDetails?: DatabaseVmDetails[]; -} - -// @public -export type SAPDatabaseScaleMethod = string; - -// @public -export type SAPDatabaseType = string; - -// @public -export type SAPDeploymentType = string; - -// @public -export interface SAPDiskConfiguration { - recommendedConfiguration?: DiskVolumeConfiguration; - supportedConfigurations?: DiskDetails[]; -} - -// @public -export interface SAPDiskConfigurationsOptionalParams extends coreClient.OperationOptions { - sAPDiskConfigurations?: SAPDiskConfigurationsRequest; -} - -// @public -export interface SAPDiskConfigurationsRequest { - appLocation: string; - databaseType: SAPDatabaseType; - dbVmSku: string; - deploymentType: SAPDeploymentType; - environment: SAPEnvironmentType; - sapProduct: SAPProductType; -} - -// @public -export type SAPDiskConfigurationsResponse = SAPDiskConfigurationsResult; - -// @public -export interface SAPDiskConfigurationsResult { - volumeConfigurations?: { - [propertyName: string]: SAPDiskConfiguration; - }; -} - -// @public -export type SAPEnvironmentType = string; - -// @public -export type SAPHealthState = string; - -// @public -export type SAPHighAvailabilityType = string; - -// @public -export interface SAPInstallWithoutOSConfigSoftwareConfiguration extends SoftwareConfiguration { - bomUrl: string; - highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; - sapBitsStorageAccountId: string; - softwareInstallationType: "SAPInstallWithoutOSConfig"; - softwareVersion: string; -} - -// @public -export type SAPProductType = string; - -// @public -export interface SAPSizingRecommendationRequest { - appLocation: string; - databaseType: SAPDatabaseType; - dbMemory: number; - dbScaleMethod?: SAPDatabaseScaleMethod; - deploymentType: SAPDeploymentType; - environment: SAPEnvironmentType; - highAvailabilityType?: SAPHighAvailabilityType; - sapProduct: SAPProductType; - saps: number; -} - -// @public -export interface SAPSizingRecommendationResult { - deploymentType: "SingleServer" | "ThreeTier"; -} - -// @public (undocumented) -export type SAPSizingRecommendationResultUnion = SAPSizingRecommendationResult | SingleServerRecommendationResult | ThreeTierRecommendationResult; - -// @public -export interface SAPSizingRecommendationsOptionalParams extends coreClient.OperationOptions { - sAPSizingRecommendation?: SAPSizingRecommendationRequest; -} - -// @public -export type SAPSizingRecommendationsResponse = SAPSizingRecommendationResultUnion; - -// @public -export type SAPSoftwareInstallationType = string; - -// @public -export interface SAPSupportedResourceSkusResult { - supportedSkus?: SAPSupportedSku[]; -} - -// @public -export interface SAPSupportedSku { - isAppServerCertified?: boolean; - isDatabaseCertified?: boolean; - vmSku?: string; -} - -// @public -export interface SAPSupportedSkuOptionalParams extends coreClient.OperationOptions { - sAPSupportedSku?: SAPSupportedSkusRequest; -} - -// @public -export type SAPSupportedSkuResponse = SAPSupportedResourceSkusResult; - -// @public -export interface SAPSupportedSkusRequest { - appLocation: string; - databaseType: SAPDatabaseType; - deploymentType: SAPDeploymentType; - environment: SAPEnvironmentType; - highAvailabilityType?: SAPHighAvailabilityType; - sapProduct: SAPProductType; -} - -// @public -export interface SAPVirtualInstance extends TrackedResource { - identity?: UserAssignedServiceIdentity; - properties: SAPVirtualInstanceProperties; -} - -// @public -export interface SAPVirtualInstanceError { - properties?: ErrorDefinition; -} - -// @public -export interface SAPVirtualInstanceList { - nextLink?: string; - value?: SAPVirtualInstance[]; -} - -// @public -export interface SAPVirtualInstanceProperties { - configuration: SAPConfigurationUnion; - environment: SAPEnvironmentType; - readonly errors?: SAPVirtualInstanceError; - readonly health?: SAPHealthState; - managedResourceGroupConfiguration?: ManagedRGConfiguration; - managedResourcesNetworkAccessType?: ManagedResourcesNetworkAccessType; - readonly provisioningState?: SapVirtualInstanceProvisioningState; - sapProduct: SAPProductType; - readonly state?: SAPVirtualInstanceState; - readonly status?: SAPVirtualInstanceStatus; -} - -// @public -export type SapVirtualInstanceProvisioningState = string; - -// @public -export interface SAPVirtualInstances { - beginCreate(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesCreateOptionalParams): Promise, SAPVirtualInstancesCreateResponse>>; - beginCreateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesCreateOptionalParams): Promise; - beginDelete(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesDeleteOptionalParams): Promise, SAPVirtualInstancesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesDeleteOptionalParams): Promise; - beginStart(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStartOptionalParams): Promise, SAPVirtualInstancesStartResponse>>; - beginStartAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStartOptionalParams): Promise; - beginStop(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStopOptionalParams): Promise, SAPVirtualInstancesStopResponse>>; - beginStopAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesStopOptionalParams): Promise; - beginUpdate(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesUpdateOptionalParams): Promise, SAPVirtualInstancesUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesUpdateOptionalParams): Promise; - get(resourceGroupName: string, sapVirtualInstanceName: string, options?: SAPVirtualInstancesGetOptionalParams): Promise; - listByResourceGroup(resourceGroupName: string, options?: SAPVirtualInstancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - listBySubscription(options?: SAPVirtualInstancesListBySubscriptionOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface SAPVirtualInstancesCreateOptionalParams extends coreClient.OperationOptions { - body?: SAPVirtualInstance; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPVirtualInstancesCreateResponse = SAPVirtualInstance; - -// @public -export interface SAPVirtualInstancesDeleteHeaders { - location?: string; -} - -// @public -export interface SAPVirtualInstancesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPVirtualInstancesDeleteResponse = SAPVirtualInstancesDeleteHeaders; - -// @public -export interface SAPVirtualInstancesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPVirtualInstancesGetResponse = SAPVirtualInstance; - -// @public -export interface SAPVirtualInstancesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPVirtualInstancesListByResourceGroupNextResponse = SAPVirtualInstanceList; - -// @public -export interface SAPVirtualInstancesListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPVirtualInstancesListByResourceGroupResponse = SAPVirtualInstanceList; - -// @public -export interface SAPVirtualInstancesListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPVirtualInstancesListBySubscriptionNextResponse = SAPVirtualInstanceList; - -// @public -export interface SAPVirtualInstancesListBySubscriptionOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SAPVirtualInstancesListBySubscriptionResponse = SAPVirtualInstanceList; - -// @public -export interface SAPVirtualInstancesStartHeaders { - location?: string; -} - -// @public -export interface SAPVirtualInstancesStartOptionalParams extends coreClient.OperationOptions { - body?: StartRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPVirtualInstancesStartResponse = OperationStatusResult; - -// @public -export interface SAPVirtualInstancesStopHeaders { - location?: string; -} - -// @public -export interface SAPVirtualInstancesStopOptionalParams extends coreClient.OperationOptions { - body?: StopRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPVirtualInstancesStopResponse = OperationStatusResult; - -// @public -export type SAPVirtualInstanceState = string; - -// @public -export type SAPVirtualInstanceStatus = string; - -// @public -export interface SAPVirtualInstancesUpdateHeaders { - location?: string; -} - -// @public -export interface SAPVirtualInstancesUpdateOptionalParams extends coreClient.OperationOptions { - body?: UpdateSAPVirtualInstanceRequest; - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type SAPVirtualInstancesUpdateResponse = SAPVirtualInstance; - -// @public -export interface ServiceInitiatedSoftwareConfiguration extends SoftwareConfiguration { - bomUrl: string; - highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; - sapBitsStorageAccountId: string; - sapFqdn: string; - softwareInstallationType: "ServiceInitiated"; - softwareVersion: string; - sshPrivateKey: string; -} - -// @public -export interface SharedStorageResourceNames { - sharedStorageAccountName?: string; - sharedStorageAccountPrivateEndPointName?: string; -} - -// @public -export interface SingleServerConfiguration extends InfrastructureConfiguration { - customResourceNames?: SingleServerCustomResourceNamesUnion; - databaseType?: SAPDatabaseType; - dbDiskConfiguration?: DiskConfiguration; - deploymentType: "SingleServer"; - networkConfiguration?: NetworkConfiguration; - subnetId: string; - virtualMachineConfiguration: VirtualMachineConfiguration; -} - -// @public -export interface SingleServerCustomResourceNames { - namingPatternType: "FullResourceName"; -} - -// @public (undocumented) -export type SingleServerCustomResourceNamesUnion = SingleServerCustomResourceNames | SingleServerFullResourceNames; - -// @public -export interface SingleServerFullResourceNames extends SingleServerCustomResourceNames { - namingPatternType: "FullResourceName"; - virtualMachine?: VirtualMachineResourceNames; -} - -// @public -export interface SingleServerRecommendationResult extends SAPSizingRecommendationResult { - deploymentType: "SingleServer"; - vmSku?: string; -} - -// @public -export interface SkipFileShareConfiguration extends FileShareConfiguration { - configurationType: "Skip"; -} - -// @public -export interface SoftwareConfiguration { - softwareInstallationType: "ServiceInitiated" | "SAPInstallWithoutOSConfig" | "External"; -} - -// @public (undocumented) -export type SoftwareConfigurationUnion = SoftwareConfiguration | ServiceInitiatedSoftwareConfiguration | SAPInstallWithoutOSConfigSoftwareConfiguration | ExternalInstallationSoftwareConfiguration; - -// @public -export interface SshConfiguration { - publicKeys?: SshPublicKey[]; -} - -// @public -export interface SshKeyPair { - privateKey?: string; - publicKey?: string; -} - -// @public -export interface SshPublicKey { - keyData?: string; -} - -// @public -export interface StartRequest { - startVm?: boolean; -} - -// @public -export interface StopRequest { - deallocateVm?: boolean; - softStopTimeoutSeconds?: number; -} - -// @public -export interface StorageConfiguration { - transportFileShareConfiguration?: FileShareConfigurationUnion; -} - -// @public -export interface StorageInformation { - readonly id?: string; -} - -// @public -export interface SystemData { - createdAt?: Date; - createdBy?: string; - createdByType?: CreatedByType; - lastModifiedAt?: Date; - lastModifiedBy?: string; - lastModifiedByType?: CreatedByType; -} - -// @public -export interface ThreeTierConfiguration extends InfrastructureConfiguration { - applicationServer: ApplicationServerConfiguration; - centralServer: CentralServerConfiguration; - customResourceNames?: ThreeTierCustomResourceNamesUnion; - databaseServer: DatabaseConfiguration; - deploymentType: "ThreeTier"; - highAvailabilityConfig?: HighAvailabilityConfiguration; - networkConfiguration?: NetworkConfiguration; - storageConfiguration?: StorageConfiguration; -} - -// @public -export interface ThreeTierCustomResourceNames { - namingPatternType: "FullResourceName"; -} - -// @public (undocumented) -export type ThreeTierCustomResourceNamesUnion = ThreeTierCustomResourceNames | ThreeTierFullResourceNames; - -// @public -export interface ThreeTierFullResourceNames extends ThreeTierCustomResourceNames { - applicationServer?: ApplicationServerFullResourceNames; - centralServer?: CentralServerFullResourceNames; - databaseServer?: DatabaseServerFullResourceNames; - namingPatternType: "FullResourceName"; - sharedStorage?: SharedStorageResourceNames; -} - -// @public -export interface ThreeTierRecommendationResult extends SAPSizingRecommendationResult { - applicationServerInstanceCount?: number; - applicationServerVmSku?: string; - centralServerInstanceCount?: number; - centralServerVmSku?: string; - databaseInstanceCount?: number; - dbVmSku?: string; - deploymentType: "ThreeTier"; -} - -// @public -export interface TrackedResource extends Resource { - location: string; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface UpdateSAPApplicationInstanceRequest { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface UpdateSAPCentralInstanceRequest { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface UpdateSAPDatabaseInstanceRequest { - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface UpdateSAPVirtualInstanceProperties { - managedResourcesNetworkAccessType?: ManagedResourcesNetworkAccessType; -} - -// @public -export interface UpdateSAPVirtualInstanceRequest { - identity?: UserAssignedServiceIdentity; - properties?: UpdateSAPVirtualInstanceProperties; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface UserAssignedIdentity { - readonly clientId?: string; - readonly principalId?: string; -} - -// @public -export interface UserAssignedServiceIdentity { - type: ManagedServiceIdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentity | null; - }; -} - -// @public -export interface VirtualMachineConfiguration { - imageReference: ImageReference; - osProfile: OSProfile; - vmSize: string; -} - -// @public -export interface VirtualMachineResourceNames { - dataDiskNames?: { - [propertyName: string]: string[]; - }; - hostName?: string; - networkInterfaces?: NetworkInterfaceResourceNames[]; - osDiskName?: string; - vmName?: string; -} - -// @public -export interface WindowsConfiguration extends OSConfiguration { - osType: "Windows"; -} - -// @public (undocumented) -export class WorkloadsClient extends coreClient.ServiceClient { - // (undocumented) - $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: WorkloadsClientOptionalParams); - // (undocumented) - apiVersion: string; - // (undocumented) - operations: Operations; - // (undocumented) - sAPApplicationServerInstances: SAPApplicationServerInstances; - sAPAvailabilityZoneDetails(location: string, options?: SAPAvailabilityZoneDetailsOptionalParams): Promise; - // (undocumented) - sAPCentralInstances: SAPCentralInstances; - // (undocumented) - sAPDatabaseInstances: SAPDatabaseInstances; - sAPDiskConfigurations(location: string, options?: SAPDiskConfigurationsOptionalParams): Promise; - sAPSizingRecommendations(location: string, options?: SAPSizingRecommendationsOptionalParams): Promise; - sAPSupportedSku(location: string, options?: SAPSupportedSkuOptionalParams): Promise; - // (undocumented) - sAPVirtualInstances: SAPVirtualInstances; - // (undocumented) - subscriptionId: string; -} - -// @public -export interface WorkloadsClientOptionalParams extends coreClient.ServiceClientOptions { - $host?: string; - apiVersion?: string; - endpoint?: string; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/sample.env b/sdk/workloads/arm-workloadssapvirtualinstance/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/operationsListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/operationsListSample.ts deleted file mode 100644 index f21d47cf8917..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the available API operations under this PR - * - * @summary Lists all the available API operations under this PR - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/operations/preview/2023-10-01-preview/examples/Operations_List.json - */ -async function operations(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await operations(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesCreateSample.ts deleted file mode 100644 index 0e9de4266e0d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesCreateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - SAPApplicationServerInstance, - SAPApplicationServerInstancesCreateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create_HA_AvSet.json - */ -async function createSapApplicationServerInstancesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: SAPApplicationServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPApplicationServerInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create.json - */ -async function sapApplicationServerInstancesCreate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: SAPApplicationServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPApplicationServerInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await createSapApplicationServerInstancesForHaSystemWithAvailabilitySet(); - await sapApplicationServerInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesDeleteSample.ts deleted file mode 100644 index 80a47e9b7007..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesDeleteSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. - * - * @summary Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Delete.json - */ -async function sapApplicationServerInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapApplicationServerInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesGetSample.ts deleted file mode 100644 index b0949106d16e..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. - * - * @summary Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Get.json - */ -async function sapApplicationServerInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.get( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapApplicationServerInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesListSample.ts deleted file mode 100644 index c83089513c8f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesListSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. - * - * @summary Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_List.json - */ -async function sapApplicationServerInstancesList(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.sAPApplicationServerInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await sapApplicationServerInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStartInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStartInstanceSample.ts deleted file mode 100644 index 3207850ff1c3..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStartInstanceSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StartRequest, - SAPApplicationServerInstancesStartInstanceOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the SAP Application Server Instance. - * - * @summary Starts the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance_WithInfraOperations.json - */ -async function startVirtualMachineAndTheSapApplicationServerInstanceOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: StartRequest = { startVm: true }; - const options: SAPApplicationServerInstancesStartInstanceOptionalParams = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP Application Server Instance. - * - * @summary Starts the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance.json - */ -async function startTheSapApplicationServerInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await startVirtualMachineAndTheSapApplicationServerInstanceOnIt(); - await startTheSapApplicationServerInstance(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStopInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStopInstanceSample.ts deleted file mode 100644 index 33997df0b69a..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesStopInstanceSample.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StopRequest, - SAPApplicationServerInstancesStopInstanceOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the SAP Application Server Instance. - * - * @summary Stops the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance.json - */ -async function stopTheSapApplicationServerInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: StopRequest = { softStopTimeoutSeconds: 0 }; - const options: SAPApplicationServerInstancesStopInstanceOptionalParams = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Application Server Instance. - * - * @summary Stops the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheSapApplicationServerInstanceAndTheVirtualMachine(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: StopRequest = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options: SAPApplicationServerInstancesStopInstanceOptionalParams = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await stopTheSapApplicationServerInstance(); - await stopTheSapApplicationServerInstanceAndTheVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesUpdateSample.ts deleted file mode 100644 index 018edaae9097..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapApplicationServerInstancesUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - UpdateSAPApplicationInstanceRequest, - SAPApplicationServerInstancesUpdateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the SAP Application server instance resource. This can be used to update tags on the resource. - * - * @summary Updates the SAP Application server instance resource. This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Update.json - */ -async function sapApplicationServerInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: UpdateSAPApplicationInstanceRequest = { - tags: { tag1: "value1" }, - }; - const options: SAPApplicationServerInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.update( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await sapApplicationServerInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapAvailabilityZoneDetailsSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapAvailabilityZoneDetailsSample.ts deleted file mode 100644 index ccf864048a75..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapAvailabilityZoneDetailsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the recommended SAP Availability Zone Pair Details for your region. - * - * @summary Get the recommended SAP Availability Zone Pair Details for your region. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json - */ -async function sapAvailabilityZoneDetailsEastus(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPAvailabilityZoneDetails(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get the recommended SAP Availability Zone Pair Details for your region. - * - * @summary Get the recommended SAP Availability Zone Pair Details for your region. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json - */ -async function sapAvailabilityZoneDetailsNortheurope(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPAvailabilityZoneDetails(location); - console.log(result); -} - -async function main(): Promise { - await sapAvailabilityZoneDetailsEastus(); - await sapAvailabilityZoneDetailsNortheurope(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesCreateSample.ts deleted file mode 100644 index 9c834b491b1a..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesCreateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - SAPCentralServerInstance, - SAPCentralInstancesCreateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * - * @summary Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create_HA_AvSet.json - */ -async function createSapCentralInstancesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: SAPCentralServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPCentralInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * - * @summary Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create.json - */ -async function sapCentralInstancesCreate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: SAPCentralServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPCentralInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await createSapCentralInstancesForHaSystemWithAvailabilitySet(); - await sapCentralInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesDeleteSample.ts deleted file mode 100644 index 9737b11d2c31..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesDeleteSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. - * - * @summary Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Delete.json - */ -async function sapCentralInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapCentralInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesGetSample.ts deleted file mode 100644 index 474360e4dc31..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SAP Central Services Instance resource. - * - * @summary Gets the SAP Central Services Instance resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Get.json - */ -async function sapCentralInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.get( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapCentralInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesListSample.ts deleted file mode 100644 index 3eff6bb32272..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesListSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. - * - * @summary Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_List.json - */ -async function sapCentralInstancesList(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.sAPCentralInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await sapCentralInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStartInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStartInstanceSample.ts deleted file mode 100644 index c10465e88f4f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStartInstanceSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StartRequest, - SAPCentralInstancesStartInstanceOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the SAP Central Services Instance. - * - * @summary Starts the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance.json - */ -async function startTheSapCentralServicesInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP Central Services Instance. - * - * @summary Starts the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance_WithInfraOperations.json - */ -async function startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: StartRequest = { startVm: true }; - const options: SAPCentralInstancesStartInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await startTheSapCentralServicesInstance(); - await startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStopInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStopInstanceSample.ts deleted file mode 100644 index 2e636c963a70..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesStopInstanceSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StopRequest, - SAPCentralInstancesStopInstanceOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the SAP Central Services Instance. - * - * @summary Stops the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: StopRequest = { deallocateVm: true }; - const options: SAPCentralInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Central Services Instance. - * - * @summary Stops the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance.json - */ -async function stopTheSapCentralServicesInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: StopRequest = { softStopTimeoutSeconds: 1200 }; - const options: SAPCentralInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS(); - await stopTheSapCentralServicesInstance(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesUpdateSample.ts deleted file mode 100644 index b98f883c9aed..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapCentralInstancesUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - UpdateSAPCentralInstanceRequest, - SAPCentralInstancesUpdateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. - * - * @summary Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Update.json - */ -async function sapCentralInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: UpdateSAPCentralInstanceRequest = { tags: { tag1: "value1" } }; - const options: SAPCentralInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.update( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await sapCentralInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesCreateSample.ts deleted file mode 100644 index b909b156fbf5..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesCreateSample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - SAPDatabaseInstance, - SAPDatabaseInstancesCreateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create_HA_AvSet.json - */ -async function createSapDatabaseInstancesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body: SAPDatabaseInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPDatabaseInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create.json - */ -async function sapDatabaseInstancesCreate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body: SAPDatabaseInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPDatabaseInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await createSapDatabaseInstancesForHaSystemWithAvailabilitySet(); - await sapDatabaseInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesDeleteSample.ts deleted file mode 100644 index 83e4af91a292..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesDeleteSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. - * - * @summary Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Delete.json - */ -async function sapDatabaseInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapDatabaseInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesGetSample.ts deleted file mode 100644 index 086545ce9972..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SAP Database Instance resource. - * - * @summary Gets the SAP Database Instance resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Get.json - */ -async function sapDatabaseInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.get( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapDatabaseInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesListSample.ts deleted file mode 100644 index ea5e1f38a6c3..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesListSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * - * @summary Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_List.json - */ -async function sapDatabaseInstancesList(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.sAPDatabaseInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await sapDatabaseInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStartInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStartInstanceSample.ts deleted file mode 100644 index 9f3a5eee7e03..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStartInstanceSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StartRequest, - SAPDatabaseInstancesStartInstanceOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the database instance of the SAP system. - * - * @summary Starts the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance_WithInfraOperations.json - */ -async function startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body: StartRequest = { startVm: true }; - const options: SAPDatabaseInstancesStartInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the database instance of the SAP system. - * - * @summary Starts the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance.json - */ -async function startTheDatabaseInstanceOfTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt(); - await startTheDatabaseInstanceOfTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStopInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStopInstanceSample.ts deleted file mode 100644 index 0afe778c237f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesStopInstanceSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StopRequest, - SAPDatabaseInstancesStopInstanceOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the database instance of the SAP system. - * - * @summary Stops the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body: StopRequest = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options: SAPDatabaseInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the database instance of the SAP system. - * - * @summary Stops the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance.json - */ -async function stopTheDatabaseInstanceOfTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body: StopRequest = { softStopTimeoutSeconds: 0 }; - const options: SAPDatabaseInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS(); - await stopTheDatabaseInstanceOfTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesUpdateSample.ts deleted file mode 100644 index b2490222d58c..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDatabaseInstancesUpdateSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - UpdateSAPDatabaseInstanceRequest, - SAPDatabaseInstancesUpdateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the Database instance resource. This can be used to update tags on the resource. - * - * @summary Updates the Database instance resource. This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Update.json - */ -async function sapDatabaseInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body: UpdateSAPDatabaseInstanceRequest = { tags: { key1: "value1" } }; - const options: SAPDatabaseInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.update( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await sapDatabaseInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDiskConfigurationsSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDiskConfigurationsSample.ts deleted file mode 100644 index 70fbda7eef71..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapDiskConfigurationsSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * - * @summary Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json - */ -async function sapDiskConfigurationsNonProd(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDiskConfigurations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * - * @summary Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json - */ -async function sapDiskConfigurationsProd(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDiskConfigurations(location); - console.log(result); -} - -async function main(): Promise { - await sapDiskConfigurationsNonProd(); - await sapDiskConfigurationsProd(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSizingRecommendationsSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSizingRecommendationsSample.ts deleted file mode 100644 index 02154f1e69fa..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSizingRecommendationsSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json - */ -async function sapSizingRecommendationsS4HanaDistributed(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json - */ -async function sapSizingRecommendationsS4HanaDistributedHaAvSet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json - */ -async function sapSizingRecommendationsS4HanaDistributedHaAvZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json - */ -async function sapSizingRecommendationsS4HanaSingleServer(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -async function main(): Promise { - await sapSizingRecommendationsS4HanaDistributed(); - await sapSizingRecommendationsS4HanaDistributedHaAvSet(); - await sapSizingRecommendationsS4HanaDistributedHaAvZone(); - await sapSizingRecommendationsS4HanaSingleServer(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSupportedSkuSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSupportedSkuSample.ts deleted file mode 100644 index a569e274ba35..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapSupportedSkuSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json - */ -async function sapSupportedSkusDistributed(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json - */ -async function sapSupportedSkusDistributedHaAvSet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json - */ -async function sapSupportedSkusDistributedHaAvZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json - */ -async function sapSupportedSkusSingleServer(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -async function main(): Promise { - await sapSupportedSkusDistributed(); - await sapSupportedSkusDistributedHaAvSet(); - await sapSupportedSkusDistributedHaAvZone(); - await sapSupportedSkusSingleServer(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesCreateSample.ts deleted file mode 100644 index 61aaf3776f7c..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesCreateSample.ts +++ /dev/null @@ -1,3163 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - SAPVirtualInstance, - SAPVirtualInstancesCreateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Custom_Image.json - */ -async function createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - availabilitySetName: "appAvSet", - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - virtualMachines: [ - { - dataDiskNames: { default: ["ascsdisk0"] }, - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - ], - }, - databaseServer: { - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadata0", "hanadata1"], - hanaLog: ["hanalog0", "hanalog1", "hanalog2"], - hanaShared: ["hanashared0", "hanashared1"], - usrSap: ["usrsap0"], - }, - hostName: "dbhostName", - networkInterfaces: [{ networkInterfaceName: "dbnic" }], - osDiskName: "dbosdisk", - vmName: "dbvm", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - availabilitySetName: "appAvSet", - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - availabilitySetName: "csAvSet", - loadBalancer: { - backendPoolNames: ["ascsBackendPool"], - frontendIpConfigurationNames: ["ascsip0", "ersip0"], - healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"], - loadBalancerName: "ascslb", - }, - virtualMachines: [ - { - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - { - hostName: "ershostName", - networkInterfaces: [{ networkInterfaceName: "ersnic" }], - osDiskName: "ersosdisk", - vmName: "ersvm", - }, - ], - }, - databaseServer: { - availabilitySetName: "dbAvSet", - loadBalancer: { - backendPoolNames: ["dbBackendPool"], - frontendIpConfigurationNames: ["dbip"], - healthProbeNames: ["dbHealthProbe"], - loadBalancerName: "dblb", - }, - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadatapr0", "hanadatapr1"], - hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"], - hanaShared: ["hanasharedpr0", "hanasharedpr1"], - usrSap: ["usrsappr0"], - }, - hostName: "dbprhostName", - networkInterfaces: [{ networkInterfaceName: "dbprnic" }], - osDiskName: "dbprosdisk", - vmName: "dbvmpr", - }, - { - dataDiskNames: { - hanaData: ["hanadatasr0", "hanadatasr1"], - hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"], - hanaShared: ["hanasharedsr0", "hanasharedsr1"], - usrSap: ["usrsapsr0"], - }, - hostName: "dbsrhostName", - networkInterfaces: [{ networkInterfaceName: "dbsrnic" }], - osDiskName: "dbsrosdisk", - vmName: "dbvmsr", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - loadBalancer: { - backendPoolNames: ["ascsBackendPool"], - frontendIpConfigurationNames: ["ascsip0", "ersip0"], - healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"], - loadBalancerName: "ascslb", - }, - virtualMachines: [ - { - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - { - hostName: "ershostName", - networkInterfaces: [{ networkInterfaceName: "ersnic" }], - osDiskName: "ersosdisk", - vmName: "ersvm", - }, - ], - }, - databaseServer: { - loadBalancer: { - backendPoolNames: ["dbBackendPool"], - frontendIpConfigurationNames: ["dbip"], - healthProbeNames: ["dbHealthProbe"], - loadBalancerName: "dblb", - }, - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadatapr0", "hanadatapr1"], - hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"], - hanaShared: ["hanasharedpr0", "hanasharedpr1"], - usrSap: ["usrsappr0"], - }, - hostName: "dbprhostName", - networkInterfaces: [{ networkInterfaceName: "dbprnic" }], - osDiskName: "dbprosdisk", - vmName: "dbvmpr", - }, - { - dataDiskNames: { - hanaData: ["hanadatasr0", "hanadatasr1"], - hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"], - hanaShared: ["hanasharedsr0", "hanasharedsr1"], - usrSap: ["usrsapsr0"], - }, - hostName: "dbsrhostName", - networkInterfaces: [{ networkInterfaceName: "dbsrnic" }], - osDiskName: "dbsrosdisk", - vmName: "dbvmsr", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_WithTrustedAccess.json - */ -async function createInfrastructureWithOSConfigurationWithTrustedAccessEnabled(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourcesNetworkAccessType: "Private", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json - */ -async function createInfrastructureOnlyForDistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json - */ -async function createInfrastructureOnlyForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 5, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json - */ -async function createInfrastructureOnlyForHaSystemWithAvailabilityZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json - */ -async function createInfrastructureOnlyForSingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.json - */ -async function createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - dbDiskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json - */ -async function createInfrastructureWithOSConfigurationForDistributedSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json - */ -async function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json - */ -async function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json - */ -async function createInfrastructureWithOSConfigurationForSingleServerSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_CreateTransport.json - */ -async function createInfrastructureWithANewSapTransportDirectoryFileshare(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { - configurationType: "CreateAndMount", - resourceGroup: "rgName", - storageAccountName: "storageName", - }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_MountTransport.json - */ -async function createInfrastructureWithAnExistingSapTransportDirectoryFileshare(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { - configurationType: "Mount", - id: "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", - privateEndpointId: - "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", - }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_SkipTransport.json - */ -async function createInfrastructureWithoutASapTransportDirectoryFileshare(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { configurationType: "Skip" }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.json - */ -async function detectSapSoftwareInstallationOnADistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "{{resourcegrp}}", - applicationServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - databaseServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - networkConfiguration: { isSecondaryIpEnabled: true }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: { createdBy: "azureuser" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.json - */ -async function detectSapSoftwareInstallationOnASingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.json - */ -async function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.json - */ -async function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.json - */ -async function installSapSoftwareOnDistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "{{resourcegrp}}", - applicationServer: { - instanceCount: 2, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - databaseServer: { - instanceCount: 1, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - networkConfiguration: { isSecondaryIpEnabled: true }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - bomUrl: - "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", - sapBitsStorageAccountId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", - softwareInstallationType: "SAPInstallWithoutOSConfig", - softwareVersion: "SAP S/4HANA 1909 SPS 03", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: { createdBy: "azureuser" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.json - */ -async function installSapSoftwareOnSingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "test-rg", - deploymentType: "SingleServer", - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "SLES-SAP", - publisher: "SUSE", - sku: "12-sp4-gen2", - version: "2022.02.01", - }, - osProfile: { - adminUsername: "azureappadmin", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - bomUrl: - "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", - sapBitsStorageAccountId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", - softwareInstallationType: "SAPInstallWithoutOSConfig", - softwareVersion: "SAP S/4HANA 1909 SPS 03", - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.json - */ -async function registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - managedRgStorageAccountName: "q20saacssgrs", - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.json - */ -async function registerExistingSapSystemAsVirtualInstanceForSapSolutions(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_TrustedAccessEnable.json - */ -async function registerWithTrustedAccessEnabled(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - }, - environment: "NonProd", - managedResourcesNetworkAccessType: "Private", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage(); - await createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem(); - await createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet(); - await createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone(); - await createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem(); - await createInfrastructureWithOSConfigurationWithTrustedAccessEnabled(); - await createInfrastructureOnlyForDistributedSystem(); - await createInfrastructureOnlyForHaSystemWithAvailabilitySet(); - await createInfrastructureOnlyForHaSystemWithAvailabilityZone(); - await createInfrastructureOnlyForSingleServerSystem(); - await createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended(); - await createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended(); - await createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended(); - await createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended(); - await createInfrastructureWithOSConfigurationForDistributedSystemRecommended(); - await createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended(); - await createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended(); - await createInfrastructureWithOSConfigurationForSingleServerSystemRecommended(); - await createInfrastructureWithANewSapTransportDirectoryFileshare(); - await createInfrastructureWithAnExistingSapTransportDirectoryFileshare(); - await createInfrastructureWithoutASapTransportDirectoryFileshare(); - await detectSapSoftwareInstallationOnADistributedSystem(); - await detectSapSoftwareInstallationOnASingleServerSystem(); - await detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet(); - await detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone(); - await installSapSoftwareOnDistributedSystem(); - await installSapSoftwareOnSingleServerSystem(); - await registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations(); - await registerExistingSapSystemAsVirtualInstanceForSapSolutions(); - await registerWithTrustedAccessEnabled(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesDeleteSample.ts deleted file mode 100644 index a415dc56ce02..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesDeleteSample.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. - * - * @summary Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json - */ -async function sapVirtualInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - await sapVirtualInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesGetSample.ts deleted file mode 100644 index e5b76c593e45..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesGetSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a Virtual Instance for SAP solutions resource - * - * @summary Gets a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get_ACSSInstallationBlocked.json - */ -async function sapVirtualInstancesGetWithAcssInstallationBlocked(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.get(resourceGroupName, sapVirtualInstanceName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a Virtual Instance for SAP solutions resource - * - * @summary Gets a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json - */ -async function sapVirtualInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.get(resourceGroupName, sapVirtualInstanceName); - console.log(result); -} - -async function main(): Promise { - await sapVirtualInstancesGetWithAcssInstallationBlocked(); - await sapVirtualInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListByResourceGroupSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListByResourceGroupSample.ts deleted file mode 100644 index d0fc499a11e7..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListByResourceGroupSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * - * @summary Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json - */ -async function sapVirtualInstancesListByResourceGroup(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.sAPVirtualInstances.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await sapVirtualInstancesListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListBySubscriptionSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListBySubscriptionSample.ts deleted file mode 100644 index 0a6ff61d9d52..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesListBySubscriptionSample.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Virtual Instances for SAP solutions resources in a Subscription. - * - * @summary Gets all Virtual Instances for SAP solutions resources in a Subscription. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json - */ -async function sapVirtualInstancesListBySubscription(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (const item of client.sAPVirtualInstances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - await sapVirtualInstancesListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStartSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStartSample.ts deleted file mode 100644 index 79a701d9b5e0..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStartSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StartRequest, - SAPVirtualInstancesStartOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the SAP application, that is the Central Services instance and Application server instances. - * - * @summary Starts the SAP application, that is the Central Services instance and Application server instances. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json - */ -async function startTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStartAndWait( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP application, that is the Central Services instance and Application server instances. - * - * @summary Starts the SAP application, that is the Central Services instance and Application server instances. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start_WithInfraOperations.json - */ -async function startTheVirtualMachinesAndTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: StartRequest = { startVm: true }; - const options: SAPVirtualInstancesStartOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStartAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await startTheSapSystem(); - await startTheVirtualMachinesAndTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStopSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStopSample.ts deleted file mode 100644 index a062cd00ef03..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesStopSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - StopRequest, - SAPVirtualInstancesStopOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the SAP Application, that is the Application server instances and Central Services instance. - * - * @summary Stops the SAP Application, that is the Application server instances and Central Services instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json - */ -async function sapVirtualInstancesStop(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: StopRequest = { softStopTimeoutSeconds: 0 }; - const options: SAPVirtualInstancesStopOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStopAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Application, that is the Application server instances and Central Services instance. - * - * @summary Stops the SAP Application, that is the Application server instances and Central Services instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop_WithInfraOperations.json - */ -async function stopTheVirtualMachineSAndTheSapSystemOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: StopRequest = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options: SAPVirtualInstancesStopOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStopAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await sapVirtualInstancesStop(); - await stopTheVirtualMachineSAndTheSapSystemOnIt(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesUpdateSample.ts deleted file mode 100644 index 4920e324db23..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples-dev/sapVirtualInstancesUpdateSample.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import type { - UpdateSAPVirtualInstanceRequest, - SAPVirtualInstancesUpdateOptionalParams, -} from "@azure/arm-workloadssapvirtualinstance"; -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a Virtual Instance for SAP solutions resource - * - * @summary Updates a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_TrustedAccessEnable_Update.json - */ -async function sapVirtualInstancesTrustedAccessEnableUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: UpdateSAPVirtualInstanceRequest = { - identity: { type: "None" }, - properties: { managedResourcesNetworkAccessType: "Private" }, - tags: { key1: "svi1" }, - }; - const options: SAPVirtualInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginUpdateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates a Virtual Instance for SAP solutions resource - * - * @summary Updates a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json - */ -async function sapVirtualInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: UpdateSAPVirtualInstanceRequest = { - identity: { type: "None" }, - tags: { key1: "svi1" }, - }; - const options: SAPVirtualInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginUpdateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - await sapVirtualInstancesTrustedAccessEnableUpdate(); - await sapVirtualInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/README.md b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/README.md deleted file mode 100644 index 441b72683c4f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,116 +0,0 @@ -# client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [operationsListSample.js][operationslistsample] | Lists all the available API operations under this PR x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/operations/preview/2023-10-01-preview/examples/Operations_List.json | -| [sapApplicationServerInstancesCreateSample.js][sapapplicationserverinstancescreatesample] | Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create_HA_AvSet.json | -| [sapApplicationServerInstancesDeleteSample.js][sapapplicationserverinstancesdeletesample] | Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Delete.json | -| [sapApplicationServerInstancesGetSample.js][sapapplicationserverinstancesgetsample] | Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Get.json | -| [sapApplicationServerInstancesListSample.js][sapapplicationserverinstanceslistsample] | Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_List.json | -| [sapApplicationServerInstancesStartInstanceSample.js][sapapplicationserverinstancesstartinstancesample] | Starts the SAP Application Server Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance_WithInfraOperations.json | -| [sapApplicationServerInstancesStopInstanceSample.js][sapapplicationserverinstancesstopinstancesample] | Stops the SAP Application Server Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance.json | -| [sapApplicationServerInstancesUpdateSample.js][sapapplicationserverinstancesupdatesample] | Updates the SAP Application server instance resource. This can be used to update tags on the resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Update.json | -| [sapAvailabilityZoneDetailsSample.js][sapavailabilityzonedetailssample] | Get the recommended SAP Availability Zone Pair Details for your region. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json | -| [sapCentralInstancesCreateSample.js][sapcentralinstancescreatesample] | Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create_HA_AvSet.json | -| [sapCentralInstancesDeleteSample.js][sapcentralinstancesdeletesample] | Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Delete.json | -| [sapCentralInstancesGetSample.js][sapcentralinstancesgetsample] | Gets the SAP Central Services Instance resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Get.json | -| [sapCentralInstancesListSample.js][sapcentralinstanceslistsample] | Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_List.json | -| [sapCentralInstancesStartInstanceSample.js][sapcentralinstancesstartinstancesample] | Starts the SAP Central Services Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance.json | -| [sapCentralInstancesStopInstanceSample.js][sapcentralinstancesstopinstancesample] | Stops the SAP Central Services Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance_WithInfraOperations.json | -| [sapCentralInstancesUpdateSample.js][sapcentralinstancesupdatesample] | Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Update.json | -| [sapDatabaseInstancesCreateSample.js][sapdatabaseinstancescreatesample] | Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create_HA_AvSet.json | -| [sapDatabaseInstancesDeleteSample.js][sapdatabaseinstancesdeletesample] | Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Delete.json | -| [sapDatabaseInstancesGetSample.js][sapdatabaseinstancesgetsample] | Gets the SAP Database Instance resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Get.json | -| [sapDatabaseInstancesListSample.js][sapdatabaseinstanceslistsample] | Lists the Database resources associated with a Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_List.json | -| [sapDatabaseInstancesStartInstanceSample.js][sapdatabaseinstancesstartinstancesample] | Starts the database instance of the SAP system. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance_WithInfraOperations.json | -| [sapDatabaseInstancesStopInstanceSample.js][sapdatabaseinstancesstopinstancesample] | Stops the database instance of the SAP system. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance_WithInfraOperations.json | -| [sapDatabaseInstancesUpdateSample.js][sapdatabaseinstancesupdatesample] | Updates the Database instance resource. This can be used to update tags on the resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Update.json | -| [sapDiskConfigurationsSample.js][sapdiskconfigurationssample] | Get the SAP Disk Configuration Layout prod/non-prod SAP System. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json | -| [sapSizingRecommendationsSample.js][sapsizingrecommendationssample] | Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json | -| [sapSupportedSkuSample.js][sapsupportedskusample] | Get a list of SAP supported SKUs for ASCS, Application and Database tier. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json | -| [sapVirtualInstancesCreateSample.js][sapvirtualinstancescreatesample] | Creates a Virtual Instance for SAP solutions (VIS) resource x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Custom_Image.json | -| [sapVirtualInstancesDeleteSample.js][sapvirtualinstancesdeletesample] | Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json | -| [sapVirtualInstancesGetSample.js][sapvirtualinstancesgetsample] | Gets a Virtual Instance for SAP solutions resource x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get_ACSSInstallationBlocked.json | -| [sapVirtualInstancesListByResourceGroupSample.js][sapvirtualinstanceslistbyresourcegroupsample] | Gets all Virtual Instances for SAP solutions resources in a Resource Group. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json | -| [sapVirtualInstancesListBySubscriptionSample.js][sapvirtualinstanceslistbysubscriptionsample] | Gets all Virtual Instances for SAP solutions resources in a Subscription. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json | -| [sapVirtualInstancesStartSample.js][sapvirtualinstancesstartsample] | Starts the SAP application, that is the Central Services instance and Application server instances. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json | -| [sapVirtualInstancesStopSample.js][sapvirtualinstancesstopsample] | Stops the SAP Application, that is the Application server instances and Central Services instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json | -| [sapVirtualInstancesUpdateSample.js][sapvirtualinstancesupdatesample] | Updates a Virtual Instance for SAP solutions resource x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_TrustedAccessEnable_Update.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node operationsListSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env WORKLOADS_SUBSCRIPTION_ID="" node operationsListSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/operationsListSample.js -[sapapplicationserverinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesCreateSample.js -[sapapplicationserverinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesDeleteSample.js -[sapapplicationserverinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesGetSample.js -[sapapplicationserverinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesListSample.js -[sapapplicationserverinstancesstartinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStartInstanceSample.js -[sapapplicationserverinstancesstopinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStopInstanceSample.js -[sapapplicationserverinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesUpdateSample.js -[sapavailabilityzonedetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapAvailabilityZoneDetailsSample.js -[sapcentralinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesCreateSample.js -[sapcentralinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesDeleteSample.js -[sapcentralinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesGetSample.js -[sapcentralinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesListSample.js -[sapcentralinstancesstartinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStartInstanceSample.js -[sapcentralinstancesstopinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStopInstanceSample.js -[sapcentralinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesUpdateSample.js -[sapdatabaseinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesCreateSample.js -[sapdatabaseinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesDeleteSample.js -[sapdatabaseinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesGetSample.js -[sapdatabaseinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesListSample.js -[sapdatabaseinstancesstartinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStartInstanceSample.js -[sapdatabaseinstancesstopinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStopInstanceSample.js -[sapdatabaseinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesUpdateSample.js -[sapdiskconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDiskConfigurationsSample.js -[sapsizingrecommendationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSizingRecommendationsSample.js -[sapsupportedskusample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSupportedSkuSample.js -[sapvirtualinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesCreateSample.js -[sapvirtualinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesDeleteSample.js -[sapvirtualinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesGetSample.js -[sapvirtualinstanceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListByResourceGroupSample.js -[sapvirtualinstanceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListBySubscriptionSample.js -[sapvirtualinstancesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStartSample.js -[sapvirtualinstancesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStopSample.js -[sapvirtualinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesUpdateSample.js -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-workloadssapvirtualinstance?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloadssapvirtualinstance/README.md diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/operationsListSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/operationsListSample.js deleted file mode 100644 index fbf42ae4e485..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all the available API operations under this PR - * - * @summary Lists all the available API operations under this PR - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/operations/preview/2023-10-01-preview/examples/Operations_List.json - */ -async function operations() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - operations(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/package.json b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/package.json deleted file mode 100644 index fe69a5edd3f8..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-workloadssapvirtualinstance-js-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/workloads/arm-workloadssapvirtualinstance" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloadssapvirtualinstance", - "dependencies": { - "@azure/arm-workloadssapvirtualinstance": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - } -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sample.env b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesCreateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesCreateSample.js deleted file mode 100644 index f30c9e05f663..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesCreateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create_HA_AvSet.json - */ -async function createSapApplicationServerInstancesForHaSystemWithAvailabilitySet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create.json - */ -async function sapApplicationServerInstancesCreate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main() { - createSapApplicationServerInstancesForHaSystemWithAvailabilitySet(); - sapApplicationServerInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesDeleteSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesDeleteSample.js deleted file mode 100644 index b3719bf6129d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. - * - * @summary Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Delete.json - */ -async function sapApplicationServerInstancesDelete() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main() { - sapApplicationServerInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesGetSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesGetSample.js deleted file mode 100644 index 8da01962d1bc..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. - * - * @summary Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Get.json - */ -async function sapApplicationServerInstancesGet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.get( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main() { - sapApplicationServerInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesListSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesListSample.js deleted file mode 100644 index 9950c98444cb..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. - * - * @summary Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_List.json - */ -async function sapApplicationServerInstancesList() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPApplicationServerInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - sapApplicationServerInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStartInstanceSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStartInstanceSample.js deleted file mode 100644 index 524ed057d24b..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStartInstanceSample.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Starts the SAP Application Server Instance. - * - * @summary Starts the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance_WithInfraOperations.json - */ -async function startVirtualMachineAndTheSapApplicationServerInstanceOnIt() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body = { startVm: true }; - const options = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP Application Server Instance. - * - * @summary Starts the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance.json - */ -async function startTheSapApplicationServerInstance() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main() { - startVirtualMachineAndTheSapApplicationServerInstanceOnIt(); - startTheSapApplicationServerInstance(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStopInstanceSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStopInstanceSample.js deleted file mode 100644 index f077ed86c7f1..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesStopInstanceSample.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Stops the SAP Application Server Instance. - * - * @summary Stops the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance.json - */ -async function stopTheSapApplicationServerInstance() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body = { softStopTimeoutSeconds: 0 }; - const options = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Application Server Instance. - * - * @summary Stops the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheSapApplicationServerInstanceAndTheVirtualMachine() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main() { - stopTheSapApplicationServerInstance(); - stopTheSapApplicationServerInstanceAndTheVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesUpdateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesUpdateSample.js deleted file mode 100644 index 4d1b36a58665..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapApplicationServerInstancesUpdateSample.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the SAP Application server instance resource. This can be used to update tags on the resource. - * - * @summary Updates the SAP Application server instance resource. This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Update.json - */ -async function sapApplicationServerInstancesUpdate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body = { - tags: { tag1: "value1" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.update( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main() { - sapApplicationServerInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapAvailabilityZoneDetailsSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapAvailabilityZoneDetailsSample.js deleted file mode 100644 index 9b601e86ab6d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapAvailabilityZoneDetailsSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the recommended SAP Availability Zone Pair Details for your region. - * - * @summary Get the recommended SAP Availability Zone Pair Details for your region. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json - */ -async function sapAvailabilityZoneDetailsEastus() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPAvailabilityZoneDetails(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get the recommended SAP Availability Zone Pair Details for your region. - * - * @summary Get the recommended SAP Availability Zone Pair Details for your region. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json - */ -async function sapAvailabilityZoneDetailsNortheurope() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPAvailabilityZoneDetails(location); - console.log(result); -} - -async function main() { - sapAvailabilityZoneDetailsEastus(); - sapAvailabilityZoneDetailsNortheurope(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesCreateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesCreateSample.js deleted file mode 100644 index 49f26fb78b75..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesCreateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * - * @summary Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create_HA_AvSet.json - */ -async function createSapCentralInstancesForHaSystemWithAvailabilitySet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * - * @summary Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create.json - */ -async function sapCentralInstancesCreate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main() { - createSapCentralInstancesForHaSystemWithAvailabilitySet(); - sapCentralInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesDeleteSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesDeleteSample.js deleted file mode 100644 index 474af81803b4..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. - * - * @summary Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Delete.json - */ -async function sapCentralInstancesDelete() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -async function main() { - sapCentralInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesGetSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesGetSample.js deleted file mode 100644 index eb8efc3f307f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the SAP Central Services Instance resource. - * - * @summary Gets the SAP Central Services Instance resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Get.json - */ -async function sapCentralInstancesGet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.get( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -async function main() { - sapCentralInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesListSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesListSample.js deleted file mode 100644 index 17170594e9f8..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. - * - * @summary Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_List.json - */ -async function sapCentralInstancesList() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPCentralInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - sapCentralInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStartInstanceSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStartInstanceSample.js deleted file mode 100644 index 482386032f8c..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStartInstanceSample.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Starts the SAP Central Services Instance. - * - * @summary Starts the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance.json - */ -async function startTheSapCentralServicesInstance() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP Central Services Instance. - * - * @summary Starts the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance_WithInfraOperations.json - */ -async function startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body = { startVm: true }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main() { - startTheSapCentralServicesInstance(); - startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStopInstanceSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStopInstanceSample.js deleted file mode 100644 index 346b26ba3c9a..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesStopInstanceSample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Stops the SAP Central Services Instance. - * - * @summary Stops the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body = { deallocateVm: true }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Central Services Instance. - * - * @summary Stops the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance.json - */ -async function stopTheSapCentralServicesInstance() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body = { softStopTimeoutSeconds: 1200 }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main() { - stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS(); - stopTheSapCentralServicesInstance(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesUpdateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesUpdateSample.js deleted file mode 100644 index 2655fd500ec8..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapCentralInstancesUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. - * - * @summary Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Update.json - */ -async function sapCentralInstancesUpdate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body = { tags: { tag1: "value1" } }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.update( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main() { - sapCentralInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesCreateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesCreateSample.js deleted file mode 100644 index 35a6ebd010bc..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesCreateSample.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create_HA_AvSet.json - */ -async function createSapDatabaseInstancesForHaSystemWithAvailabilitySet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create.json - */ -async function sapDatabaseInstancesCreate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main() { - createSapDatabaseInstancesForHaSystemWithAvailabilitySet(); - sapDatabaseInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesDeleteSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesDeleteSample.js deleted file mode 100644 index f060b75c120b..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. - * - * @summary Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Delete.json - */ -async function sapDatabaseInstancesDelete() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main() { - sapDatabaseInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesGetSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesGetSample.js deleted file mode 100644 index 1e57ba9acda2..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the SAP Database Instance resource. - * - * @summary Gets the SAP Database Instance resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Get.json - */ -async function sapDatabaseInstancesGet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.get( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main() { - sapDatabaseInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesListSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesListSample.js deleted file mode 100644 index a531da10edcd..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * - * @summary Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_List.json - */ -async function sapDatabaseInstancesList() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPDatabaseInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - sapDatabaseInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStartInstanceSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStartInstanceSample.js deleted file mode 100644 index 7794d7980e19..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStartInstanceSample.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Starts the database instance of the SAP system. - * - * @summary Starts the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance_WithInfraOperations.json - */ -async function startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body = { startVm: true }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the database instance of the SAP system. - * - * @summary Starts the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance.json - */ -async function startTheDatabaseInstanceOfTheSapSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main() { - startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt(); - startTheDatabaseInstanceOfTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStopInstanceSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStopInstanceSample.js deleted file mode 100644 index f7bf75715b22..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesStopInstanceSample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Stops the database instance of the SAP system. - * - * @summary Stops the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the database instance of the SAP system. - * - * @summary Stops the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance.json - */ -async function stopTheDatabaseInstanceOfTheSapSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body = { softStopTimeoutSeconds: 0 }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main() { - stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS(); - stopTheDatabaseInstanceOfTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesUpdateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesUpdateSample.js deleted file mode 100644 index b564007c0900..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDatabaseInstancesUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates the Database instance resource. This can be used to update tags on the resource. - * - * @summary Updates the Database instance resource. This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Update.json - */ -async function sapDatabaseInstancesUpdate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body = { tags: { key1: "value1" } }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.update( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main() { - sapDatabaseInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDiskConfigurationsSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDiskConfigurationsSample.js deleted file mode 100644 index 4ec643c8e4af..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapDiskConfigurationsSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * - * @summary Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json - */ -async function sapDiskConfigurationsNonProd() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDiskConfigurations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * - * @summary Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json - */ -async function sapDiskConfigurationsProd() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDiskConfigurations(location); - console.log(result); -} - -async function main() { - sapDiskConfigurationsNonProd(); - sapDiskConfigurationsProd(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSizingRecommendationsSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSizingRecommendationsSample.js deleted file mode 100644 index e9fb5ee8f75f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSizingRecommendationsSample.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json - */ -async function sapSizingRecommendationsS4HanaDistributed() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json - */ -async function sapSizingRecommendationsS4HanaDistributedHaAvSet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json - */ -async function sapSizingRecommendationsS4HanaDistributedHaAvZone() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json - */ -async function sapSizingRecommendationsS4HanaSingleServer() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -async function main() { - sapSizingRecommendationsS4HanaDistributed(); - sapSizingRecommendationsS4HanaDistributedHaAvSet(); - sapSizingRecommendationsS4HanaDistributedHaAvZone(); - sapSizingRecommendationsS4HanaSingleServer(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSupportedSkuSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSupportedSkuSample.js deleted file mode 100644 index db9a7787055d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapSupportedSkuSample.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json - */ -async function sapSupportedSkusDistributed() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json - */ -async function sapSupportedSkusDistributedHaAvSet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json - */ -async function sapSupportedSkusDistributedHaAvZone() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json - */ -async function sapSupportedSkusSingleServer() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -async function main() { - sapSupportedSkusDistributed(); - sapSupportedSkusDistributedHaAvSet(); - sapSupportedSkusDistributedHaAvZone(); - sapSupportedSkusSingleServer(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesCreateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesCreateSample.js deleted file mode 100644 index d8eddf9d5d30..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesCreateSample.js +++ /dev/null @@ -1,3162 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Custom_Image.json - */ -async function createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - availabilitySetName: "appAvSet", - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - virtualMachines: [ - { - dataDiskNames: { default: ["ascsdisk0"] }, - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - ], - }, - databaseServer: { - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadata0", "hanadata1"], - hanaLog: ["hanalog0", "hanalog1", "hanalog2"], - hanaShared: ["hanashared0", "hanashared1"], - usrSap: ["usrsap0"], - }, - hostName: "dbhostName", - networkInterfaces: [{ networkInterfaceName: "dbnic" }], - osDiskName: "dbosdisk", - vmName: "dbvm", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - availabilitySetName: "appAvSet", - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - availabilitySetName: "csAvSet", - loadBalancer: { - backendPoolNames: ["ascsBackendPool"], - frontendIpConfigurationNames: ["ascsip0", "ersip0"], - healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"], - loadBalancerName: "ascslb", - }, - virtualMachines: [ - { - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - { - hostName: "ershostName", - networkInterfaces: [{ networkInterfaceName: "ersnic" }], - osDiskName: "ersosdisk", - vmName: "ersvm", - }, - ], - }, - databaseServer: { - availabilitySetName: "dbAvSet", - loadBalancer: { - backendPoolNames: ["dbBackendPool"], - frontendIpConfigurationNames: ["dbip"], - healthProbeNames: ["dbHealthProbe"], - loadBalancerName: "dblb", - }, - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadatapr0", "hanadatapr1"], - hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"], - hanaShared: ["hanasharedpr0", "hanasharedpr1"], - usrSap: ["usrsappr0"], - }, - hostName: "dbprhostName", - networkInterfaces: [{ networkInterfaceName: "dbprnic" }], - osDiskName: "dbprosdisk", - vmName: "dbvmpr", - }, - { - dataDiskNames: { - hanaData: ["hanadatasr0", "hanadatasr1"], - hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"], - hanaShared: ["hanasharedsr0", "hanasharedsr1"], - usrSap: ["usrsapsr0"], - }, - hostName: "dbsrhostName", - networkInterfaces: [{ networkInterfaceName: "dbsrnic" }], - osDiskName: "dbsrosdisk", - vmName: "dbvmsr", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - loadBalancer: { - backendPoolNames: ["ascsBackendPool"], - frontendIpConfigurationNames: ["ascsip0", "ersip0"], - healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"], - loadBalancerName: "ascslb", - }, - virtualMachines: [ - { - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - { - hostName: "ershostName", - networkInterfaces: [{ networkInterfaceName: "ersnic" }], - osDiskName: "ersosdisk", - vmName: "ersvm", - }, - ], - }, - databaseServer: { - loadBalancer: { - backendPoolNames: ["dbBackendPool"], - frontendIpConfigurationNames: ["dbip"], - healthProbeNames: ["dbHealthProbe"], - loadBalancerName: "dblb", - }, - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadatapr0", "hanadatapr1"], - hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"], - hanaShared: ["hanasharedpr0", "hanasharedpr1"], - usrSap: ["usrsappr0"], - }, - hostName: "dbprhostName", - networkInterfaces: [{ networkInterfaceName: "dbprnic" }], - osDiskName: "dbprosdisk", - vmName: "dbvmpr", - }, - { - dataDiskNames: { - hanaData: ["hanadatasr0", "hanadatasr1"], - hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"], - hanaShared: ["hanasharedsr0", "hanasharedsr1"], - usrSap: ["usrsapsr0"], - }, - hostName: "dbsrhostName", - networkInterfaces: [{ networkInterfaceName: "dbsrnic" }], - osDiskName: "dbsrosdisk", - vmName: "dbvmsr", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_WithTrustedAccess.json - */ -async function createInfrastructureWithOSConfigurationWithTrustedAccessEnabled() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourcesNetworkAccessType: "Private", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json - */ -async function createInfrastructureOnlyForDistributedSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json - */ -async function createInfrastructureOnlyForHaSystemWithAvailabilitySet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 5, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json - */ -async function createInfrastructureOnlyForHaSystemWithAvailabilityZone() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json - */ -async function createInfrastructureOnlyForSingleServerSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.json - */ -async function createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - dbDiskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json - */ -async function createInfrastructureWithOSConfigurationForDistributedSystemRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json - */ -async function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json - */ -async function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json - */ -async function createInfrastructureWithOSConfigurationForSingleServerSystemRecommended() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_CreateTransport.json - */ -async function createInfrastructureWithANewSapTransportDirectoryFileshare() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { - configurationType: "CreateAndMount", - resourceGroup: "rgName", - storageAccountName: "storageName", - }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_MountTransport.json - */ -async function createInfrastructureWithAnExistingSapTransportDirectoryFileshare() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { - configurationType: "Mount", - id: "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", - privateEndpointId: - "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", - }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_SkipTransport.json - */ -async function createInfrastructureWithoutASapTransportDirectoryFileshare() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { configurationType: "Skip" }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.json - */ -async function detectSapSoftwareInstallationOnADistributedSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "{{resourcegrp}}", - applicationServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - databaseServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - networkConfiguration: { isSecondaryIpEnabled: true }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: { createdBy: "azureuser" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.json - */ -async function detectSapSoftwareInstallationOnASingleServerSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.json - */ -async function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.json - */ -async function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.json - */ -async function installSapSoftwareOnDistributedSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "{{resourcegrp}}", - applicationServer: { - instanceCount: 2, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - databaseServer: { - instanceCount: 1, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - networkConfiguration: { isSecondaryIpEnabled: true }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - bomUrl: - "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", - sapBitsStorageAccountId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", - softwareInstallationType: "SAPInstallWithoutOSConfig", - softwareVersion: "SAP S/4HANA 1909 SPS 03", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: { createdBy: "azureuser" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.json - */ -async function installSapSoftwareOnSingleServerSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "test-rg", - deploymentType: "SingleServer", - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "SLES-SAP", - publisher: "SUSE", - sku: "12-sp4-gen2", - version: "2022.02.01", - }, - osProfile: { - adminUsername: "azureappadmin", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - bomUrl: - "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", - sapBitsStorageAccountId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", - softwareInstallationType: "SAPInstallWithoutOSConfig", - softwareVersion: "SAP S/4HANA 1909 SPS 03", - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.json - */ -async function registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - managedRgStorageAccountName: "q20saacssgrs", - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.json - */ -async function registerExistingSapSystemAsVirtualInstanceForSapSolutions() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_TrustedAccessEnable.json - */ -async function registerWithTrustedAccessEnabled() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - }, - environment: "NonProd", - managedResourcesNetworkAccessType: "Private", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main() { - createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem(); - createInfrastructureWithOSConfigurationWithTrustedAccessEnabled(); - createInfrastructureOnlyForDistributedSystem(); - createInfrastructureOnlyForHaSystemWithAvailabilitySet(); - createInfrastructureOnlyForHaSystemWithAvailabilityZone(); - createInfrastructureOnlyForSingleServerSystem(); - createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended(); - createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended(); - createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended(); - createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended(); - createInfrastructureWithOSConfigurationForDistributedSystemRecommended(); - createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended(); - createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended(); - createInfrastructureWithOSConfigurationForSingleServerSystemRecommended(); - createInfrastructureWithANewSapTransportDirectoryFileshare(); - createInfrastructureWithAnExistingSapTransportDirectoryFileshare(); - createInfrastructureWithoutASapTransportDirectoryFileshare(); - detectSapSoftwareInstallationOnADistributedSystem(); - detectSapSoftwareInstallationOnASingleServerSystem(); - detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet(); - detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone(); - installSapSoftwareOnDistributedSystem(); - installSapSoftwareOnSingleServerSystem(); - registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations(); - registerExistingSapSystemAsVirtualInstanceForSapSolutions(); - registerWithTrustedAccessEnabled(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesDeleteSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesDeleteSample.js deleted file mode 100644 index 5fb579875d47..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. - * - * @summary Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json - */ -async function sapVirtualInstancesDelete() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -async function main() { - sapVirtualInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesGetSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesGetSample.js deleted file mode 100644 index b160beb987b1..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesGetSample.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets a Virtual Instance for SAP solutions resource - * - * @summary Gets a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get_ACSSInstallationBlocked.json - */ -async function sapVirtualInstancesGetWithAcssInstallationBlocked() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.get(resourceGroupName, sapVirtualInstanceName); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a Virtual Instance for SAP solutions resource - * - * @summary Gets a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json - */ -async function sapVirtualInstancesGet() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.get(resourceGroupName, sapVirtualInstanceName); - console.log(result); -} - -async function main() { - sapVirtualInstancesGetWithAcssInstallationBlocked(); - sapVirtualInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListByResourceGroupSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListByResourceGroupSample.js deleted file mode 100644 index 49070b22aea7..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * - * @summary Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json - */ -async function sapVirtualInstancesListByResourceGroup() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPVirtualInstances.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - sapVirtualInstancesListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListBySubscriptionSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListBySubscriptionSample.js deleted file mode 100644 index b9bb511257e9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets all Virtual Instances for SAP solutions resources in a Subscription. - * - * @summary Gets all Virtual Instances for SAP solutions resources in a Subscription. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json - */ -async function sapVirtualInstancesListBySubscription() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "6d875e77-e412-4d7d-9af4-8895278b4443"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPVirtualInstances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - sapVirtualInstancesListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStartSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStartSample.js deleted file mode 100644 index 54f04a1b32b1..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStartSample.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Starts the SAP application, that is the Central Services instance and Application server instances. - * - * @summary Starts the SAP application, that is the Central Services instance and Application server instances. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json - */ -async function startTheSapSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStartAndWait( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP application, that is the Central Services instance and Application server instances. - * - * @summary Starts the SAP application, that is the Central Services instance and Application server instances. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start_WithInfraOperations.json - */ -async function startTheVirtualMachinesAndTheSapSystem() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { startVm: true }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStartAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main() { - startTheSapSystem(); - startTheVirtualMachinesAndTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStopSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStopSample.js deleted file mode 100644 index c25516e41d37..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesStopSample.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Stops the SAP Application, that is the Application server instances and Central Services instance. - * - * @summary Stops the SAP Application, that is the Application server instances and Central Services instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json - */ -async function sapVirtualInstancesStop() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { softStopTimeoutSeconds: 0 }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStopAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Application, that is the Application server instances and Central Services instance. - * - * @summary Stops the SAP Application, that is the Application server instances and Central Services instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop_WithInfraOperations.json - */ -async function stopTheVirtualMachineSAndTheSapSystemOnIt() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStopAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main() { - sapVirtualInstancesStop(); - stopTheVirtualMachineSAndTheSapSystemOnIt(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesUpdateSample.js b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesUpdateSample.js deleted file mode 100644 index fd19ed6a3453..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/javascript/sapVirtualInstancesUpdateSample.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -const { WorkloadsClient } = require("@azure/arm-workloadssapvirtualinstance"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Updates a Virtual Instance for SAP solutions resource - * - * @summary Updates a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_TrustedAccessEnable_Update.json - */ -async function sapVirtualInstancesTrustedAccessEnableUpdate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - identity: { type: "None" }, - properties: { managedResourcesNetworkAccessType: "Private" }, - tags: { key1: "svi1" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginUpdateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates a Virtual Instance for SAP solutions resource - * - * @summary Updates a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json - */ -async function sapVirtualInstancesUpdate() { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body = { - identity: { type: "None" }, - tags: { key1: "svi1" }, - }; - const options = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginUpdateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main() { - sapVirtualInstancesTrustedAccessEnableUpdate(); - sapVirtualInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/README.md b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/README.md deleted file mode 100644 index 1b3f094a1956..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [operationsListSample.ts][operationslistsample] | Lists all the available API operations under this PR x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/operations/preview/2023-10-01-preview/examples/Operations_List.json | -| [sapApplicationServerInstancesCreateSample.ts][sapapplicationserverinstancescreatesample] | Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create_HA_AvSet.json | -| [sapApplicationServerInstancesDeleteSample.ts][sapapplicationserverinstancesdeletesample] | Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Delete.json | -| [sapApplicationServerInstancesGetSample.ts][sapapplicationserverinstancesgetsample] | Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Get.json | -| [sapApplicationServerInstancesListSample.ts][sapapplicationserverinstanceslistsample] | Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_List.json | -| [sapApplicationServerInstancesStartInstanceSample.ts][sapapplicationserverinstancesstartinstancesample] | Starts the SAP Application Server Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance_WithInfraOperations.json | -| [sapApplicationServerInstancesStopInstanceSample.ts][sapapplicationserverinstancesstopinstancesample] | Stops the SAP Application Server Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance.json | -| [sapApplicationServerInstancesUpdateSample.ts][sapapplicationserverinstancesupdatesample] | Updates the SAP Application server instance resource. This can be used to update tags on the resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Update.json | -| [sapAvailabilityZoneDetailsSample.ts][sapavailabilityzonedetailssample] | Get the recommended SAP Availability Zone Pair Details for your region. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json | -| [sapCentralInstancesCreateSample.ts][sapcentralinstancescreatesample] | Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create_HA_AvSet.json | -| [sapCentralInstancesDeleteSample.ts][sapcentralinstancesdeletesample] | Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Delete.json | -| [sapCentralInstancesGetSample.ts][sapcentralinstancesgetsample] | Gets the SAP Central Services Instance resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Get.json | -| [sapCentralInstancesListSample.ts][sapcentralinstanceslistsample] | Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_List.json | -| [sapCentralInstancesStartInstanceSample.ts][sapcentralinstancesstartinstancesample] | Starts the SAP Central Services Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance.json | -| [sapCentralInstancesStopInstanceSample.ts][sapcentralinstancesstopinstancesample] | Stops the SAP Central Services Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance_WithInfraOperations.json | -| [sapCentralInstancesUpdateSample.ts][sapcentralinstancesupdatesample] | Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Update.json | -| [sapDatabaseInstancesCreateSample.ts][sapdatabaseinstancescreatesample] | Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create_HA_AvSet.json | -| [sapDatabaseInstancesDeleteSample.ts][sapdatabaseinstancesdeletesample] | Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Delete.json | -| [sapDatabaseInstancesGetSample.ts][sapdatabaseinstancesgetsample] | Gets the SAP Database Instance resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Get.json | -| [sapDatabaseInstancesListSample.ts][sapdatabaseinstanceslistsample] | Lists the Database resources associated with a Virtual Instance for SAP solutions resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_List.json | -| [sapDatabaseInstancesStartInstanceSample.ts][sapdatabaseinstancesstartinstancesample] | Starts the database instance of the SAP system. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance_WithInfraOperations.json | -| [sapDatabaseInstancesStopInstanceSample.ts][sapdatabaseinstancesstopinstancesample] | Stops the database instance of the SAP system. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance_WithInfraOperations.json | -| [sapDatabaseInstancesUpdateSample.ts][sapdatabaseinstancesupdatesample] | Updates the Database instance resource. This can be used to update tags on the resource. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Update.json | -| [sapDiskConfigurationsSample.ts][sapdiskconfigurationssample] | Get the SAP Disk Configuration Layout prod/non-prod SAP System. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json | -| [sapSizingRecommendationsSample.ts][sapsizingrecommendationssample] | Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json | -| [sapSupportedSkuSample.ts][sapsupportedskusample] | Get a list of SAP supported SKUs for ASCS, Application and Database tier. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json | -| [sapVirtualInstancesCreateSample.ts][sapvirtualinstancescreatesample] | Creates a Virtual Instance for SAP solutions (VIS) resource x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Custom_Image.json | -| [sapVirtualInstancesDeleteSample.ts][sapvirtualinstancesdeletesample] | Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json | -| [sapVirtualInstancesGetSample.ts][sapvirtualinstancesgetsample] | Gets a Virtual Instance for SAP solutions resource x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get_ACSSInstallationBlocked.json | -| [sapVirtualInstancesListByResourceGroupSample.ts][sapvirtualinstanceslistbyresourcegroupsample] | Gets all Virtual Instances for SAP solutions resources in a Resource Group. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json | -| [sapVirtualInstancesListBySubscriptionSample.ts][sapvirtualinstanceslistbysubscriptionsample] | Gets all Virtual Instances for SAP solutions resources in a Subscription. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json | -| [sapVirtualInstancesStartSample.ts][sapvirtualinstancesstartsample] | Starts the SAP application, that is the Central Services instance and Application server instances. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json | -| [sapVirtualInstancesStopSample.ts][sapvirtualinstancesstopsample] | Stops the SAP Application, that is the Application server instances and Central Services instance. x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json | -| [sapVirtualInstancesUpdateSample.ts][sapvirtualinstancesupdatesample] | Updates a Virtual Instance for SAP solutions resource x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_TrustedAccessEnable_Update.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/operationsListSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx dev-tool run vendored cross-env WORKLOADS_SUBSCRIPTION_ID="" node dist/operationsListSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/operationsListSample.ts -[sapapplicationserverinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesCreateSample.ts -[sapapplicationserverinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesDeleteSample.ts -[sapapplicationserverinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesGetSample.ts -[sapapplicationserverinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesListSample.ts -[sapapplicationserverinstancesstartinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStartInstanceSample.ts -[sapapplicationserverinstancesstopinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStopInstanceSample.ts -[sapapplicationserverinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesUpdateSample.ts -[sapavailabilityzonedetailssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapAvailabilityZoneDetailsSample.ts -[sapcentralinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesCreateSample.ts -[sapcentralinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesDeleteSample.ts -[sapcentralinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesGetSample.ts -[sapcentralinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesListSample.ts -[sapcentralinstancesstartinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStartInstanceSample.ts -[sapcentralinstancesstopinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStopInstanceSample.ts -[sapcentralinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesUpdateSample.ts -[sapdatabaseinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesCreateSample.ts -[sapdatabaseinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesDeleteSample.ts -[sapdatabaseinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesGetSample.ts -[sapdatabaseinstanceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesListSample.ts -[sapdatabaseinstancesstartinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStartInstanceSample.ts -[sapdatabaseinstancesstopinstancesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStopInstanceSample.ts -[sapdatabaseinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesUpdateSample.ts -[sapdiskconfigurationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDiskConfigurationsSample.ts -[sapsizingrecommendationssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSizingRecommendationsSample.ts -[sapsupportedskusample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSupportedSkuSample.ts -[sapvirtualinstancescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesCreateSample.ts -[sapvirtualinstancesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesDeleteSample.ts -[sapvirtualinstancesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesGetSample.ts -[sapvirtualinstanceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListByResourceGroupSample.ts -[sapvirtualinstanceslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListBySubscriptionSample.ts -[sapvirtualinstancesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStartSample.ts -[sapvirtualinstancesstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStopSample.ts -[sapvirtualinstancesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesUpdateSample.ts -[apiref]: https://learn.microsoft.com/javascript/api/@azure/arm-workloadssapvirtualinstance?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloadssapvirtualinstance/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json deleted file mode 100644 index 4dad0e1f42f1..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-workloadssapvirtualinstance-ts-beta", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript (Beta)", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/workloads/arm-workloadssapvirtualinstance" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/workloads/arm-workloadssapvirtualinstance", - "dependencies": { - "@azure/arm-workloadssapvirtualinstance": "next", - "dotenv": "latest", - "@azure/identity": "^4.2.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.7.2", - "rimraf": "latest" - } -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/sample.env b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/operationsListSample.ts deleted file mode 100644 index 1a65e28efc98..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists all the available API operations under this PR - * - * @summary Lists all the available API operations under this PR - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/operations/preview/2023-10-01-preview/examples/Operations_List.json - */ -async function operations(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "00000000-0000-0000-0000-000000000000"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - operations(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesCreateSample.ts deleted file mode 100644 index 606dcc1447dd..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesCreateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - SAPApplicationServerInstance, - SAPApplicationServerInstancesCreateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create_HA_AvSet.json - */ -async function createSapApplicationServerInstancesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: SAPApplicationServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPApplicationServerInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Create.json - */ -async function sapApplicationServerInstancesCreate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: SAPApplicationServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPApplicationServerInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - createSapApplicationServerInstancesForHaSystemWithAvailabilitySet(); - sapApplicationServerInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesDeleteSample.ts deleted file mode 100644 index 9b2640414c51..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. - * - * @summary Deletes the SAP Application Server Instance resource.

This operation will be used by service only. Delete by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Delete.json - */ -async function sapApplicationServerInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapApplicationServerInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesGetSample.ts deleted file mode 100644 index c7ca201d0ad4..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. - * - * @summary Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Get.json - */ -async function sapApplicationServerInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.get( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapApplicationServerInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesListSample.ts deleted file mode 100644 index 4a462dffc25c..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesListSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. - * - * @summary Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_List.json - */ -async function sapApplicationServerInstancesList(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPApplicationServerInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - sapApplicationServerInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStartInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStartInstanceSample.ts deleted file mode 100644 index 234b6eed5a1d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStartInstanceSample.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StartRequest, - SAPApplicationServerInstancesStartInstanceOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the SAP Application Server Instance. - * - * @summary Starts the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance_WithInfraOperations.json - */ -async function startVirtualMachineAndTheSapApplicationServerInstanceOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: StartRequest = { startVm: true }; - const options: SAPApplicationServerInstancesStartInstanceOptionalParams = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = - await client.sAPApplicationServerInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP Application Server Instance. - * - * @summary Starts the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StartInstance.json - */ -async function startTheSapApplicationServerInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = - await client.sAPApplicationServerInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - startVirtualMachineAndTheSapApplicationServerInstanceOnIt(); - startTheSapApplicationServerInstance(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStopInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStopInstanceSample.ts deleted file mode 100644 index 1482d1812d16..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesStopInstanceSample.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StopRequest, - SAPApplicationServerInstancesStopInstanceOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the SAP Application Server Instance. - * - * @summary Stops the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance.json - */ -async function stopTheSapApplicationServerInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: StopRequest = { softStopTimeoutSeconds: 0 }; - const options: SAPApplicationServerInstancesStopInstanceOptionalParams = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = - await client.sAPApplicationServerInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Application Server Instance. - * - * @summary Stops the SAP Application Server Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheSapApplicationServerInstanceAndTheVirtualMachine(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: StopRequest = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options: SAPApplicationServerInstancesStopInstanceOptionalParams = { - body, - }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = - await client.sAPApplicationServerInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - stopTheSapApplicationServerInstance(); - stopTheSapApplicationServerInstanceAndTheVirtualMachine(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesUpdateSample.ts deleted file mode 100644 index d640a4c792eb..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapApplicationServerInstancesUpdateSample.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - UpdateSAPApplicationInstanceRequest, - SAPApplicationServerInstancesUpdateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the SAP Application server instance resource. This can be used to update tags on the resource. - * - * @summary Updates the SAP Application server instance resource. This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapapplicationinstances/SAPApplicationServerInstances_Update.json - */ -async function sapApplicationServerInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const applicationInstanceName = "app01"; - const body: UpdateSAPApplicationInstanceRequest = { - tags: { tag1: "value1" }, - }; - const options: SAPApplicationServerInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPApplicationServerInstances.update( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - sapApplicationServerInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapAvailabilityZoneDetailsSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapAvailabilityZoneDetailsSample.ts deleted file mode 100644 index 0b6dd936b881..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapAvailabilityZoneDetailsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the recommended SAP Availability Zone Pair Details for your region. - * - * @summary Get the recommended SAP Availability Zone Pair Details for your region. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_eastus.json - */ -async function sapAvailabilityZoneDetailsEastus(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPAvailabilityZoneDetails(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get the recommended SAP Availability Zone Pair Details for your region. - * - * @summary Get the recommended SAP Availability Zone Pair Details for your region. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPAvailabilityZoneDetails_northeurope.json - */ -async function sapAvailabilityZoneDetailsNortheurope(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPAvailabilityZoneDetails(location); - console.log(result); -} - -async function main(): Promise { - sapAvailabilityZoneDetailsEastus(); - sapAvailabilityZoneDetailsNortheurope(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesCreateSample.ts deleted file mode 100644 index 423a8c20ee6f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesCreateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - SAPCentralServerInstance, - SAPCentralInstancesCreateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * - * @summary Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create_HA_AvSet.json - */ -async function createSapCentralInstancesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: SAPCentralServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPCentralInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * - * @summary Creates the SAP Central Services Instance resource.

This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Create.json - */ -async function sapCentralInstancesCreate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: SAPCentralServerInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPCentralInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - createSapCentralInstancesForHaSystemWithAvailabilitySet(); - sapCentralInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesDeleteSample.ts deleted file mode 100644 index e205c706ba0b..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. - * - * @summary Deletes the SAP Central Services Instance resource.

This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Delete.json - */ -async function sapCentralInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapCentralInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesGetSample.ts deleted file mode 100644 index 2026f269a49f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SAP Central Services Instance resource. - * - * @summary Gets the SAP Central Services Instance resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Get.json - */ -async function sapCentralInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.get( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapCentralInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesListSample.ts deleted file mode 100644 index fabf777f3038..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesListSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. - * - * @summary Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_List.json - */ -async function sapCentralInstancesList(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPCentralInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - sapCentralInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStartInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStartInstanceSample.ts deleted file mode 100644 index de4f6a14fe13..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStartInstanceSample.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StartRequest, - SAPCentralInstancesStartInstanceOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the SAP Central Services Instance. - * - * @summary Starts the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance.json - */ -async function startTheSapCentralServicesInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP Central Services Instance. - * - * @summary Starts the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StartInstance_WithInfraOperations.json - */ -async function startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: StartRequest = { startVm: true }; - const options: SAPCentralInstancesStartInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - startTheSapCentralServicesInstance(); - startTheVirtualMachineSAndTheSapCentralServicesInstanceOnIt(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStopInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStopInstanceSample.ts deleted file mode 100644 index 9791ff9a1ba7..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesStopInstanceSample.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StopRequest, - SAPCentralInstancesStopInstanceOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the SAP Central Services Instance. - * - * @summary Stops the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: StopRequest = { deallocateVm: true }; - const options: SAPCentralInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Central Services Instance. - * - * @summary Stops the SAP Central Services Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_StopInstance.json - */ -async function stopTheSapCentralServicesInstance(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: StopRequest = { softStopTimeoutSeconds: 1200 }; - const options: SAPCentralInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - stopTheSapCentralServicesInstanceAndItsUnderlyingVirtualMachineS(); - stopTheSapCentralServicesInstance(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesUpdateSample.ts deleted file mode 100644 index 87fd23b05009..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapCentralInstancesUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - UpdateSAPCentralInstanceRequest, - SAPCentralInstancesUpdateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. - * - * @summary Updates the SAP Central Services Instance resource.

This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapcentralinstances/SAPCentralInstances_Update.json - */ -async function sapCentralInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const centralInstanceName = "centralServer"; - const body: UpdateSAPCentralInstanceRequest = { tags: { tag1: "value1" } }; - const options: SAPCentralInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPCentralInstances.update( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - sapCentralInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesCreateSample.ts deleted file mode 100644 index 98fd4a307bbe..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesCreateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - SAPDatabaseInstance, - SAPDatabaseInstancesCreateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create_HA_AvSet.json - */ -async function createSapDatabaseInstancesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body: SAPDatabaseInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPDatabaseInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * - * @summary Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.

This will be used by service only. PUT by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Create.json - */ -async function sapDatabaseInstancesCreate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body: SAPDatabaseInstance = { - location: "eastus", - properties: {}, - tags: {}, - }; - const options: SAPDatabaseInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - createSapDatabaseInstancesForHaSystemWithAvailabilitySet(); - sapDatabaseInstancesCreate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesDeleteSample.ts deleted file mode 100644 index 533cea943760..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesDeleteSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. - * - * @summary Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.

This will be used by service only. Delete by end user will return a Bad Request error. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Delete.json - */ -async function sapDatabaseInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapDatabaseInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesGetSample.ts deleted file mode 100644 index 2f166ffcbf90..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesGetSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets the SAP Database Instance resource. - * - * @summary Gets the SAP Database Instance resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Get.json - */ -async function sapDatabaseInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.get( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapDatabaseInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesListSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesListSample.ts deleted file mode 100644 index dc4c8954b1c2..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesListSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * - * @summary Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_List.json - */ -async function sapDatabaseInstancesList(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPDatabaseInstances.list( - resourceGroupName, - sapVirtualInstanceName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - sapDatabaseInstancesList(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStartInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStartInstanceSample.ts deleted file mode 100644 index 8801c644ec4d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStartInstanceSample.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StartRequest, - SAPDatabaseInstancesStartInstanceOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the database instance of the SAP system. - * - * @summary Starts the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance_WithInfraOperations.json - */ -async function startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body: StartRequest = { startVm: true }; - const options: SAPDatabaseInstancesStartInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the database instance of the SAP system. - * - * @summary Starts the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StartInstance.json - */ -async function startTheDatabaseInstanceOfTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStartInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - startVirtualMachineAndTheDatabaseInstanceOfTheSapSystemOnIt(); - startTheDatabaseInstanceOfTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStopInstanceSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStopInstanceSample.ts deleted file mode 100644 index a7ac62831137..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesStopInstanceSample.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StopRequest, - SAPDatabaseInstancesStopInstanceOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the database instance of the SAP system. - * - * @summary Stops the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance_WithInfraOperations.json - */ -async function stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body: StopRequest = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options: SAPDatabaseInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the database instance of the SAP system. - * - * @summary Stops the database instance of the SAP system. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_StopInstance.json - */ -async function stopTheDatabaseInstanceOfTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "db0"; - const body: StopRequest = { softStopTimeoutSeconds: 0 }; - const options: SAPDatabaseInstancesStopInstanceOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.beginStopInstanceAndWait( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - stopTheDatabaseInstanceOfTheSapSystemAndTheUnderlyingVirtualMachineS(); - stopTheDatabaseInstanceOfTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesUpdateSample.ts deleted file mode 100644 index 7aaf9ff0350d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDatabaseInstancesUpdateSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - UpdateSAPDatabaseInstanceRequest, - SAPDatabaseInstancesUpdateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates the Database instance resource. This can be used to update tags on the resource. - * - * @summary Updates the Database instance resource. This can be used to update tags on the resource. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapdatabaseinstances/SAPDatabaseInstances_Update.json - */ -async function sapDatabaseInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const databaseInstanceName = "databaseServer"; - const body: UpdateSAPDatabaseInstanceRequest = { tags: { key1: "value1" } }; - const options: SAPDatabaseInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDatabaseInstances.update( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - sapDatabaseInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDiskConfigurationsSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDiskConfigurationsSample.ts deleted file mode 100644 index 57019bbe7a17..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapDiskConfigurationsSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * - * @summary Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_NonProd.json - */ -async function sapDiskConfigurationsNonProd(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDiskConfigurations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * - * @summary Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPDiskConfigurations_Prod.json - */ -async function sapDiskConfigurationsProd(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPDiskConfigurations(location); - console.log(result); -} - -async function main(): Promise { - sapDiskConfigurationsNonProd(); - sapDiskConfigurationsProd(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSizingRecommendationsSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSizingRecommendationsSample.ts deleted file mode 100644 index 67909475bebc..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSizingRecommendationsSample.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_Distributed.json - */ -async function sapSizingRecommendationsS4HanaDistributed(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvSet.json - */ -async function sapSizingRecommendationsS4HanaDistributedHaAvSet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_HA_AvZone.json - */ -async function sapSizingRecommendationsS4HanaDistributedHaAvZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * - * @summary Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSizingRecommendations_S4HANA_SingleServer.json - */ -async function sapSizingRecommendationsS4HanaSingleServer(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSizingRecommendations(location); - console.log(result); -} - -async function main(): Promise { - sapSizingRecommendationsS4HanaDistributed(); - sapSizingRecommendationsS4HanaDistributedHaAvSet(); - sapSizingRecommendationsS4HanaDistributedHaAvZone(); - sapSizingRecommendationsS4HanaSingleServer(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSupportedSkuSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSupportedSkuSample.ts deleted file mode 100644 index 603b64866761..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapSupportedSkuSample.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_Distributed.json - */ -async function sapSupportedSkusDistributed(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvSet.json - */ -async function sapSupportedSkusDistributedHaAvSet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_DistributedHA_AvZone.json - */ -async function sapSupportedSkusDistributedHaAvZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -/** - * This sample demonstrates how to Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * - * @summary Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPSupportedSkus_SingleServer.json - */ -async function sapSupportedSkusSingleServer(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const location = "centralus"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPSupportedSku(location); - console.log(result); -} - -async function main(): Promise { - sapSupportedSkusDistributed(); - sapSupportedSkusDistributedHaAvSet(); - sapSupportedSkusDistributedHaAvZone(); - sapSupportedSkusSingleServer(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesCreateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesCreateSample.ts deleted file mode 100644 index fd3294d9389f..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesCreateSample.ts +++ /dev/null @@ -1,3223 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - SAPVirtualInstance, - SAPVirtualInstancesCreateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Custom_Image.json - */ -async function createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - id: "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_Distributed.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - availabilitySetName: "appAvSet", - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - virtualMachines: [ - { - dataDiskNames: { default: ["ascsdisk0"] }, - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - ], - }, - databaseServer: { - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadata0", "hanadata1"], - hanaLog: ["hanalog0", "hanalog1", "hanalog2"], - hanaShared: ["hanashared0", "hanashared1"], - usrSap: ["usrsap0"], - }, - hostName: "dbhostName", - networkInterfaces: [{ networkInterfaceName: "dbnic" }], - osDiskName: "dbosdisk", - vmName: "dbvm", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvSet.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - availabilitySetName: "appAvSet", - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - availabilitySetName: "csAvSet", - loadBalancer: { - backendPoolNames: ["ascsBackendPool"], - frontendIpConfigurationNames: ["ascsip0", "ersip0"], - healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"], - loadBalancerName: "ascslb", - }, - virtualMachines: [ - { - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - { - hostName: "ershostName", - networkInterfaces: [{ networkInterfaceName: "ersnic" }], - osDiskName: "ersosdisk", - vmName: "ersvm", - }, - ], - }, - databaseServer: { - availabilitySetName: "dbAvSet", - loadBalancer: { - backendPoolNames: ["dbBackendPool"], - frontendIpConfigurationNames: ["dbip"], - healthProbeNames: ["dbHealthProbe"], - loadBalancerName: "dblb", - }, - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadatapr0", "hanadatapr1"], - hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"], - hanaShared: ["hanasharedpr0", "hanasharedpr1"], - usrSap: ["usrsappr0"], - }, - hostName: "dbprhostName", - networkInterfaces: [{ networkInterfaceName: "dbprnic" }], - osDiskName: "dbprosdisk", - vmName: "dbvmpr", - }, - { - dataDiskNames: { - hanaData: ["hanadatasr0", "hanadatasr1"], - hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"], - hanaShared: ["hanasharedsr0", "hanasharedsr1"], - usrSap: ["usrsapsr0"], - }, - hostName: "dbsrhostName", - networkInterfaces: [{ networkInterfaceName: "dbsrnic" }], - osDiskName: "dbsrosdisk", - vmName: "dbvmsr", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_HA_AvZone.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - customResourceNames: { - applicationServer: { - virtualMachines: [ - { - dataDiskNames: { default: ["app0disk0"] }, - hostName: "apphostName0", - networkInterfaces: [{ networkInterfaceName: "appnic0" }], - osDiskName: "app0osdisk", - vmName: "appvm0", - }, - { - dataDiskNames: { default: ["app1disk0"] }, - hostName: "apphostName1", - networkInterfaces: [{ networkInterfaceName: "appnic1" }], - osDiskName: "app1osdisk", - vmName: "appvm1", - }, - ], - }, - centralServer: { - loadBalancer: { - backendPoolNames: ["ascsBackendPool"], - frontendIpConfigurationNames: ["ascsip0", "ersip0"], - healthProbeNames: ["ascsHealthProbe", "ersHealthProbe"], - loadBalancerName: "ascslb", - }, - virtualMachines: [ - { - hostName: "ascshostName", - networkInterfaces: [{ networkInterfaceName: "ascsnic" }], - osDiskName: "ascsosdisk", - vmName: "ascsvm", - }, - { - hostName: "ershostName", - networkInterfaces: [{ networkInterfaceName: "ersnic" }], - osDiskName: "ersosdisk", - vmName: "ersvm", - }, - ], - }, - databaseServer: { - loadBalancer: { - backendPoolNames: ["dbBackendPool"], - frontendIpConfigurationNames: ["dbip"], - healthProbeNames: ["dbHealthProbe"], - loadBalancerName: "dblb", - }, - virtualMachines: [ - { - dataDiskNames: { - hanaData: ["hanadatapr0", "hanadatapr1"], - hanaLog: ["hanalogpr0", "hanalogpr1", "hanalogpr2"], - hanaShared: ["hanasharedpr0", "hanasharedpr1"], - usrSap: ["usrsappr0"], - }, - hostName: "dbprhostName", - networkInterfaces: [{ networkInterfaceName: "dbprnic" }], - osDiskName: "dbprosdisk", - vmName: "dbvmpr", - }, - { - dataDiskNames: { - hanaData: ["hanadatasr0", "hanadatasr1"], - hanaLog: ["hanalogsr0", "hanalogsr1", "hanalogsr2"], - hanaShared: ["hanasharedsr0", "hanasharedsr1"], - usrSap: ["usrsapsr0"], - }, - hostName: "dbsrhostName", - networkInterfaces: [{ networkInterfaceName: "dbsrnic" }], - osDiskName: "dbsrosdisk", - vmName: "dbvmsr", - }, - ], - }, - namingPatternType: "FullResourceName", - sharedStorage: { - sharedStorageAccountName: "storageacc", - sharedStorageAccountPrivateEndPointName: "peForxNFS", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_CustomFullResourceNames_SingleServer.json - */ -async function createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - managedResourceGroupConfiguration: { - name: "mrg-X00-8e17e36c-42e9-4cd5-a078-7b44883414e0", - }, - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_WithTrustedAccess.json - */ -async function createInfrastructureWithOSConfigurationWithTrustedAccessEnabled(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - managedResourcesNetworkAccessType: "Private", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed.json - */ -async function createInfrastructureOnlyForDistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvSet.json - */ -async function createInfrastructureOnlyForHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 5, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_HA_AvZone.json - */ -async function createInfrastructureOnlyForHaSystemWithAvailabilityZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_SingleServer.json - */ -async function createInfrastructureOnlyForSingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "Deployment", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - ssh: { publicKeys: [{ keyData: "ssh-rsa public key" }] }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_Distributed.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvSet.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_HA_AvZone.json - */ -async function createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - diskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_DiskDetails_SingleServer.json - */ -async function createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - dbDiskConfiguration: { - diskVolumeConfigurations: { - backup: { - count: 2, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - "hana/data": { - count: 4, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/log": { - count: 3, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - "hana/shared": { - count: 1, - sizeGB: 256, - sku: { name: "StandardSSD_LRS" }, - }, - os: { count: 1, sizeGB: 64, sku: { name: "StandardSSD_LRS" } }, - "usr/sap": { - count: 1, - sizeGB: 128, - sku: { name: "Premium_LRS" }, - }, - }, - }, - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_Distributed.json - */ -async function createInfrastructureWithOSConfigurationForDistributedSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvSet.json - */ -async function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_HA_AvZone.json - */ -async function createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_WithOSConfig_SingleServer.json - */ -async function createInfrastructureWithOSConfigurationForSingleServerSystemRecommended(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_CreateTransport.json - */ -async function createInfrastructureWithANewSapTransportDirectoryFileshare(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { - configurationType: "CreateAndMount", - resourceGroup: "rgName", - storageAccountName: "storageName", - }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_MountTransport.json - */ -async function createInfrastructureWithAnExistingSapTransportDirectoryFileshare(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { - configurationType: "Mount", - id: "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", - privateEndpointId: - "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", - }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Distributed_SkipTransport.json - */ -async function createInfrastructureWithoutASapTransportDirectoryFileshare(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - storageConfiguration: { - transportFileShareConfiguration: { configurationType: "Skip" }, - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_Distributed.json - */ -async function detectSapSoftwareInstallationOnADistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "{{resourcegrp}}", - applicationServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - databaseServer: { - instanceCount: 1, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - networkConfiguration: { isSecondaryIpEnabled: true }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: { createdBy: "azureuser" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_SingleServer.json - */ -async function detectSapSoftwareInstallationOnASingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - databaseType: "HANA", - deploymentType: "SingleServer", - networkConfiguration: { isSecondaryIpEnabled: true }, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvSet.json - */ -async function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilitySet" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_DetectInstallation_HA_AvZone.json - */ -async function detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "X00-RG", - applicationServer: { - instanceCount: 6, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - centralServer: { - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_E16ds_v4", - }, - }, - databaseServer: { - databaseType: "HANA", - instanceCount: 2, - subnetId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "84sapha-gen2", - version: "latest", - }, - osProfile: { - adminUsername: "{your-username}", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { privateKey: "xyz", publicKey: "abc" }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - highAvailabilityConfig: { highAvailabilityType: "AvailabilityZone" }, - }, - osSapConfiguration: { sapFqdn: "xyz.test.com" }, - softwareConfiguration: { - centralServerVmId: - "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - softwareInstallationType: "External", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_Distributed.json - */ -async function installSapSoftwareOnDistributedSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "{{resourcegrp}}", - applicationServer: { - instanceCount: 2, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - centralServer: { - instanceCount: 1, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E4ds_v4", - }, - }, - databaseServer: { - instanceCount: 1, - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", - virtualMachineConfiguration: { - imageReference: { - offer: "RHEL-SAP-HA", - publisher: "RedHat", - sku: "8.2", - version: "8.2.2021091201", - }, - osProfile: { - adminUsername: "azureuser", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_M32ts", - }, - }, - deploymentType: "ThreeTier", - networkConfiguration: { isSecondaryIpEnabled: true }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - bomUrl: - "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", - sapBitsStorageAccountId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", - softwareInstallationType: "SAPInstallWithoutOSConfig", - softwareVersion: "SAP S/4HANA 1909 SPS 03", - }, - }, - environment: "Prod", - sapProduct: "S4HANA", - }, - tags: { createdBy: "azureuser" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Install_SingleServer.json - */ -async function installSapSoftwareOnSingleServerSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "eastus2", - properties: { - configuration: { - appLocation: "eastus", - configurationType: "DeploymentWithOSConfig", - infrastructureConfiguration: { - appResourceGroup: "test-rg", - deploymentType: "SingleServer", - subnetId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet", - virtualMachineConfiguration: { - imageReference: { - offer: "SLES-SAP", - publisher: "SUSE", - sku: "12-sp4-gen2", - version: "2022.02.01", - }, - osProfile: { - adminUsername: "azureappadmin", - osConfiguration: { - disablePasswordAuthentication: true, - osType: "Linux", - sshKeyPair: { - privateKey: "{{privateKey}}", - publicKey: "{{sshkey}}", - }, - }, - }, - vmSize: "Standard_E32ds_v4", - }, - }, - osSapConfiguration: { sapFqdn: "sap.bpaas.com" }, - softwareConfiguration: { - bomUrl: - "https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", - sapBitsStorageAccountId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", - softwareInstallationType: "SAPInstallWithoutOSConfig", - softwareVersion: "SAP S/4HANA 1909 SPS 03", - }, - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: {}, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_CustomMrgStorageAccountName.json - */ -async function registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - managedRgStorageAccountName: "q20saacssgrs", - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover.json - */ -async function registerExistingSapSystemAsVirtualInstanceForSapSolutions(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - }, - environment: "NonProd", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates a Virtual Instance for SAP solutions (VIS) resource - * - * @summary Creates a Virtual Instance for SAP solutions (VIS) resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Create_Discover_TrustedAccessEnable.json - */ -async function registerWithTrustedAccessEnabled(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: SAPVirtualInstance = { - location: "northeurope", - properties: { - configuration: { - centralServerVmId: - "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", - configurationType: "Discovery", - }, - environment: "NonProd", - managedResourcesNetworkAccessType: "Private", - sapProduct: "S4HANA", - }, - tags: { createdby: "abc@microsoft.com", test: "abc" }, - }; - const options: SAPVirtualInstancesCreateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginCreateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - createInfrastructureWithOSConfigurationWithAzureComputeGalleryImage(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilitySet(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForHaSystemWithAvailabilityZone(); - createInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem(); - createInfrastructureWithOSConfigurationWithTrustedAccessEnabled(); - createInfrastructureOnlyForDistributedSystem(); - createInfrastructureOnlyForHaSystemWithAvailabilitySet(); - createInfrastructureOnlyForHaSystemWithAvailabilityZone(); - createInfrastructureOnlyForSingleServerSystem(); - createInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended(); - createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilitySetRecommended(); - createInfrastructureWithDiskAndOSConfigurationForHaSystemWithAvailabilityZoneRecommended(); - createInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended(); - createInfrastructureWithOSConfigurationForDistributedSystemRecommended(); - createInfrastructureWithOSConfigurationForHaSystemWithAvailabilitySetRecommended(); - createInfrastructureWithOSConfigurationForHaSystemWithAvailabilityZoneRecommended(); - createInfrastructureWithOSConfigurationForSingleServerSystemRecommended(); - createInfrastructureWithANewSapTransportDirectoryFileshare(); - createInfrastructureWithAnExistingSapTransportDirectoryFileshare(); - createInfrastructureWithoutASapTransportDirectoryFileshare(); - detectSapSoftwareInstallationOnADistributedSystem(); - detectSapSoftwareInstallationOnASingleServerSystem(); - detectSapSoftwareInstallationOnAnHaSystemWithAvailabilitySet(); - detectSapSoftwareInstallationOnAnHaSystemWithAvailabilityZone(); - installSapSoftwareOnDistributedSystem(); - installSapSoftwareOnSingleServerSystem(); - registerExistingSapSystemAsVirtualInstanceForSapSolutionsWithOptionalCustomizations(); - registerExistingSapSystemAsVirtualInstanceForSapSolutions(); - registerWithTrustedAccessEnabled(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesDeleteSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesDeleteSample.ts deleted file mode 100644 index 68be41709cc9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesDeleteSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. - * - * @summary Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Delete.json - */ -async function sapVirtualInstancesDelete(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginDeleteAndWait( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapVirtualInstancesDelete(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesGetSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesGetSample.ts deleted file mode 100644 index 0d9be63d434a..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesGetSample.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets a Virtual Instance for SAP solutions resource - * - * @summary Gets a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get_ACSSInstallationBlocked.json - */ -async function sapVirtualInstancesGetWithAcssInstallationBlocked(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.get( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Gets a Virtual Instance for SAP solutions resource - * - * @summary Gets a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Get.json - */ -async function sapVirtualInstancesGet(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.get( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -async function main(): Promise { - sapVirtualInstancesGetWithAcssInstallationBlocked(); - sapVirtualInstancesGet(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListByResourceGroupSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListByResourceGroupSample.ts deleted file mode 100644 index 28f6ab95f88e..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListByResourceGroupSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * - * @summary Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListByResourceGroup.json - */ -async function sapVirtualInstancesListByResourceGroup(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPVirtualInstances.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - sapVirtualInstancesListByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListBySubscriptionSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListBySubscriptionSample.ts deleted file mode 100644 index 4745b25606a6..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesListBySubscriptionSample.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { WorkloadsClient } from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Gets all Virtual Instances for SAP solutions resources in a Subscription. - * - * @summary Gets all Virtual Instances for SAP solutions resources in a Subscription. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_ListBySubscription.json - */ -async function sapVirtualInstancesListBySubscription(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "6d875e77-e412-4d7d-9af4-8895278b4443"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.sAPVirtualInstances.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main(): Promise { - sapVirtualInstancesListBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStartSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStartSample.ts deleted file mode 100644 index 5283c30a8a86..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStartSample.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StartRequest, - SAPVirtualInstancesStartOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Starts the SAP application, that is the Central Services instance and Application server instances. - * - * @summary Starts the SAP application, that is the Central Services instance and Application server instances. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start.json - */ -async function startTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStartAndWait( - resourceGroupName, - sapVirtualInstanceName, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Starts the SAP application, that is the Central Services instance and Application server instances. - * - * @summary Starts the SAP application, that is the Central Services instance and Application server instances. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Start_WithInfraOperations.json - */ -async function startTheVirtualMachinesAndTheSapSystem(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: StartRequest = { startVm: true }; - const options: SAPVirtualInstancesStartOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStartAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - startTheSapSystem(); - startTheVirtualMachinesAndTheSapSystem(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStopSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStopSample.ts deleted file mode 100644 index 08e46b119587..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesStopSample.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - StopRequest, - SAPVirtualInstancesStopOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Stops the SAP Application, that is the Application server instances and Central Services instance. - * - * @summary Stops the SAP Application, that is the Application server instances and Central Services instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop.json - */ -async function sapVirtualInstancesStop(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: StopRequest = { softStopTimeoutSeconds: 0 }; - const options: SAPVirtualInstancesStopOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStopAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Stops the SAP Application, that is the Application server instances and Central Services instance. - * - * @summary Stops the SAP Application, that is the Application server instances and Central Services instance. - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Stop_WithInfraOperations.json - */ -async function stopTheVirtualMachineSAndTheSapSystemOnIt(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: StopRequest = { deallocateVm: true, softStopTimeoutSeconds: 0 }; - const options: SAPVirtualInstancesStopOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginStopAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - sapVirtualInstancesStop(); - stopTheVirtualMachineSAndTheSapSystemOnIt(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesUpdateSample.ts b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesUpdateSample.ts deleted file mode 100644 index d20a250c7f97..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/src/sapVirtualInstancesUpdateSample.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { - UpdateSAPVirtualInstanceRequest, - SAPVirtualInstancesUpdateOptionalParams, - WorkloadsClient, -} from "@azure/arm-workloadssapvirtualinstance"; -import { DefaultAzureCredential } from "@azure/identity"; -import "dotenv/config"; - -/** - * This sample demonstrates how to Updates a Virtual Instance for SAP solutions resource - * - * @summary Updates a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_TrustedAccessEnable_Update.json - */ -async function sapVirtualInstancesTrustedAccessEnableUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: UpdateSAPVirtualInstanceRequest = { - identity: { type: "None" }, - properties: { managedResourcesNetworkAccessType: "Private" }, - tags: { key1: "svi1" }, - }; - const options: SAPVirtualInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginUpdateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Updates a Virtual Instance for SAP solutions resource - * - * @summary Updates a Virtual Instance for SAP solutions resource - * x-ms-original-file: specification/workloads/resource-manager/Microsoft.Workloads/SAPVirtualInstance/preview/2023-10-01-preview/examples/sapvirtualinstances/SAPVirtualInstances_Update.json - */ -async function sapVirtualInstancesUpdate(): Promise { - const subscriptionId = - process.env["WORKLOADS_SUBSCRIPTION_ID"] || - "8e17e36c-42e9-4cd5-a078-7b44883414e0"; - const resourceGroupName = - process.env["WORKLOADS_RESOURCE_GROUP"] || "test-rg"; - const sapVirtualInstanceName = "X00"; - const body: UpdateSAPVirtualInstanceRequest = { - identity: { type: "None" }, - tags: { key1: "svi1" }, - }; - const options: SAPVirtualInstancesUpdateOptionalParams = { body }; - const credential = new DefaultAzureCredential(); - const client = new WorkloadsClient(credential, subscriptionId); - const result = await client.sAPVirtualInstances.beginUpdateAndWait( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - console.log(result); -} - -async function main(): Promise { - sapVirtualInstancesTrustedAccessEnableUpdate(); - sapVirtualInstancesUpdate(); -} - -main().catch(console.error); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/tsconfig.json b/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/index.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/index.ts deleted file mode 100644 index 75eb96300617..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -/// -export { getContinuationToken } from "./pagingHelper.js"; -export * from "./models/index.js"; -export { WorkloadsClient } from "./workloadsClient.js"; -export * from "./operationsInterfaces/index.js"; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/lroImpl.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/lroImpl.ts deleted file mode 100644 index d8bc98987053..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/lroImpl.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ -import { AbortSignalLike } from "@azure/abort-controller"; -import { LongRunningOperation, LroResponse } from "@azure/core-lro"; - -export function createLroSpec(inputs: { - sendOperationFn: (args: any, spec: any) => Promise>; - args: Record; - spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record; -}): LongRunningOperation { - const { args, spec, sendOperationFn } = inputs; - return { - requestMethod: spec.httpMethod, - requestPath: spec.path!, - sendInitialRequest: () => sendOperationFn(args, spec), - sendPollRequest: ( - path: string, - options?: { abortSignal?: AbortSignalLike }, - ) => { - const { requestBody, ...restSpec } = spec; - return sendOperationFn(args, { - ...restSpec, - httpMethod: "GET", - path, - abortSignal: options?.abortSignal, - }); - }, - }; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/models/index.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/models/index.ts deleted file mode 100644 index a7c9e3ccbebd..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/models/index.ts +++ /dev/null @@ -1,2476 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export type SAPSizingRecommendationResultUnion = - | SAPSizingRecommendationResult - | SingleServerRecommendationResult - | ThreeTierRecommendationResult; -export type SAPConfigurationUnion = - | SAPConfiguration - | DiscoveryConfiguration - | DeploymentConfiguration - | DeploymentWithOSConfiguration; -export type OSConfigurationUnion = - | OSConfiguration - | WindowsConfiguration - | LinuxConfiguration; -export type SingleServerCustomResourceNamesUnion = - | SingleServerCustomResourceNames - | SingleServerFullResourceNames; -export type InfrastructureConfigurationUnion = - | InfrastructureConfiguration - | SingleServerConfiguration - | ThreeTierConfiguration; -export type FileShareConfigurationUnion = - | FileShareConfiguration - | SkipFileShareConfiguration - | CreateAndMountFileShareConfiguration - | MountFileShareConfiguration; -export type ThreeTierCustomResourceNamesUnion = - | ThreeTierCustomResourceNames - | ThreeTierFullResourceNames; -export type SoftwareConfigurationUnion = - | SoftwareConfiguration - | ServiceInitiatedSoftwareConfiguration - | SAPInstallWithoutOSConfigSoftwareConfiguration - | ExternalInstallationSoftwareConfiguration; - -/** The SAP Sizing Recommendation request. */ -export interface SAPSizingRecommendationRequest { - /** The geo-location where the resource is to be created. */ - appLocation: string; - /** Defines the environment type - Production/Non Production. */ - environment: SAPEnvironmentType; - /** Defines the SAP Product type. */ - sapProduct: SAPProductType; - /** The deployment type. Eg: SingleServer/ThreeTier */ - deploymentType: SAPDeploymentType; - /** The SAP Application Performance Standard measurement. */ - saps: number; - /** The database memory configuration. */ - dbMemory: number; - /** The database type. */ - databaseType: SAPDatabaseType; - /** The DB scale method. */ - dbScaleMethod?: SAPDatabaseScaleMethod; - /** The high availability type. */ - highAvailabilityType?: SAPHighAvailabilityType; -} - -/** The SAP sizing recommendation result. */ -export interface SAPSizingRecommendationResult { - /** Polymorphic discriminator, which specifies the different types this object can be */ - deploymentType: "SingleServer" | "ThreeTier"; -} - -/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ -export interface ErrorResponse { - /** The error object. */ - error?: ErrorDetail; -} - -/** The error detail. */ -export interface ErrorDetail { - /** - * The error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * The error message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The error target. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** - * The error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** The resource management error additional info. */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The additional info. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly info?: Record; -} - -/** The SAP request to get list of supported SKUs. */ -export interface SAPSupportedSkusRequest { - /** The geo-location where the resource is to be created. */ - appLocation: string; - /** Defines the environment type - Production/Non Production. */ - environment: SAPEnvironmentType; - /** Defines the SAP Product type. */ - sapProduct: SAPProductType; - /** The deployment type. Eg: SingleServer/ThreeTier */ - deploymentType: SAPDeploymentType; - /** The database type. Eg: HANA, DB2, etc */ - databaseType: SAPDatabaseType; - /** The high availability type. */ - highAvailabilityType?: SAPHighAvailabilityType; -} - -/** The list of supported SKUs for different resources which are part of SAP deployment. */ -export interface SAPSupportedResourceSkusResult { - /** Gets the list of SAP supported SKUs. */ - supportedSkus?: SAPSupportedSku[]; -} - -/** The SAP supported SKU. */ -export interface SAPSupportedSku { - /** The VM Sku. */ - vmSku?: string; - /** True if the Sku is certified for App server in the SAP system. */ - isAppServerCertified?: boolean; - /** True if the Sku is certified for Database server in the SAP system. */ - isDatabaseCertified?: boolean; -} - -/** The SAP request to get list of disk configurations. */ -export interface SAPDiskConfigurationsRequest { - /** The geo-location where the SAP resources will be created. */ - appLocation: string; - /** Defines the environment type - Production/Non Production. */ - environment: SAPEnvironmentType; - /** Defines the SAP Product type. */ - sapProduct: SAPProductType; - /** The database type. Eg: HANA, DB2, etc */ - databaseType: SAPDatabaseType; - /** The deployment type. Eg: SingleServer/ThreeTier */ - deploymentType: SAPDeploymentType; - /** The VM SKU for database instance. */ - dbVmSku: string; -} - -/** The list of disk configuration for vmSku which are part of SAP deployment. */ -export interface SAPDiskConfigurationsResult { - /** The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. */ - volumeConfigurations?: { [propertyName: string]: SAPDiskConfiguration }; -} - -/** The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type. */ -export interface SAPDiskConfiguration { - /** The recommended disk details for a given VM Sku. */ - recommendedConfiguration?: DiskVolumeConfiguration; - /** The list of supported disks for a given VM Sku. */ - supportedConfigurations?: DiskDetails[]; -} - -/** The disk configuration required for the selected volume. */ -export interface DiskVolumeConfiguration { - /** The total number of disks required for the concerned volume. */ - count?: number; - /** The disk size in GB. */ - sizeGB?: number; - /** The disk SKU details. */ - sku?: DiskSku; -} - -/** The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. */ -export interface DiskSku { - /** Defines the disk sku name. */ - name?: DiskSkuName; -} - -/** The supported disk size details for a disk type. */ -export interface DiskDetails { - /** The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. */ - sku?: DiskSku; - /** The disk size in GB. */ - sizeGB?: number; - /** The minimum supported disk count. */ - minimumSupportedDiskCount?: number; - /** The maximum supported disk count. */ - maximumSupportedDiskCount?: number; - /** The disk Iops. */ - iopsReadWrite?: number; - /** The disk provisioned throughput in MBps. */ - mbpsReadWrite?: number; - /** The disk tier, e.g. P10, E10. */ - diskTier?: string; -} - -/** The SAP request to get list of availability zones. */ -export interface SAPAvailabilityZoneDetailsRequest { - /** The geo-location where the SAP resources will be created. */ - appLocation: string; - /** Defines the SAP Product type. */ - sapProduct: SAPProductType; - /** The database type. Eg: HANA, DB2, etc */ - databaseType: SAPDatabaseType; -} - -/** The list of supported availability zone pairs which are part of SAP HA deployment. */ -export interface SAPAvailabilityZoneDetailsResult { - /** Gets the list of availability zone pairs. */ - availabilityZonePairs?: SAPAvailabilityZonePair[]; -} - -/** The SAP Availability Zone Pair. */ -export interface SAPAvailabilityZonePair { - /** The zone A. */ - zoneA?: number; - /** The zone B. */ - zoneB?: number; -} - -/** Managed service identity (user assigned identities) */ -export interface UserAssignedServiceIdentity { - /** Type of manage identity */ - type: ManagedServiceIdentityType; - /** User assigned identities dictionary */ - userAssignedIdentities?: { - [propertyName: string]: UserAssignedIdentity | null; - }; -} - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} - -/** Defines the Virtual Instance for SAP solutions resource properties. */ -export interface SAPVirtualInstanceProperties { - /** Defines the environment type - Production/Non Production. */ - environment: SAPEnvironmentType; - /** Defines the SAP Product type. */ - sapProduct: SAPProductType; - /** Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228 */ - managedResourcesNetworkAccessType?: ManagedResourcesNetworkAccessType; - /** Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS */ - configuration: SAPConfigurationUnion; - /** Managed resource group configuration */ - managedResourceGroupConfiguration?: ManagedRGConfiguration; - /** - * Defines the SAP Instance status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SAPVirtualInstanceStatus; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; - /** - * Defines the Virtual Instance for SAP state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: SAPVirtualInstanceState; - /** - * Defines the provisioning states. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: SapVirtualInstanceProvisioningState; - /** - * Indicates any errors on the Virtual Instance for SAP solutions resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errors?: SAPVirtualInstanceError; -} - -/** The SAP Configuration. */ -export interface SAPConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "Discovery" | "Deployment" | "DeploymentWithOSConfig"; -} - -/** Managed resource group configuration */ -export interface ManagedRGConfiguration { - /** Managed resource group name */ - name?: string; -} - -/** An error response from the Virtual Instance for SAP Workload service. */ -export interface SAPVirtualInstanceError { - /** The Virtual Instance for SAP error body. */ - properties?: ErrorDefinition; -} - -/** Error definition. */ -export interface ErrorDefinition { - /** - * Service specific error code which serves as the substatus for the HTTP error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * Description of the error. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * Internal error details. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly details?: ErrorDefinition[]; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** Defines the request body for updating Virtual Instance for SAP. */ -export interface UpdateSAPVirtualInstanceRequest { - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Managed service identity (user assigned identities) */ - identity?: UserAssignedServiceIdentity; - /** Defines the properties to be updated for Virtual Instance for SAP. */ - properties?: UpdateSAPVirtualInstanceProperties; -} - -/** Defines the properties to be updated for Virtual Instance for SAP. */ -export interface UpdateSAPVirtualInstanceProperties { - /** Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228 */ - managedResourcesNetworkAccessType?: ManagedResourcesNetworkAccessType; -} - -/** Defines the collection of Virtual Instance for SAP solutions resources. */ -export interface SAPVirtualInstanceList { - /** Gets the list of Virtual Instances for SAP solutions resources. */ - value?: SAPVirtualInstance[]; - /** Gets the value of next link. */ - nextLink?: string; -} - -/** Defines the SAP Central Services Instance properties. */ -export interface SAPCentralServerProperties { - /** - * The central services instance number. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceNo?: string; - /** - * The central services instance subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnet?: string; - /** Defines the SAP message server properties. */ - messageServerProperties?: MessageServerProperties; - /** Defines the SAP Enqueue Server properties. */ - enqueueServerProperties?: EnqueueServerProperties; - /** Defines the SAP Gateway Server properties. */ - gatewayServerProperties?: GatewayServerProperties; - /** Defines the SAP Enqueue Replication Server (ERS) properties. */ - enqueueReplicationServerProperties?: EnqueueReplicationServerProperties; - /** - * The central services instance Kernel Version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kernelVersion?: string; - /** - * The central services instance Kernel Patch level. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kernelPatch?: string; - /** - * The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancerDetails?: LoadBalancerDetails; - /** - * The list of virtual machines corresponding to the Central Services instance. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmDetails?: CentralServerVmDetails[]; - /** - * Defines the SAP Instance status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SAPVirtualInstanceStatus; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; - /** - * Defines the provisioning states. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: SapVirtualInstanceProvisioningState; - /** - * Defines the errors related to SAP Central Services Instance resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errors?: SAPVirtualInstanceError; -} - -/** Defines the SAP message server properties. */ -export interface MessageServerProperties { - /** - * message server port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly msPort?: number; - /** - * message server internal MS port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly internalMsPort?: number; - /** - * message server HTTP Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly httpPort?: number; - /** - * message server HTTPS Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly httpsPort?: number; - /** - * message server SAP Hostname. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostname?: string; - /** - * message server IP Address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddress?: string; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; -} - -/** Defines the SAP Enqueue Server properties. */ -export interface EnqueueServerProperties { - /** - * Enqueue Server SAP Hostname. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostname?: string; - /** - * Enqueue Server SAP IP Address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddress?: string; - /** - * Enqueue Server Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly port?: number; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; -} - -/** Defines the SAP Gateway Server properties. */ -export interface GatewayServerProperties { - /** - * Gateway Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly port?: number; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; -} - -/** Defines the SAP Enqueue Replication Server (ERS) properties. */ -export interface EnqueueReplicationServerProperties { - /** - * Defines the type of Enqueue Replication Server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ersVersion?: EnqueueReplicationServerType; - /** - * ERS Instance Number. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceNo?: string; - /** - * ERS SAP Hostname. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostname?: string; - /** - * ERS SAP Kernel Version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kernelVersion?: string; - /** - * ERS SAP Kernel Patch level. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kernelPatch?: string; - /** - * ERS SAP IP Address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddress?: string; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; -} - -/** The Load Balancer details such as Load Balancer ID. */ -export interface LoadBalancerDetails { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; -} - -/** The SAP Central Services Instance VM details. */ -export interface CentralServerVmDetails { - /** - * Defines the type of central server VM. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: CentralServerVirtualMachineType; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly virtualMachineId?: string; - /** - * Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly storageDetails?: StorageInformation[]; -} - -/** Storage details of all the Storage accounts attached to the VM. For e.g. NFS on AFS Shared Storage. */ -export interface StorageInformation { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; -} - -/** Defines the request body for updating SAP Central Instance. */ -export interface UpdateSAPCentralInstanceRequest { - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Defines the collection of SAP Central Services Instance resources. */ -export interface SAPCentralInstanceList { - /** Gets the list of SAP central services instance resources. */ - value?: SAPCentralServerInstance[]; - /** Gets the value of next link. */ - nextLink?: string; -} - -/** Defines the Database properties. */ -export interface SAPDatabaseProperties { - /** - * Database subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnet?: string; - /** - * Database SID name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly databaseSid?: string; - /** - * Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly databaseType?: string; - /** - * Database IP Address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddress?: string; - /** - * The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancerDetails?: LoadBalancerDetails; - /** - * The list of virtual machines corresponding to the Database resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmDetails?: DatabaseVmDetails[]; - /** - * Defines the SAP Instance status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SAPVirtualInstanceStatus; - /** - * Defines the provisioning states. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: SapVirtualInstanceProvisioningState; - /** - * Defines the errors related to Database resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errors?: SAPVirtualInstanceError; -} - -/** Database VM details. */ -export interface DatabaseVmDetails { - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly virtualMachineId?: string; - /** - * Defines the SAP Instance status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SAPVirtualInstanceStatus; - /** - * Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly storageDetails?: StorageInformation[]; -} - -/** Defines the request body for updating SAP Database Instance. */ -export interface UpdateSAPDatabaseInstanceRequest { - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Defines the collection of SAP Database Instances. */ -export interface SAPDatabaseInstanceList { - /** Gets the list of SAP Database instances. */ - value?: SAPDatabaseInstance[]; - /** Gets the value of next link. */ - nextLink?: string; -} - -/** Defines the SAP Application Server instance properties. */ -export interface SAPApplicationServerProperties { - /** - * Application server Instance Number. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly instanceNo?: string; - /** - * Application server Subnet. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly subnet?: string; - /** - * Application server instance SAP hostname. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly hostname?: string; - /** - * Application server instance SAP Kernel Version. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kernelVersion?: string; - /** - * Application server instance SAP Kernel Patch level. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kernelPatch?: string; - /** - * Application server instance SAP IP Address. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ipAddress?: string; - /** - * Application server instance gateway Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gatewayPort?: number; - /** - * Application server instance ICM HTTP Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly icmHttpPort?: number; - /** - * Application server instance ICM HTTPS Port. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly icmHttpsPort?: number; - /** - * Application server instance dispatcher status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly dispatcherStatus?: string; - /** - * The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly loadBalancerDetails?: LoadBalancerDetails; - /** - * The list of virtual machines. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly vmDetails?: ApplicationServerVmDetails[]; - /** - * Defines the SAP Instance status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: SAPVirtualInstanceStatus; - /** - * Defines the health of SAP Instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly health?: SAPHealthState; - /** - * Defines the provisioning states. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: SapVirtualInstanceProvisioningState; - /** - * Defines the Application Instance errors. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly errors?: SAPVirtualInstanceError; -} - -/** The Application Server VM Details. */ -export interface ApplicationServerVmDetails { - /** - * Defines the type of application server VM. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: ApplicationServerVirtualMachineType; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly virtualMachineId?: string; - /** - * Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly storageDetails?: StorageInformation[]; -} - -/** Defines the request body for updating SAP Application Instance. */ -export interface UpdateSAPApplicationInstanceRequest { - /** Gets or sets the Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** Defines the collection of SAP Application Server Instance resources. */ -export interface SAPApplicationServerInstanceList { - /** Gets the list of SAP Application Server instance resources. */ - value?: SAPApplicationServerInstance[]; - /** Gets the value of next link. */ - nextLink?: string; -} - -/** Start SAP instance(s) request body. */ -export interface StartRequest { - /** The boolean value indicates whether to start the virtual machines before starting the SAP instances. */ - startVm?: boolean; -} - -/** The current status of an async operation. */ -export interface OperationStatusResult { - /** Fully qualified ID for the async operation. */ - id?: string; - /** Name of the async operation. */ - name?: string; - /** Operation status. */ - status: string; - /** Percent of the operation that is complete. */ - percentComplete?: number; - /** The start time of the operation. */ - startTime?: Date; - /** The end time of the operation. */ - endTime?: Date; - /** The operations list. */ - operations?: OperationStatusResult[]; - /** If present, details of the operation error. */ - error?: ErrorDetail; -} - -/** Stop SAP instance(s) request body. */ -export interface StopRequest { - /** This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. */ - softStopTimeoutSeconds?: number; - /** The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. */ - deallocateVm?: boolean; -} - -/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */ -export interface OperationListResult { - /** - * List of operations supported by the resource provider - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: Operation[]; - /** - * URL to get the next set of operation list results (if there are any). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** Details of a REST API operation, returned from the Resource Provider Operations API */ -export interface Operation { - /** - * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isDataAction?: boolean; - /** Localized display information for this particular operation. */ - display?: OperationDisplay; - /** - * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly origin?: Origin; - /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actionType?: ActionType; -} - -/** Localized display information for this particular operation. */ -export interface OperationDisplay { - /** - * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provider?: string; - /** - * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resource?: string; - /** - * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operation?: string; - /** - * The short, localized friendly description of the operation; suitable for tool tips and detailed views. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly description?: string; -} - -/** Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. */ -export interface ImageReference { - /** The image publisher. */ - publisher?: string; - /** Specifies the offer of the platform image or marketplace image used to create the virtual machine. */ - offer?: string; - /** The image SKU. */ - sku?: string; - /** Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. */ - version?: string; - /** Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. */ - id?: string; -} - -/** Defines the OS configuration. */ -export interface OSConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - osType: "Windows" | "Linux"; -} - -/** Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. */ -export interface SshPublicKey { - /** SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ - keyData?: string; -} - -/** SSH configuration for Linux based VMs running on Azure */ -export interface SshConfiguration { - /** The list of SSH public keys used to authenticate with linux based VMs. */ - publicKeys?: SshPublicKey[]; -} - -/** The SSH Key-pair used to authenticate with the VM. The key needs to be at least 2048-bit and in ssh-rsa format.

For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). */ -export interface SshKeyPair { - /** SSH public key */ - publicKey?: string; - /** SSH private key. */ - privateKey?: string; -} - -/** Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. */ -export interface OSProfile { - /** Specifies the name of the administrator account.

This property cannot be updated after the VM is created.

**Windows-only restriction:** Cannot end in "."

**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

**Minimum-length (Linux):** 1 character

**Max-length (Linux):** 64 characters

**Max-length (Windows):** 20 characters. */ - adminUsername?: string; - /** Specifies the password of the administrator account.

**Minimum-length (Windows):** 8 characters

**Minimum-length (Linux):** 6 characters

**Max-length (Windows):** 123 characters

**Max-length (Linux):** 72 characters

**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])

**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) */ - adminPassword?: string; - /** Specifies Windows operating system settings on the virtual machine. */ - osConfiguration?: OSConfigurationUnion; -} - -/** The Disk Configuration Details. */ -export interface DiskConfiguration { - /** The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. */ - diskVolumeConfigurations?: { - [propertyName: string]: DiskVolumeConfiguration; - }; -} - -/** Defines the virtual machine configuration. */ -export interface VirtualMachineConfiguration { - /** The virtual machine size. */ - vmSize: string; - /** The image reference. */ - imageReference: ImageReference; - /** The OS profile. */ - osProfile: OSProfile; -} - -/** Defines the network configuration type for SAP system infrastructure that is being deployed */ -export interface NetworkConfiguration { - /** Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed */ - isSecondaryIpEnabled?: boolean; -} - -/** The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP system. */ -export interface SingleServerCustomResourceNames { - /** Polymorphic discriminator, which specifies the different types this object can be */ - namingPatternType: "FullResourceName"; -} - -/** Deploy SAP Infrastructure Details. */ -export interface InfrastructureConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - deploymentType: "SingleServer" | "ThreeTier"; - /** The application resource group where SAP system resources will be deployed. */ - appResourceGroup: string; -} - -/** Gets or sets the central server configuration. */ -export interface CentralServerConfiguration { - /** The subnet id. */ - subnetId: string; - /** Gets or sets the virtual machine configuration. */ - virtualMachineConfiguration: VirtualMachineConfiguration; - /** The number of central server VMs. */ - instanceCount: number; -} - -/** Gets or sets the database configuration. */ -export interface DatabaseConfiguration { - /** The database type. */ - databaseType?: SAPDatabaseType; - /** The subnet id. */ - subnetId: string; - /** Gets or sets the virtual machine configuration. */ - virtualMachineConfiguration: VirtualMachineConfiguration; - /** The number of database VMs. */ - instanceCount: number; - /** Gets or sets the disk configuration. */ - diskConfiguration?: DiskConfiguration; -} - -/** Gets or sets the application server configuration. */ -export interface ApplicationServerConfiguration { - /** The subnet id. */ - subnetId: string; - /** Gets or sets the virtual machine configuration. */ - virtualMachineConfiguration: VirtualMachineConfiguration; - /** The number of app server instances. */ - instanceCount: number; -} - -/** Gets or sets the high availability configuration. */ -export interface HighAvailabilityConfiguration { - /** The high availability type. */ - highAvailabilityType: SAPHighAvailabilityType; -} - -/** File Share configuration details, populated with information on storage configuration mounted on the VIS. The createAndMount option is selected in case of missing input. */ -export interface FileShareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "Skip" | "CreateAndMount" | "Mount"; -} - -/** Gets or sets the storage configuration. */ -export interface StorageConfiguration { - /** The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. */ - transportFileShareConfiguration?: FileShareConfigurationUnion; -} - -/** The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP system. */ -export interface ThreeTierCustomResourceNames { - /** Polymorphic discriminator, which specifies the different types this object can be */ - namingPatternType: "FullResourceName"; -} - -/** The resource names object for virtual machine and related resources. */ -export interface VirtualMachineResourceNames { - /** The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. */ - vmName?: string; - /** The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. */ - hostName?: string; - /** The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. */ - networkInterfaces?: NetworkInterfaceResourceNames[]; - /** The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. */ - osDiskName?: string; - /** The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported */ - dataDiskNames?: { [propertyName: string]: string[] }; -} - -/** The resource names object for network interface and related resources. */ -export interface NetworkInterfaceResourceNames { - /** The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. */ - networkInterfaceName?: string; -} - -/** The full resource names object for central server layer resources. */ -export interface CentralServerFullResourceNames { - /** The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. */ - virtualMachines?: VirtualMachineResourceNames[]; - /** The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. */ - availabilitySetName?: string; - /** The resource names object for load balancer and related resources. */ - loadBalancer?: LoadBalancerResourceNames; -} - -/** The resource names object for load balancer and related resources. */ -export interface LoadBalancerResourceNames { - /** The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. */ - loadBalancerName?: string; - /** The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. */ - frontendIpConfigurationNames?: string[]; - /** The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1 */ - backendPoolNames?: string[]; - /** The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. */ - healthProbeNames?: string[]; -} - -/** The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. */ -export interface ApplicationServerFullResourceNames { - /** The list of virtual machine naming details. */ - virtualMachines?: VirtualMachineResourceNames[]; - /** The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. */ - availabilitySetName?: string; -} - -/** The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. */ -export interface DatabaseServerFullResourceNames { - /** The list of virtual machine naming details. */ - virtualMachines?: VirtualMachineResourceNames[]; - /** The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. */ - availabilitySetName?: string; - /** The resource names object for load balancer and related resources. */ - loadBalancer?: LoadBalancerResourceNames; -} - -/** The resource names object for shared storage. */ -export interface SharedStorageResourceNames { - /** The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. */ - sharedStorageAccountName?: string; - /** The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe */ - sharedStorageAccountPrivateEndPointName?: string; -} - -/** The SAP Software configuration Input. */ -export interface SoftwareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - softwareInstallationType: - | "ServiceInitiated" - | "SAPInstallWithoutOSConfig" - | "External"; -} - -/** Gets or sets the HA software configuration. */ -export interface HighAvailabilitySoftwareConfiguration { - /** The fencing client id. */ - fencingClientId: string; - /** The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. */ - fencingClientPassword: string; -} - -/** Defines the OS and SAP Configurations for Deployment */ -export interface OsSapConfiguration { - /** The url and storage account ID where deployer VM packages are uploaded */ - deployerVmPackages?: DeployerVmPackages; - /** The FQDN to set for the SAP system */ - sapFqdn?: string; -} - -/** Defines the url and storage account ID where deployer VM packages are uploaded */ -export interface DeployerVmPackages { - /** The URL to the deployer VM packages file. */ - url?: string; - /** The deployer VM packages storage account id */ - storageAccountId?: string; -} - -/** The recommended configuration for a single server SAP system. */ -export interface SingleServerRecommendationResult - extends SAPSizingRecommendationResult { - /** Polymorphic discriminator, which specifies the different types this object can be */ - deploymentType: "SingleServer"; - /** The recommended VM SKU for single server. */ - vmSku?: string; -} - -/** The recommended configuration for a three tier SAP system. */ -export interface ThreeTierRecommendationResult - extends SAPSizingRecommendationResult { - /** Polymorphic discriminator, which specifies the different types this object can be */ - deploymentType: "ThreeTier"; - /** The database VM SKU. */ - dbVmSku?: string; - /** The database server instance count. */ - databaseInstanceCount?: number; - /** The central server VM SKU. */ - centralServerVmSku?: string; - /** The central server instance count. */ - centralServerInstanceCount?: number; - /** The application server VM SKU. */ - applicationServerVmSku?: string; - /** The application server instance count. */ - applicationServerInstanceCount?: number; -} - -/** Discovery Details. */ -export interface DiscoveryConfiguration extends SAPConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "Discovery"; - /** The virtual machine ID of the Central Server. */ - centralServerVmId?: string; - /** The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.

Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).

If not provided, the service will create the storage account with a random name. */ - managedRgStorageAccountName?: string; - /** - * The geo-location where the SAP system exists. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly appLocation?: string; -} - -/** Deployment Configuration. */ -export interface DeploymentConfiguration extends SAPConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "Deployment"; - /** The geo-location where the SAP system is to be created. */ - appLocation?: string; - /** The infrastructure configuration. */ - infrastructureConfiguration?: InfrastructureConfigurationUnion; - /** The software configuration. */ - softwareConfiguration?: SoftwareConfigurationUnion; -} - -/** Deployment along with OS Configuration. */ -export interface DeploymentWithOSConfiguration extends SAPConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "DeploymentWithOSConfig"; - /** The geo-location where the SAP system is to be created. */ - appLocation?: string; - /** The infrastructure configuration. */ - infrastructureConfiguration?: InfrastructureConfigurationUnion; - /** The software configuration. */ - softwareConfiguration?: SoftwareConfigurationUnion; - /** The OS and SAP configuration. */ - osSapConfiguration?: OsSapConfiguration; -} - -/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export interface TrackedResource extends Resource { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The geo-location where the resource lives */ - location: string; -} - -/** Specifies Windows operating system settings on the virtual machine. */ -export interface WindowsConfiguration extends OSConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - osType: "Windows"; -} - -/** Specifies the Linux operating system settings on the virtual machine.

For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). */ -export interface LinuxConfiguration extends OSConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - osType: "Linux"; - /** Specifies whether password authentication should be disabled. */ - disablePasswordAuthentication?: boolean; - /** Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead) */ - ssh?: SshConfiguration; - /** The SSH Key-pair used to authenticate with the VM's. */ - sshKeyPair?: SshKeyPair; -} - -/** The resource name object where the specified values will be full resource names of the corresponding resources in a single server SAP system. */ -export interface SingleServerFullResourceNames - extends SingleServerCustomResourceNames { - /** Polymorphic discriminator, which specifies the different types this object can be */ - namingPatternType: "FullResourceName"; - /** The resource names object for virtual machine and related resources. */ - virtualMachine?: VirtualMachineResourceNames; -} - -/** Gets or sets the single server configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409) */ -export interface SingleServerConfiguration extends InfrastructureConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - deploymentType: "SingleServer"; - /** Network configuration for the server */ - networkConfiguration?: NetworkConfiguration; - /** The database type. */ - databaseType?: SAPDatabaseType; - /** The subnet id. */ - subnetId: string; - /** Gets or sets the virtual machine configuration. */ - virtualMachineConfiguration: VirtualMachineConfiguration; - /** Gets or sets the disk configuration. */ - dbDiskConfiguration?: DiskConfiguration; - /** The set of custom names to be used for underlying azure resources that are part of the SAP system. */ - customResourceNames?: SingleServerCustomResourceNamesUnion; -} - -/** Gets or sets the three tier SAP configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409) */ -export interface ThreeTierConfiguration extends InfrastructureConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - deploymentType: "ThreeTier"; - /** Network configuration common to all servers */ - networkConfiguration?: NetworkConfiguration; - /** The central server configuration. */ - centralServer: CentralServerConfiguration; - /** The application server configuration. */ - applicationServer: ApplicationServerConfiguration; - /** The database configuration. */ - databaseServer: DatabaseConfiguration; - /** The high availability configuration. */ - highAvailabilityConfig?: HighAvailabilityConfiguration; - /** The storage configuration. */ - storageConfiguration?: StorageConfiguration; - /** The set of custom names to be used for underlying azure resources that are part of the SAP system. */ - customResourceNames?: ThreeTierCustomResourceNamesUnion; -} - -/** Gets or sets the file share configuration for scenarios where transport directory fileshare is not created or required. */ -export interface SkipFileShareConfiguration extends FileShareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "Skip"; -} - -/** Gets or sets the file share configuration where the transport directory fileshare is created and mounted as a part of the create infra flow. Please pre-create the resource group you intend to place the transport directory in. The storage account and fileshare will be auto-created by the ACSS and doesn't need to be pre-created. */ -export interface CreateAndMountFileShareConfiguration - extends FileShareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "CreateAndMount"; - /** The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. */ - resourceGroup?: string; - /** The name of file share storage account name . A custom name is used in case of missing input. */ - storageAccountName?: string; -} - -/** Gets or sets the file share configuration where the transport directory fileshare already exists, and user wishes to mount the fileshare as a part of the create infra flow. */ -export interface MountFileShareConfiguration extends FileShareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - configurationType: "Mount"; - /** The fileshare resource ID */ - id: string; - /** The private endpoint resource ID */ - privateEndpointId: string; -} - -/** The resource name object where the specified values will be full resource names of the corresponding resources in a three tier SAP system. */ -export interface ThreeTierFullResourceNames - extends ThreeTierCustomResourceNames { - /** Polymorphic discriminator, which specifies the different types this object can be */ - namingPatternType: "FullResourceName"; - /** The full resource names object for central server layer resources. */ - centralServer?: CentralServerFullResourceNames; - /** The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. */ - applicationServer?: ApplicationServerFullResourceNames; - /** The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. */ - databaseServer?: DatabaseServerFullResourceNames; - /** The resource names object for shared storage. */ - sharedStorage?: SharedStorageResourceNames; -} - -/** The SAP Software configuration Input when the software is to be installed by service. */ -export interface ServiceInitiatedSoftwareConfiguration - extends SoftwareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - softwareInstallationType: "ServiceInitiated"; - /** The URL to the SAP Build of Materials(BOM) file. */ - bomUrl: string; - /** The software version to install. */ - softwareVersion: string; - /** The SAP bits storage account id. */ - sapBitsStorageAccountId: string; - /** The FQDN to set for the SAP system during install. */ - sapFqdn: string; - /** The SSH private key. */ - sshPrivateKey: string; - /** Gets or sets the HA software configuration. */ - highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; -} - -/** The SAP Software configuration Input when the software is to be installed by service without OS Configurations */ -export interface SAPInstallWithoutOSConfigSoftwareConfiguration - extends SoftwareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - softwareInstallationType: "SAPInstallWithoutOSConfig"; - /** The URL to the SAP Build of Materials(BOM) file. */ - bomUrl: string; - /** The SAP bits storage account id. */ - sapBitsStorageAccountId: string; - /** The software version to install. */ - softwareVersion: string; - /** Gets or sets the HA software configuration. */ - highAvailabilitySoftwareConfiguration?: HighAvailabilitySoftwareConfiguration; -} - -/** The SAP Software configuration Input when the software is installed externally outside the service. */ -export interface ExternalInstallationSoftwareConfiguration - extends SoftwareConfiguration { - /** Polymorphic discriminator, which specifies the different types this object can be */ - softwareInstallationType: "External"; - /** The resource ID of the virtual machine containing the central server instance. */ - centralServerVmId?: string; -} - -/** Define the Virtual Instance for SAP solutions resource. */ -export interface SAPVirtualInstance extends TrackedResource { - /** Managed service identity (user assigned identities) */ - identity?: UserAssignedServiceIdentity; - /** Defines the Virtual Instance for SAP solutions resource properties. */ - properties: SAPVirtualInstanceProperties; -} - -/** Define the SAP Central Services Instance resource. */ -export interface SAPCentralServerInstance extends TrackedResource { - /** Defines the SAP Central Services Instance properties. */ - properties?: SAPCentralServerProperties; -} - -/** Define the Database resource. */ -export interface SAPDatabaseInstance extends TrackedResource { - /** Defines the Database properties. */ - properties?: SAPDatabaseProperties; -} - -/** Define the SAP Application Server Instance resource. */ -export interface SAPApplicationServerInstance extends TrackedResource { - /** Defines the SAP Application Server instance properties. */ - properties?: SAPApplicationServerProperties; -} - -/** Defines headers for SAPVirtualInstances_update operation. */ -export interface SAPVirtualInstancesUpdateHeaders { - /** URL to poll for status updates. */ - location?: string; -} - -/** Defines headers for SAPVirtualInstances_delete operation. */ -export interface SAPVirtualInstancesDeleteHeaders { - /** URL to poll for status updates. */ - location?: string; -} - -/** Defines headers for SAPVirtualInstances_start operation. */ -export interface SAPVirtualInstancesStartHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPVirtualInstances_stop operation. */ -export interface SAPVirtualInstancesStopHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPCentralInstances_delete operation. */ -export interface SAPCentralInstancesDeleteHeaders { - /** The URI to fetch the updated SAP Central Services Instance resource. */ - location?: string; -} - -/** Defines headers for SAPCentralInstances_startInstance operation. */ -export interface SAPCentralInstancesStartInstanceHeaders { - /** The URI to fetch the updated central instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPCentralInstances_stopInstance operation. */ -export interface SAPCentralInstancesStopInstanceHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPDatabaseInstances_delete operation. */ -export interface SAPDatabaseInstancesDeleteHeaders { - /** The URI to fetch the updated SAP Database Instance resource. */ - location?: string; -} - -/** Defines headers for SAPDatabaseInstances_startInstance operation. */ -export interface SAPDatabaseInstancesStartInstanceHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPDatabaseInstances_stopInstance operation. */ -export interface SAPDatabaseInstancesStopInstanceHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPApplicationServerInstances_delete operation. */ -export interface SAPApplicationServerInstancesDeleteHeaders { - /** The URI to fetch the updated SAP Application Server Instance resource. */ - location?: string; -} - -/** Defines headers for SAPApplicationServerInstances_startInstance operation. */ -export interface SAPApplicationServerInstancesStartInstanceHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Defines headers for SAPApplicationServerInstances_stopInstance operation. */ -export interface SAPApplicationServerInstancesStopInstanceHeaders { - /** The URI to fetch the updated Virtual Instance for SAP resource. */ - location?: string; -} - -/** Known values of {@link SAPEnvironmentType} that the service accepts. */ -export enum KnownSAPEnvironmentType { - /** NonProd */ - NonProd = "NonProd", - /** Prod */ - Prod = "Prod", -} - -/** - * Defines values for SAPEnvironmentType. \ - * {@link KnownSAPEnvironmentType} can be used interchangeably with SAPEnvironmentType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NonProd** \ - * **Prod** - */ -export type SAPEnvironmentType = string; - -/** Known values of {@link SAPProductType} that the service accepts. */ -export enum KnownSAPProductType { - /** ECC */ - ECC = "ECC", - /** S4Hana */ - S4Hana = "S4HANA", - /** Other */ - Other = "Other", -} - -/** - * Defines values for SAPProductType. \ - * {@link KnownSAPProductType} can be used interchangeably with SAPProductType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ECC** \ - * **S4HANA** \ - * **Other** - */ -export type SAPProductType = string; - -/** Known values of {@link SAPDeploymentType} that the service accepts. */ -export enum KnownSAPDeploymentType { - /** SingleServer */ - SingleServer = "SingleServer", - /** ThreeTier */ - ThreeTier = "ThreeTier", -} - -/** - * Defines values for SAPDeploymentType. \ - * {@link KnownSAPDeploymentType} can be used interchangeably with SAPDeploymentType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SingleServer** \ - * **ThreeTier** - */ -export type SAPDeploymentType = string; - -/** Known values of {@link SAPDatabaseType} that the service accepts. */ -export enum KnownSAPDatabaseType { - /** Hana */ - Hana = "HANA", - /** DB2 */ - DB2 = "DB2", -} - -/** - * Defines values for SAPDatabaseType. \ - * {@link KnownSAPDatabaseType} can be used interchangeably with SAPDatabaseType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **HANA** \ - * **DB2** - */ -export type SAPDatabaseType = string; - -/** Known values of {@link SAPDatabaseScaleMethod} that the service accepts. */ -export enum KnownSAPDatabaseScaleMethod { - /** ScaleUp */ - ScaleUp = "ScaleUp", -} - -/** - * Defines values for SAPDatabaseScaleMethod. \ - * {@link KnownSAPDatabaseScaleMethod} can be used interchangeably with SAPDatabaseScaleMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ScaleUp** - */ -export type SAPDatabaseScaleMethod = string; - -/** Known values of {@link SAPHighAvailabilityType} that the service accepts. */ -export enum KnownSAPHighAvailabilityType { - /** AvailabilitySet */ - AvailabilitySet = "AvailabilitySet", - /** AvailabilityZone */ - AvailabilityZone = "AvailabilityZone", -} - -/** - * Defines values for SAPHighAvailabilityType. \ - * {@link KnownSAPHighAvailabilityType} can be used interchangeably with SAPHighAvailabilityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AvailabilitySet** \ - * **AvailabilityZone** - */ -export type SAPHighAvailabilityType = string; - -/** Known values of {@link DiskSkuName} that the service accepts. */ -export enum KnownDiskSkuName { - /** StandardLRS */ - StandardLRS = "Standard_LRS", - /** PremiumLRS */ - PremiumLRS = "Premium_LRS", - /** StandardSSDLRS */ - StandardSSDLRS = "StandardSSD_LRS", - /** UltraSSDLRS */ - UltraSSDLRS = "UltraSSD_LRS", - /** PremiumZRS */ - PremiumZRS = "Premium_ZRS", - /** StandardSSDZRS */ - StandardSSDZRS = "StandardSSD_ZRS", - /** PremiumV2LRS */ - PremiumV2LRS = "PremiumV2_LRS", -} - -/** - * Defines values for DiskSkuName. \ - * {@link KnownDiskSkuName} can be used interchangeably with DiskSkuName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Standard_LRS** \ - * **Premium_LRS** \ - * **StandardSSD_LRS** \ - * **UltraSSD_LRS** \ - * **Premium_ZRS** \ - * **StandardSSD_ZRS** \ - * **PremiumV2_LRS** - */ -export type DiskSkuName = string; - -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** UserAssigned */ - UserAssigned = "UserAssigned", -} - -/** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **UserAssigned** - */ -export type ManagedServiceIdentityType = string; - -/** Known values of {@link ManagedResourcesNetworkAccessType} that the service accepts. */ -export enum KnownManagedResourcesNetworkAccessType { - /** Public */ - Public = "Public", - /** Private */ - Private = "Private", -} - -/** - * Defines values for ManagedResourcesNetworkAccessType. \ - * {@link KnownManagedResourcesNetworkAccessType} can be used interchangeably with ManagedResourcesNetworkAccessType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Public** \ - * **Private** - */ -export type ManagedResourcesNetworkAccessType = string; - -/** Known values of {@link SAPConfigurationType} that the service accepts. */ -export enum KnownSAPConfigurationType { - /** Deployment */ - Deployment = "Deployment", - /** Discovery */ - Discovery = "Discovery", - /** DeploymentWithOSConfig */ - DeploymentWithOSConfig = "DeploymentWithOSConfig", -} - -/** - * Defines values for SAPConfigurationType. \ - * {@link KnownSAPConfigurationType} can be used interchangeably with SAPConfigurationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Deployment** \ - * **Discovery** \ - * **DeploymentWithOSConfig** - */ -export type SAPConfigurationType = string; - -/** Known values of {@link SAPVirtualInstanceStatus} that the service accepts. */ -export enum KnownSAPVirtualInstanceStatus { - /** Starting */ - Starting = "Starting", - /** Running */ - Running = "Running", - /** Stopping */ - Stopping = "Stopping", - /** Offline */ - Offline = "Offline", - /** PartiallyRunning */ - PartiallyRunning = "PartiallyRunning", - /** Unavailable */ - Unavailable = "Unavailable", - /** SoftShutdown */ - SoftShutdown = "SoftShutdown", -} - -/** - * Defines values for SAPVirtualInstanceStatus. \ - * {@link KnownSAPVirtualInstanceStatus} can be used interchangeably with SAPVirtualInstanceStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Starting** \ - * **Running** \ - * **Stopping** \ - * **Offline** \ - * **PartiallyRunning** \ - * **Unavailable** \ - * **SoftShutdown** - */ -export type SAPVirtualInstanceStatus = string; - -/** Known values of {@link SAPHealthState} that the service accepts. */ -export enum KnownSAPHealthState { - /** Unknown */ - Unknown = "Unknown", - /** Healthy */ - Healthy = "Healthy", - /** Unhealthy */ - Unhealthy = "Unhealthy", - /** Degraded */ - Degraded = "Degraded", -} - -/** - * Defines values for SAPHealthState. \ - * {@link KnownSAPHealthState} can be used interchangeably with SAPHealthState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **Healthy** \ - * **Unhealthy** \ - * **Degraded** - */ -export type SAPHealthState = string; - -/** Known values of {@link SAPVirtualInstanceState} that the service accepts. */ -export enum KnownSAPVirtualInstanceState { - /** InfrastructureDeploymentPending */ - InfrastructureDeploymentPending = "InfrastructureDeploymentPending", - /** InfrastructureDeploymentInProgress */ - InfrastructureDeploymentInProgress = "InfrastructureDeploymentInProgress", - /** InfrastructureDeploymentFailed */ - InfrastructureDeploymentFailed = "InfrastructureDeploymentFailed", - /** SoftwareInstallationPending */ - SoftwareInstallationPending = "SoftwareInstallationPending", - /** SoftwareInstallationInProgress */ - SoftwareInstallationInProgress = "SoftwareInstallationInProgress", - /** SoftwareInstallationFailed */ - SoftwareInstallationFailed = "SoftwareInstallationFailed", - /** SoftwareDetectionInProgress */ - SoftwareDetectionInProgress = "SoftwareDetectionInProgress", - /** SoftwareDetectionFailed */ - SoftwareDetectionFailed = "SoftwareDetectionFailed", - /** DiscoveryPending */ - DiscoveryPending = "DiscoveryPending", - /** DiscoveryInProgress */ - DiscoveryInProgress = "DiscoveryInProgress", - /** DiscoveryFailed */ - DiscoveryFailed = "DiscoveryFailed", - /** RegistrationComplete */ - RegistrationComplete = "RegistrationComplete", - /** AcssInstallationBlocked */ - AcssInstallationBlocked = "ACSSInstallationBlocked", -} - -/** - * Defines values for SAPVirtualInstanceState. \ - * {@link KnownSAPVirtualInstanceState} can be used interchangeably with SAPVirtualInstanceState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **InfrastructureDeploymentPending** \ - * **InfrastructureDeploymentInProgress** \ - * **InfrastructureDeploymentFailed** \ - * **SoftwareInstallationPending** \ - * **SoftwareInstallationInProgress** \ - * **SoftwareInstallationFailed** \ - * **SoftwareDetectionInProgress** \ - * **SoftwareDetectionFailed** \ - * **DiscoveryPending** \ - * **DiscoveryInProgress** \ - * **DiscoveryFailed** \ - * **RegistrationComplete** \ - * **ACSSInstallationBlocked** - */ -export type SAPVirtualInstanceState = string; - -/** Known values of {@link SapVirtualInstanceProvisioningState} that the service accepts. */ -export enum KnownSapVirtualInstanceProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Updating */ - Updating = "Updating", - /** Creating */ - Creating = "Creating", - /** Failed */ - Failed = "Failed", - /** Deleting */ - Deleting = "Deleting", - /** Canceled */ - Canceled = "Canceled", -} - -/** - * Defines values for SapVirtualInstanceProvisioningState. \ - * {@link KnownSapVirtualInstanceProvisioningState} can be used interchangeably with SapVirtualInstanceProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Updating** \ - * **Creating** \ - * **Failed** \ - * **Deleting** \ - * **Canceled** - */ -export type SapVirtualInstanceProvisioningState = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key", -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; - -/** Known values of {@link EnqueueReplicationServerType} that the service accepts. */ -export enum KnownEnqueueReplicationServerType { - /** EnqueueReplicator1 */ - EnqueueReplicator1 = "EnqueueReplicator1", - /** EnqueueReplicator2 */ - EnqueueReplicator2 = "EnqueueReplicator2", -} - -/** - * Defines values for EnqueueReplicationServerType. \ - * {@link KnownEnqueueReplicationServerType} can be used interchangeably with EnqueueReplicationServerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **EnqueueReplicator1** \ - * **EnqueueReplicator2** - */ -export type EnqueueReplicationServerType = string; - -/** Known values of {@link CentralServerVirtualMachineType} that the service accepts. */ -export enum KnownCentralServerVirtualMachineType { - /** Primary */ - Primary = "Primary", - /** Secondary */ - Secondary = "Secondary", - /** Unknown */ - Unknown = "Unknown", - /** Ascs */ - Ascs = "ASCS", - /** ERSInactive */ - ERSInactive = "ERSInactive", - /** ERS */ - ERS = "ERS", - /** Standby */ - Standby = "Standby", -} - -/** - * Defines values for CentralServerVirtualMachineType. \ - * {@link KnownCentralServerVirtualMachineType} can be used interchangeably with CentralServerVirtualMachineType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Primary** \ - * **Secondary** \ - * **Unknown** \ - * **ASCS** \ - * **ERSInactive** \ - * **ERS** \ - * **Standby** - */ -export type CentralServerVirtualMachineType = string; - -/** Known values of {@link ApplicationServerVirtualMachineType} that the service accepts. */ -export enum KnownApplicationServerVirtualMachineType { - /** Active */ - Active = "Active", - /** Standby */ - Standby = "Standby", - /** Unknown */ - Unknown = "Unknown", -} - -/** - * Defines values for ApplicationServerVirtualMachineType. \ - * {@link KnownApplicationServerVirtualMachineType} can be used interchangeably with ApplicationServerVirtualMachineType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Active** \ - * **Standby** \ - * **Unknown** - */ -export type ApplicationServerVirtualMachineType = string; - -/** Known values of {@link Origin} that the service accepts. */ -export enum KnownOrigin { - /** User */ - User = "user", - /** System */ - System = "system", - /** UserSystem */ - UserSystem = "user,system", -} - -/** - * Defines values for Origin. \ - * {@link KnownOrigin} can be used interchangeably with Origin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** \ - * **user,system** - */ -export type Origin = string; - -/** Known values of {@link ActionType} that the service accepts. */ -export enum KnownActionType { - /** Internal */ - Internal = "Internal", -} - -/** - * Defines values for ActionType. \ - * {@link KnownActionType} can be used interchangeably with ActionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Internal** - */ -export type ActionType = string; - -/** Known values of {@link OSType} that the service accepts. */ -export enum KnownOSType { - /** Linux */ - Linux = "Linux", - /** Windows */ - Windows = "Windows", -} - -/** - * Defines values for OSType. \ - * {@link KnownOSType} can be used interchangeably with OSType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Linux** \ - * **Windows** - */ -export type OSType = string; - -/** Known values of {@link NamingPatternType} that the service accepts. */ -export enum KnownNamingPatternType { - /** FullResourceName */ - FullResourceName = "FullResourceName", -} - -/** - * Defines values for NamingPatternType. \ - * {@link KnownNamingPatternType} can be used interchangeably with NamingPatternType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **FullResourceName** - */ -export type NamingPatternType = string; - -/** Known values of {@link ConfigurationType} that the service accepts. */ -export enum KnownConfigurationType { - /** Skip */ - Skip = "Skip", - /** CreateAndMount */ - CreateAndMount = "CreateAndMount", - /** Mount */ - Mount = "Mount", -} - -/** - * Defines values for ConfigurationType. \ - * {@link KnownConfigurationType} can be used interchangeably with ConfigurationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Skip** \ - * **CreateAndMount** \ - * **Mount** - */ -export type ConfigurationType = string; - -/** Known values of {@link SAPSoftwareInstallationType} that the service accepts. */ -export enum KnownSAPSoftwareInstallationType { - /** ServiceInitiated */ - ServiceInitiated = "ServiceInitiated", - /** SAPInstallWithoutOSConfig */ - SAPInstallWithoutOSConfig = "SAPInstallWithoutOSConfig", - /** External */ - External = "External", -} - -/** - * Defines values for SAPSoftwareInstallationType. \ - * {@link KnownSAPSoftwareInstallationType} can be used interchangeably with SAPSoftwareInstallationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ServiceInitiated** \ - * **SAPInstallWithoutOSConfig** \ - * **External** - */ -export type SAPSoftwareInstallationType = string; - -/** Optional parameters. */ -export interface SAPSizingRecommendationsOptionalParams - extends coreClient.OperationOptions { - /** SAP Sizing Recommendation Request body */ - sAPSizingRecommendation?: SAPSizingRecommendationRequest; -} - -/** Contains response data for the sAPSizingRecommendations operation. */ -export type SAPSizingRecommendationsResponse = - SAPSizingRecommendationResultUnion; - -/** Optional parameters. */ -export interface SAPSupportedSkuOptionalParams - extends coreClient.OperationOptions { - /** SAP Supported SKU Request body */ - sAPSupportedSku?: SAPSupportedSkusRequest; -} - -/** Contains response data for the sAPSupportedSku operation. */ -export type SAPSupportedSkuResponse = SAPSupportedResourceSkusResult; - -/** Optional parameters. */ -export interface SAPDiskConfigurationsOptionalParams - extends coreClient.OperationOptions { - /** SAP Disk Configurations Request body */ - sAPDiskConfigurations?: SAPDiskConfigurationsRequest; -} - -/** Contains response data for the sAPDiskConfigurations operation. */ -export type SAPDiskConfigurationsResponse = SAPDiskConfigurationsResult; - -/** Optional parameters. */ -export interface SAPAvailabilityZoneDetailsOptionalParams - extends coreClient.OperationOptions { - /** SAP Availability Zone Details Request body */ - sAPAvailabilityZoneDetails?: SAPAvailabilityZoneDetailsRequest; -} - -/** Contains response data for the sAPAvailabilityZoneDetails operation. */ -export type SAPAvailabilityZoneDetailsResponse = - SAPAvailabilityZoneDetailsResult; - -/** Optional parameters. */ -export interface SAPVirtualInstancesCreateOptionalParams - extends coreClient.OperationOptions { - /** Virtual Instance for SAP solutions resource request body. */ - body?: SAPVirtualInstance; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type SAPVirtualInstancesCreateResponse = SAPVirtualInstance; - -/** Optional parameters. */ -export interface SAPVirtualInstancesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SAPVirtualInstancesGetResponse = SAPVirtualInstance; - -/** Optional parameters. */ -export interface SAPVirtualInstancesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Request body to update a Virtual Instance for SAP solutions resource. */ - body?: UpdateSAPVirtualInstanceRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type SAPVirtualInstancesUpdateResponse = SAPVirtualInstance; - -/** Optional parameters. */ -export interface SAPVirtualInstancesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type SAPVirtualInstancesDeleteResponse = - SAPVirtualInstancesDeleteHeaders; - -/** Optional parameters. */ -export interface SAPVirtualInstancesListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type SAPVirtualInstancesListByResourceGroupResponse = - SAPVirtualInstanceList; - -/** Optional parameters. */ -export interface SAPVirtualInstancesListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type SAPVirtualInstancesListBySubscriptionResponse = - SAPVirtualInstanceList; - -/** Optional parameters. */ -export interface SAPVirtualInstancesStartOptionalParams - extends coreClient.OperationOptions { - /** The Virtual Instance for SAP solutions resource start request body. */ - body?: StartRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the start operation. */ -export type SAPVirtualInstancesStartResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SAPVirtualInstancesStopOptionalParams - extends coreClient.OperationOptions { - /** The Virtual Instance for SAP solutions resource stop request body. */ - body?: StopRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the stop operation. */ -export type SAPVirtualInstancesStopResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SAPVirtualInstancesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type SAPVirtualInstancesListByResourceGroupNextResponse = - SAPVirtualInstanceList; - -/** Optional parameters. */ -export interface SAPVirtualInstancesListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type SAPVirtualInstancesListBySubscriptionNextResponse = - SAPVirtualInstanceList; - -/** Optional parameters. */ -export interface SAPCentralInstancesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SAPCentralInstancesGetResponse = SAPCentralServerInstance; - -/** Optional parameters. */ -export interface SAPCentralInstancesCreateOptionalParams - extends coreClient.OperationOptions { - /** The SAP Central Services Instance request body. */ - body?: SAPCentralServerInstance; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type SAPCentralInstancesCreateResponse = SAPCentralServerInstance; - -/** Optional parameters. */ -export interface SAPCentralInstancesUpdateOptionalParams - extends coreClient.OperationOptions { - /** The SAP Central Services Instance resource request body. */ - body?: UpdateSAPCentralInstanceRequest; -} - -/** Contains response data for the update operation. */ -export type SAPCentralInstancesUpdateResponse = SAPCentralServerInstance; - -/** Optional parameters. */ -export interface SAPCentralInstancesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type SAPCentralInstancesDeleteResponse = - SAPCentralInstancesDeleteHeaders; - -/** Optional parameters. */ -export interface SAPCentralInstancesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SAPCentralInstancesListResponse = SAPCentralInstanceList; - -/** Optional parameters. */ -export interface SAPCentralInstancesStartInstanceOptionalParams - extends coreClient.OperationOptions { - /** SAP Central Services instance start request body. */ - body?: StartRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the startInstance operation. */ -export type SAPCentralInstancesStartInstanceResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SAPCentralInstancesStopInstanceOptionalParams - extends coreClient.OperationOptions { - /** SAP Central Services instance stop request body. */ - body?: StopRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the stopInstance operation. */ -export type SAPCentralInstancesStopInstanceResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SAPCentralInstancesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SAPCentralInstancesListNextResponse = SAPCentralInstanceList; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SAPDatabaseInstancesGetResponse = SAPDatabaseInstance; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesCreateOptionalParams - extends coreClient.OperationOptions { - /** Request body of Database resource of a SAP system. */ - body?: SAPDatabaseInstance; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type SAPDatabaseInstancesCreateResponse = SAPDatabaseInstance; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Database resource update request body. */ - body?: UpdateSAPDatabaseInstanceRequest; -} - -/** Contains response data for the update operation. */ -export type SAPDatabaseInstancesUpdateResponse = SAPDatabaseInstance; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type SAPDatabaseInstancesDeleteResponse = - SAPDatabaseInstancesDeleteHeaders; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SAPDatabaseInstancesListResponse = SAPDatabaseInstanceList; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesStartInstanceOptionalParams - extends coreClient.OperationOptions { - /** SAP Database server instance start request body. */ - body?: StartRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the startInstance operation. */ -export type SAPDatabaseInstancesStartInstanceResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesStopInstanceOptionalParams - extends coreClient.OperationOptions { - /** Stop request for the database instance of the SAP system. */ - body?: StopRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the stopInstance operation. */ -export type SAPDatabaseInstancesStopInstanceResponse = OperationStatusResult; - -/** Optional parameters. */ -export interface SAPDatabaseInstancesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SAPDatabaseInstancesListNextResponse = SAPDatabaseInstanceList; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SAPApplicationServerInstancesGetResponse = - SAPApplicationServerInstance; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesCreateOptionalParams - extends coreClient.OperationOptions { - /** The SAP Application Server Instance resource request body. */ - body?: SAPApplicationServerInstance; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the create operation. */ -export type SAPApplicationServerInstancesCreateResponse = - SAPApplicationServerInstance; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesUpdateOptionalParams - extends coreClient.OperationOptions { - /** The SAP Application Server Instance resource request body. */ - body?: UpdateSAPApplicationInstanceRequest; -} - -/** Contains response data for the update operation. */ -export type SAPApplicationServerInstancesUpdateResponse = - SAPApplicationServerInstance; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type SAPApplicationServerInstancesDeleteResponse = - SAPApplicationServerInstancesDeleteHeaders; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type SAPApplicationServerInstancesListResponse = - SAPApplicationServerInstanceList; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesStartInstanceOptionalParams - extends coreClient.OperationOptions { - /** SAP Application server instance start request body. */ - body?: StartRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the startInstance operation. */ -export type SAPApplicationServerInstancesStartInstanceResponse = - OperationStatusResult; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesStopInstanceOptionalParams - extends coreClient.OperationOptions { - /** SAP Application server instance stop request body. */ - body?: StopRequest; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the stopInstance operation. */ -export type SAPApplicationServerInstancesStopInstanceResponse = - OperationStatusResult; - -/** Optional parameters. */ -export interface SAPApplicationServerInstancesListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type SAPApplicationServerInstancesListNextResponse = - SAPApplicationServerInstanceList; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface WorkloadsClientOptionalParams - extends coreClient.ServiceClientOptions { - /** server parameter */ - $host?: string; - /** Api Version */ - apiVersion?: string; - /** Overrides client endpoint. */ - endpoint?: string; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/models/mappers.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/models/mappers.ts deleted file mode 100644 index 4bb32493a425..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/models/mappers.ts +++ /dev/null @@ -1,3615 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; - -export const SAPSizingRecommendationRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPSizingRecommendationRequest", - modelProperties: { - appLocation: { - serializedName: "appLocation", - required: true, - type: { - name: "String", - }, - }, - environment: { - serializedName: "environment", - required: true, - type: { - name: "String", - }, - }, - sapProduct: { - serializedName: "sapProduct", - required: true, - type: { - name: "String", - }, - }, - deploymentType: { - serializedName: "deploymentType", - required: true, - type: { - name: "String", - }, - }, - saps: { - serializedName: "saps", - required: true, - type: { - name: "Number", - }, - }, - dbMemory: { - serializedName: "dbMemory", - required: true, - type: { - name: "Number", - }, - }, - databaseType: { - serializedName: "databaseType", - required: true, - type: { - name: "String", - }, - }, - dbScaleMethod: { - serializedName: "dbScaleMethod", - type: { - name: "String", - }, - }, - highAvailabilityType: { - serializedName: "highAvailabilityType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPSizingRecommendationResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPSizingRecommendationResult", - uberParent: "SAPSizingRecommendationResult", - polymorphicDiscriminator: { - serializedName: "deploymentType", - clientName: "deploymentType", - }, - modelProperties: { - deploymentType: { - serializedName: "deploymentType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const ErrorDetail: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetail", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, - additionalInfo: { - serializedName: "additionalInfo", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - }, - }, - }, - }, - }, - }, -}; - -export const ErrorAdditionalInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorAdditionalInfo", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - info: { - serializedName: "info", - readOnly: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - }, - }, -}; - -export const SAPSupportedSkusRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPSupportedSkusRequest", - modelProperties: { - appLocation: { - serializedName: "appLocation", - required: true, - type: { - name: "String", - }, - }, - environment: { - serializedName: "environment", - required: true, - type: { - name: "String", - }, - }, - sapProduct: { - serializedName: "sapProduct", - required: true, - type: { - name: "String", - }, - }, - deploymentType: { - serializedName: "deploymentType", - required: true, - type: { - name: "String", - }, - }, - databaseType: { - serializedName: "databaseType", - required: true, - type: { - name: "String", - }, - }, - highAvailabilityType: { - serializedName: "highAvailabilityType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPSupportedResourceSkusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPSupportedResourceSkusResult", - modelProperties: { - supportedSkus: { - serializedName: "supportedSkus", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SAPSupportedSku", - }, - }, - }, - }, - }, - }, -}; - -export const SAPSupportedSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPSupportedSku", - modelProperties: { - vmSku: { - serializedName: "vmSku", - type: { - name: "String", - }, - }, - isAppServerCertified: { - serializedName: "isAppServerCertified", - type: { - name: "Boolean", - }, - }, - isDatabaseCertified: { - serializedName: "isDatabaseCertified", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const SAPDiskConfigurationsRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDiskConfigurationsRequest", - modelProperties: { - appLocation: { - serializedName: "appLocation", - required: true, - type: { - name: "String", - }, - }, - environment: { - serializedName: "environment", - required: true, - type: { - name: "String", - }, - }, - sapProduct: { - serializedName: "sapProduct", - required: true, - type: { - name: "String", - }, - }, - databaseType: { - serializedName: "databaseType", - required: true, - type: { - name: "String", - }, - }, - deploymentType: { - serializedName: "deploymentType", - required: true, - type: { - name: "String", - }, - }, - dbVmSku: { - serializedName: "dbVmSku", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPDiskConfigurationsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDiskConfigurationsResult", - modelProperties: { - volumeConfigurations: { - serializedName: "volumeConfigurations", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "SAPDiskConfiguration" }, - }, - }, - }, - }, - }, -}; - -export const SAPDiskConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDiskConfiguration", - modelProperties: { - recommendedConfiguration: { - serializedName: "recommendedConfiguration", - type: { - name: "Composite", - className: "DiskVolumeConfiguration", - }, - }, - supportedConfigurations: { - serializedName: "supportedConfigurations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiskDetails", - }, - }, - }, - }, - }, - }, -}; - -export const DiskVolumeConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiskVolumeConfiguration", - modelProperties: { - count: { - serializedName: "count", - type: { - name: "Number", - }, - }, - sizeGB: { - serializedName: "sizeGB", - type: { - name: "Number", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "DiskSku", - }, - }, - }, - }, -}; - -export const DiskSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiskSku", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DiskDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiskDetails", - modelProperties: { - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "DiskSku", - }, - }, - sizeGB: { - serializedName: "sizeGB", - type: { - name: "Number", - }, - }, - minimumSupportedDiskCount: { - serializedName: "minimumSupportedDiskCount", - type: { - name: "Number", - }, - }, - maximumSupportedDiskCount: { - serializedName: "maximumSupportedDiskCount", - type: { - name: "Number", - }, - }, - iopsReadWrite: { - serializedName: "iopsReadWrite", - type: { - name: "Number", - }, - }, - mbpsReadWrite: { - serializedName: "mbpsReadWrite", - type: { - name: "Number", - }, - }, - diskTier: { - serializedName: "diskTier", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPAvailabilityZoneDetailsRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPAvailabilityZoneDetailsRequest", - modelProperties: { - appLocation: { - serializedName: "appLocation", - required: true, - type: { - name: "String", - }, - }, - sapProduct: { - serializedName: "sapProduct", - required: true, - type: { - name: "String", - }, - }, - databaseType: { - serializedName: "databaseType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPAvailabilityZoneDetailsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPAvailabilityZoneDetailsResult", - modelProperties: { - availabilityZonePairs: { - serializedName: "availabilityZonePairs", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SAPAvailabilityZonePair", - }, - }, - }, - }, - }, - }, -}; - -export const SAPAvailabilityZonePair: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPAvailabilityZonePair", - modelProperties: { - zoneA: { - serializedName: "zoneA", - type: { - name: "Number", - }, - }, - zoneB: { - serializedName: "zoneB", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const UserAssignedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedServiceIdentity", - modelProperties: { - type: { - serializedName: "type", - required: true, - type: { - name: "String", - }, - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" }, - }, - }, - }, - }, - }, -}; - -export const UserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - }, - }, -}; - -export const SAPVirtualInstanceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstanceProperties", - modelProperties: { - environment: { - serializedName: "environment", - required: true, - type: { - name: "String", - }, - }, - sapProduct: { - serializedName: "sapProduct", - required: true, - type: { - name: "String", - }, - }, - managedResourcesNetworkAccessType: { - serializedName: "managedResourcesNetworkAccessType", - type: { - name: "String", - }, - }, - configuration: { - serializedName: "configuration", - type: { - name: "Composite", - className: "SAPConfiguration", - }, - }, - managedResourceGroupConfiguration: { - serializedName: "managedResourceGroupConfiguration", - type: { - name: "Composite", - className: "ManagedRGConfiguration", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - state: { - serializedName: "state", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - errors: { - serializedName: "errors", - type: { - name: "Composite", - className: "SAPVirtualInstanceError", - }, - }, - }, - }, -}; - -export const SAPConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPConfiguration", - uberParent: "SAPConfiguration", - polymorphicDiscriminator: { - serializedName: "configurationType", - clientName: "configurationType", - }, - modelProperties: { - configurationType: { - serializedName: "configurationType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ManagedRGConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedRGConfiguration", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPVirtualInstanceError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstanceError", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ErrorDefinition", - }, - }, - }, - }, -}; - -export const ErrorDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDefinition", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorDefinition", - }, - }, - }, - }, - }, - }, -}; - -export const Resource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, - }, - }, -}; - -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const UpdateSAPVirtualInstanceRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateSAPVirtualInstanceRequest", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "UserAssignedServiceIdentity", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "UpdateSAPVirtualInstanceProperties", - }, - }, - }, - }, -}; - -export const UpdateSAPVirtualInstanceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateSAPVirtualInstanceProperties", - modelProperties: { - managedResourcesNetworkAccessType: { - serializedName: "managedResourcesNetworkAccessType", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPVirtualInstanceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstanceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SAPVirtualInstance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPCentralServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPCentralServerProperties", - modelProperties: { - instanceNo: { - serializedName: "instanceNo", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "subnet", - readOnly: true, - type: { - name: "String", - }, - }, - messageServerProperties: { - serializedName: "messageServerProperties", - type: { - name: "Composite", - className: "MessageServerProperties", - }, - }, - enqueueServerProperties: { - serializedName: "enqueueServerProperties", - type: { - name: "Composite", - className: "EnqueueServerProperties", - }, - }, - gatewayServerProperties: { - serializedName: "gatewayServerProperties", - type: { - name: "Composite", - className: "GatewayServerProperties", - }, - }, - enqueueReplicationServerProperties: { - serializedName: "enqueueReplicationServerProperties", - type: { - name: "Composite", - className: "EnqueueReplicationServerProperties", - }, - }, - kernelVersion: { - serializedName: "kernelVersion", - readOnly: true, - nullable: true, - type: { - name: "String", - }, - }, - kernelPatch: { - serializedName: "kernelPatch", - readOnly: true, - nullable: true, - type: { - name: "String", - }, - }, - loadBalancerDetails: { - serializedName: "loadBalancerDetails", - type: { - name: "Composite", - className: "LoadBalancerDetails", - }, - }, - vmDetails: { - serializedName: "vmDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CentralServerVmDetails", - }, - }, - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - errors: { - serializedName: "errors", - type: { - name: "Composite", - className: "SAPVirtualInstanceError", - }, - }, - }, - }, -}; - -export const MessageServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MessageServerProperties", - modelProperties: { - msPort: { - serializedName: "msPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - internalMsPort: { - serializedName: "internalMsPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - httpPort: { - serializedName: "httpPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - httpsPort: { - serializedName: "httpsPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - hostname: { - serializedName: "hostname", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EnqueueServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EnqueueServerProperties", - modelProperties: { - hostname: { - serializedName: "hostname", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String", - }, - }, - port: { - serializedName: "port", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const GatewayServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GatewayServerProperties", - modelProperties: { - port: { - serializedName: "port", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const EnqueueReplicationServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EnqueueReplicationServerProperties", - modelProperties: { - ersVersion: { - serializedName: "ersVersion", - readOnly: true, - type: { - name: "String", - }, - }, - instanceNo: { - serializedName: "instanceNo", - readOnly: true, - type: { - name: "String", - }, - }, - hostname: { - serializedName: "hostname", - readOnly: true, - type: { - name: "String", - }, - }, - kernelVersion: { - serializedName: "kernelVersion", - readOnly: true, - type: { - name: "String", - }, - }, - kernelPatch: { - serializedName: "kernelPatch", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const LoadBalancerDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerDetails", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CentralServerVmDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CentralServerVmDetails", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachineId: { - serializedName: "virtualMachineId", - readOnly: true, - type: { - name: "String", - }, - }, - storageDetails: { - serializedName: "storageDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageInformation", - }, - }, - }, - }, - }, - }, -}; - -export const StorageInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageInformation", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const UpdateSAPCentralInstanceRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateSAPCentralInstanceRequest", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const SAPCentralInstanceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPCentralInstanceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SAPCentralServerInstance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPDatabaseProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDatabaseProperties", - modelProperties: { - subnet: { - serializedName: "subnet", - readOnly: true, - type: { - name: "String", - }, - }, - databaseSid: { - serializedName: "databaseSid", - readOnly: true, - type: { - name: "String", - }, - }, - databaseType: { - serializedName: "databaseType", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String", - }, - }, - loadBalancerDetails: { - serializedName: "loadBalancerDetails", - type: { - name: "Composite", - className: "LoadBalancerDetails", - }, - }, - vmDetails: { - serializedName: "vmDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseVmDetails", - }, - }, - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - errors: { - serializedName: "errors", - type: { - name: "Composite", - className: "SAPVirtualInstanceError", - }, - }, - }, - }, -}; - -export const DatabaseVmDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseVmDetails", - modelProperties: { - virtualMachineId: { - serializedName: "virtualMachineId", - readOnly: true, - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - storageDetails: { - serializedName: "storageDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageInformation", - }, - }, - }, - }, - }, - }, -}; - -export const UpdateSAPDatabaseInstanceRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateSAPDatabaseInstanceRequest", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const SAPDatabaseInstanceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDatabaseInstanceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SAPDatabaseInstance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPApplicationServerProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPApplicationServerProperties", - modelProperties: { - instanceNo: { - serializedName: "instanceNo", - readOnly: true, - type: { - name: "String", - }, - }, - subnet: { - serializedName: "subnet", - readOnly: true, - type: { - name: "String", - }, - }, - hostname: { - serializedName: "hostname", - readOnly: true, - type: { - name: "String", - }, - }, - kernelVersion: { - serializedName: "kernelVersion", - readOnly: true, - type: { - name: "String", - }, - }, - kernelPatch: { - serializedName: "kernelPatch", - readOnly: true, - type: { - name: "String", - }, - }, - ipAddress: { - serializedName: "ipAddress", - readOnly: true, - type: { - name: "String", - }, - }, - gatewayPort: { - serializedName: "gatewayPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - icmHttpPort: { - serializedName: "icmHttpPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - icmHttpsPort: { - serializedName: "icmHttpsPort", - readOnly: true, - nullable: true, - type: { - name: "Number", - }, - }, - dispatcherStatus: { - serializedName: "dispatcherStatus", - readOnly: true, - type: { - name: "String", - }, - }, - loadBalancerDetails: { - serializedName: "loadBalancerDetails", - type: { - name: "Composite", - className: "LoadBalancerDetails", - }, - }, - vmDetails: { - serializedName: "vmDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ApplicationServerVmDetails", - }, - }, - }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", - }, - }, - health: { - serializedName: "health", - readOnly: true, - type: { - name: "String", - }, - }, - provisioningState: { - serializedName: "provisioningState", - readOnly: true, - type: { - name: "String", - }, - }, - errors: { - serializedName: "errors", - type: { - name: "Composite", - className: "SAPVirtualInstanceError", - }, - }, - }, - }, -}; - -export const ApplicationServerVmDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationServerVmDetails", - modelProperties: { - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - virtualMachineId: { - serializedName: "virtualMachineId", - readOnly: true, - type: { - name: "String", - }, - }, - storageDetails: { - serializedName: "storageDetails", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageInformation", - }, - }, - }, - }, - }, - }, -}; - -export const UpdateSAPApplicationInstanceRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UpdateSAPApplicationInstanceRequest", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - }, - }, -}; - -export const SAPApplicationServerInstanceList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPApplicationServerInstanceList", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SAPApplicationServerInstance", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StartRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StartRequest", - modelProperties: { - startVm: { - defaultValue: false, - serializedName: "startVm", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const OperationStatusResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationStatusResult", - modelProperties: { - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - status: { - serializedName: "status", - required: true, - type: { - name: "String", - }, - }, - percentComplete: { - constraints: { - InclusiveMaximum: 100, - InclusiveMinimum: 0, - }, - serializedName: "percentComplete", - type: { - name: "Number", - }, - }, - startTime: { - serializedName: "startTime", - type: { - name: "DateTime", - }, - }, - endTime: { - serializedName: "endTime", - type: { - name: "DateTime", - }, - }, - operations: { - serializedName: "operations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationStatusResult", - }, - }, - }, - }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetail", - }, - }, - }, - }, -}; - -export const StopRequest: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StopRequest", - modelProperties: { - softStopTimeoutSeconds: { - defaultValue: 0, - serializedName: "softStopTimeoutSeconds", - type: { - name: "Number", - }, - }, - deallocateVm: { - defaultValue: false, - serializedName: "deallocateVm", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - isDataAction: { - serializedName: "isDataAction", - readOnly: true, - type: { - name: "Boolean", - }, - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay", - }, - }, - origin: { - serializedName: "origin", - readOnly: true, - type: { - name: "String", - }, - }, - actionType: { - serializedName: "actionType", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", - readOnly: true, - type: { - name: "String", - }, - }, - resource: { - serializedName: "resource", - readOnly: true, - type: { - name: "String", - }, - }, - operation: { - serializedName: "operation", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ImageReference: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ImageReference", - modelProperties: { - publisher: { - serializedName: "publisher", - type: { - name: "String", - }, - }, - offer: { - serializedName: "offer", - type: { - name: "String", - }, - }, - sku: { - serializedName: "sku", - type: { - name: "String", - }, - }, - version: { - serializedName: "version", - type: { - name: "String", - }, - }, - id: { - serializedName: "id", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OSConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OSConfiguration", - uberParent: "OSConfiguration", - polymorphicDiscriminator: { - serializedName: "osType", - clientName: "osType", - }, - modelProperties: { - osType: { - serializedName: "osType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SshPublicKey: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SshPublicKey", - modelProperties: { - keyData: { - serializedName: "keyData", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SshConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SshConfiguration", - modelProperties: { - publicKeys: { - serializedName: "publicKeys", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SshPublicKey", - }, - }, - }, - }, - }, - }, -}; - -export const SshKeyPair: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SshKeyPair", - modelProperties: { - publicKey: { - serializedName: "publicKey", - type: { - name: "String", - }, - }, - privateKey: { - serializedName: "privateKey", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const OSProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OSProfile", - modelProperties: { - adminUsername: { - serializedName: "adminUsername", - type: { - name: "String", - }, - }, - adminPassword: { - serializedName: "adminPassword", - type: { - name: "String", - }, - }, - osConfiguration: { - serializedName: "osConfiguration", - type: { - name: "Composite", - className: "OSConfiguration", - }, - }, - }, - }, -}; - -export const DiskConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiskConfiguration", - modelProperties: { - diskVolumeConfigurations: { - serializedName: "diskVolumeConfigurations", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "DiskVolumeConfiguration" }, - }, - }, - }, - }, - }, -}; - -export const VirtualMachineConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineConfiguration", - modelProperties: { - vmSize: { - serializedName: "vmSize", - required: true, - type: { - name: "String", - }, - }, - imageReference: { - serializedName: "imageReference", - type: { - name: "Composite", - className: "ImageReference", - }, - }, - osProfile: { - serializedName: "osProfile", - type: { - name: "Composite", - className: "OSProfile", - }, - }, - }, - }, -}; - -export const NetworkConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkConfiguration", - modelProperties: { - isSecondaryIpEnabled: { - defaultValue: false, - serializedName: "isSecondaryIpEnabled", - type: { - name: "Boolean", - }, - }, - }, - }, -}; - -export const SingleServerCustomResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SingleServerCustomResourceNames", - uberParent: "SingleServerCustomResourceNames", - polymorphicDiscriminator: { - serializedName: "namingPatternType", - clientName: "namingPatternType", - }, - modelProperties: { - namingPatternType: { - serializedName: "namingPatternType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const InfrastructureConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InfrastructureConfiguration", - uberParent: "InfrastructureConfiguration", - polymorphicDiscriminator: { - serializedName: "deploymentType", - clientName: "deploymentType", - }, - modelProperties: { - deploymentType: { - serializedName: "deploymentType", - required: true, - type: { - name: "String", - }, - }, - appResourceGroup: { - serializedName: "appResourceGroup", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CentralServerConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CentralServerConfiguration", - modelProperties: { - subnetId: { - serializedName: "subnetId", - required: true, - type: { - name: "String", - }, - }, - virtualMachineConfiguration: { - serializedName: "virtualMachineConfiguration", - type: { - name: "Composite", - className: "VirtualMachineConfiguration", - }, - }, - instanceCount: { - serializedName: "instanceCount", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const DatabaseConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseConfiguration", - modelProperties: { - databaseType: { - serializedName: "databaseType", - type: { - name: "String", - }, - }, - subnetId: { - serializedName: "subnetId", - required: true, - type: { - name: "String", - }, - }, - virtualMachineConfiguration: { - serializedName: "virtualMachineConfiguration", - type: { - name: "Composite", - className: "VirtualMachineConfiguration", - }, - }, - instanceCount: { - serializedName: "instanceCount", - required: true, - type: { - name: "Number", - }, - }, - diskConfiguration: { - serializedName: "diskConfiguration", - type: { - name: "Composite", - className: "DiskConfiguration", - }, - }, - }, - }, -}; - -export const ApplicationServerConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationServerConfiguration", - modelProperties: { - subnetId: { - serializedName: "subnetId", - required: true, - type: { - name: "String", - }, - }, - virtualMachineConfiguration: { - serializedName: "virtualMachineConfiguration", - type: { - name: "Composite", - className: "VirtualMachineConfiguration", - }, - }, - instanceCount: { - serializedName: "instanceCount", - required: true, - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const HighAvailabilityConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "HighAvailabilityConfiguration", - modelProperties: { - highAvailabilityType: { - serializedName: "highAvailabilityType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const FileShareConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FileShareConfiguration", - uberParent: "FileShareConfiguration", - polymorphicDiscriminator: { - serializedName: "configurationType", - clientName: "configurationType", - }, - modelProperties: { - configurationType: { - serializedName: "configurationType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const StorageConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageConfiguration", - modelProperties: { - transportFileShareConfiguration: { - serializedName: "transportFileShareConfiguration", - type: { - name: "Composite", - className: "FileShareConfiguration", - }, - }, - }, - }, -}; - -export const ThreeTierCustomResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ThreeTierCustomResourceNames", - uberParent: "ThreeTierCustomResourceNames", - polymorphicDiscriminator: { - serializedName: "namingPatternType", - clientName: "namingPatternType", - }, - modelProperties: { - namingPatternType: { - serializedName: "namingPatternType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const VirtualMachineResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualMachineResourceNames", - modelProperties: { - vmName: { - serializedName: "vmName", - type: { - name: "String", - }, - }, - hostName: { - serializedName: "hostName", - type: { - name: "String", - }, - }, - networkInterfaces: { - constraints: { - MaxItems: 1, - }, - serializedName: "networkInterfaces", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NetworkInterfaceResourceNames", - }, - }, - }, - }, - osDiskName: { - serializedName: "osDiskName", - type: { - name: "String", - }, - }, - dataDiskNames: { - serializedName: "dataDiskNames", - type: { - name: "Dictionary", - value: { - type: { name: "Sequence", element: { type: { name: "String" } } }, - }, - }, - }, - }, - }, -}; - -export const NetworkInterfaceResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkInterfaceResourceNames", - modelProperties: { - networkInterfaceName: { - serializedName: "networkInterfaceName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const CentralServerFullResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CentralServerFullResourceNames", - modelProperties: { - virtualMachines: { - constraints: { - MaxItems: 2, - }, - serializedName: "virtualMachines", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineResourceNames", - }, - }, - }, - }, - availabilitySetName: { - serializedName: "availabilitySetName", - type: { - name: "String", - }, - }, - loadBalancer: { - serializedName: "loadBalancer", - type: { - name: "Composite", - className: "LoadBalancerResourceNames", - }, - }, - }, - }, -}; - -export const LoadBalancerResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoadBalancerResourceNames", - modelProperties: { - loadBalancerName: { - serializedName: "loadBalancerName", - type: { - name: "String", - }, - }, - frontendIpConfigurationNames: { - constraints: { - MaxItems: 2, - }, - serializedName: "frontendIpConfigurationNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - backendPoolNames: { - constraints: { - MaxItems: 1, - }, - serializedName: "backendPoolNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - healthProbeNames: { - constraints: { - MaxItems: 2, - }, - serializedName: "healthProbeNames", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - }, - }, -}; - -export const ApplicationServerFullResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ApplicationServerFullResourceNames", - modelProperties: { - virtualMachines: { - serializedName: "virtualMachines", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineResourceNames", - }, - }, - }, - }, - availabilitySetName: { - serializedName: "availabilitySetName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DatabaseServerFullResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseServerFullResourceNames", - modelProperties: { - virtualMachines: { - constraints: { - MaxItems: 2, - }, - serializedName: "virtualMachines", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualMachineResourceNames", - }, - }, - }, - }, - availabilitySetName: { - serializedName: "availabilitySetName", - type: { - name: "String", - }, - }, - loadBalancer: { - serializedName: "loadBalancer", - type: { - name: "Composite", - className: "LoadBalancerResourceNames", - }, - }, - }, - }, -}; - -export const SharedStorageResourceNames: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SharedStorageResourceNames", - modelProperties: { - sharedStorageAccountName: { - serializedName: "sharedStorageAccountName", - type: { - name: "String", - }, - }, - sharedStorageAccountPrivateEndPointName: { - serializedName: "sharedStorageAccountPrivateEndPointName", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SoftwareConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SoftwareConfiguration", - uberParent: "SoftwareConfiguration", - polymorphicDiscriminator: { - serializedName: "softwareInstallationType", - clientName: "softwareInstallationType", - }, - modelProperties: { - softwareInstallationType: { - serializedName: "softwareInstallationType", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const HighAvailabilitySoftwareConfiguration: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "HighAvailabilitySoftwareConfiguration", - modelProperties: { - fencingClientId: { - serializedName: "fencingClientId", - required: true, - type: { - name: "String", - }, - }, - fencingClientPassword: { - serializedName: "fencingClientPassword", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const OsSapConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OsSapConfiguration", - modelProperties: { - deployerVmPackages: { - serializedName: "deployerVmPackages", - type: { - name: "Composite", - className: "DeployerVmPackages", - }, - }, - sapFqdn: { - serializedName: "sapFqdn", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DeployerVmPackages: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DeployerVmPackages", - modelProperties: { - url: { - serializedName: "url", - type: { - name: "String", - }, - }, - storageAccountId: { - serializedName: "storageAccountId", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SingleServerRecommendationResult: coreClient.CompositeMapper = { - serializedName: "SingleServer", - type: { - name: "Composite", - className: "SingleServerRecommendationResult", - uberParent: "SAPSizingRecommendationResult", - polymorphicDiscriminator: - SAPSizingRecommendationResult.type.polymorphicDiscriminator, - modelProperties: { - ...SAPSizingRecommendationResult.type.modelProperties, - vmSku: { - serializedName: "vmSku", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ThreeTierRecommendationResult: coreClient.CompositeMapper = { - serializedName: "ThreeTier", - type: { - name: "Composite", - className: "ThreeTierRecommendationResult", - uberParent: "SAPSizingRecommendationResult", - polymorphicDiscriminator: - SAPSizingRecommendationResult.type.polymorphicDiscriminator, - modelProperties: { - ...SAPSizingRecommendationResult.type.modelProperties, - dbVmSku: { - serializedName: "dbVmSku", - type: { - name: "String", - }, - }, - databaseInstanceCount: { - serializedName: "databaseInstanceCount", - type: { - name: "Number", - }, - }, - centralServerVmSku: { - serializedName: "centralServerVmSku", - type: { - name: "String", - }, - }, - centralServerInstanceCount: { - serializedName: "centralServerInstanceCount", - type: { - name: "Number", - }, - }, - applicationServerVmSku: { - serializedName: "applicationServerVmSku", - type: { - name: "String", - }, - }, - applicationServerInstanceCount: { - serializedName: "applicationServerInstanceCount", - type: { - name: "Number", - }, - }, - }, - }, -}; - -export const DiscoveryConfiguration: coreClient.CompositeMapper = { - serializedName: "Discovery", - type: { - name: "Composite", - className: "DiscoveryConfiguration", - uberParent: "SAPConfiguration", - polymorphicDiscriminator: SAPConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...SAPConfiguration.type.modelProperties, - centralServerVmId: { - serializedName: "centralServerVmId", - type: { - name: "String", - }, - }, - managedRgStorageAccountName: { - constraints: { - MaxLength: 24, - MinLength: 3, - }, - serializedName: "managedRgStorageAccountName", - type: { - name: "String", - }, - }, - appLocation: { - serializedName: "appLocation", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DeploymentConfiguration: coreClient.CompositeMapper = { - serializedName: "Deployment", - type: { - name: "Composite", - className: "DeploymentConfiguration", - uberParent: "SAPConfiguration", - polymorphicDiscriminator: SAPConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...SAPConfiguration.type.modelProperties, - appLocation: { - serializedName: "appLocation", - type: { - name: "String", - }, - }, - infrastructureConfiguration: { - serializedName: "infrastructureConfiguration", - type: { - name: "Composite", - className: "InfrastructureConfiguration", - }, - }, - softwareConfiguration: { - serializedName: "softwareConfiguration", - type: { - name: "Composite", - className: "SoftwareConfiguration", - }, - }, - }, - }, -}; - -export const DeploymentWithOSConfiguration: coreClient.CompositeMapper = { - serializedName: "DeploymentWithOSConfig", - type: { - name: "Composite", - className: "DeploymentWithOSConfiguration", - uberParent: "SAPConfiguration", - polymorphicDiscriminator: SAPConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...SAPConfiguration.type.modelProperties, - appLocation: { - serializedName: "appLocation", - type: { - name: "String", - }, - }, - infrastructureConfiguration: { - serializedName: "infrastructureConfiguration", - type: { - name: "Composite", - className: "InfrastructureConfiguration", - }, - }, - softwareConfiguration: { - serializedName: "softwareConfiguration", - type: { - name: "Composite", - className: "SoftwareConfiguration", - }, - }, - osSapConfiguration: { - serializedName: "osSapConfiguration", - type: { - name: "Composite", - className: "OsSapConfiguration", - }, - }, - }, - }, -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const WindowsConfiguration: coreClient.CompositeMapper = { - serializedName: "Windows", - type: { - name: "Composite", - className: "WindowsConfiguration", - uberParent: "OSConfiguration", - polymorphicDiscriminator: OSConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...OSConfiguration.type.modelProperties, - }, - }, -}; - -export const LinuxConfiguration: coreClient.CompositeMapper = { - serializedName: "Linux", - type: { - name: "Composite", - className: "LinuxConfiguration", - uberParent: "OSConfiguration", - polymorphicDiscriminator: OSConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...OSConfiguration.type.modelProperties, - disablePasswordAuthentication: { - serializedName: "disablePasswordAuthentication", - type: { - name: "Boolean", - }, - }, - ssh: { - serializedName: "ssh", - type: { - name: "Composite", - className: "SshConfiguration", - }, - }, - sshKeyPair: { - serializedName: "sshKeyPair", - type: { - name: "Composite", - className: "SshKeyPair", - }, - }, - }, - }, -}; - -export const SingleServerFullResourceNames: coreClient.CompositeMapper = { - serializedName: "FullResourceName", - type: { - name: "Composite", - className: "SingleServerFullResourceNames", - uberParent: "SingleServerCustomResourceNames", - polymorphicDiscriminator: - SingleServerCustomResourceNames.type.polymorphicDiscriminator, - modelProperties: { - ...SingleServerCustomResourceNames.type.modelProperties, - virtualMachine: { - serializedName: "virtualMachine", - type: { - name: "Composite", - className: "VirtualMachineResourceNames", - }, - }, - }, - }, -}; - -export const SingleServerConfiguration: coreClient.CompositeMapper = { - serializedName: "SingleServer", - type: { - name: "Composite", - className: "SingleServerConfiguration", - uberParent: "InfrastructureConfiguration", - polymorphicDiscriminator: - InfrastructureConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...InfrastructureConfiguration.type.modelProperties, - networkConfiguration: { - serializedName: "networkConfiguration", - type: { - name: "Composite", - className: "NetworkConfiguration", - }, - }, - databaseType: { - serializedName: "databaseType", - type: { - name: "String", - }, - }, - subnetId: { - serializedName: "subnetId", - required: true, - type: { - name: "String", - }, - }, - virtualMachineConfiguration: { - serializedName: "virtualMachineConfiguration", - type: { - name: "Composite", - className: "VirtualMachineConfiguration", - }, - }, - dbDiskConfiguration: { - serializedName: "dbDiskConfiguration", - type: { - name: "Composite", - className: "DiskConfiguration", - }, - }, - customResourceNames: { - serializedName: "customResourceNames", - type: { - name: "Composite", - className: "SingleServerCustomResourceNames", - }, - }, - }, - }, -}; - -export const ThreeTierConfiguration: coreClient.CompositeMapper = { - serializedName: "ThreeTier", - type: { - name: "Composite", - className: "ThreeTierConfiguration", - uberParent: "InfrastructureConfiguration", - polymorphicDiscriminator: - InfrastructureConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...InfrastructureConfiguration.type.modelProperties, - networkConfiguration: { - serializedName: "networkConfiguration", - type: { - name: "Composite", - className: "NetworkConfiguration", - }, - }, - centralServer: { - serializedName: "centralServer", - type: { - name: "Composite", - className: "CentralServerConfiguration", - }, - }, - applicationServer: { - serializedName: "applicationServer", - type: { - name: "Composite", - className: "ApplicationServerConfiguration", - }, - }, - databaseServer: { - serializedName: "databaseServer", - type: { - name: "Composite", - className: "DatabaseConfiguration", - }, - }, - highAvailabilityConfig: { - serializedName: "highAvailabilityConfig", - type: { - name: "Composite", - className: "HighAvailabilityConfiguration", - }, - }, - storageConfiguration: { - serializedName: "storageConfiguration", - type: { - name: "Composite", - className: "StorageConfiguration", - }, - }, - customResourceNames: { - serializedName: "customResourceNames", - type: { - name: "Composite", - className: "ThreeTierCustomResourceNames", - }, - }, - }, - }, -}; - -export const SkipFileShareConfiguration: coreClient.CompositeMapper = { - serializedName: "Skip", - type: { - name: "Composite", - className: "SkipFileShareConfiguration", - uberParent: "FileShareConfiguration", - polymorphicDiscriminator: - FileShareConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...FileShareConfiguration.type.modelProperties, - }, - }, -}; - -export const CreateAndMountFileShareConfiguration: coreClient.CompositeMapper = - { - serializedName: "CreateAndMount", - type: { - name: "Composite", - className: "CreateAndMountFileShareConfiguration", - uberParent: "FileShareConfiguration", - polymorphicDiscriminator: - FileShareConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...FileShareConfiguration.type.modelProperties, - resourceGroup: { - serializedName: "resourceGroup", - type: { - name: "String", - }, - }, - storageAccountName: { - serializedName: "storageAccountName", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const MountFileShareConfiguration: coreClient.CompositeMapper = { - serializedName: "Mount", - type: { - name: "Composite", - className: "MountFileShareConfiguration", - uberParent: "FileShareConfiguration", - polymorphicDiscriminator: - FileShareConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...FileShareConfiguration.type.modelProperties, - id: { - serializedName: "id", - required: true, - type: { - name: "String", - }, - }, - privateEndpointId: { - serializedName: "privateEndpointId", - required: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const ThreeTierFullResourceNames: coreClient.CompositeMapper = { - serializedName: "FullResourceName", - type: { - name: "Composite", - className: "ThreeTierFullResourceNames", - uberParent: "ThreeTierCustomResourceNames", - polymorphicDiscriminator: - ThreeTierCustomResourceNames.type.polymorphicDiscriminator, - modelProperties: { - ...ThreeTierCustomResourceNames.type.modelProperties, - centralServer: { - serializedName: "centralServer", - type: { - name: "Composite", - className: "CentralServerFullResourceNames", - }, - }, - applicationServer: { - serializedName: "applicationServer", - type: { - name: "Composite", - className: "ApplicationServerFullResourceNames", - }, - }, - databaseServer: { - serializedName: "databaseServer", - type: { - name: "Composite", - className: "DatabaseServerFullResourceNames", - }, - }, - sharedStorage: { - serializedName: "sharedStorage", - type: { - name: "Composite", - className: "SharedStorageResourceNames", - }, - }, - }, - }, -}; - -export const ServiceInitiatedSoftwareConfiguration: coreClient.CompositeMapper = - { - serializedName: "ServiceInitiated", - type: { - name: "Composite", - className: "ServiceInitiatedSoftwareConfiguration", - uberParent: "SoftwareConfiguration", - polymorphicDiscriminator: - SoftwareConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...SoftwareConfiguration.type.modelProperties, - bomUrl: { - serializedName: "bomUrl", - required: true, - type: { - name: "String", - }, - }, - softwareVersion: { - serializedName: "softwareVersion", - required: true, - type: { - name: "String", - }, - }, - sapBitsStorageAccountId: { - serializedName: "sapBitsStorageAccountId", - required: true, - type: { - name: "String", - }, - }, - sapFqdn: { - serializedName: "sapFqdn", - required: true, - type: { - name: "String", - }, - }, - sshPrivateKey: { - serializedName: "sshPrivateKey", - required: true, - type: { - name: "String", - }, - }, - highAvailabilitySoftwareConfiguration: { - serializedName: "highAvailabilitySoftwareConfiguration", - type: { - name: "Composite", - className: "HighAvailabilitySoftwareConfiguration", - }, - }, - }, - }, - }; - -export const SAPInstallWithoutOSConfigSoftwareConfiguration: coreClient.CompositeMapper = - { - serializedName: "SAPInstallWithoutOSConfig", - type: { - name: "Composite", - className: "SAPInstallWithoutOSConfigSoftwareConfiguration", - uberParent: "SoftwareConfiguration", - polymorphicDiscriminator: - SoftwareConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...SoftwareConfiguration.type.modelProperties, - bomUrl: { - serializedName: "bomUrl", - required: true, - type: { - name: "String", - }, - }, - sapBitsStorageAccountId: { - serializedName: "sapBitsStorageAccountId", - required: true, - type: { - name: "String", - }, - }, - softwareVersion: { - serializedName: "softwareVersion", - required: true, - type: { - name: "String", - }, - }, - highAvailabilitySoftwareConfiguration: { - serializedName: "highAvailabilitySoftwareConfiguration", - type: { - name: "Composite", - className: "HighAvailabilitySoftwareConfiguration", - }, - }, - }, - }, - }; - -export const ExternalInstallationSoftwareConfiguration: coreClient.CompositeMapper = - { - serializedName: "External", - type: { - name: "Composite", - className: "ExternalInstallationSoftwareConfiguration", - uberParent: "SoftwareConfiguration", - polymorphicDiscriminator: - SoftwareConfiguration.type.polymorphicDiscriminator, - modelProperties: { - ...SoftwareConfiguration.type.modelProperties, - centralServerVmId: { - serializedName: "centralServerVmId", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPVirtualInstance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstance", - modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "UserAssignedServiceIdentity", - }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SAPVirtualInstanceProperties", - }, - }, - }, - }, -}; - -export const SAPCentralServerInstance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPCentralServerInstance", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SAPCentralServerProperties", - }, - }, - }, - }, -}; - -export const SAPDatabaseInstance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDatabaseInstance", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SAPDatabaseProperties", - }, - }, - }, - }, -}; - -export const SAPApplicationServerInstance: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPApplicationServerInstance", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "SAPApplicationServerProperties", - }, - }, - }, - }, -}; - -export const SAPVirtualInstancesUpdateHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstancesUpdateHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPVirtualInstancesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPVirtualInstancesStartHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstancesStartHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPVirtualInstancesStopHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPVirtualInstancesStopHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPCentralInstancesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPCentralInstancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPCentralInstancesStartInstanceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPCentralInstancesStartInstanceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPCentralInstancesStopInstanceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPCentralInstancesStopInstanceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPDatabaseInstancesDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SAPDatabaseInstancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const SAPDatabaseInstancesStartInstanceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPDatabaseInstancesStartInstanceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPDatabaseInstancesStopInstanceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPDatabaseInstancesStopInstanceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPApplicationServerInstancesDeleteHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPApplicationServerInstancesDeleteHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPApplicationServerInstancesStartInstanceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPApplicationServerInstancesStartInstanceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export const SAPApplicationServerInstancesStopInstanceHeaders: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SAPApplicationServerInstancesStopInstanceHeaders", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, - }; - -export let discriminators = { - SAPSizingRecommendationResult: SAPSizingRecommendationResult, - SAPConfiguration: SAPConfiguration, - OSConfiguration: OSConfiguration, - SingleServerCustomResourceNames: SingleServerCustomResourceNames, - InfrastructureConfiguration: InfrastructureConfiguration, - FileShareConfiguration: FileShareConfiguration, - ThreeTierCustomResourceNames: ThreeTierCustomResourceNames, - SoftwareConfiguration: SoftwareConfiguration, - "SAPSizingRecommendationResult.SingleServer": - SingleServerRecommendationResult, - "SAPSizingRecommendationResult.ThreeTier": ThreeTierRecommendationResult, - "SAPConfiguration.Discovery": DiscoveryConfiguration, - "SAPConfiguration.Deployment": DeploymentConfiguration, - "SAPConfiguration.DeploymentWithOSConfig": DeploymentWithOSConfiguration, - "OSConfiguration.Windows": WindowsConfiguration, - "OSConfiguration.Linux": LinuxConfiguration, - "SingleServerCustomResourceNames.FullResourceName": - SingleServerFullResourceNames, - "InfrastructureConfiguration.SingleServer": SingleServerConfiguration, - "InfrastructureConfiguration.ThreeTier": ThreeTierConfiguration, - "FileShareConfiguration.Skip": SkipFileShareConfiguration, - "FileShareConfiguration.CreateAndMount": CreateAndMountFileShareConfiguration, - "FileShareConfiguration.Mount": MountFileShareConfiguration, - "ThreeTierCustomResourceNames.FullResourceName": ThreeTierFullResourceNames, - "SoftwareConfiguration.ServiceInitiated": - ServiceInitiatedSoftwareConfiguration, - "SoftwareConfiguration.SAPInstallWithoutOSConfig": - SAPInstallWithoutOSConfigSoftwareConfiguration, - "SoftwareConfiguration.External": ExternalInstallationSoftwareConfiguration, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/models/parameters.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/models/parameters.ts deleted file mode 100644 index 6e84bbc78439..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/models/parameters.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationParameter, - OperationURLParameter, - OperationQueryParameter, -} from "@azure/core-client"; -import { - SAPSizingRecommendationRequest as SAPSizingRecommendationRequestMapper, - SAPSupportedSkusRequest as SAPSupportedSkusRequestMapper, - SAPDiskConfigurationsRequest as SAPDiskConfigurationsRequestMapper, - SAPAvailabilityZoneDetailsRequest as SAPAvailabilityZoneDetailsRequestMapper, - SAPVirtualInstance as SAPVirtualInstanceMapper, - UpdateSAPVirtualInstanceRequest as UpdateSAPVirtualInstanceRequestMapper, - StartRequest as StartRequestMapper, - StopRequest as StopRequestMapper, - SAPCentralServerInstance as SAPCentralServerInstanceMapper, - UpdateSAPCentralInstanceRequest as UpdateSAPCentralInstanceRequestMapper, - SAPDatabaseInstance as SAPDatabaseInstanceMapper, - UpdateSAPDatabaseInstanceRequest as UpdateSAPDatabaseInstanceRequestMapper, - SAPApplicationServerInstance as SAPApplicationServerInstanceMapper, - UpdateSAPApplicationInstanceRequest as UpdateSAPApplicationInstanceRequestMapper, -} from "../models/mappers.js"; - -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String", - }, - }, -}; - -export const sAPSizingRecommendation: OperationParameter = { - parameterPath: ["options", "sAPSizingRecommendation"], - mapper: SAPSizingRecommendationRequestMapper, -}; - -export const accept: OperationParameter = { - parameterPath: "accept", - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Accept", - type: { - name: "String", - }, - }, -}; - -export const $host: OperationURLParameter = { - parameterPath: "$host", - mapper: { - serializedName: "$host", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "subscriptionId", - required: true, - type: { - name: "String", - }, - }, -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - constraints: { - MinLength: 1, - }, - serializedName: "location", - required: true, - type: { - name: "String", - }, - }, -}; - -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2023-10-01-preview", - isConstant: true, - serializedName: "api-version", - type: { - name: "String", - }, - }, -}; - -export const sAPSupportedSku: OperationParameter = { - parameterPath: ["options", "sAPSupportedSku"], - mapper: SAPSupportedSkusRequestMapper, -}; - -export const sAPDiskConfigurations: OperationParameter = { - parameterPath: ["options", "sAPDiskConfigurations"], - mapper: SAPDiskConfigurationsRequestMapper, -}; - -export const sAPAvailabilityZoneDetails: OperationParameter = { - parameterPath: ["options", "sAPAvailabilityZoneDetails"], - mapper: SAPAvailabilityZoneDetailsRequestMapper, -}; - -export const body: OperationParameter = { - parameterPath: ["options", "body"], - mapper: SAPVirtualInstanceMapper, -}; - -export const resourceGroupName: OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - constraints: { - MaxLength: 90, - MinLength: 1, - }, - serializedName: "resourceGroupName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const sapVirtualInstanceName: OperationURLParameter = { - parameterPath: "sapVirtualInstanceName", - mapper: { - constraints: { - Pattern: new RegExp("^[a-zA-Z][a-zA-Z0-9]{2}$"), - }, - serializedName: "sapVirtualInstanceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const body1: OperationParameter = { - parameterPath: ["options", "body"], - mapper: UpdateSAPVirtualInstanceRequestMapper, -}; - -export const body2: OperationParameter = { - parameterPath: ["options", "body"], - mapper: StartRequestMapper, -}; - -export const body3: OperationParameter = { - parameterPath: ["options", "body"], - mapper: StopRequestMapper, -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String", - }, - }, - skipEncoding: true, -}; - -export const centralInstanceName: OperationURLParameter = { - parameterPath: "centralInstanceName", - mapper: { - constraints: { - Pattern: new RegExp("^.*"), - }, - serializedName: "centralInstanceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const body4: OperationParameter = { - parameterPath: ["options", "body"], - mapper: SAPCentralServerInstanceMapper, -}; - -export const body5: OperationParameter = { - parameterPath: ["options", "body"], - mapper: UpdateSAPCentralInstanceRequestMapper, -}; - -export const databaseInstanceName: OperationURLParameter = { - parameterPath: "databaseInstanceName", - mapper: { - constraints: { - Pattern: new RegExp("^.*"), - }, - serializedName: "databaseInstanceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const body6: OperationParameter = { - parameterPath: ["options", "body"], - mapper: SAPDatabaseInstanceMapper, -}; - -export const body7: OperationParameter = { - parameterPath: ["options", "body"], - mapper: UpdateSAPDatabaseInstanceRequestMapper, -}; - -export const applicationInstanceName: OperationURLParameter = { - parameterPath: "applicationInstanceName", - mapper: { - constraints: { - Pattern: new RegExp("^.*"), - }, - serializedName: "applicationInstanceName", - required: true, - type: { - name: "String", - }, - }, -}; - -export const body8: OperationParameter = { - parameterPath: ["options", "body"], - mapper: SAPApplicationServerInstanceMapper, -}; - -export const body9: OperationParameter = { - parameterPath: ["options", "body"], - mapper: UpdateSAPApplicationInstanceRequestMapper, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/index.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/index.ts deleted file mode 100644 index 94fedc92f4a9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./sAPVirtualInstances.js"; -export * from "./sAPCentralInstances.js"; -export * from "./sAPDatabaseInstances.js"; -export * from "./sAPApplicationServerInstances.js"; -export * from "./operations.js"; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/operations.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/operations.ts deleted file mode 100644 index d0aebad53030..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/operations.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { Operations } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { WorkloadsClient } from "../workloadsClient.js"; -import { - Operation, - OperationsListNextOptionalParams, - OperationsListOptionalParams, - OperationsListResponse, - OperationsListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing Operations operations. */ -export class OperationsImpl implements Operations { - private readonly client: WorkloadsClient; - - /** - * Initialize a new instance of the class Operations class. - * @param client Reference to the service client - */ - constructor(client: WorkloadsClient) { - this.client = client; - } - - /** - * Lists all the available API operations under this PR - * @param options The options parameters. - */ - public list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage(options, settings); - }, - }; - } - - private async *listPagingPage( - options?: OperationsListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: OperationsListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - options?: OperationsListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Lists all the available API operations under this PR - * @param options The options parameters. - */ - private _list( - options?: OperationsListOptionalParams, - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: OperationsListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: "/providers/Microsoft.Workloads/operations", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host], - headerParameters: [Parameters.accept], - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationListResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [Parameters.$host, Parameters.nextLink], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPApplicationServerInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPApplicationServerInstances.ts deleted file mode 100644 index aba785c42dbe..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPApplicationServerInstances.ts +++ /dev/null @@ -1,852 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { SAPApplicationServerInstances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { WorkloadsClient } from "../workloadsClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - SAPApplicationServerInstance, - SAPApplicationServerInstancesListNextOptionalParams, - SAPApplicationServerInstancesListOptionalParams, - SAPApplicationServerInstancesListResponse, - SAPApplicationServerInstancesGetOptionalParams, - SAPApplicationServerInstancesGetResponse, - SAPApplicationServerInstancesCreateOptionalParams, - SAPApplicationServerInstancesCreateResponse, - SAPApplicationServerInstancesUpdateOptionalParams, - SAPApplicationServerInstancesUpdateResponse, - SAPApplicationServerInstancesDeleteOptionalParams, - SAPApplicationServerInstancesDeleteResponse, - SAPApplicationServerInstancesStartInstanceOptionalParams, - SAPApplicationServerInstancesStartInstanceResponse, - SAPApplicationServerInstancesStopInstanceOptionalParams, - SAPApplicationServerInstancesStopInstanceResponse, - SAPApplicationServerInstancesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SAPApplicationServerInstances operations. */ -export class SAPApplicationServerInstancesImpl - implements SAPApplicationServerInstances -{ - private readonly client: WorkloadsClient; - - /** - * Initialize a new instance of the class SAPApplicationServerInstances class. - * @param client Reference to the service client - */ - constructor(client: WorkloadsClient) { - this.client = client; - } - - /** - * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPApplicationServerInstancesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - sapVirtualInstanceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPApplicationServerInstancesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SAPApplicationServerInstancesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - sapVirtualInstanceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPApplicationServerInstancesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - sapVirtualInstanceName, - options, - )) { - yield* page; - } - } - - /** - * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - }, - getOperationSpec, - ); - } - - /** - * Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by - * end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesCreateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - SAPApplicationServerInstancesCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by - * end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the SAP Application server instance resource. This can be used to update tags on the - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the SAP Application Server Instance resource.

This operation will be used by service - * only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - SAPApplicationServerInstancesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the SAP Application Server Instance resource.

This operation will be used by service - * only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPApplicationServerInstancesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, options }, - listOperationSpec, - ); - } - - /** - * Starts the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginStartInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStartInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesStartInstanceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - }, - spec: startInstanceOperationSpec, - }); - const poller = await createHttpPoller< - SAPApplicationServerInstancesStartInstanceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginStartInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStartInstanceOptionalParams, - ): Promise { - const poller = await this.beginStartInstance( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginStopInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStopInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesStopInstanceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - }, - spec: stopInstanceOperationSpec, - }); - const poller = await createHttpPoller< - SAPApplicationServerInstancesStopInstanceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - async beginStopInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStopInstanceOptionalParams, - ): Promise { - const poller = await this.beginStopInstance( - resourceGroupName, - sapVirtualInstanceName, - applicationInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - sapVirtualInstanceName: string, - nextLink: string, - options?: SAPApplicationServerInstancesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPApplicationServerInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.applicationInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SAPApplicationServerInstance, - }, - 201: { - bodyMapper: Mappers.SAPApplicationServerInstance, - }, - 202: { - bodyMapper: Mappers.SAPApplicationServerInstance, - }, - 204: { - bodyMapper: Mappers.SAPApplicationServerInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body8, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.applicationInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SAPApplicationServerInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.applicationInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.SAPApplicationServerInstancesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.SAPApplicationServerInstancesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.SAPApplicationServerInstancesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.SAPApplicationServerInstancesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.applicationInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPApplicationServerInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startInstanceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.applicationInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const stopInstanceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.applicationInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPApplicationServerInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPCentralInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPCentralInstances.ts deleted file mode 100644 index 576a61475d6d..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPCentralInstances.ts +++ /dev/null @@ -1,863 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { SAPCentralInstances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { WorkloadsClient } from "../workloadsClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - SAPCentralServerInstance, - SAPCentralInstancesListNextOptionalParams, - SAPCentralInstancesListOptionalParams, - SAPCentralInstancesListResponse, - SAPCentralInstancesGetOptionalParams, - SAPCentralInstancesGetResponse, - SAPCentralInstancesCreateOptionalParams, - SAPCentralInstancesCreateResponse, - SAPCentralInstancesUpdateOptionalParams, - SAPCentralInstancesUpdateResponse, - SAPCentralInstancesDeleteOptionalParams, - SAPCentralInstancesDeleteResponse, - SAPCentralInstancesStartInstanceOptionalParams, - SAPCentralInstancesStartInstanceResponse, - SAPCentralInstancesStopInstanceOptionalParams, - SAPCentralInstancesStopInstanceResponse, - SAPCentralInstancesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SAPCentralInstances operations. */ -export class SAPCentralInstancesImpl implements SAPCentralInstances { - private readonly client: WorkloadsClient; - - /** - * Initialize a new instance of the class SAPCentralInstances class. - * @param client Reference to the service client - */ - constructor(client: WorkloadsClient) { - this.client = client; - } - - /** - * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPCentralInstancesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - sapVirtualInstanceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPCentralInstancesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SAPCentralInstancesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - sapVirtualInstanceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPCentralInstancesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - sapVirtualInstanceName, - options, - )) { - yield* page; - } - } - - /** - * Gets the SAP Central Services Instance resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates the SAP Central Services Instance resource.

This will be used by service only. PUT - * operation on this resource by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesCreateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - SAPCentralInstancesCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Creates the SAP Central Services Instance resource.

This will be used by service only. PUT - * operation on this resource by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the SAP Central Services Instance resource.

This can be used to update tags on the - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the SAP Central Services Instance resource.

This will be used by service only. - * Delete operation on this resource by end user will return a Bad Request error. You can delete the - * parent resource, which is the Virtual Instance for SAP solutions resource, using the delete - * operation on it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - SAPCentralInstancesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the SAP Central Services Instance resource.

This will be used by service only. - * Delete operation on this resource by end user will return a Bad Request error. You can delete the - * parent resource, which is the Virtual Instance for SAP solutions resource, using the delete - * operation on it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPCentralInstancesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, options }, - listOperationSpec, - ); - } - - /** - * Starts the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginStartInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStartInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesStartInstanceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - }, - spec: startInstanceOperationSpec, - }); - const poller = await createHttpPoller< - SAPCentralInstancesStartInstanceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginStartInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStartInstanceOptionalParams, - ): Promise { - const poller = await this.beginStartInstance( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginStopInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStopInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesStopInstanceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - }, - spec: stopInstanceOperationSpec, - }); - const poller = await createHttpPoller< - SAPCentralInstancesStopInstanceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - async beginStopInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStopInstanceOptionalParams, - ): Promise { - const poller = await this.beginStopInstance( - resourceGroupName, - sapVirtualInstanceName, - centralInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - sapVirtualInstanceName: string, - nextLink: string, - options?: SAPCentralInstancesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPCentralServerInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.centralInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SAPCentralServerInstance, - }, - 201: { - bodyMapper: Mappers.SAPCentralServerInstance, - }, - 202: { - bodyMapper: Mappers.SAPCentralServerInstance, - }, - 204: { - bodyMapper: Mappers.SAPCentralServerInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.centralInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SAPCentralServerInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.centralInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.SAPCentralInstancesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.SAPCentralInstancesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.SAPCentralInstancesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.SAPCentralInstancesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.centralInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPCentralInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startInstanceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.centralInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const stopInstanceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.centralInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPCentralInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPDatabaseInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPDatabaseInstances.ts deleted file mode 100644 index eb404da73039..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPDatabaseInstances.ts +++ /dev/null @@ -1,856 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { SAPDatabaseInstances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { WorkloadsClient } from "../workloadsClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - SAPDatabaseInstance, - SAPDatabaseInstancesListNextOptionalParams, - SAPDatabaseInstancesListOptionalParams, - SAPDatabaseInstancesListResponse, - SAPDatabaseInstancesGetOptionalParams, - SAPDatabaseInstancesGetResponse, - SAPDatabaseInstancesCreateOptionalParams, - SAPDatabaseInstancesCreateResponse, - SAPDatabaseInstancesUpdateOptionalParams, - SAPDatabaseInstancesUpdateResponse, - SAPDatabaseInstancesDeleteOptionalParams, - SAPDatabaseInstancesDeleteResponse, - SAPDatabaseInstancesStartInstanceOptionalParams, - SAPDatabaseInstancesStartInstanceResponse, - SAPDatabaseInstancesStopInstanceOptionalParams, - SAPDatabaseInstancesStopInstanceResponse, - SAPDatabaseInstancesListNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SAPDatabaseInstances operations. */ -export class SAPDatabaseInstancesImpl implements SAPDatabaseInstances { - private readonly client: WorkloadsClient; - - /** - * Initialize a new instance of the class SAPDatabaseInstances class. - * @param client Reference to the service client - */ - constructor(client: WorkloadsClient) { - this.client = client; - } - - /** - * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - public list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPDatabaseInstancesListOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listPagingPage( - resourceGroupName, - sapVirtualInstanceName, - options, - settings, - ); - }, - }; - } - - private async *listPagingPage( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPDatabaseInstancesListOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SAPDatabaseInstancesListResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._list( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listNext( - resourceGroupName, - sapVirtualInstanceName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listPagingAll( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPDatabaseInstancesListOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - sapVirtualInstanceName, - options, - )) { - yield* page; - } - } - - /** - * Gets the SAP Database Instance resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - }, - getOperationSpec, - ); - } - - /** - * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. - *

This will be used by service only. PUT by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesCreateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - SAPDatabaseInstancesCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. - *

This will be used by service only. PUT by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Updates the Database instance resource. This can be used to update tags on the resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - }, - updateOperationSpec, - ); - } - - /** - * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. - *

This will be used by service only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - SAPDatabaseInstancesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. - *

This will be used by service only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - private _list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPDatabaseInstancesListOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, options }, - listOperationSpec, - ); - } - - /** - * Starts the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginStartInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStartInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesStartInstanceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - }, - spec: startInstanceOperationSpec, - }); - const poller = await createHttpPoller< - SAPDatabaseInstancesStartInstanceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Starts the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginStartInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStartInstanceOptionalParams, - ): Promise { - const poller = await this.beginStartInstance( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginStopInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStopInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesStopInstanceResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - }, - spec: stopInstanceOperationSpec, - }); - const poller = await createHttpPoller< - SAPDatabaseInstancesStopInstanceResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Stops the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - async beginStopInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStopInstanceOptionalParams, - ): Promise { - const poller = await this.beginStopInstance( - resourceGroupName, - sapVirtualInstanceName, - databaseInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - resourceGroupName: string, - sapVirtualInstanceName: string, - nextLink: string, - options?: SAPDatabaseInstancesListNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, nextLink, options }, - listNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPDatabaseInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.databaseInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SAPDatabaseInstance, - }, - 201: { - bodyMapper: Mappers.SAPDatabaseInstance, - }, - 202: { - bodyMapper: Mappers.SAPDatabaseInstance, - }, - 204: { - bodyMapper: Mappers.SAPDatabaseInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body6, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.databaseInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SAPDatabaseInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body7, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.databaseInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.databaseInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPDatabaseInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const startInstanceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.databaseInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const stopInstanceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.databaseInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPDatabaseInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPVirtualInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPVirtualInstances.ts deleted file mode 100644 index 7f5b7b295328..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operations/sAPVirtualInstances.ts +++ /dev/null @@ -1,964 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper.js"; -import { SAPVirtualInstances } from "../operationsInterfaces/index.js"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers.js"; -import * as Parameters from "../models/parameters.js"; -import { WorkloadsClient } from "../workloadsClient.js"; -import { - SimplePollerLike, - OperationState, - createHttpPoller, -} from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl.js"; -import { - SAPVirtualInstance, - SAPVirtualInstancesListByResourceGroupNextOptionalParams, - SAPVirtualInstancesListByResourceGroupOptionalParams, - SAPVirtualInstancesListByResourceGroupResponse, - SAPVirtualInstancesListBySubscriptionNextOptionalParams, - SAPVirtualInstancesListBySubscriptionOptionalParams, - SAPVirtualInstancesListBySubscriptionResponse, - SAPVirtualInstancesCreateOptionalParams, - SAPVirtualInstancesCreateResponse, - SAPVirtualInstancesGetOptionalParams, - SAPVirtualInstancesGetResponse, - SAPVirtualInstancesUpdateOptionalParams, - SAPVirtualInstancesUpdateResponse, - SAPVirtualInstancesDeleteOptionalParams, - SAPVirtualInstancesDeleteResponse, - SAPVirtualInstancesStartOptionalParams, - SAPVirtualInstancesStartResponse, - SAPVirtualInstancesStopOptionalParams, - SAPVirtualInstancesStopResponse, - SAPVirtualInstancesListByResourceGroupNextResponse, - SAPVirtualInstancesListBySubscriptionNextResponse, -} from "../models/index.js"; - -/// -/** Class containing SAPVirtualInstances operations. */ -export class SAPVirtualInstancesImpl implements SAPVirtualInstances { - private readonly client: WorkloadsClient; - - /** - * Initialize a new instance of the class SAPVirtualInstances class. - * @param client Reference to the service client - */ - constructor(client: WorkloadsClient) { - this.client = client; - } - - /** - * Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: SAPVirtualInstancesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings, - ); - }, - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: SAPVirtualInstancesListByResourceGroupOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SAPVirtualInstancesListByResourceGroupResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options, - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: SAPVirtualInstancesListByResourceGroupOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options, - )) { - yield* page; - } - } - - /** - * Gets all Virtual Instances for SAP solutions resources in a Subscription. - * @param options The options parameters. - */ - public listBySubscription( - options?: SAPVirtualInstancesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listBySubscriptionPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listBySubscriptionPagingPage(options, settings); - }, - }; - } - - private async *listBySubscriptionPagingPage( - options?: SAPVirtualInstancesListBySubscriptionOptionalParams, - settings?: PageSettings, - ): AsyncIterableIterator { - let result: SAPVirtualInstancesListBySubscriptionResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listBySubscription(options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listBySubscriptionNext(continuationToken, options); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listBySubscriptionPagingAll( - options?: SAPVirtualInstancesListBySubscriptionOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listBySubscriptionPagingPage(options)) { - yield* page; - } - } - - /** - * Creates a Virtual Instance for SAP solutions (VIS) resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesCreateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, sapVirtualInstanceName, options }, - spec: createOperationSpec, - }); - const poller = await createHttpPoller< - SAPVirtualInstancesCreateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Creates a Virtual Instance for SAP solutions (VIS) resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesCreateOptionalParams, - ): Promise { - const poller = await this.beginCreate( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets a Virtual Instance for SAP solutions resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesGetOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, sapVirtualInstanceName, options }, - getOperationSpec, - ); - } - - /** - * Updates a Virtual Instance for SAP solutions resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginUpdate( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, sapVirtualInstanceName, options }, - spec: updateOperationSpec, - }); - const poller = await createHttpPoller< - SAPVirtualInstancesUpdateResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Updates a Virtual Instance for SAP solutions resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesUpdateOptionalParams, - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the - * associated Central Services Instance, Application Server Instances and Database Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, sapVirtualInstanceName, options }, - spec: deleteOperationSpec, - }); - const poller = await createHttpPoller< - SAPVirtualInstancesDeleteResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - resourceLocationConfig: "location", - }); - await poller.poll(); - return poller; - } - - /** - * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the - * associated Central Services Instance, Application Server Instances and Database Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesDeleteOptionalParams, - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: SAPVirtualInstancesListByResourceGroupOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec, - ); - } - - /** - * Gets all Virtual Instances for SAP solutions resources in a Subscription. - * @param options The options parameters. - */ - private _listBySubscription( - options?: SAPVirtualInstancesListBySubscriptionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { options }, - listBySubscriptionOperationSpec, - ); - } - - /** - * Starts the SAP application, that is the Central Services instance and Application server instances. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginStart( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStartOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesStartResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, sapVirtualInstanceName, options }, - spec: startOperationSpec, - }); - const poller = await createHttpPoller< - SAPVirtualInstancesStartResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Starts the SAP application, that is the Central Services instance and Application server instances. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginStartAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStartOptionalParams, - ): Promise { - const poller = await this.beginStart( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * Stops the SAP Application, that is the Application server instances and Central Services instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginStop( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStopOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesStopResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperationFn = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec, - ) => { - let currentRawResponse: coreClient.FullOperationResponse | undefined = - undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown, - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback, - }, - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON(), - }, - }; - }; - - const lro = createLroSpec({ - sendOperationFn, - args: { resourceGroupName, sapVirtualInstanceName, options }, - spec: stopOperationSpec, - }); - const poller = await createHttpPoller< - SAPVirtualInstancesStopResponse, - OperationState - >(lro, { - restoreFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - }); - await poller.poll(); - return poller; - } - - /** - * Stops the SAP Application, that is the Application server instances and Central Services instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - async beginStopAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStopOptionalParams, - ): Promise { - const poller = await this.beginStop( - resourceGroupName, - sapVirtualInstanceName, - options, - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: SAPVirtualInstancesListByResourceGroupNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec, - ); - } - - /** - * ListBySubscriptionNext - * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. - * @param options The options parameters. - */ - private _listBySubscriptionNext( - nextLink: string, - options?: SAPVirtualInstancesListBySubscriptionNextOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listBySubscriptionNextOperationSpec, - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - 201: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - 202: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - 204: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const getOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - 201: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - 202: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - 204: { - bodyMapper: Mappers.SAPVirtualInstance, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.SAPVirtualInstancesDeleteHeaders, - }, - 201: { - headersMapper: Mappers.SAPVirtualInstancesDeleteHeaders, - }, - 202: { - headersMapper: Mappers.SAPVirtualInstancesDeleteHeaders, - }, - 204: { - headersMapper: Mappers.SAPVirtualInstancesDeleteHeaders, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer, -}; -const startOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const stopOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.OperationStatusResult, - }, - 201: { - bodyMapper: Mappers.OperationStatusResult, - }, - 202: { - bodyMapper: Mappers.OperationStatusResult, - }, - 204: { - bodyMapper: Mappers.OperationStatusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.body3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.sapVirtualInstanceName, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SAPVirtualInstanceList, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - ], - headerParameters: [Parameters.accept], - serializer, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/index.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/index.ts deleted file mode 100644 index 94fedc92f4a9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export * from "./sAPVirtualInstances.js"; -export * from "./sAPCentralInstances.js"; -export * from "./sAPDatabaseInstances.js"; -export * from "./sAPApplicationServerInstances.js"; -export * from "./operations.js"; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/operations.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/operations.ts deleted file mode 100644 index 7d947fe764e0..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/operations.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models/index.js"; - -/// -/** Interface representing a Operations. */ -export interface Operations { - /** - * Lists all the available API operations under this PR - * @param options The options parameters. - */ - list( - options?: OperationsListOptionalParams, - ): PagedAsyncIterableIterator; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPApplicationServerInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPApplicationServerInstances.ts deleted file mode 100644 index 3cc16cb719e9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPApplicationServerInstances.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SAPApplicationServerInstance, - SAPApplicationServerInstancesListOptionalParams, - SAPApplicationServerInstancesGetOptionalParams, - SAPApplicationServerInstancesGetResponse, - SAPApplicationServerInstancesCreateOptionalParams, - SAPApplicationServerInstancesCreateResponse, - SAPApplicationServerInstancesUpdateOptionalParams, - SAPApplicationServerInstancesUpdateResponse, - SAPApplicationServerInstancesDeleteOptionalParams, - SAPApplicationServerInstancesDeleteResponse, - SAPApplicationServerInstancesStartInstanceOptionalParams, - SAPApplicationServerInstancesStartInstanceResponse, - SAPApplicationServerInstancesStopInstanceOptionalParams, - SAPApplicationServerInstancesStopInstanceResponse, -} from "../models/index.js"; - -/// -/** Interface representing a SAPApplicationServerInstances. */ -export interface SAPApplicationServerInstances { - /** - * Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPApplicationServerInstancesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesGetOptionalParams, - ): Promise; - /** - * Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by - * end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesCreateResponse - > - >; - /** - * Puts the SAP Application Server Instance resource.

This will be used by service only. PUT by - * end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesCreateOptionalParams, - ): Promise; - /** - * Updates the SAP Application server instance resource. This can be used to update tags on the - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesUpdateOptionalParams, - ): Promise; - /** - * Deletes the SAP Application Server Instance resource.

This operation will be used by service - * only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesDeleteResponse - > - >; - /** - * Deletes the SAP Application Server Instance resource.

This operation will be used by service - * only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesDeleteOptionalParams, - ): Promise; - /** - * Starts the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginStartInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStartInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesStartInstanceResponse - > - >; - /** - * Starts the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginStartInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStartInstanceOptionalParams, - ): Promise; - /** - * Stops the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginStopInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStopInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPApplicationServerInstancesStopInstanceResponse - > - >; - /** - * Stops the SAP Application Server Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param applicationInstanceName The name of SAP Application Server instance resource. - * @param options The options parameters. - */ - beginStopInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - applicationInstanceName: string, - options?: SAPApplicationServerInstancesStopInstanceOptionalParams, - ): Promise; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPCentralInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPCentralInstances.ts deleted file mode 100644 index 6659ff29c789..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPCentralInstances.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SAPCentralServerInstance, - SAPCentralInstancesListOptionalParams, - SAPCentralInstancesGetOptionalParams, - SAPCentralInstancesGetResponse, - SAPCentralInstancesCreateOptionalParams, - SAPCentralInstancesCreateResponse, - SAPCentralInstancesUpdateOptionalParams, - SAPCentralInstancesUpdateResponse, - SAPCentralInstancesDeleteOptionalParams, - SAPCentralInstancesDeleteResponse, - SAPCentralInstancesStartInstanceOptionalParams, - SAPCentralInstancesStartInstanceResponse, - SAPCentralInstancesStopInstanceOptionalParams, - SAPCentralInstancesStopInstanceResponse, -} from "../models/index.js"; - -/// -/** Interface representing a SAPCentralInstances. */ -export interface SAPCentralInstances { - /** - * Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPCentralInstancesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the SAP Central Services Instance resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesGetOptionalParams, - ): Promise; - /** - * Creates the SAP Central Services Instance resource.

This will be used by service only. PUT - * operation on this resource by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesCreateResponse - > - >; - /** - * Creates the SAP Central Services Instance resource.

This will be used by service only. PUT - * operation on this resource by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesCreateOptionalParams, - ): Promise; - /** - * Updates the SAP Central Services Instance resource.

This can be used to update tags on the - * resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesUpdateOptionalParams, - ): Promise; - /** - * Deletes the SAP Central Services Instance resource.

This will be used by service only. - * Delete operation on this resource by end user will return a Bad Request error. You can delete the - * parent resource, which is the Virtual Instance for SAP solutions resource, using the delete - * operation on it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesDeleteResponse - > - >; - /** - * Deletes the SAP Central Services Instance resource.

This will be used by service only. - * Delete operation on this resource by end user will return a Bad Request error. You can delete the - * parent resource, which is the Virtual Instance for SAP solutions resource, using the delete - * operation on it. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesDeleteOptionalParams, - ): Promise; - /** - * Starts the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginStartInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStartInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesStartInstanceResponse - > - >; - /** - * Starts the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginStartInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStartInstanceOptionalParams, - ): Promise; - /** - * Stops the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginStopInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStopInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPCentralInstancesStopInstanceResponse - > - >; - /** - * Stops the SAP Central Services Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param centralInstanceName Central Services Instance resource name string modeled as parameter for - * auto generation to work correctly. - * @param options The options parameters. - */ - beginStopInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - centralInstanceName: string, - options?: SAPCentralInstancesStopInstanceOptionalParams, - ): Promise; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPDatabaseInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPDatabaseInstances.ts deleted file mode 100644 index 351b87b9e1dc..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPDatabaseInstances.ts +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SAPDatabaseInstance, - SAPDatabaseInstancesListOptionalParams, - SAPDatabaseInstancesGetOptionalParams, - SAPDatabaseInstancesGetResponse, - SAPDatabaseInstancesCreateOptionalParams, - SAPDatabaseInstancesCreateResponse, - SAPDatabaseInstancesUpdateOptionalParams, - SAPDatabaseInstancesUpdateResponse, - SAPDatabaseInstancesDeleteOptionalParams, - SAPDatabaseInstancesDeleteResponse, - SAPDatabaseInstancesStartInstanceOptionalParams, - SAPDatabaseInstancesStartInstanceResponse, - SAPDatabaseInstancesStopInstanceOptionalParams, - SAPDatabaseInstancesStopInstanceResponse, -} from "../models/index.js"; - -/// -/** Interface representing a SAPDatabaseInstances. */ -export interface SAPDatabaseInstances { - /** - * Lists the Database resources associated with a Virtual Instance for SAP solutions resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - list( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPDatabaseInstancesListOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets the SAP Database Instance resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesGetOptionalParams, - ): Promise; - /** - * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. - *

This will be used by service only. PUT by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesCreateResponse - > - >; - /** - * Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. - *

This will be used by service only. PUT by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesCreateOptionalParams, - ): Promise; - /** - * Updates the Database instance resource. This can be used to update tags on the resource. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesUpdateOptionalParams, - ): Promise; - /** - * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. - *

This will be used by service only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesDeleteResponse - > - >; - /** - * Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. - *

This will be used by service only. Delete by end user will return a Bad Request error. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesDeleteOptionalParams, - ): Promise; - /** - * Starts the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginStartInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStartInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesStartInstanceResponse - > - >; - /** - * Starts the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginStartInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStartInstanceOptionalParams, - ): Promise; - /** - * Stops the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginStopInstance( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStopInstanceOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPDatabaseInstancesStopInstanceResponse - > - >; - /** - * Stops the database instance of the SAP system. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param databaseInstanceName Database resource name string modeled as parameter for auto generation - * to work correctly. - * @param options The options parameters. - */ - beginStopInstanceAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - databaseInstanceName: string, - options?: SAPDatabaseInstancesStopInstanceOptionalParams, - ): Promise; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPVirtualInstances.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPVirtualInstances.ts deleted file mode 100644 index 85e90b8ce5d8..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/operationsInterfaces/sAPVirtualInstances.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { SimplePollerLike, OperationState } from "@azure/core-lro"; -import { - SAPVirtualInstance, - SAPVirtualInstancesListByResourceGroupOptionalParams, - SAPVirtualInstancesListBySubscriptionOptionalParams, - SAPVirtualInstancesCreateOptionalParams, - SAPVirtualInstancesCreateResponse, - SAPVirtualInstancesGetOptionalParams, - SAPVirtualInstancesGetResponse, - SAPVirtualInstancesUpdateOptionalParams, - SAPVirtualInstancesUpdateResponse, - SAPVirtualInstancesDeleteOptionalParams, - SAPVirtualInstancesDeleteResponse, - SAPVirtualInstancesStartOptionalParams, - SAPVirtualInstancesStartResponse, - SAPVirtualInstancesStopOptionalParams, - SAPVirtualInstancesStopResponse, -} from "../models/index.js"; - -/// -/** Interface representing a SAPVirtualInstances. */ -export interface SAPVirtualInstances { - /** - * Gets all Virtual Instances for SAP solutions resources in a Resource Group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: SAPVirtualInstancesListByResourceGroupOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Gets all Virtual Instances for SAP solutions resources in a Subscription. - * @param options The options parameters. - */ - listBySubscription( - options?: SAPVirtualInstancesListBySubscriptionOptionalParams, - ): PagedAsyncIterableIterator; - /** - * Creates a Virtual Instance for SAP solutions (VIS) resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginCreate( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesCreateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesCreateResponse - > - >; - /** - * Creates a Virtual Instance for SAP solutions (VIS) resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginCreateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesCreateOptionalParams, - ): Promise; - /** - * Gets a Virtual Instance for SAP solutions resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - get( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesGetOptionalParams, - ): Promise; - /** - * Updates a Virtual Instance for SAP solutions resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginUpdate( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesUpdateOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesUpdateResponse - > - >; - /** - * Updates a Virtual Instance for SAP solutions resource - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesUpdateOptionalParams, - ): Promise; - /** - * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the - * associated Central Services Instance, Application Server Instances and Database Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginDelete( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesDeleteOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesDeleteResponse - > - >; - /** - * Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the - * associated Central Services Instance, Application Server Instances and Database Instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesDeleteOptionalParams, - ): Promise; - /** - * Starts the SAP application, that is the Central Services instance and Application server instances. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginStart( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStartOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesStartResponse - > - >; - /** - * Starts the SAP application, that is the Central Services instance and Application server instances. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginStartAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStartOptionalParams, - ): Promise; - /** - * Stops the SAP Application, that is the Application server instances and Central Services instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginStop( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStopOptionalParams, - ): Promise< - SimplePollerLike< - OperationState, - SAPVirtualInstancesStopResponse - > - >; - /** - * Stops the SAP Application, that is the Application server instances and Central Services instance. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource - * @param options The options parameters. - */ - beginStopAndWait( - resourceGroupName: string, - sapVirtualInstanceName: string, - options?: SAPVirtualInstancesStopOptionalParams, - ): Promise; -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/pagingHelper.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/pagingHelper.ts deleted file mode 100644 index 205cccc26592..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/pagingHelper.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export interface PageInfo { - continuationToken?: string; -} - -const pageMap = new WeakMap(); - -/** - * Given the last `.value` produced by the `byPage` iterator, - * returns a continuation token that can be used to begin paging from - * that point later. - * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. - * @returns The continuation token that can be passed into byPage() during future calls. - */ -export function getContinuationToken(page: unknown): string | undefined { - if (typeof page !== "object" || page === null) { - return undefined; - } - return pageMap.get(page)?.continuationToken; -} - -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined, -): void { - if (typeof page !== "object" || page === null || !continuationToken) { - return; - } - const pageInfo = pageMap.get(page) ?? {}; - pageInfo.continuationToken = continuationToken; - pageMap.set(page, pageInfo); -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/src/workloadsClient.ts b/sdk/workloads/arm-workloadssapvirtualinstance/src/workloadsClient.ts deleted file mode 100644 index dc0e2f0714cc..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/src/workloadsClient.ts +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest, -} from "@azure/core-rest-pipeline"; -import * as coreAuth from "@azure/core-auth"; -import { - SAPVirtualInstancesImpl, - SAPCentralInstancesImpl, - SAPDatabaseInstancesImpl, - SAPApplicationServerInstancesImpl, - OperationsImpl, -} from "./operations/index.js"; -import { - SAPVirtualInstances, - SAPCentralInstances, - SAPDatabaseInstances, - SAPApplicationServerInstances, - Operations, -} from "./operationsInterfaces/index.js"; -import * as Parameters from "./models/parameters.js"; -import * as Mappers from "./models/mappers.js"; -import { - WorkloadsClientOptionalParams, - SAPSizingRecommendationsOptionalParams, - SAPSizingRecommendationsResponse, - SAPSupportedSkuOptionalParams, - SAPSupportedSkuResponse, - SAPDiskConfigurationsOptionalParams, - SAPDiskConfigurationsResponse, - SAPAvailabilityZoneDetailsOptionalParams, - SAPAvailabilityZoneDetailsResponse, -} from "./models/index.js"; - -export class WorkloadsClient extends coreClient.ServiceClient { - $host: string; - subscriptionId: string; - apiVersion: string; - - /** - * Initializes a new instance of the WorkloadsClient class. - * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. - * @param options The parameter options - */ - constructor( - credentials: coreAuth.TokenCredential, - subscriptionId: string, - options?: WorkloadsClientOptionalParams, - ) { - if (credentials === undefined) { - throw new Error("'credentials' cannot be null"); - } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); - } - - // Initializing default values for options - if (!options) { - options = {}; - } - const defaults: WorkloadsClientOptionalParams = { - requestContentType: "application/json; charset=utf-8", - credential: credentials, - }; - - const packageDetails = `azsdk-js-arm-workloadssapvirtualinstance/1.0.0-beta.2`; - const userAgentPrefix = - options.userAgentOptions && options.userAgentOptions.userAgentPrefix - ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` - : `${packageDetails}`; - - const optionsWithDefaults = { - ...defaults, - ...options, - userAgentOptions: { - userAgentPrefix, - }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com", - }; - super(optionsWithDefaults); - - let bearerTokenAuthenticationPolicyFound: boolean = false; - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = - options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName, - ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName, - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge, - }, - }), - ); - } - // Parameter assignments - this.subscriptionId = subscriptionId; - - // Assigning values to Constant parameters - this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-10-01-preview"; - this.sAPVirtualInstances = new SAPVirtualInstancesImpl(this); - this.sAPCentralInstances = new SAPCentralInstancesImpl(this); - this.sAPDatabaseInstances = new SAPDatabaseInstancesImpl(this); - this.sAPApplicationServerInstances = new SAPApplicationServerInstancesImpl( - this, - ); - this.operations = new OperationsImpl(this); - this.addCustomApiVersionPolicy(options.apiVersion); - } - - /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ - private addCustomApiVersionPolicy(apiVersion?: string) { - if (!apiVersion) { - return; - } - const apiVersionPolicy = { - name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest, - ): Promise { - const param = request.url.split("?"); - if (param.length > 1) { - const newParams = param[1].split("&").map((item) => { - if (item.indexOf("api-version") > -1) { - return "api-version=" + apiVersion; - } else { - return item; - } - }); - request.url = param[0] + "?" + newParams.join("&"); - } - return next(request); - }, - }; - this.pipeline.addPolicy(apiVersionPolicy); - } - - /** - * Get SAP sizing recommendations by providing input SAPS for application tier and memory required for - * database tier - * @param location The name of Azure region. - * @param options The options parameters. - */ - sAPSizingRecommendations( - location: string, - options?: SAPSizingRecommendationsOptionalParams, - ): Promise { - return this.sendOperationRequest( - { location, options }, - sAPSizingRecommendationsOperationSpec, - ); - } - - /** - * Get a list of SAP supported SKUs for ASCS, Application and Database tier. - * @param location The name of Azure region. - * @param options The options parameters. - */ - sAPSupportedSku( - location: string, - options?: SAPSupportedSkuOptionalParams, - ): Promise { - return this.sendOperationRequest( - { location, options }, - sAPSupportedSkuOperationSpec, - ); - } - - /** - * Get the SAP Disk Configuration Layout prod/non-prod SAP System. - * @param location The name of Azure region. - * @param options The options parameters. - */ - sAPDiskConfigurations( - location: string, - options?: SAPDiskConfigurationsOptionalParams, - ): Promise { - return this.sendOperationRequest( - { location, options }, - sAPDiskConfigurationsOperationSpec, - ); - } - - /** - * Get the recommended SAP Availability Zone Pair Details for your region. - * @param location The name of Azure region. - * @param options The options parameters. - */ - sAPAvailabilityZoneDetails( - location: string, - options?: SAPAvailabilityZoneDetailsOptionalParams, - ): Promise { - return this.sendOperationRequest( - { location, options }, - sAPAvailabilityZoneDetailsOperationSpec, - ); - } - - sAPVirtualInstances: SAPVirtualInstances; - sAPCentralInstances: SAPCentralInstances; - sAPDatabaseInstances: SAPDatabaseInstances; - sAPApplicationServerInstances: SAPApplicationServerInstances; - operations: Operations; -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const sAPSizingRecommendationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SAPSizingRecommendationResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.sAPSizingRecommendation, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const sAPSupportedSkuOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SAPSupportedResourceSkusResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.sAPSupportedSku, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const sAPDiskConfigurationsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SAPDiskConfigurationsResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.sAPDiskConfigurations, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; -const sAPAvailabilityZoneDetailsOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SAPAvailabilityZoneDetailsResult, - }, - default: { - bodyMapper: Mappers.ErrorResponse, - }, - }, - requestBody: Parameters.sAPAvailabilityZoneDetails, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - ], - headerParameters: [Parameters.contentType, Parameters.accept], - mediaType: "json", - serializer, -}; diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/test/snippets.spec.ts b/sdk/workloads/arm-workloadssapvirtualinstance/test/snippets.spec.ts deleted file mode 100644 index fdd01fef964e..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/test/snippets.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { WorkloadsClient } from "../src/index.js"; -import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; -import { setLogLevel } from "@azure/logger"; -import { describe, it } from "vitest"; - -describe("snippets", () => { - it("ReadmeSampleCreateClient_Node", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new WorkloadsClient(new DefaultAzureCredential(), subscriptionId); - }); - - it("ReadmeSampleCreateClient_Browser", async () => { - const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const credential = new InteractiveBrowserCredential({ - tenantId: "", - clientId: "", - }); - const client = new WorkloadsClient(credential, subscriptionId); - }); - - it("SetLogLevel", async () => { - setLogLevel("info"); - }); -}); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/test/workloadssapvirtualinstance_operations_test.spec.ts b/sdk/workloads/arm-workloadssapvirtualinstance/test/workloadssapvirtualinstance_operations_test.spec.ts deleted file mode 100644 index a8889eee52ac..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/test/workloadssapvirtualinstance_operations_test.spec.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import type { RecorderStartOptions } from "@azure-tools/test-recorder"; -import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { WorkloadsClient } from "../src/workloadsClient.js"; -import { describe, it, assert, beforeEach, afterEach } from "vitest"; - -const replaceableVariables: Record = { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id", -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("Workloads test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: WorkloadsClient; - - beforeEach(async (ctx) => { - recorder = new Recorder(ctx); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new WorkloadsClient(credential, subscriptionId, recorder.configureClientOptions({})); - }); - - afterEach(async () => { - await recorder.stop(); - }); - - it("operations list test", async () => { - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); -}); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.browser.config.json b/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.browser.config.json deleted file mode 100644 index 0c8bafa97126..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.browser.config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "./tsconfig.test.json", - "../../../tsconfig.browser.base.json" - ] -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.json b/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.json deleted file mode 100644 index 19ceb382b521..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "references": [ - { - "path": "./tsconfig.src.json" - }, - { - "path": "./tsconfig.samples.json" - }, - { - "path": "./tsconfig.test.json" - } - ] -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.samples.json b/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.samples.json deleted file mode 100644 index 40d5dcb6bd08..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.samples.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.samples.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-workloadssapvirtualinstance": [ - "./dist/esm" - ] - } - } -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.src.json b/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.src.json deleted file mode 100644 index bae70752dd38..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.src.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../../tsconfig.lib.json" -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.test.json b/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.test.json deleted file mode 100644 index 3c2b783a8c1b..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/tsconfig.test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "./tsconfig.src.json", - "../../../tsconfig.test.base.json" - ] -} diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/tsp-location.yaml b/sdk/workloads/arm-workloadssapvirtualinstance/tsp-location.yaml new file mode 100644 index 000000000000..f2ff86340e4f --- /dev/null +++ b/sdk/workloads/arm-workloadssapvirtualinstance/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/workloads/Workloads.SAPVirtualInstance.Management +commit: 1e3132c2f308fd63ab800ce351d34851ada174fe +repo: ../azure-rest-api-specs +additionalDirectories: diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/vitest.browser.config.ts b/sdk/workloads/arm-workloadssapvirtualinstance/vitest.browser.config.ts deleted file mode 100644 index 182729ab5ce9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/vitest.browser.config.ts +++ /dev/null @@ -1,17 +0,0 @@ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.browser.shared.config.ts"; - -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - include: ["dist-test/browser/test/**/*.spec.js",], - testTimeout: 1200000, - hookTimeout: 1200000, - }, - }), -); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/vitest.config.ts b/sdk/workloads/arm-workloadssapvirtualinstance/vitest.config.ts deleted file mode 100644 index 40e031385dd8..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/vitest.config.ts +++ /dev/null @@ -1,16 +0,0 @@ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { defineConfig, mergeConfig } from "vitest/config"; -import viteConfig from "../../../vitest.shared.config.ts"; - -export default mergeConfig( - viteConfig, - defineConfig({ - test: { - testTimeout: 1200000, - hookTimeout: 1200000, - }, - }), -); diff --git a/sdk/workloads/arm-workloadssapvirtualinstance/vitest.esm.config.ts b/sdk/workloads/arm-workloadssapvirtualinstance/vitest.esm.config.ts deleted file mode 100644 index a70127279fc9..000000000000 --- a/sdk/workloads/arm-workloadssapvirtualinstance/vitest.esm.config.ts +++ /dev/null @@ -1,12 +0,0 @@ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { mergeConfig } from "vitest/config"; -import vitestConfig from "./vitest.config.ts"; -import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; - -export default mergeConfig( - vitestConfig, - vitestEsmConfig -);