@azure/arm-hanaonazure 2.2.0 → 4.0.0-beta.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 +11 -0
- package/LICENSE +21 -0
- package/LICENSE.txt +1 -1
- package/README.md +72 -72
- package/dist/index.js +1333 -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/src/hanaManagementClient.d.ts +21 -0
- package/dist-esm/src/hanaManagementClient.d.ts.map +1 -0
- package/dist-esm/src/hanaManagementClient.js +54 -0
- package/dist-esm/src/hanaManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +260 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +19 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +15 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +330 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +14 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +116 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +4 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +11 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +26 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +90 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/providerInstances.d.ts +88 -0
- package/dist-esm/src/operations/providerInstances.d.ts.map +1 -0
- package/dist-esm/src/operations/providerInstances.js +344 -0
- package/dist-esm/src/operations/providerInstances.js.map +1 -0
- package/dist-esm/src/operations/sapMonitors.d.ts +81 -0
- package/dist-esm/src/operations/sapMonitors.d.ts.map +1 -0
- package/dist-esm/src/operations/sapMonitors.js +346 -0
- package/dist-esm/src/operations/sapMonitors.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +11 -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/providerInstances.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/providerInstances.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/providerInstances.js +9 -0
- package/dist-esm/src/operationsInterfaces/providerInstances.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sapMonitors.d.ts +59 -0
- package/dist-esm/src/operationsInterfaces/sapMonitors.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sapMonitors.js +9 -0
- package/dist-esm/src/operationsInterfaces/sapMonitors.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +65 -31
- package/review/arm-hanaonazure.api.md +260 -0
- package/rollup.config.js +181 -30
- package/src/hanaManagementClient.ts +75 -34
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +227 -638
- package/src/models/mappers.ts +138 -367
- package/src/models/parameters.ts +84 -30
- package/src/operations/index.ts +4 -6
- package/src/operations/operations.ts +66 -42
- package/src/operations/providerInstances.ts +477 -0
- package/src/operations/sapMonitors.ts +332 -256
- package/src/operationsInterfaces/index.ts +11 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/providerInstances.ts +115 -0
- package/src/operationsInterfaces/sapMonitors.ts +113 -0
- package/tsconfig.json +4 -4
- package/types/arm-hanaonazure.d.ts +444 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-hanaonazure.js +0 -1702
- package/dist/arm-hanaonazure.js.map +0 -1
- package/dist/arm-hanaonazure.min.js +0 -1
- package/dist/arm-hanaonazure.min.js.map +0 -1
- package/esm/hanaManagementClient.d.ts +0 -21
- package/esm/hanaManagementClient.d.ts.map +0 -1
- package/esm/hanaManagementClient.js +0 -36
- package/esm/hanaManagementClient.js.map +0 -1
- package/esm/hanaManagementClientContext.d.ts +0 -17
- package/esm/hanaManagementClientContext.d.ts.map +0 -1
- package/esm/hanaManagementClientContext.js +0 -57
- package/esm/hanaManagementClientContext.js.map +0 -1
- package/esm/models/hanaInstancesMappers.d.ts +0 -2
- package/esm/models/hanaInstancesMappers.d.ts.map +0 -1
- package/esm/models/hanaInstancesMappers.js +0 -9
- package/esm/models/hanaInstancesMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -661
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -21
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -556
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -9
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -81
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/sapMonitorsMappers.d.ts +0 -2
- package/esm/models/sapMonitorsMappers.d.ts.map +0 -1
- package/esm/models/sapMonitorsMappers.js +0 -9
- package/esm/models/sapMonitorsMappers.js.map +0 -1
- package/esm/operations/hanaInstances.d.ts +0 -244
- package/esm/operations/hanaInstances.d.ts.map +0 -1
- package/esm/operations/hanaInstances.js +0 -514
- package/esm/operations/hanaInstances.js.map +0 -1
- package/esm/operations/index.d.ts +0 -4
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -13
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -28
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -51
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/sapMonitors.d.ts +0 -138
- package/esm/operations/sapMonitors.d.ts.map +0 -1
- package/esm/operations/sapMonitors.js +0 -260
- package/esm/operations/sapMonitors.js.map +0 -1
- package/src/hanaManagementClientContext.ts +0 -63
- package/src/models/hanaInstancesMappers.ts +0 -25
- package/src/models/operationsMappers.ts +0 -14
- package/src/models/sapMonitorsMappers.ts +0 -23
- package/src/operations/hanaInstances.ts +0 -718
|
@@ -1,242 +1,331 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import * as
|
|
14
|
-
import * as Mappers from "../models/
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { SapMonitors } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
15
13
|
import * as Parameters from "../models/parameters";
|
|
16
|
-
import {
|
|
14
|
+
import { HanaManagementClient } from "../hanaManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
SapMonitor,
|
|
19
|
+
SapMonitorsListNextOptionalParams,
|
|
20
|
+
SapMonitorsListOptionalParams,
|
|
21
|
+
SapMonitorsListResponse,
|
|
22
|
+
SapMonitorsGetOptionalParams,
|
|
23
|
+
SapMonitorsGetResponse,
|
|
24
|
+
SapMonitorsCreateOptionalParams,
|
|
25
|
+
SapMonitorsCreateResponse,
|
|
26
|
+
SapMonitorsDeleteOptionalParams,
|
|
27
|
+
Tags,
|
|
28
|
+
SapMonitorsUpdateOptionalParams,
|
|
29
|
+
SapMonitorsUpdateResponse,
|
|
30
|
+
SapMonitorsListNextResponse
|
|
31
|
+
} from "../models";
|
|
17
32
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
33
|
+
/// <reference lib="esnext.asynciterable" />
|
|
34
|
+
/** Class containing SapMonitors operations. */
|
|
35
|
+
export class SapMonitorsImpl implements SapMonitors {
|
|
36
|
+
private readonly client: HanaManagementClient;
|
|
21
37
|
|
|
22
38
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param
|
|
39
|
+
* Initialize a new instance of the class SapMonitors class.
|
|
40
|
+
* @param client Reference to the service client
|
|
25
41
|
*/
|
|
26
|
-
constructor(client:
|
|
42
|
+
constructor(client: HanaManagementClient) {
|
|
27
43
|
this.client = client;
|
|
28
44
|
}
|
|
29
45
|
|
|
30
46
|
/**
|
|
31
|
-
* Gets a list of SAP monitors in the specified subscription. The operations returns various
|
|
32
|
-
*
|
|
33
|
-
* @
|
|
34
|
-
* @param [options] The optional parameters
|
|
35
|
-
* @returns Promise<Models.SapMonitorsListResponse>
|
|
47
|
+
* Gets a list of SAP monitors in the specified subscription. The operations returns various properties
|
|
48
|
+
* of each SAP monitor.
|
|
49
|
+
* @param options The options parameters.
|
|
36
50
|
*/
|
|
37
|
-
list(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* @param callback The callback
|
|
45
|
-
*/
|
|
46
|
-
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SapMonitorListResult>): void;
|
|
47
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SapMonitorListResult>, callback?: msRest.ServiceCallback<Models.SapMonitorListResult>): Promise<Models.SapMonitorsListResponse> {
|
|
48
|
-
return this.client.sendOperationRequest(
|
|
49
|
-
{
|
|
50
|
-
options
|
|
51
|
+
public list(
|
|
52
|
+
options?: SapMonitorsListOptionalParams
|
|
53
|
+
): PagedAsyncIterableIterator<SapMonitor> {
|
|
54
|
+
const iter = this.listPagingAll(options);
|
|
55
|
+
return {
|
|
56
|
+
next() {
|
|
57
|
+
return iter.next();
|
|
51
58
|
},
|
|
52
|
-
|
|
53
|
-
|
|
59
|
+
[Symbol.asyncIterator]() {
|
|
60
|
+
return this;
|
|
61
|
+
},
|
|
62
|
+
byPage: () => {
|
|
63
|
+
return this.listPagingPage(options);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private async *listPagingPage(
|
|
69
|
+
options?: SapMonitorsListOptionalParams
|
|
70
|
+
): AsyncIterableIterator<SapMonitor[]> {
|
|
71
|
+
let result = await this._list(options);
|
|
72
|
+
yield result.value || [];
|
|
73
|
+
let continuationToken = result.nextLink;
|
|
74
|
+
while (continuationToken) {
|
|
75
|
+
result = await this._listNext(continuationToken, options);
|
|
76
|
+
continuationToken = result.nextLink;
|
|
77
|
+
yield result.value || [];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private async *listPagingAll(
|
|
82
|
+
options?: SapMonitorsListOptionalParams
|
|
83
|
+
): AsyncIterableIterator<SapMonitor> {
|
|
84
|
+
for await (const page of this.listPagingPage(options)) {
|
|
85
|
+
yield* page;
|
|
86
|
+
}
|
|
54
87
|
}
|
|
55
88
|
|
|
56
89
|
/**
|
|
57
|
-
* Gets
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
60
|
-
* @param resourceGroupName Name of the resource group.
|
|
61
|
-
* @param sapMonitorName Name of the SAP monitor resource.
|
|
62
|
-
* @param [options] The optional parameters
|
|
63
|
-
* @returns Promise<Models.SapMonitorsGetResponse>
|
|
64
|
-
*/
|
|
65
|
-
get(resourceGroupName: string, sapMonitorName: string, options?: msRest.RequestOptionsBase): Promise<Models.SapMonitorsGetResponse>;
|
|
66
|
-
/**
|
|
67
|
-
* @param resourceGroupName Name of the resource group.
|
|
68
|
-
* @param sapMonitorName Name of the SAP monitor resource.
|
|
69
|
-
* @param callback The callback
|
|
90
|
+
* Gets a list of SAP monitors in the specified subscription. The operations returns various properties
|
|
91
|
+
* of each SAP monitor.
|
|
92
|
+
* @param options The options parameters.
|
|
70
93
|
*/
|
|
71
|
-
|
|
94
|
+
private _list(
|
|
95
|
+
options?: SapMonitorsListOptionalParams
|
|
96
|
+
): Promise<SapMonitorsListResponse> {
|
|
97
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
98
|
+
}
|
|
99
|
+
|
|
72
100
|
/**
|
|
101
|
+
* Gets properties of a SAP monitor for the specified subscription, resource group, and resource name.
|
|
73
102
|
* @param resourceGroupName Name of the resource group.
|
|
74
103
|
* @param sapMonitorName Name of the SAP monitor resource.
|
|
75
|
-
* @param options The
|
|
76
|
-
* @param callback The callback
|
|
104
|
+
* @param options The options parameters.
|
|
77
105
|
*/
|
|
78
|
-
get(
|
|
79
|
-
|
|
106
|
+
get(
|
|
107
|
+
resourceGroupName: string,
|
|
108
|
+
sapMonitorName: string,
|
|
109
|
+
options?: SapMonitorsGetOptionalParams
|
|
110
|
+
): Promise<SapMonitorsGetResponse> {
|
|
80
111
|
return this.client.sendOperationRequest(
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
options
|
|
85
|
-
},
|
|
86
|
-
getOperationSpec,
|
|
87
|
-
callback) as Promise<Models.SapMonitorsGetResponse>;
|
|
112
|
+
{ resourceGroupName, sapMonitorName, options },
|
|
113
|
+
getOperationSpec
|
|
114
|
+
);
|
|
88
115
|
}
|
|
89
116
|
|
|
90
117
|
/**
|
|
91
118
|
* Creates a SAP monitor for the specified subscription, resource group, and resource name.
|
|
92
|
-
* @summary Creates a SAP monitor.
|
|
93
119
|
* @param resourceGroupName Name of the resource group.
|
|
94
120
|
* @param sapMonitorName Name of the SAP monitor resource.
|
|
95
121
|
* @param sapMonitorParameter Request body representing a SAP Monitor
|
|
96
|
-
* @param
|
|
97
|
-
* @returns Promise<Models.SapMonitorsCreateResponse>
|
|
122
|
+
* @param options The options parameters.
|
|
98
123
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
124
|
+
async beginCreate(
|
|
125
|
+
resourceGroupName: string,
|
|
126
|
+
sapMonitorName: string,
|
|
127
|
+
sapMonitorParameter: SapMonitor,
|
|
128
|
+
options?: SapMonitorsCreateOptionalParams
|
|
129
|
+
): Promise<
|
|
130
|
+
PollerLike<
|
|
131
|
+
PollOperationState<SapMonitorsCreateResponse>,
|
|
132
|
+
SapMonitorsCreateResponse
|
|
133
|
+
>
|
|
134
|
+
> {
|
|
135
|
+
const directSendOperation = async (
|
|
136
|
+
args: coreClient.OperationArguments,
|
|
137
|
+
spec: coreClient.OperationSpec
|
|
138
|
+
): Promise<SapMonitorsCreateResponse> => {
|
|
139
|
+
return this.client.sendOperationRequest(args, spec);
|
|
140
|
+
};
|
|
141
|
+
const sendOperation = async (
|
|
142
|
+
args: coreClient.OperationArguments,
|
|
143
|
+
spec: coreClient.OperationSpec
|
|
144
|
+
) => {
|
|
145
|
+
let currentRawResponse:
|
|
146
|
+
| coreClient.FullOperationResponse
|
|
147
|
+
| undefined = undefined;
|
|
148
|
+
const providedCallback = args.options?.onResponse;
|
|
149
|
+
const callback: coreClient.RawResponseCallback = (
|
|
150
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
151
|
+
flatResponse: unknown
|
|
152
|
+
) => {
|
|
153
|
+
currentRawResponse = rawResponse;
|
|
154
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
155
|
+
};
|
|
156
|
+
const updatedArgs = {
|
|
157
|
+
...args,
|
|
158
|
+
options: {
|
|
159
|
+
...args.options,
|
|
160
|
+
onResponse: callback
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
164
|
+
return {
|
|
165
|
+
flatResponse,
|
|
166
|
+
rawResponse: {
|
|
167
|
+
statusCode: currentRawResponse!.status,
|
|
168
|
+
body: currentRawResponse!.parsedBody,
|
|
169
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const lro = new LroImpl(
|
|
175
|
+
sendOperation,
|
|
176
|
+
{ resourceGroupName, sapMonitorName, sapMonitorParameter, options },
|
|
177
|
+
createOperationSpec
|
|
178
|
+
);
|
|
179
|
+
return new LroEngine(lro, {
|
|
180
|
+
resumeFrom: options?.resumeFrom,
|
|
181
|
+
intervalInMs: options?.updateIntervalInMs
|
|
182
|
+
});
|
|
102
183
|
}
|
|
103
184
|
|
|
104
185
|
/**
|
|
105
|
-
*
|
|
106
|
-
* @summary Deletes a SAP monitor.
|
|
186
|
+
* Creates a SAP monitor for the specified subscription, resource group, and resource name.
|
|
107
187
|
* @param resourceGroupName Name of the resource group.
|
|
108
188
|
* @param sapMonitorName Name of the SAP monitor resource.
|
|
109
|
-
* @param
|
|
110
|
-
* @
|
|
189
|
+
* @param sapMonitorParameter Request body representing a SAP Monitor
|
|
190
|
+
* @param options The options parameters.
|
|
111
191
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
192
|
+
async beginCreateAndWait(
|
|
193
|
+
resourceGroupName: string,
|
|
194
|
+
sapMonitorName: string,
|
|
195
|
+
sapMonitorParameter: SapMonitor,
|
|
196
|
+
options?: SapMonitorsCreateOptionalParams
|
|
197
|
+
): Promise<SapMonitorsCreateResponse> {
|
|
198
|
+
const poller = await this.beginCreate(
|
|
199
|
+
resourceGroupName,
|
|
200
|
+
sapMonitorName,
|
|
201
|
+
sapMonitorParameter,
|
|
202
|
+
options
|
|
203
|
+
);
|
|
204
|
+
return poller.pollUntilDone();
|
|
115
205
|
}
|
|
116
206
|
|
|
117
207
|
/**
|
|
118
|
-
*
|
|
119
|
-
* monitor name.
|
|
120
|
-
* @summary Patches the Tags field of a SAP monitor.
|
|
121
|
-
* @param resourceGroupName Name of the resource group.
|
|
122
|
-
* @param sapMonitorName Name of the SAP monitor resource.
|
|
123
|
-
* @param tagsParameter Request body that only contains the new Tags field
|
|
124
|
-
* @param [options] The optional parameters
|
|
125
|
-
* @returns Promise<Models.SapMonitorsUpdateResponse>
|
|
126
|
-
*/
|
|
127
|
-
update(resourceGroupName: string, sapMonitorName: string, tagsParameter: Models.Tags, options?: msRest.RequestOptionsBase): Promise<Models.SapMonitorsUpdateResponse>;
|
|
128
|
-
/**
|
|
129
|
-
* @param resourceGroupName Name of the resource group.
|
|
130
|
-
* @param sapMonitorName Name of the SAP monitor resource.
|
|
131
|
-
* @param tagsParameter Request body that only contains the new Tags field
|
|
132
|
-
* @param callback The callback
|
|
133
|
-
*/
|
|
134
|
-
update(resourceGroupName: string, sapMonitorName: string, tagsParameter: Models.Tags, callback: msRest.ServiceCallback<Models.SapMonitor>): void;
|
|
135
|
-
/**
|
|
208
|
+
* Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
|
|
136
209
|
* @param resourceGroupName Name of the resource group.
|
|
137
210
|
* @param sapMonitorName Name of the SAP monitor resource.
|
|
138
|
-
* @param
|
|
139
|
-
* @param options The optional parameters
|
|
140
|
-
* @param callback The callback
|
|
211
|
+
* @param options The options parameters.
|
|
141
212
|
*/
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
213
|
+
async beginDelete(
|
|
214
|
+
resourceGroupName: string,
|
|
215
|
+
sapMonitorName: string,
|
|
216
|
+
options?: SapMonitorsDeleteOptionalParams
|
|
217
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
218
|
+
const directSendOperation = async (
|
|
219
|
+
args: coreClient.OperationArguments,
|
|
220
|
+
spec: coreClient.OperationSpec
|
|
221
|
+
): Promise<void> => {
|
|
222
|
+
return this.client.sendOperationRequest(args, spec);
|
|
223
|
+
};
|
|
224
|
+
const sendOperation = async (
|
|
225
|
+
args: coreClient.OperationArguments,
|
|
226
|
+
spec: coreClient.OperationSpec
|
|
227
|
+
) => {
|
|
228
|
+
let currentRawResponse:
|
|
229
|
+
| coreClient.FullOperationResponse
|
|
230
|
+
| undefined = undefined;
|
|
231
|
+
const providedCallback = args.options?.onResponse;
|
|
232
|
+
const callback: coreClient.RawResponseCallback = (
|
|
233
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
234
|
+
flatResponse: unknown
|
|
235
|
+
) => {
|
|
236
|
+
currentRawResponse = rawResponse;
|
|
237
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
238
|
+
};
|
|
239
|
+
const updatedArgs = {
|
|
240
|
+
...args,
|
|
241
|
+
options: {
|
|
242
|
+
...args.options,
|
|
243
|
+
onResponse: callback
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
247
|
+
return {
|
|
248
|
+
flatResponse,
|
|
249
|
+
rawResponse: {
|
|
250
|
+
statusCode: currentRawResponse!.status,
|
|
251
|
+
body: currentRawResponse!.parsedBody,
|
|
252
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
const lro = new LroImpl(
|
|
258
|
+
sendOperation,
|
|
259
|
+
{ resourceGroupName, sapMonitorName, options },
|
|
260
|
+
deleteOperationSpec
|
|
261
|
+
);
|
|
262
|
+
return new LroEngine(lro, {
|
|
263
|
+
resumeFrom: options?.resumeFrom,
|
|
264
|
+
intervalInMs: options?.updateIntervalInMs
|
|
265
|
+
});
|
|
153
266
|
}
|
|
154
267
|
|
|
155
268
|
/**
|
|
156
|
-
*
|
|
157
|
-
* @summary Creates a SAP monitor.
|
|
269
|
+
* Deletes a SAP monitor with the specified subscription, resource group, and monitor name.
|
|
158
270
|
* @param resourceGroupName Name of the resource group.
|
|
159
271
|
* @param sapMonitorName Name of the SAP monitor resource.
|
|
160
|
-
* @param
|
|
161
|
-
* @param [options] The optional parameters
|
|
162
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
272
|
+
* @param options The options parameters.
|
|
163
273
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
274
|
+
async beginDeleteAndWait(
|
|
275
|
+
resourceGroupName: string,
|
|
276
|
+
sapMonitorName: string,
|
|
277
|
+
options?: SapMonitorsDeleteOptionalParams
|
|
278
|
+
): Promise<void> {
|
|
279
|
+
const poller = await this.beginDelete(
|
|
280
|
+
resourceGroupName,
|
|
281
|
+
sapMonitorName,
|
|
282
|
+
options
|
|
283
|
+
);
|
|
284
|
+
return poller.pollUntilDone();
|
|
174
285
|
}
|
|
175
286
|
|
|
176
287
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
288
|
+
* Patches the Tags field of a SAP monitor for the specified subscription, resource group, and monitor
|
|
289
|
+
* name.
|
|
179
290
|
* @param resourceGroupName Name of the resource group.
|
|
180
291
|
* @param sapMonitorName Name of the SAP monitor resource.
|
|
181
|
-
* @param
|
|
182
|
-
* @
|
|
292
|
+
* @param tagsParameter Request body that only contains the new Tags field
|
|
293
|
+
* @param options The options parameters.
|
|
183
294
|
*/
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
295
|
+
update(
|
|
296
|
+
resourceGroupName: string,
|
|
297
|
+
sapMonitorName: string,
|
|
298
|
+
tagsParameter: Tags,
|
|
299
|
+
options?: SapMonitorsUpdateOptionalParams
|
|
300
|
+
): Promise<SapMonitorsUpdateResponse> {
|
|
301
|
+
return this.client.sendOperationRequest(
|
|
302
|
+
{ resourceGroupName, sapMonitorName, tagsParameter, options },
|
|
303
|
+
updateOperationSpec
|
|
304
|
+
);
|
|
193
305
|
}
|
|
194
306
|
|
|
195
307
|
/**
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* @
|
|
199
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
200
|
-
* @param [options] The optional parameters
|
|
201
|
-
* @returns Promise<Models.SapMonitorsListNextResponse>
|
|
202
|
-
*/
|
|
203
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.SapMonitorsListNextResponse>;
|
|
204
|
-
/**
|
|
205
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
206
|
-
* @param callback The callback
|
|
207
|
-
*/
|
|
208
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.SapMonitorListResult>): void;
|
|
209
|
-
/**
|
|
210
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
211
|
-
* @param options The optional parameters
|
|
212
|
-
* @param callback The callback
|
|
308
|
+
* ListNext
|
|
309
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
310
|
+
* @param options The options parameters.
|
|
213
311
|
*/
|
|
214
|
-
|
|
215
|
-
|
|
312
|
+
private _listNext(
|
|
313
|
+
nextLink: string,
|
|
314
|
+
options?: SapMonitorsListNextOptionalParams
|
|
315
|
+
): Promise<SapMonitorsListNextResponse> {
|
|
216
316
|
return this.client.sendOperationRequest(
|
|
217
|
-
{
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
listNextOperationSpec,
|
|
222
|
-
callback) as Promise<Models.SapMonitorsListNextResponse>;
|
|
317
|
+
{ nextLink, options },
|
|
318
|
+
listNextOperationSpec
|
|
319
|
+
);
|
|
223
320
|
}
|
|
224
321
|
}
|
|
225
|
-
|
|
226
322
|
// Operation Specifications
|
|
227
|
-
const serializer =
|
|
228
|
-
|
|
323
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
324
|
+
|
|
325
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
326
|
+
path:
|
|
327
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors",
|
|
229
328
|
httpMethod: "GET",
|
|
230
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors",
|
|
231
|
-
urlParameters: [
|
|
232
|
-
Parameters.subscriptionId
|
|
233
|
-
],
|
|
234
|
-
queryParameters: [
|
|
235
|
-
Parameters.apiVersion
|
|
236
|
-
],
|
|
237
|
-
headerParameters: [
|
|
238
|
-
Parameters.acceptLanguage
|
|
239
|
-
],
|
|
240
329
|
responses: {
|
|
241
330
|
200: {
|
|
242
331
|
bodyMapper: Mappers.SapMonitorListResult
|
|
@@ -245,23 +334,15 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
245
334
|
bodyMapper: Mappers.ErrorResponse
|
|
246
335
|
}
|
|
247
336
|
},
|
|
337
|
+
queryParameters: [Parameters.apiVersion],
|
|
338
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
339
|
+
headerParameters: [Parameters.accept],
|
|
248
340
|
serializer
|
|
249
341
|
};
|
|
250
|
-
|
|
251
|
-
|
|
342
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
343
|
+
path:
|
|
344
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
252
345
|
httpMethod: "GET",
|
|
253
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
254
|
-
urlParameters: [
|
|
255
|
-
Parameters.subscriptionId,
|
|
256
|
-
Parameters.resourceGroupName,
|
|
257
|
-
Parameters.sapMonitorName
|
|
258
|
-
],
|
|
259
|
-
queryParameters: [
|
|
260
|
-
Parameters.apiVersion
|
|
261
|
-
],
|
|
262
|
-
headerParameters: [
|
|
263
|
-
Parameters.acceptLanguage
|
|
264
|
-
],
|
|
265
346
|
responses: {
|
|
266
347
|
200: {
|
|
267
348
|
bodyMapper: Mappers.SapMonitor
|
|
@@ -270,62 +351,20 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
270
351
|
bodyMapper: Mappers.ErrorResponse
|
|
271
352
|
}
|
|
272
353
|
},
|
|
273
|
-
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
const updateOperationSpec: msRest.OperationSpec = {
|
|
277
|
-
httpMethod: "PATCH",
|
|
278
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
354
|
+
queryParameters: [Parameters.apiVersion],
|
|
279
355
|
urlParameters: [
|
|
356
|
+
Parameters.$host,
|
|
280
357
|
Parameters.subscriptionId,
|
|
281
358
|
Parameters.resourceGroupName,
|
|
282
359
|
Parameters.sapMonitorName
|
|
283
360
|
],
|
|
284
|
-
|
|
285
|
-
Parameters.apiVersion
|
|
286
|
-
],
|
|
287
|
-
headerParameters: [
|
|
288
|
-
Parameters.acceptLanguage
|
|
289
|
-
],
|
|
290
|
-
requestBody: {
|
|
291
|
-
parameterPath: "tagsParameter",
|
|
292
|
-
mapper: {
|
|
293
|
-
...Mappers.Tags,
|
|
294
|
-
required: true
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
responses: {
|
|
298
|
-
200: {
|
|
299
|
-
bodyMapper: Mappers.SapMonitor
|
|
300
|
-
},
|
|
301
|
-
default: {
|
|
302
|
-
bodyMapper: Mappers.ErrorResponse
|
|
303
|
-
}
|
|
304
|
-
},
|
|
361
|
+
headerParameters: [Parameters.accept],
|
|
305
362
|
serializer
|
|
306
363
|
};
|
|
307
|
-
|
|
308
|
-
|
|
364
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
365
|
+
path:
|
|
366
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
309
367
|
httpMethod: "PUT",
|
|
310
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
311
|
-
urlParameters: [
|
|
312
|
-
Parameters.subscriptionId,
|
|
313
|
-
Parameters.resourceGroupName,
|
|
314
|
-
Parameters.sapMonitorName
|
|
315
|
-
],
|
|
316
|
-
queryParameters: [
|
|
317
|
-
Parameters.apiVersion
|
|
318
|
-
],
|
|
319
|
-
headerParameters: [
|
|
320
|
-
Parameters.acceptLanguage
|
|
321
|
-
],
|
|
322
|
-
requestBody: {
|
|
323
|
-
parameterPath: "sapMonitorParameter",
|
|
324
|
-
mapper: {
|
|
325
|
-
...Mappers.SapMonitor,
|
|
326
|
-
required: true
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
368
|
responses: {
|
|
330
369
|
200: {
|
|
331
370
|
bodyMapper: Mappers.SapMonitor
|
|
@@ -333,48 +372,78 @@ const beginCreateOperationSpec: msRest.OperationSpec = {
|
|
|
333
372
|
201: {
|
|
334
373
|
bodyMapper: Mappers.SapMonitor
|
|
335
374
|
},
|
|
375
|
+
202: {
|
|
376
|
+
bodyMapper: Mappers.SapMonitor
|
|
377
|
+
},
|
|
378
|
+
204: {
|
|
379
|
+
bodyMapper: Mappers.SapMonitor
|
|
380
|
+
},
|
|
336
381
|
default: {
|
|
337
382
|
bodyMapper: Mappers.ErrorResponse
|
|
338
383
|
}
|
|
339
384
|
},
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
344
|
-
httpMethod: "DELETE",
|
|
345
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
385
|
+
requestBody: Parameters.sapMonitorParameter,
|
|
386
|
+
queryParameters: [Parameters.apiVersion],
|
|
346
387
|
urlParameters: [
|
|
388
|
+
Parameters.$host,
|
|
347
389
|
Parameters.subscriptionId,
|
|
348
390
|
Parameters.resourceGroupName,
|
|
349
391
|
Parameters.sapMonitorName
|
|
350
392
|
],
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
393
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
394
|
+
mediaType: "json",
|
|
395
|
+
serializer
|
|
396
|
+
};
|
|
397
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
398
|
+
path:
|
|
399
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
400
|
+
httpMethod: "DELETE",
|
|
357
401
|
responses: {
|
|
358
402
|
200: {},
|
|
403
|
+
201: {},
|
|
359
404
|
202: {},
|
|
360
405
|
204: {},
|
|
361
406
|
default: {
|
|
362
407
|
bodyMapper: Mappers.ErrorResponse
|
|
363
408
|
}
|
|
364
409
|
},
|
|
410
|
+
queryParameters: [Parameters.apiVersion],
|
|
411
|
+
urlParameters: [
|
|
412
|
+
Parameters.$host,
|
|
413
|
+
Parameters.subscriptionId,
|
|
414
|
+
Parameters.resourceGroupName,
|
|
415
|
+
Parameters.sapMonitorName
|
|
416
|
+
],
|
|
417
|
+
headerParameters: [Parameters.accept],
|
|
365
418
|
serializer
|
|
366
419
|
};
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
420
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
421
|
+
path:
|
|
422
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}",
|
|
423
|
+
httpMethod: "PATCH",
|
|
424
|
+
responses: {
|
|
425
|
+
200: {
|
|
426
|
+
bodyMapper: Mappers.SapMonitor
|
|
427
|
+
},
|
|
428
|
+
default: {
|
|
429
|
+
bodyMapper: Mappers.ErrorResponse
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
requestBody: Parameters.tagsParameter,
|
|
433
|
+
queryParameters: [Parameters.apiVersion],
|
|
372
434
|
urlParameters: [
|
|
373
|
-
Parameters
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
Parameters.
|
|
435
|
+
Parameters.$host,
|
|
436
|
+
Parameters.subscriptionId,
|
|
437
|
+
Parameters.resourceGroupName,
|
|
438
|
+
Parameters.sapMonitorName
|
|
377
439
|
],
|
|
440
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
441
|
+
mediaType: "json",
|
|
442
|
+
serializer
|
|
443
|
+
};
|
|
444
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
445
|
+
path: "{nextLink}",
|
|
446
|
+
httpMethod: "GET",
|
|
378
447
|
responses: {
|
|
379
448
|
200: {
|
|
380
449
|
bodyMapper: Mappers.SapMonitorListResult
|
|
@@ -383,5 +452,12 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
383
452
|
bodyMapper: Mappers.ErrorResponse
|
|
384
453
|
}
|
|
385
454
|
},
|
|
455
|
+
queryParameters: [Parameters.apiVersion],
|
|
456
|
+
urlParameters: [
|
|
457
|
+
Parameters.$host,
|
|
458
|
+
Parameters.subscriptionId,
|
|
459
|
+
Parameters.nextLink
|
|
460
|
+
],
|
|
461
|
+
headerParameters: [Parameters.accept],
|
|
386
462
|
serializer
|
|
387
463
|
};
|