Files
Minh-Anh PhanandGitHub 3181ad2806 [EngSys] Bump min-version to node 22 (#38887) ***NO_CI***
This pull request updates the Node.js version requirement across
multiple files and tools in the repository. The changes ensure
compatibility with Node.js version 22 and its corresponding type
definitions. Resolves #37945.

***NO_CI***
2026-06-23 16:25:55 -07:00
..
…

@azure/arm-workloadssapvirtualinstance client library samples for JavaScript

These sample programs show how to use the JavaScript client libraries for @azure/arm-workloadssapvirtualinstance in some common scenarios.

File Name Description
operationsListSample.js list the operations for the provider x-ms-original-file: 2024-09-01/Operations_List.json
sapApplicationServerInstancesCreateSample.js puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_Create.json
sapApplicationServerInstancesDeleteSample.js deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_Delete.json
sapApplicationServerInstancesGetSample.js gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_Get.json
sapApplicationServerInstancesListSample.js lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_ListBySapVirtualInstance.json
sapApplicationServerInstancesStartSample.js starts the SAP Application Server Instance. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_StartInstance.json
sapApplicationServerInstancesStopSample.js stops the SAP Application Server Instance. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_StopInstance.json
sapApplicationServerInstancesUpdateSample.js puts the SAP Application Server Instance resource. x-ms-original-file: 2024-09-01/SapApplicationServerInstances_Update.json
sapCentralServerInstancesCreateSample.js creates the SAP Central Services Instance resource. <br><br>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: 2024-09-01/SapCentralInstances_Create.json
sapCentralServerInstancesDeleteSample.js deletes the SAP Central Services Instance resource. <br><br>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: 2024-09-01/SapCentralInstances_Delete.json
sapCentralServerInstancesGetSample.js gets the SAP Central Services Instance resource. x-ms-original-file: 2024-09-01/SapCentralInstances_Get.json
sapCentralServerInstancesListSample.js lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. x-ms-original-file: 2024-09-01/SapCentralServerInstances_ListBySapVirtualInstance.json
sapCentralServerInstancesStartSample.js starts the SAP Central Services Instance. x-ms-original-file: 2024-09-01/SapCentralInstances_StartInstance.json
sapCentralServerInstancesStopSample.js stops the SAP Central Services Instance. x-ms-original-file: 2024-09-01/SapCentralInstances_StopInstance.json
sapCentralServerInstancesUpdateSample.js updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. x-ms-original-file: 2024-09-01/SapCentralInstances_Update.json
sapDatabaseInstancesCreateSample.js creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. x-ms-original-file: 2024-09-01/SapDatabaseInstances_Create.json
sapDatabaseInstancesDeleteSample.js deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. x-ms-original-file: 2024-09-01/SapDatabaseInstances_Delete.json
sapDatabaseInstancesGetSample.js gets the SAP Database Instance resource. x-ms-original-file: 2024-09-01/SapDatabaseInstances_Get.json
sapDatabaseInstancesListSample.js lists the Database resources associated with a Virtual Instance for SAP solutions resource. x-ms-original-file: 2024-09-01/SapDatabaseInstances_List.json
sapDatabaseInstancesStartSample.js starts the database instance of the SAP system. x-ms-original-file: 2024-09-01/SapDatabaseInstances_StartInstance.json
sapDatabaseInstancesStopSample.js stops the database instance of the SAP system. x-ms-original-file: 2024-09-01/SapDatabaseInstances_StopInstance.json
sapDatabaseInstancesUpdateSample.js updates the Database resource. x-ms-original-file: 2024-09-01/SapDatabaseInstances_Update.json
sapVirtualInstancesCreateSample.js creates a Virtual Instance for SAP solutions (VIS) resource x-ms-original-file: 2024-09-01/SapVirtualInstances_CreateDetectDS.json
sapVirtualInstancesDeleteSample.js 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: 2024-09-01/SapVirtualInstances_Delete.json
sapVirtualInstancesGetAvailabilityZoneDetailsSample.js get the recommended SAP Availability Zone Pair Details for your region. x-ms-original-file: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_eastus.json
sapVirtualInstancesGetDiskConfigurationsSample.js get the SAP Disk Configuration Layout prod/non-prod SAP System. x-ms-original-file: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_NonProd.json
sapVirtualInstancesGetSample.js gets a Virtual Instance for SAP solutions resource x-ms-original-file: 2024-09-01/SapVirtualInstances_Get.json
sapVirtualInstancesGetSapSupportedSkuSample.js get a list of SAP supported SKUs for ASCS, Application and Database tier. x-ms-original-file: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_Distributed.json
sapVirtualInstancesGetSizingRecommendationsSample.js gets the sizing recommendations. x-ms-original-file: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_Distributed.json
sapVirtualInstancesListByResourceGroupSample.js gets all Virtual Instances for SAP solutions resources in a Resource Group. x-ms-original-file: 2024-09-01/SapVirtualInstances_ListByResourceGroup.json
sapVirtualInstancesListBySubscriptionSample.js gets all Virtual Instances for SAP solutions resources in a Subscription. x-ms-original-file: 2024-09-01/SapVirtualInstances_ListBySubscription.json
sapVirtualInstancesStartSample.js starts the SAP application, that is the Central Services instance and Application server instances. x-ms-original-file: 2024-09-01/SapVirtualInstances_Start.json
sapVirtualInstancesStopSample.js stops the SAP Application, that is the Application server instances and Central Services instance. x-ms-original-file: 2024-09-01/SapVirtualInstances_SoftStop.json
sapVirtualInstancesUpdateSample.js updates a Virtual Instance for SAP solutions resource x-ms-original-file: 2024-09-01/SapVirtualInstances_Update.json

Prerequisites

The sample programs are compatible with LTS versions of Node.js.

You need an Azure subscription 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.

Setup

To run the samples using the published version of the package:

  1. Install the dependencies using npm:
npm install
  1. 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.

  2. Run whichever samples you like (note that some samples may require additional setup, see the table above):

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):

cross-env node operationsListSample.js

Next Steps

Take a look at our API Documentation for more information about the APIs that are available in the clients.