@azure/arm-workloadssapvirtualinstance 1.0.0-alpha.20240322.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +6973 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +53 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesCreateSample.js +72 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesDeleteSample.js +40 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesGetSample.js +40 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesListSample.js +55 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesListSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.js +64 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStartInstanceSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.js +68 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesStopInstanceSample.js.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesUpdateSample.js +44 -0
- package/dist-esm/samples-dev/sapApplicationServerInstancesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapAvailabilityZoneDetailsSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapAvailabilityZoneDetailsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapAvailabilityZoneDetailsSample.js +56 -0
- package/dist-esm/samples-dev/sapAvailabilityZoneDetailsSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesCreateSample.js +72 -0
- package/dist-esm/samples-dev/sapCentralInstancesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesDeleteSample.js +40 -0
- package/dist-esm/samples-dev/sapCentralInstancesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesGetSample.js +40 -0
- package/dist-esm/samples-dev/sapCentralInstancesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesListSample.js +55 -0
- package/dist-esm/samples-dev/sapCentralInstancesListSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.js +62 -0
- package/dist-esm/samples-dev/sapCentralInstancesStartInstanceSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.js +64 -0
- package/dist-esm/samples-dev/sapCentralInstancesStopInstanceSample.js.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapCentralInstancesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapCentralInstancesUpdateSample.js +42 -0
- package/dist-esm/samples-dev/sapCentralInstancesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesCreateSample.js +72 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesDeleteSample.js +40 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesGetSample.js +40 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesListSample.js +55 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesListSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.js +62 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStartInstanceSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.js +64 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesStopInstanceSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesUpdateSample.js +42 -0
- package/dist-esm/samples-dev/sapDatabaseInstancesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapDiskConfigurationsSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapDiskConfigurationsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapDiskConfigurationsSample.js +56 -0
- package/dist-esm/samples-dev/sapDiskConfigurationsSample.js.map +1 -0
- package/dist-esm/samples-dev/sapSizingRecommendationsSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapSizingRecommendationsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapSizingRecommendationsSample.js +92 -0
- package/dist-esm/samples-dev/sapSizingRecommendationsSample.js.map +1 -0
- package/dist-esm/samples-dev/sapSupportedSkuSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapSupportedSkuSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapSupportedSkuSample.js +92 -0
- package/dist-esm/samples-dev/sapSupportedSkuSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesCreateSample.js +2993 -0
- package/dist-esm/samples-dev/sapVirtualInstancesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/sapVirtualInstancesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesGetSample.js +58 -0
- package/dist-esm/samples-dev/sapVirtualInstancesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListByResourceGroupSample.js +54 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListBySubscriptionSample.js +53 -0
- package/dist-esm/samples-dev/sapVirtualInstancesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStartSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStartSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStartSample.js +60 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStartSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStopSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStopSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStopSample.js +62 -0
- package/dist-esm/samples-dev/sapVirtualInstancesStopSample.js.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sapVirtualInstancesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sapVirtualInstancesUpdateSample.js +69 -0
- package/dist-esm/samples-dev/sapVirtualInstancesUpdateSample.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +11 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +21 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +2158 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +274 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +146 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +3364 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +28 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +212 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +13 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +133 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/sAPApplicationServerInstances.d.ts +127 -0
- package/dist-esm/src/operations/sAPApplicationServerInstances.d.ts.map +1 -0
- package/dist-esm/src/operations/sAPApplicationServerInstances.js +617 -0
- package/dist-esm/src/operations/sAPApplicationServerInstances.js.map +1 -0
- package/dist-esm/src/operations/sAPCentralInstances.d.ts +140 -0
- package/dist-esm/src/operations/sAPCentralInstances.d.ts.map +1 -0
- package/dist-esm/src/operations/sAPCentralInstances.js +630 -0
- package/dist-esm/src/operations/sAPCentralInstances.js.map +1 -0
- package/dist-esm/src/operations/sAPDatabaseInstances.d.ts +133 -0
- package/dist-esm/src/operations/sAPDatabaseInstances.d.ts.map +1 -0
- package/dist-esm/src/operations/sAPDatabaseInstances.js +623 -0
- package/dist-esm/src/operations/sAPDatabaseInstances.js.map +1 -0
- package/dist-esm/src/operations/sAPVirtualInstances.d.ts +133 -0
- package/dist-esm/src/operations/sAPVirtualInstances.d.ts.map +1 -0
- package/dist-esm/src/operations/sAPVirtualInstances.js +725 -0
- package/dist-esm/src/operations/sAPVirtualInstances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPApplicationServerInstances.d.ts +101 -0
- package/dist-esm/src/operationsInterfaces/sAPApplicationServerInstances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPApplicationServerInstances.js +9 -0
- package/dist-esm/src/operationsInterfaces/sAPApplicationServerInstances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPCentralInstances.d.ts +114 -0
- package/dist-esm/src/operationsInterfaces/sAPCentralInstances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPCentralInstances.js +9 -0
- package/dist-esm/src/operationsInterfaces/sAPCentralInstances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPDatabaseInstances.d.ts +108 -0
- package/dist-esm/src/operationsInterfaces/sAPDatabaseInstances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPDatabaseInstances.js +9 -0
- package/dist-esm/src/operationsInterfaces/sAPDatabaseInstances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPVirtualInstances.d.ts +97 -0
- package/dist-esm/src/operationsInterfaces/sAPVirtualInstances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sAPVirtualInstances.js +9 -0
- package/dist-esm/src/operationsInterfaces/sAPVirtualInstances.js.map +1 -0
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/workloadsClient.d.ts +49 -0
- package/dist-esm/src/workloadsClient.d.ts.map +1 -0
- package/dist-esm/src/workloadsClient.js +229 -0
- package/dist-esm/src/workloadsClient.js.map +1 -0
- package/dist-esm/test/workloadssapvirtualinstance_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/workloadssapvirtualinstance_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/workloadssapvirtualinstance_operations_test.spec.js +73 -0
- package/dist-esm/test/workloadssapvirtualinstance_operations_test.spec.js.map +1 -0
- package/package.json +118 -0
- package/review/arm-workloadssapvirtualinstance.api.md +1558 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +42 -0
- package/src/models/index.ts +2476 -0
- package/src/models/mappers.ts +3615 -0
- package/src/models/parameters.ts +258 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/operations.ts +149 -0
- package/src/operations/sAPApplicationServerInstances.ts +852 -0
- package/src/operations/sAPCentralInstances.ts +863 -0
- package/src/operations/sAPDatabaseInstances.ts +856 -0
- package/src/operations/sAPVirtualInstances.ts +964 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/sAPApplicationServerInstances.ts +199 -0
- package/src/operationsInterfaces/sAPCentralInstances.ts +212 -0
- package/src/operationsInterfaces/sAPDatabaseInstances.ts +206 -0
- package/src/operationsInterfaces/sAPVirtualInstances.ts +196 -0
- package/src/pagingHelper.ts +39 -0
- package/src/workloadsClient.ts +327 -0
- package/tsconfig.json +33 -0
- package/types/arm-workloadssapvirtualinstance.d.ts +2888 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,856 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { SAPDatabaseInstances } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { WorkloadsClient } from "../workloadsClient";
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller,
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
22
|
+
import {
|
|
23
|
+
SAPDatabaseInstance,
|
|
24
|
+
SAPDatabaseInstancesListNextOptionalParams,
|
|
25
|
+
SAPDatabaseInstancesListOptionalParams,
|
|
26
|
+
SAPDatabaseInstancesListResponse,
|
|
27
|
+
SAPDatabaseInstancesGetOptionalParams,
|
|
28
|
+
SAPDatabaseInstancesGetResponse,
|
|
29
|
+
SAPDatabaseInstancesCreateOptionalParams,
|
|
30
|
+
SAPDatabaseInstancesCreateResponse,
|
|
31
|
+
SAPDatabaseInstancesUpdateOptionalParams,
|
|
32
|
+
SAPDatabaseInstancesUpdateResponse,
|
|
33
|
+
SAPDatabaseInstancesDeleteOptionalParams,
|
|
34
|
+
SAPDatabaseInstancesDeleteResponse,
|
|
35
|
+
SAPDatabaseInstancesStartInstanceOptionalParams,
|
|
36
|
+
SAPDatabaseInstancesStartInstanceResponse,
|
|
37
|
+
SAPDatabaseInstancesStopInstanceOptionalParams,
|
|
38
|
+
SAPDatabaseInstancesStopInstanceResponse,
|
|
39
|
+
SAPDatabaseInstancesListNextResponse,
|
|
40
|
+
} from "../models";
|
|
41
|
+
|
|
42
|
+
/// <reference lib="esnext.asynciterable" />
|
|
43
|
+
/** Class containing SAPDatabaseInstances operations. */
|
|
44
|
+
export class SAPDatabaseInstancesImpl implements SAPDatabaseInstances {
|
|
45
|
+
private readonly client: WorkloadsClient;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initialize a new instance of the class SAPDatabaseInstances class.
|
|
49
|
+
* @param client Reference to the service client
|
|
50
|
+
*/
|
|
51
|
+
constructor(client: WorkloadsClient) {
|
|
52
|
+
this.client = client;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Lists the Database resources associated with a Virtual Instance for SAP solutions resource.
|
|
57
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
58
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
59
|
+
* @param options The options parameters.
|
|
60
|
+
*/
|
|
61
|
+
public list(
|
|
62
|
+
resourceGroupName: string,
|
|
63
|
+
sapVirtualInstanceName: string,
|
|
64
|
+
options?: SAPDatabaseInstancesListOptionalParams,
|
|
65
|
+
): PagedAsyncIterableIterator<SAPDatabaseInstance> {
|
|
66
|
+
const iter = this.listPagingAll(
|
|
67
|
+
resourceGroupName,
|
|
68
|
+
sapVirtualInstanceName,
|
|
69
|
+
options,
|
|
70
|
+
);
|
|
71
|
+
return {
|
|
72
|
+
next() {
|
|
73
|
+
return iter.next();
|
|
74
|
+
},
|
|
75
|
+
[Symbol.asyncIterator]() {
|
|
76
|
+
return this;
|
|
77
|
+
},
|
|
78
|
+
byPage: (settings?: PageSettings) => {
|
|
79
|
+
if (settings?.maxPageSize) {
|
|
80
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
81
|
+
}
|
|
82
|
+
return this.listPagingPage(
|
|
83
|
+
resourceGroupName,
|
|
84
|
+
sapVirtualInstanceName,
|
|
85
|
+
options,
|
|
86
|
+
settings,
|
|
87
|
+
);
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private async *listPagingPage(
|
|
93
|
+
resourceGroupName: string,
|
|
94
|
+
sapVirtualInstanceName: string,
|
|
95
|
+
options?: SAPDatabaseInstancesListOptionalParams,
|
|
96
|
+
settings?: PageSettings,
|
|
97
|
+
): AsyncIterableIterator<SAPDatabaseInstance[]> {
|
|
98
|
+
let result: SAPDatabaseInstancesListResponse;
|
|
99
|
+
let continuationToken = settings?.continuationToken;
|
|
100
|
+
if (!continuationToken) {
|
|
101
|
+
result = await this._list(
|
|
102
|
+
resourceGroupName,
|
|
103
|
+
sapVirtualInstanceName,
|
|
104
|
+
options,
|
|
105
|
+
);
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
continuationToken = result.nextLink;
|
|
108
|
+
setContinuationToken(page, continuationToken);
|
|
109
|
+
yield page;
|
|
110
|
+
}
|
|
111
|
+
while (continuationToken) {
|
|
112
|
+
result = await this._listNext(
|
|
113
|
+
resourceGroupName,
|
|
114
|
+
sapVirtualInstanceName,
|
|
115
|
+
continuationToken,
|
|
116
|
+
options,
|
|
117
|
+
);
|
|
118
|
+
continuationToken = result.nextLink;
|
|
119
|
+
let page = result.value || [];
|
|
120
|
+
setContinuationToken(page, continuationToken);
|
|
121
|
+
yield page;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private async *listPagingAll(
|
|
126
|
+
resourceGroupName: string,
|
|
127
|
+
sapVirtualInstanceName: string,
|
|
128
|
+
options?: SAPDatabaseInstancesListOptionalParams,
|
|
129
|
+
): AsyncIterableIterator<SAPDatabaseInstance> {
|
|
130
|
+
for await (const page of this.listPagingPage(
|
|
131
|
+
resourceGroupName,
|
|
132
|
+
sapVirtualInstanceName,
|
|
133
|
+
options,
|
|
134
|
+
)) {
|
|
135
|
+
yield* page;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Gets the SAP Database Instance resource.
|
|
141
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
142
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
143
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
144
|
+
* to work correctly.
|
|
145
|
+
* @param options The options parameters.
|
|
146
|
+
*/
|
|
147
|
+
get(
|
|
148
|
+
resourceGroupName: string,
|
|
149
|
+
sapVirtualInstanceName: string,
|
|
150
|
+
databaseInstanceName: string,
|
|
151
|
+
options?: SAPDatabaseInstancesGetOptionalParams,
|
|
152
|
+
): Promise<SAPDatabaseInstancesGetResponse> {
|
|
153
|
+
return this.client.sendOperationRequest(
|
|
154
|
+
{
|
|
155
|
+
resourceGroupName,
|
|
156
|
+
sapVirtualInstanceName,
|
|
157
|
+
databaseInstanceName,
|
|
158
|
+
options,
|
|
159
|
+
},
|
|
160
|
+
getOperationSpec,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.
|
|
166
|
+
* <br><br>This will be used by service only. PUT by end user will return a Bad Request error.
|
|
167
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
168
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
169
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
170
|
+
* to work correctly.
|
|
171
|
+
* @param options The options parameters.
|
|
172
|
+
*/
|
|
173
|
+
async beginCreate(
|
|
174
|
+
resourceGroupName: string,
|
|
175
|
+
sapVirtualInstanceName: string,
|
|
176
|
+
databaseInstanceName: string,
|
|
177
|
+
options?: SAPDatabaseInstancesCreateOptionalParams,
|
|
178
|
+
): Promise<
|
|
179
|
+
SimplePollerLike<
|
|
180
|
+
OperationState<SAPDatabaseInstancesCreateResponse>,
|
|
181
|
+
SAPDatabaseInstancesCreateResponse
|
|
182
|
+
>
|
|
183
|
+
> {
|
|
184
|
+
const directSendOperation = async (
|
|
185
|
+
args: coreClient.OperationArguments,
|
|
186
|
+
spec: coreClient.OperationSpec,
|
|
187
|
+
): Promise<SAPDatabaseInstancesCreateResponse> => {
|
|
188
|
+
return this.client.sendOperationRequest(args, spec);
|
|
189
|
+
};
|
|
190
|
+
const sendOperationFn = async (
|
|
191
|
+
args: coreClient.OperationArguments,
|
|
192
|
+
spec: coreClient.OperationSpec,
|
|
193
|
+
) => {
|
|
194
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
195
|
+
undefined;
|
|
196
|
+
const providedCallback = args.options?.onResponse;
|
|
197
|
+
const callback: coreClient.RawResponseCallback = (
|
|
198
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
199
|
+
flatResponse: unknown,
|
|
200
|
+
) => {
|
|
201
|
+
currentRawResponse = rawResponse;
|
|
202
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
203
|
+
};
|
|
204
|
+
const updatedArgs = {
|
|
205
|
+
...args,
|
|
206
|
+
options: {
|
|
207
|
+
...args.options,
|
|
208
|
+
onResponse: callback,
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
212
|
+
return {
|
|
213
|
+
flatResponse,
|
|
214
|
+
rawResponse: {
|
|
215
|
+
statusCode: currentRawResponse!.status,
|
|
216
|
+
body: currentRawResponse!.parsedBody,
|
|
217
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const lro = createLroSpec({
|
|
223
|
+
sendOperationFn,
|
|
224
|
+
args: {
|
|
225
|
+
resourceGroupName,
|
|
226
|
+
sapVirtualInstanceName,
|
|
227
|
+
databaseInstanceName,
|
|
228
|
+
options,
|
|
229
|
+
},
|
|
230
|
+
spec: createOperationSpec,
|
|
231
|
+
});
|
|
232
|
+
const poller = await createHttpPoller<
|
|
233
|
+
SAPDatabaseInstancesCreateResponse,
|
|
234
|
+
OperationState<SAPDatabaseInstancesCreateResponse>
|
|
235
|
+
>(lro, {
|
|
236
|
+
restoreFrom: options?.resumeFrom,
|
|
237
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
238
|
+
});
|
|
239
|
+
await poller.poll();
|
|
240
|
+
return poller;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource.
|
|
245
|
+
* <br><br>This will be used by service only. PUT by end user will return a Bad Request error.
|
|
246
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
247
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
248
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
249
|
+
* to work correctly.
|
|
250
|
+
* @param options The options parameters.
|
|
251
|
+
*/
|
|
252
|
+
async beginCreateAndWait(
|
|
253
|
+
resourceGroupName: string,
|
|
254
|
+
sapVirtualInstanceName: string,
|
|
255
|
+
databaseInstanceName: string,
|
|
256
|
+
options?: SAPDatabaseInstancesCreateOptionalParams,
|
|
257
|
+
): Promise<SAPDatabaseInstancesCreateResponse> {
|
|
258
|
+
const poller = await this.beginCreate(
|
|
259
|
+
resourceGroupName,
|
|
260
|
+
sapVirtualInstanceName,
|
|
261
|
+
databaseInstanceName,
|
|
262
|
+
options,
|
|
263
|
+
);
|
|
264
|
+
return poller.pollUntilDone();
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Updates the Database instance resource. This can be used to update tags on the resource.
|
|
269
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
270
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
271
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
272
|
+
* to work correctly.
|
|
273
|
+
* @param options The options parameters.
|
|
274
|
+
*/
|
|
275
|
+
update(
|
|
276
|
+
resourceGroupName: string,
|
|
277
|
+
sapVirtualInstanceName: string,
|
|
278
|
+
databaseInstanceName: string,
|
|
279
|
+
options?: SAPDatabaseInstancesUpdateOptionalParams,
|
|
280
|
+
): Promise<SAPDatabaseInstancesUpdateResponse> {
|
|
281
|
+
return this.client.sendOperationRequest(
|
|
282
|
+
{
|
|
283
|
+
resourceGroupName,
|
|
284
|
+
sapVirtualInstanceName,
|
|
285
|
+
databaseInstanceName,
|
|
286
|
+
options,
|
|
287
|
+
},
|
|
288
|
+
updateOperationSpec,
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.
|
|
294
|
+
* <br><br>This will be used by service only. Delete by end user will return a Bad Request error.
|
|
295
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
296
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
297
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
298
|
+
* to work correctly.
|
|
299
|
+
* @param options The options parameters.
|
|
300
|
+
*/
|
|
301
|
+
async beginDelete(
|
|
302
|
+
resourceGroupName: string,
|
|
303
|
+
sapVirtualInstanceName: string,
|
|
304
|
+
databaseInstanceName: string,
|
|
305
|
+
options?: SAPDatabaseInstancesDeleteOptionalParams,
|
|
306
|
+
): Promise<
|
|
307
|
+
SimplePollerLike<
|
|
308
|
+
OperationState<SAPDatabaseInstancesDeleteResponse>,
|
|
309
|
+
SAPDatabaseInstancesDeleteResponse
|
|
310
|
+
>
|
|
311
|
+
> {
|
|
312
|
+
const directSendOperation = async (
|
|
313
|
+
args: coreClient.OperationArguments,
|
|
314
|
+
spec: coreClient.OperationSpec,
|
|
315
|
+
): Promise<SAPDatabaseInstancesDeleteResponse> => {
|
|
316
|
+
return this.client.sendOperationRequest(args, spec);
|
|
317
|
+
};
|
|
318
|
+
const sendOperationFn = async (
|
|
319
|
+
args: coreClient.OperationArguments,
|
|
320
|
+
spec: coreClient.OperationSpec,
|
|
321
|
+
) => {
|
|
322
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
323
|
+
undefined;
|
|
324
|
+
const providedCallback = args.options?.onResponse;
|
|
325
|
+
const callback: coreClient.RawResponseCallback = (
|
|
326
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
327
|
+
flatResponse: unknown,
|
|
328
|
+
) => {
|
|
329
|
+
currentRawResponse = rawResponse;
|
|
330
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
331
|
+
};
|
|
332
|
+
const updatedArgs = {
|
|
333
|
+
...args,
|
|
334
|
+
options: {
|
|
335
|
+
...args.options,
|
|
336
|
+
onResponse: callback,
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
340
|
+
return {
|
|
341
|
+
flatResponse,
|
|
342
|
+
rawResponse: {
|
|
343
|
+
statusCode: currentRawResponse!.status,
|
|
344
|
+
body: currentRawResponse!.parsedBody,
|
|
345
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
const lro = createLroSpec({
|
|
351
|
+
sendOperationFn,
|
|
352
|
+
args: {
|
|
353
|
+
resourceGroupName,
|
|
354
|
+
sapVirtualInstanceName,
|
|
355
|
+
databaseInstanceName,
|
|
356
|
+
options,
|
|
357
|
+
},
|
|
358
|
+
spec: deleteOperationSpec,
|
|
359
|
+
});
|
|
360
|
+
const poller = await createHttpPoller<
|
|
361
|
+
SAPDatabaseInstancesDeleteResponse,
|
|
362
|
+
OperationState<SAPDatabaseInstancesDeleteResponse>
|
|
363
|
+
>(lro, {
|
|
364
|
+
restoreFrom: options?.resumeFrom,
|
|
365
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
366
|
+
resourceLocationConfig: "location",
|
|
367
|
+
});
|
|
368
|
+
await poller.poll();
|
|
369
|
+
return poller;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource.
|
|
374
|
+
* <br><br>This will be used by service only. Delete by end user will return a Bad Request error.
|
|
375
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
376
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
377
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
378
|
+
* to work correctly.
|
|
379
|
+
* @param options The options parameters.
|
|
380
|
+
*/
|
|
381
|
+
async beginDeleteAndWait(
|
|
382
|
+
resourceGroupName: string,
|
|
383
|
+
sapVirtualInstanceName: string,
|
|
384
|
+
databaseInstanceName: string,
|
|
385
|
+
options?: SAPDatabaseInstancesDeleteOptionalParams,
|
|
386
|
+
): Promise<SAPDatabaseInstancesDeleteResponse> {
|
|
387
|
+
const poller = await this.beginDelete(
|
|
388
|
+
resourceGroupName,
|
|
389
|
+
sapVirtualInstanceName,
|
|
390
|
+
databaseInstanceName,
|
|
391
|
+
options,
|
|
392
|
+
);
|
|
393
|
+
return poller.pollUntilDone();
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Lists the Database resources associated with a Virtual Instance for SAP solutions resource.
|
|
398
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
399
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
400
|
+
* @param options The options parameters.
|
|
401
|
+
*/
|
|
402
|
+
private _list(
|
|
403
|
+
resourceGroupName: string,
|
|
404
|
+
sapVirtualInstanceName: string,
|
|
405
|
+
options?: SAPDatabaseInstancesListOptionalParams,
|
|
406
|
+
): Promise<SAPDatabaseInstancesListResponse> {
|
|
407
|
+
return this.client.sendOperationRequest(
|
|
408
|
+
{ resourceGroupName, sapVirtualInstanceName, options },
|
|
409
|
+
listOperationSpec,
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Starts the database instance of the SAP system.
|
|
415
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
416
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
417
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
418
|
+
* to work correctly.
|
|
419
|
+
* @param options The options parameters.
|
|
420
|
+
*/
|
|
421
|
+
async beginStartInstance(
|
|
422
|
+
resourceGroupName: string,
|
|
423
|
+
sapVirtualInstanceName: string,
|
|
424
|
+
databaseInstanceName: string,
|
|
425
|
+
options?: SAPDatabaseInstancesStartInstanceOptionalParams,
|
|
426
|
+
): Promise<
|
|
427
|
+
SimplePollerLike<
|
|
428
|
+
OperationState<SAPDatabaseInstancesStartInstanceResponse>,
|
|
429
|
+
SAPDatabaseInstancesStartInstanceResponse
|
|
430
|
+
>
|
|
431
|
+
> {
|
|
432
|
+
const directSendOperation = async (
|
|
433
|
+
args: coreClient.OperationArguments,
|
|
434
|
+
spec: coreClient.OperationSpec,
|
|
435
|
+
): Promise<SAPDatabaseInstancesStartInstanceResponse> => {
|
|
436
|
+
return this.client.sendOperationRequest(args, spec);
|
|
437
|
+
};
|
|
438
|
+
const sendOperationFn = async (
|
|
439
|
+
args: coreClient.OperationArguments,
|
|
440
|
+
spec: coreClient.OperationSpec,
|
|
441
|
+
) => {
|
|
442
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
443
|
+
undefined;
|
|
444
|
+
const providedCallback = args.options?.onResponse;
|
|
445
|
+
const callback: coreClient.RawResponseCallback = (
|
|
446
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
447
|
+
flatResponse: unknown,
|
|
448
|
+
) => {
|
|
449
|
+
currentRawResponse = rawResponse;
|
|
450
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
451
|
+
};
|
|
452
|
+
const updatedArgs = {
|
|
453
|
+
...args,
|
|
454
|
+
options: {
|
|
455
|
+
...args.options,
|
|
456
|
+
onResponse: callback,
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
460
|
+
return {
|
|
461
|
+
flatResponse,
|
|
462
|
+
rawResponse: {
|
|
463
|
+
statusCode: currentRawResponse!.status,
|
|
464
|
+
body: currentRawResponse!.parsedBody,
|
|
465
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
466
|
+
},
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
const lro = createLroSpec({
|
|
471
|
+
sendOperationFn,
|
|
472
|
+
args: {
|
|
473
|
+
resourceGroupName,
|
|
474
|
+
sapVirtualInstanceName,
|
|
475
|
+
databaseInstanceName,
|
|
476
|
+
options,
|
|
477
|
+
},
|
|
478
|
+
spec: startInstanceOperationSpec,
|
|
479
|
+
});
|
|
480
|
+
const poller = await createHttpPoller<
|
|
481
|
+
SAPDatabaseInstancesStartInstanceResponse,
|
|
482
|
+
OperationState<SAPDatabaseInstancesStartInstanceResponse>
|
|
483
|
+
>(lro, {
|
|
484
|
+
restoreFrom: options?.resumeFrom,
|
|
485
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
486
|
+
resourceLocationConfig: "location",
|
|
487
|
+
});
|
|
488
|
+
await poller.poll();
|
|
489
|
+
return poller;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Starts the database instance of the SAP system.
|
|
494
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
495
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
496
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
497
|
+
* to work correctly.
|
|
498
|
+
* @param options The options parameters.
|
|
499
|
+
*/
|
|
500
|
+
async beginStartInstanceAndWait(
|
|
501
|
+
resourceGroupName: string,
|
|
502
|
+
sapVirtualInstanceName: string,
|
|
503
|
+
databaseInstanceName: string,
|
|
504
|
+
options?: SAPDatabaseInstancesStartInstanceOptionalParams,
|
|
505
|
+
): Promise<SAPDatabaseInstancesStartInstanceResponse> {
|
|
506
|
+
const poller = await this.beginStartInstance(
|
|
507
|
+
resourceGroupName,
|
|
508
|
+
sapVirtualInstanceName,
|
|
509
|
+
databaseInstanceName,
|
|
510
|
+
options,
|
|
511
|
+
);
|
|
512
|
+
return poller.pollUntilDone();
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Stops the database instance of the SAP system.
|
|
517
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
518
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
519
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
520
|
+
* to work correctly.
|
|
521
|
+
* @param options The options parameters.
|
|
522
|
+
*/
|
|
523
|
+
async beginStopInstance(
|
|
524
|
+
resourceGroupName: string,
|
|
525
|
+
sapVirtualInstanceName: string,
|
|
526
|
+
databaseInstanceName: string,
|
|
527
|
+
options?: SAPDatabaseInstancesStopInstanceOptionalParams,
|
|
528
|
+
): Promise<
|
|
529
|
+
SimplePollerLike<
|
|
530
|
+
OperationState<SAPDatabaseInstancesStopInstanceResponse>,
|
|
531
|
+
SAPDatabaseInstancesStopInstanceResponse
|
|
532
|
+
>
|
|
533
|
+
> {
|
|
534
|
+
const directSendOperation = async (
|
|
535
|
+
args: coreClient.OperationArguments,
|
|
536
|
+
spec: coreClient.OperationSpec,
|
|
537
|
+
): Promise<SAPDatabaseInstancesStopInstanceResponse> => {
|
|
538
|
+
return this.client.sendOperationRequest(args, spec);
|
|
539
|
+
};
|
|
540
|
+
const sendOperationFn = async (
|
|
541
|
+
args: coreClient.OperationArguments,
|
|
542
|
+
spec: coreClient.OperationSpec,
|
|
543
|
+
) => {
|
|
544
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
545
|
+
undefined;
|
|
546
|
+
const providedCallback = args.options?.onResponse;
|
|
547
|
+
const callback: coreClient.RawResponseCallback = (
|
|
548
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
549
|
+
flatResponse: unknown,
|
|
550
|
+
) => {
|
|
551
|
+
currentRawResponse = rawResponse;
|
|
552
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
553
|
+
};
|
|
554
|
+
const updatedArgs = {
|
|
555
|
+
...args,
|
|
556
|
+
options: {
|
|
557
|
+
...args.options,
|
|
558
|
+
onResponse: callback,
|
|
559
|
+
},
|
|
560
|
+
};
|
|
561
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
562
|
+
return {
|
|
563
|
+
flatResponse,
|
|
564
|
+
rawResponse: {
|
|
565
|
+
statusCode: currentRawResponse!.status,
|
|
566
|
+
body: currentRawResponse!.parsedBody,
|
|
567
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
const lro = createLroSpec({
|
|
573
|
+
sendOperationFn,
|
|
574
|
+
args: {
|
|
575
|
+
resourceGroupName,
|
|
576
|
+
sapVirtualInstanceName,
|
|
577
|
+
databaseInstanceName,
|
|
578
|
+
options,
|
|
579
|
+
},
|
|
580
|
+
spec: stopInstanceOperationSpec,
|
|
581
|
+
});
|
|
582
|
+
const poller = await createHttpPoller<
|
|
583
|
+
SAPDatabaseInstancesStopInstanceResponse,
|
|
584
|
+
OperationState<SAPDatabaseInstancesStopInstanceResponse>
|
|
585
|
+
>(lro, {
|
|
586
|
+
restoreFrom: options?.resumeFrom,
|
|
587
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
588
|
+
resourceLocationConfig: "location",
|
|
589
|
+
});
|
|
590
|
+
await poller.poll();
|
|
591
|
+
return poller;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Stops the database instance of the SAP system.
|
|
596
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
597
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
598
|
+
* @param databaseInstanceName Database resource name string modeled as parameter for auto generation
|
|
599
|
+
* to work correctly.
|
|
600
|
+
* @param options The options parameters.
|
|
601
|
+
*/
|
|
602
|
+
async beginStopInstanceAndWait(
|
|
603
|
+
resourceGroupName: string,
|
|
604
|
+
sapVirtualInstanceName: string,
|
|
605
|
+
databaseInstanceName: string,
|
|
606
|
+
options?: SAPDatabaseInstancesStopInstanceOptionalParams,
|
|
607
|
+
): Promise<SAPDatabaseInstancesStopInstanceResponse> {
|
|
608
|
+
const poller = await this.beginStopInstance(
|
|
609
|
+
resourceGroupName,
|
|
610
|
+
sapVirtualInstanceName,
|
|
611
|
+
databaseInstanceName,
|
|
612
|
+
options,
|
|
613
|
+
);
|
|
614
|
+
return poller.pollUntilDone();
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* ListNext
|
|
619
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
620
|
+
* @param sapVirtualInstanceName The name of the Virtual Instances for SAP solutions resource
|
|
621
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
622
|
+
* @param options The options parameters.
|
|
623
|
+
*/
|
|
624
|
+
private _listNext(
|
|
625
|
+
resourceGroupName: string,
|
|
626
|
+
sapVirtualInstanceName: string,
|
|
627
|
+
nextLink: string,
|
|
628
|
+
options?: SAPDatabaseInstancesListNextOptionalParams,
|
|
629
|
+
): Promise<SAPDatabaseInstancesListNextResponse> {
|
|
630
|
+
return this.client.sendOperationRequest(
|
|
631
|
+
{ resourceGroupName, sapVirtualInstanceName, nextLink, options },
|
|
632
|
+
listNextOperationSpec,
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
// Operation Specifications
|
|
637
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
638
|
+
|
|
639
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
640
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}",
|
|
641
|
+
httpMethod: "GET",
|
|
642
|
+
responses: {
|
|
643
|
+
200: {
|
|
644
|
+
bodyMapper: Mappers.SAPDatabaseInstance,
|
|
645
|
+
},
|
|
646
|
+
default: {
|
|
647
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
648
|
+
},
|
|
649
|
+
},
|
|
650
|
+
queryParameters: [Parameters.apiVersion],
|
|
651
|
+
urlParameters: [
|
|
652
|
+
Parameters.$host,
|
|
653
|
+
Parameters.subscriptionId,
|
|
654
|
+
Parameters.resourceGroupName,
|
|
655
|
+
Parameters.sapVirtualInstanceName,
|
|
656
|
+
Parameters.databaseInstanceName,
|
|
657
|
+
],
|
|
658
|
+
headerParameters: [Parameters.accept],
|
|
659
|
+
serializer,
|
|
660
|
+
};
|
|
661
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
662
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}",
|
|
663
|
+
httpMethod: "PUT",
|
|
664
|
+
responses: {
|
|
665
|
+
200: {
|
|
666
|
+
bodyMapper: Mappers.SAPDatabaseInstance,
|
|
667
|
+
},
|
|
668
|
+
201: {
|
|
669
|
+
bodyMapper: Mappers.SAPDatabaseInstance,
|
|
670
|
+
},
|
|
671
|
+
202: {
|
|
672
|
+
bodyMapper: Mappers.SAPDatabaseInstance,
|
|
673
|
+
},
|
|
674
|
+
204: {
|
|
675
|
+
bodyMapper: Mappers.SAPDatabaseInstance,
|
|
676
|
+
},
|
|
677
|
+
default: {
|
|
678
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
679
|
+
},
|
|
680
|
+
},
|
|
681
|
+
requestBody: Parameters.body6,
|
|
682
|
+
queryParameters: [Parameters.apiVersion],
|
|
683
|
+
urlParameters: [
|
|
684
|
+
Parameters.$host,
|
|
685
|
+
Parameters.subscriptionId,
|
|
686
|
+
Parameters.resourceGroupName,
|
|
687
|
+
Parameters.sapVirtualInstanceName,
|
|
688
|
+
Parameters.databaseInstanceName,
|
|
689
|
+
],
|
|
690
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
691
|
+
mediaType: "json",
|
|
692
|
+
serializer,
|
|
693
|
+
};
|
|
694
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
695
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}",
|
|
696
|
+
httpMethod: "PATCH",
|
|
697
|
+
responses: {
|
|
698
|
+
200: {
|
|
699
|
+
bodyMapper: Mappers.SAPDatabaseInstance,
|
|
700
|
+
},
|
|
701
|
+
default: {
|
|
702
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
requestBody: Parameters.body7,
|
|
706
|
+
queryParameters: [Parameters.apiVersion],
|
|
707
|
+
urlParameters: [
|
|
708
|
+
Parameters.$host,
|
|
709
|
+
Parameters.subscriptionId,
|
|
710
|
+
Parameters.resourceGroupName,
|
|
711
|
+
Parameters.sapVirtualInstanceName,
|
|
712
|
+
Parameters.databaseInstanceName,
|
|
713
|
+
],
|
|
714
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
715
|
+
mediaType: "json",
|
|
716
|
+
serializer,
|
|
717
|
+
};
|
|
718
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
719
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}",
|
|
720
|
+
httpMethod: "DELETE",
|
|
721
|
+
responses: {
|
|
722
|
+
200: {
|
|
723
|
+
headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders,
|
|
724
|
+
},
|
|
725
|
+
201: {
|
|
726
|
+
headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders,
|
|
727
|
+
},
|
|
728
|
+
202: {
|
|
729
|
+
headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders,
|
|
730
|
+
},
|
|
731
|
+
204: {
|
|
732
|
+
headersMapper: Mappers.SAPDatabaseInstancesDeleteHeaders,
|
|
733
|
+
},
|
|
734
|
+
default: {
|
|
735
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
736
|
+
},
|
|
737
|
+
},
|
|
738
|
+
queryParameters: [Parameters.apiVersion],
|
|
739
|
+
urlParameters: [
|
|
740
|
+
Parameters.$host,
|
|
741
|
+
Parameters.subscriptionId,
|
|
742
|
+
Parameters.resourceGroupName,
|
|
743
|
+
Parameters.sapVirtualInstanceName,
|
|
744
|
+
Parameters.databaseInstanceName,
|
|
745
|
+
],
|
|
746
|
+
headerParameters: [Parameters.accept],
|
|
747
|
+
serializer,
|
|
748
|
+
};
|
|
749
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
750
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances",
|
|
751
|
+
httpMethod: "GET",
|
|
752
|
+
responses: {
|
|
753
|
+
200: {
|
|
754
|
+
bodyMapper: Mappers.SAPDatabaseInstanceList,
|
|
755
|
+
},
|
|
756
|
+
default: {
|
|
757
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
queryParameters: [Parameters.apiVersion],
|
|
761
|
+
urlParameters: [
|
|
762
|
+
Parameters.$host,
|
|
763
|
+
Parameters.subscriptionId,
|
|
764
|
+
Parameters.resourceGroupName,
|
|
765
|
+
Parameters.sapVirtualInstanceName,
|
|
766
|
+
],
|
|
767
|
+
headerParameters: [Parameters.accept],
|
|
768
|
+
serializer,
|
|
769
|
+
};
|
|
770
|
+
const startInstanceOperationSpec: coreClient.OperationSpec = {
|
|
771
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start",
|
|
772
|
+
httpMethod: "POST",
|
|
773
|
+
responses: {
|
|
774
|
+
200: {
|
|
775
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
776
|
+
},
|
|
777
|
+
201: {
|
|
778
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
779
|
+
},
|
|
780
|
+
202: {
|
|
781
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
782
|
+
},
|
|
783
|
+
204: {
|
|
784
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
785
|
+
},
|
|
786
|
+
default: {
|
|
787
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
requestBody: Parameters.body2,
|
|
791
|
+
queryParameters: [Parameters.apiVersion],
|
|
792
|
+
urlParameters: [
|
|
793
|
+
Parameters.$host,
|
|
794
|
+
Parameters.subscriptionId,
|
|
795
|
+
Parameters.resourceGroupName,
|
|
796
|
+
Parameters.sapVirtualInstanceName,
|
|
797
|
+
Parameters.databaseInstanceName,
|
|
798
|
+
],
|
|
799
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
800
|
+
mediaType: "json",
|
|
801
|
+
serializer,
|
|
802
|
+
};
|
|
803
|
+
const stopInstanceOperationSpec: coreClient.OperationSpec = {
|
|
804
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop",
|
|
805
|
+
httpMethod: "POST",
|
|
806
|
+
responses: {
|
|
807
|
+
200: {
|
|
808
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
809
|
+
},
|
|
810
|
+
201: {
|
|
811
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
812
|
+
},
|
|
813
|
+
202: {
|
|
814
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
815
|
+
},
|
|
816
|
+
204: {
|
|
817
|
+
bodyMapper: Mappers.OperationStatusResult,
|
|
818
|
+
},
|
|
819
|
+
default: {
|
|
820
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
requestBody: Parameters.body3,
|
|
824
|
+
queryParameters: [Parameters.apiVersion],
|
|
825
|
+
urlParameters: [
|
|
826
|
+
Parameters.$host,
|
|
827
|
+
Parameters.subscriptionId,
|
|
828
|
+
Parameters.resourceGroupName,
|
|
829
|
+
Parameters.sapVirtualInstanceName,
|
|
830
|
+
Parameters.databaseInstanceName,
|
|
831
|
+
],
|
|
832
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
833
|
+
mediaType: "json",
|
|
834
|
+
serializer,
|
|
835
|
+
};
|
|
836
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
837
|
+
path: "{nextLink}",
|
|
838
|
+
httpMethod: "GET",
|
|
839
|
+
responses: {
|
|
840
|
+
200: {
|
|
841
|
+
bodyMapper: Mappers.SAPDatabaseInstanceList,
|
|
842
|
+
},
|
|
843
|
+
default: {
|
|
844
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
845
|
+
},
|
|
846
|
+
},
|
|
847
|
+
urlParameters: [
|
|
848
|
+
Parameters.$host,
|
|
849
|
+
Parameters.subscriptionId,
|
|
850
|
+
Parameters.resourceGroupName,
|
|
851
|
+
Parameters.sapVirtualInstanceName,
|
|
852
|
+
Parameters.nextLink,
|
|
853
|
+
],
|
|
854
|
+
headerParameters: [Parameters.accept],
|
|
855
|
+
serializer,
|
|
856
|
+
};
|