@azure/arm-timeseriesinsights 1.2.1 → 2.0.0-alpha.20220131.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/README.md +72 -73
- package/dist/index.js +3489 -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/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 +1102 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +109 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +94 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1965 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +26 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +225 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/accessPolicies.d.ts +65 -0
- package/dist-esm/src/operations/accessPolicies.d.ts.map +1 -0
- package/dist-esm/src/operations/accessPolicies.js +212 -0
- package/dist-esm/src/operations/accessPolicies.js.map +1 -0
- package/dist-esm/src/operations/environments.d.ts +78 -0
- package/dist-esm/src/operations/environments.d.ts.map +1 -0
- package/dist-esm/src/operations/environments.js +314 -0
- package/dist-esm/src/operations/environments.js.map +1 -0
- package/dist-esm/src/operations/eventSources.d.ts +66 -0
- package/dist-esm/src/operations/eventSources.d.ts.map +1 -0
- package/dist-esm/src/operations/eventSources.js +213 -0
- package/dist-esm/src/operations/eventSources.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +3 -5
- 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 +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/referenceDataSets.d.ts +66 -0
- package/dist-esm/src/operations/referenceDataSets.d.ts.map +1 -0
- package/dist-esm/src/operations/referenceDataSets.js +213 -0
- package/dist-esm/src/operations/referenceDataSets.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/accessPolicies.d.ts +57 -0
- package/dist-esm/src/operationsInterfaces/accessPolicies.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/accessPolicies.js +9 -0
- package/dist-esm/src/operationsInterfaces/accessPolicies.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/environments.d.ts +70 -0
- package/dist-esm/src/operationsInterfaces/environments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/environments.js +9 -0
- package/dist-esm/src/operationsInterfaces/environments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventSources.d.ts +58 -0
- package/dist-esm/src/operationsInterfaces/eventSources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/eventSources.js +9 -0
- package/dist-esm/src/operationsInterfaces/eventSources.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/referenceDataSets.d.ts +58 -0
- package/dist-esm/src/operationsInterfaces/referenceDataSets.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/referenceDataSets.js +9 -0
- package/dist-esm/src/operationsInterfaces/referenceDataSets.js.map +1 -0
- package/dist-esm/src/timeSeriesInsightsClient.d.ts +22 -0
- package/dist-esm/src/timeSeriesInsightsClient.d.ts.map +1 -0
- package/dist-esm/src/timeSeriesInsightsClient.js +55 -0
- package/dist-esm/src/timeSeriesInsightsClient.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 +73 -21
- package/review/arm-timeseriesinsights.api.md +943 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1032 -1259
- package/src/models/mappers.ts +1568 -811
- package/src/models/parameters.ts +157 -69
- package/src/operations/accessPolicies.ts +144 -250
- package/src/operations/environments.ts +322 -267
- package/src/operations/eventSources.ts +144 -250
- package/src/operations/index.ts +3 -5
- package/src/operations/operations.ts +87 -73
- package/src/operations/referenceDataSets.ts +144 -250
- package/src/operationsInterfaces/accessPolicies.ts +103 -0
- package/src/operationsInterfaces/environments.ts +135 -0
- package/src/operationsInterfaces/eventSources.ts +104 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/referenceDataSets.ts +104 -0
- package/src/timeSeriesInsightsClient.ts +82 -37
- package/tsconfig.json +3 -3
- package/types/arm-timeseriesinsights.d.ts +1523 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-timeseriesinsights.js +0 -2796
- package/dist/arm-timeseriesinsights.js.map +0 -1
- package/dist/arm-timeseriesinsights.min.js +0 -1
- package/dist/arm-timeseriesinsights.min.js.map +0 -1
- package/esm/models/accessPoliciesMappers.d.ts +0 -2
- package/esm/models/accessPoliciesMappers.d.ts.map +0 -1
- package/esm/models/accessPoliciesMappers.js +0 -9
- package/esm/models/accessPoliciesMappers.js.map +0 -1
- package/esm/models/environmentsMappers.d.ts +0 -2
- package/esm/models/environmentsMappers.d.ts.map +0 -1
- package/esm/models/environmentsMappers.js +0 -9
- package/esm/models/environmentsMappers.js.map +0 -1
- package/esm/models/eventSourcesMappers.d.ts +0 -2
- package/esm/models/eventSourcesMappers.d.ts.map +0 -1
- package/esm/models/eventSourcesMappers.js +0 -9
- package/esm/models/eventSourcesMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1413
- 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 -54
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -1321
- 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 -16
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -173
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/referenceDataSetsMappers.d.ts +0 -2
- package/esm/models/referenceDataSetsMappers.d.ts.map +0 -1
- package/esm/models/referenceDataSetsMappers.js +0 -9
- package/esm/models/referenceDataSetsMappers.js.map +0 -1
- package/esm/operations/accessPolicies.d.ts +0 -165
- package/esm/operations/accessPolicies.d.ts.map +0 -1
- package/esm/operations/accessPolicies.js +0 -203
- package/esm/operations/accessPolicies.js.map +0 -1
- package/esm/operations/environments.d.ts +0 -139
- package/esm/operations/environments.d.ts.map +0 -1
- package/esm/operations/environments.js +0 -268
- package/esm/operations/environments.js.map +0 -1
- package/esm/operations/eventSources.d.ts +0 -166
- package/esm/operations/eventSources.d.ts.map +0 -1
- package/esm/operations/eventSources.js +0 -203
- package/esm/operations/eventSources.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/referenceDataSets.d.ts +0 -166
- package/esm/operations/referenceDataSets.d.ts.map +0 -1
- package/esm/operations/referenceDataSets.js +0 -203
- package/esm/operations/referenceDataSets.js.map +0 -1
- package/esm/timeSeriesInsightsClient.d.ts +0 -22
- package/esm/timeSeriesInsightsClient.d.ts.map +0 -1
- package/esm/timeSeriesInsightsClient.js +0 -37
- package/esm/timeSeriesInsightsClient.js.map +0 -1
- package/esm/timeSeriesInsightsClientContext.d.ts +0 -16
- package/esm/timeSeriesInsightsClientContext.d.ts.map +0 -1
- package/esm/timeSeriesInsightsClientContext.js +0 -56
- package/esm/timeSeriesInsightsClientContext.js.map +0 -1
- package/src/models/accessPoliciesMappers.ts +0 -30
- package/src/models/environmentsMappers.ts +0 -35
- package/src/models/eventSourcesMappers.ts +0 -39
- package/src/models/operationsMappers.ts +0 -15
- package/src/models/referenceDataSetsMappers.ts +0 -35
- package/src/timeSeriesInsightsClientContext.ts +0 -62
@@ -1,29 +1,43 @@
|
|
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 * as
|
13
|
-
import * as
|
14
|
-
import * as Mappers from "../models/environmentsMappers";
|
9
|
+
import { Environments } from "../operationsInterfaces";
|
10
|
+
import * as coreClient from "@azure/core-client";
|
11
|
+
import * as Mappers from "../models/mappers";
|
15
12
|
import * as Parameters from "../models/parameters";
|
16
|
-
import {
|
13
|
+
import { TimeSeriesInsightsClient } from "../timeSeriesInsightsClient";
|
14
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
15
|
+
import { LroImpl } from "../lroImpl";
|
16
|
+
import {
|
17
|
+
EnvironmentCreateOrUpdateParametersUnion,
|
18
|
+
EnvironmentsCreateOrUpdateOptionalParams,
|
19
|
+
EnvironmentsCreateOrUpdateResponse,
|
20
|
+
EnvironmentsGetOptionalParams,
|
21
|
+
EnvironmentsGetResponse,
|
22
|
+
EnvironmentUpdateParametersUnion,
|
23
|
+
EnvironmentsUpdateOptionalParams,
|
24
|
+
EnvironmentsUpdateResponse,
|
25
|
+
EnvironmentsDeleteOptionalParams,
|
26
|
+
EnvironmentsListByResourceGroupOptionalParams,
|
27
|
+
EnvironmentsListByResourceGroupResponse,
|
28
|
+
EnvironmentsListBySubscriptionOptionalParams,
|
29
|
+
EnvironmentsListBySubscriptionResponse
|
30
|
+
} from "../models";
|
17
31
|
|
18
|
-
/** Class
|
19
|
-
export class Environments {
|
20
|
-
private readonly client:
|
32
|
+
/** Class containing Environments operations. */
|
33
|
+
export class EnvironmentsImpl implements Environments {
|
34
|
+
private readonly client: TimeSeriesInsightsClient;
|
21
35
|
|
22
36
|
/**
|
23
|
-
*
|
24
|
-
* @param
|
37
|
+
* Initialize a new instance of the class Environments class.
|
38
|
+
* @param client Reference to the service client
|
25
39
|
*/
|
26
|
-
constructor(client:
|
40
|
+
constructor(client: TimeSeriesInsightsClient) {
|
27
41
|
this.client = client;
|
28
42
|
}
|
29
43
|
|
@@ -32,361 +46,402 @@ export class Environments {
|
|
32
46
|
* @param resourceGroupName Name of an Azure Resource group.
|
33
47
|
* @param environmentName Name of the environment
|
34
48
|
* @param parameters Parameters for creating an environment resource.
|
35
|
-
* @param
|
36
|
-
* @returns Promise<Models.EnvironmentsCreateOrUpdateResponse>
|
49
|
+
* @param options The options parameters.
|
37
50
|
*/
|
38
|
-
|
39
|
-
|
40
|
-
|
51
|
+
async beginCreateOrUpdate(
|
52
|
+
resourceGroupName: string,
|
53
|
+
environmentName: string,
|
54
|
+
parameters: EnvironmentCreateOrUpdateParametersUnion,
|
55
|
+
options?: EnvironmentsCreateOrUpdateOptionalParams
|
56
|
+
): Promise<
|
57
|
+
PollerLike<
|
58
|
+
PollOperationState<EnvironmentsCreateOrUpdateResponse>,
|
59
|
+
EnvironmentsCreateOrUpdateResponse
|
60
|
+
>
|
61
|
+
> {
|
62
|
+
const directSendOperation = async (
|
63
|
+
args: coreClient.OperationArguments,
|
64
|
+
spec: coreClient.OperationSpec
|
65
|
+
): Promise<EnvironmentsCreateOrUpdateResponse> => {
|
66
|
+
return this.client.sendOperationRequest(args, spec);
|
67
|
+
};
|
68
|
+
const sendOperation = async (
|
69
|
+
args: coreClient.OperationArguments,
|
70
|
+
spec: coreClient.OperationSpec
|
71
|
+
) => {
|
72
|
+
let currentRawResponse:
|
73
|
+
| coreClient.FullOperationResponse
|
74
|
+
| undefined = undefined;
|
75
|
+
const providedCallback = args.options?.onResponse;
|
76
|
+
const callback: coreClient.RawResponseCallback = (
|
77
|
+
rawResponse: coreClient.FullOperationResponse,
|
78
|
+
flatResponse: unknown
|
79
|
+
) => {
|
80
|
+
currentRawResponse = rawResponse;
|
81
|
+
providedCallback?.(rawResponse, flatResponse);
|
82
|
+
};
|
83
|
+
const updatedArgs = {
|
84
|
+
...args,
|
85
|
+
options: {
|
86
|
+
...args.options,
|
87
|
+
onResponse: callback
|
88
|
+
}
|
89
|
+
};
|
90
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
91
|
+
return {
|
92
|
+
flatResponse,
|
93
|
+
rawResponse: {
|
94
|
+
statusCode: currentRawResponse!.status,
|
95
|
+
body: currentRawResponse!.parsedBody,
|
96
|
+
headers: currentRawResponse!.headers.toJSON()
|
97
|
+
}
|
98
|
+
};
|
99
|
+
};
|
100
|
+
|
101
|
+
const lro = new LroImpl(
|
102
|
+
sendOperation,
|
103
|
+
{ resourceGroupName, environmentName, parameters, options },
|
104
|
+
createOrUpdateOperationSpec
|
105
|
+
);
|
106
|
+
return new LroEngine(lro, {
|
107
|
+
resumeFrom: options?.resumeFrom,
|
108
|
+
intervalInMs: options?.updateIntervalInMs
|
109
|
+
});
|
41
110
|
}
|
42
111
|
|
43
112
|
/**
|
44
|
-
*
|
113
|
+
* Create or update an environment in the specified subscription and resource group.
|
45
114
|
* @param resourceGroupName Name of an Azure Resource group.
|
46
|
-
* @param environmentName
|
47
|
-
*
|
48
|
-
* @param
|
49
|
-
* @returns Promise<Models.EnvironmentsGetResponse>
|
115
|
+
* @param environmentName Name of the environment
|
116
|
+
* @param parameters Parameters for creating an environment resource.
|
117
|
+
* @param options The options parameters.
|
50
118
|
*/
|
51
|
-
|
119
|
+
async beginCreateOrUpdateAndWait(
|
120
|
+
resourceGroupName: string,
|
121
|
+
environmentName: string,
|
122
|
+
parameters: EnvironmentCreateOrUpdateParametersUnion,
|
123
|
+
options?: EnvironmentsCreateOrUpdateOptionalParams
|
124
|
+
): Promise<EnvironmentsCreateOrUpdateResponse> {
|
125
|
+
const poller = await this.beginCreateOrUpdate(
|
126
|
+
resourceGroupName,
|
127
|
+
environmentName,
|
128
|
+
parameters,
|
129
|
+
options
|
130
|
+
);
|
131
|
+
return poller.pollUntilDone();
|
132
|
+
}
|
133
|
+
|
52
134
|
/**
|
135
|
+
* Gets the environment with the specified name in the specified subscription and resource group.
|
53
136
|
* @param resourceGroupName Name of an Azure Resource group.
|
54
137
|
* @param environmentName The name of the Time Series Insights environment associated with the
|
55
|
-
*
|
56
|
-
* @param
|
138
|
+
* specified resource group.
|
139
|
+
* @param options The options parameters.
|
57
140
|
*/
|
58
|
-
get(
|
141
|
+
get(
|
142
|
+
resourceGroupName: string,
|
143
|
+
environmentName: string,
|
144
|
+
options?: EnvironmentsGetOptionalParams
|
145
|
+
): Promise<EnvironmentsGetResponse> {
|
146
|
+
return this.client.sendOperationRequest(
|
147
|
+
{ resourceGroupName, environmentName, options },
|
148
|
+
getOperationSpec
|
149
|
+
);
|
150
|
+
}
|
151
|
+
|
59
152
|
/**
|
153
|
+
* Updates the environment with the specified name in the specified subscription and resource group.
|
60
154
|
* @param resourceGroupName Name of an Azure Resource group.
|
61
155
|
* @param environmentName The name of the Time Series Insights environment associated with the
|
62
|
-
*
|
63
|
-
* @param
|
64
|
-
*
|
156
|
+
* specified resource group.
|
157
|
+
* @param environmentUpdateParameters Request object that contains the updated information for the
|
158
|
+
* environment.
|
159
|
+
* @param options The options parameters.
|
65
160
|
*/
|
66
|
-
|
67
|
-
|
68
|
-
|
161
|
+
async beginUpdate(
|
162
|
+
resourceGroupName: string,
|
163
|
+
environmentName: string,
|
164
|
+
environmentUpdateParameters: EnvironmentUpdateParametersUnion,
|
165
|
+
options?: EnvironmentsUpdateOptionalParams
|
166
|
+
): Promise<
|
167
|
+
PollerLike<
|
168
|
+
PollOperationState<EnvironmentsUpdateResponse>,
|
169
|
+
EnvironmentsUpdateResponse
|
170
|
+
>
|
171
|
+
> {
|
172
|
+
const directSendOperation = async (
|
173
|
+
args: coreClient.OperationArguments,
|
174
|
+
spec: coreClient.OperationSpec
|
175
|
+
): Promise<EnvironmentsUpdateResponse> => {
|
176
|
+
return this.client.sendOperationRequest(args, spec);
|
177
|
+
};
|
178
|
+
const sendOperation = async (
|
179
|
+
args: coreClient.OperationArguments,
|
180
|
+
spec: coreClient.OperationSpec
|
181
|
+
) => {
|
182
|
+
let currentRawResponse:
|
183
|
+
| coreClient.FullOperationResponse
|
184
|
+
| undefined = undefined;
|
185
|
+
const providedCallback = args.options?.onResponse;
|
186
|
+
const callback: coreClient.RawResponseCallback = (
|
187
|
+
rawResponse: coreClient.FullOperationResponse,
|
188
|
+
flatResponse: unknown
|
189
|
+
) => {
|
190
|
+
currentRawResponse = rawResponse;
|
191
|
+
providedCallback?.(rawResponse, flatResponse);
|
192
|
+
};
|
193
|
+
const updatedArgs = {
|
194
|
+
...args,
|
195
|
+
options: {
|
196
|
+
...args.options,
|
197
|
+
onResponse: callback
|
198
|
+
}
|
199
|
+
};
|
200
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
201
|
+
return {
|
202
|
+
flatResponse,
|
203
|
+
rawResponse: {
|
204
|
+
statusCode: currentRawResponse!.status,
|
205
|
+
body: currentRawResponse!.parsedBody,
|
206
|
+
headers: currentRawResponse!.headers.toJSON()
|
207
|
+
}
|
208
|
+
};
|
209
|
+
};
|
210
|
+
|
211
|
+
const lro = new LroImpl(
|
212
|
+
sendOperation,
|
69
213
|
{
|
70
214
|
resourceGroupName,
|
71
215
|
environmentName,
|
216
|
+
environmentUpdateParameters,
|
72
217
|
options
|
73
218
|
},
|
74
|
-
|
75
|
-
|
219
|
+
updateOperationSpec
|
220
|
+
);
|
221
|
+
return new LroEngine(lro, {
|
222
|
+
resumeFrom: options?.resumeFrom,
|
223
|
+
intervalInMs: options?.updateIntervalInMs
|
224
|
+
});
|
76
225
|
}
|
77
226
|
|
78
227
|
/**
|
79
|
-
* Updates the environment with the specified name in the specified subscription and resource
|
80
|
-
* group.
|
228
|
+
* Updates the environment with the specified name in the specified subscription and resource group.
|
81
229
|
* @param resourceGroupName Name of an Azure Resource group.
|
82
230
|
* @param environmentName The name of the Time Series Insights environment associated with the
|
83
|
-
*
|
231
|
+
* specified resource group.
|
84
232
|
* @param environmentUpdateParameters Request object that contains the updated information for the
|
85
|
-
*
|
86
|
-
* @param
|
87
|
-
* @returns Promise<Models.EnvironmentsUpdateResponse>
|
233
|
+
* environment.
|
234
|
+
* @param options The options parameters.
|
88
235
|
*/
|
89
|
-
|
90
|
-
|
91
|
-
|
236
|
+
async beginUpdateAndWait(
|
237
|
+
resourceGroupName: string,
|
238
|
+
environmentName: string,
|
239
|
+
environmentUpdateParameters: EnvironmentUpdateParametersUnion,
|
240
|
+
options?: EnvironmentsUpdateOptionalParams
|
241
|
+
): Promise<EnvironmentsUpdateResponse> {
|
242
|
+
const poller = await this.beginUpdate(
|
243
|
+
resourceGroupName,
|
244
|
+
environmentName,
|
245
|
+
environmentUpdateParameters,
|
246
|
+
options
|
247
|
+
);
|
248
|
+
return poller.pollUntilDone();
|
92
249
|
}
|
93
250
|
|
94
251
|
/**
|
95
|
-
* Deletes the environment with the specified name in the specified subscription and resource
|
96
|
-
* group.
|
97
|
-
* @param resourceGroupName Name of an Azure Resource group.
|
98
|
-
* @param environmentName The name of the Time Series Insights environment associated with the
|
99
|
-
* specified resource group.
|
100
|
-
* @param [options] The optional parameters
|
101
|
-
* @returns Promise<msRest.RestResponse>
|
102
|
-
*/
|
103
|
-
deleteMethod(resourceGroupName: string, environmentName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
|
104
|
-
/**
|
105
|
-
* @param resourceGroupName Name of an Azure Resource group.
|
106
|
-
* @param environmentName The name of the Time Series Insights environment associated with the
|
107
|
-
* specified resource group.
|
108
|
-
* @param callback The callback
|
109
|
-
*/
|
110
|
-
deleteMethod(resourceGroupName: string, environmentName: string, callback: msRest.ServiceCallback<void>): void;
|
111
|
-
/**
|
252
|
+
* Deletes the environment with the specified name in the specified subscription and resource group.
|
112
253
|
* @param resourceGroupName Name of an Azure Resource group.
|
113
254
|
* @param environmentName The name of the Time Series Insights environment associated with the
|
114
|
-
*
|
115
|
-
* @param options The
|
116
|
-
* @param callback The callback
|
255
|
+
* specified resource group.
|
256
|
+
* @param options The options parameters.
|
117
257
|
*/
|
118
|
-
|
119
|
-
|
258
|
+
delete(
|
259
|
+
resourceGroupName: string,
|
260
|
+
environmentName: string,
|
261
|
+
options?: EnvironmentsDeleteOptionalParams
|
262
|
+
): Promise<void> {
|
120
263
|
return this.client.sendOperationRequest(
|
121
|
-
{
|
122
|
-
|
123
|
-
|
124
|
-
options
|
125
|
-
},
|
126
|
-
deleteMethodOperationSpec,
|
127
|
-
callback);
|
264
|
+
{ resourceGroupName, environmentName, options },
|
265
|
+
deleteOperationSpec
|
266
|
+
);
|
128
267
|
}
|
129
268
|
|
130
269
|
/**
|
131
270
|
* Lists all the available environments associated with the subscription and within the specified
|
132
271
|
* resource group.
|
133
272
|
* @param resourceGroupName Name of an Azure Resource group.
|
134
|
-
* @param
|
135
|
-
* @returns Promise<Models.EnvironmentsListByResourceGroupResponse>
|
136
|
-
*/
|
137
|
-
listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise<Models.EnvironmentsListByResourceGroupResponse>;
|
138
|
-
/**
|
139
|
-
* @param resourceGroupName Name of an Azure Resource group.
|
140
|
-
* @param callback The callback
|
141
|
-
*/
|
142
|
-
listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback<Models.EnvironmentListResponse>): void;
|
143
|
-
/**
|
144
|
-
* @param resourceGroupName Name of an Azure Resource group.
|
145
|
-
* @param options The optional parameters
|
146
|
-
* @param callback The callback
|
273
|
+
* @param options The options parameters.
|
147
274
|
*/
|
148
|
-
listByResourceGroup(
|
149
|
-
|
275
|
+
listByResourceGroup(
|
276
|
+
resourceGroupName: string,
|
277
|
+
options?: EnvironmentsListByResourceGroupOptionalParams
|
278
|
+
): Promise<EnvironmentsListByResourceGroupResponse> {
|
150
279
|
return this.client.sendOperationRequest(
|
151
|
-
{
|
152
|
-
|
153
|
-
|
154
|
-
},
|
155
|
-
listByResourceGroupOperationSpec,
|
156
|
-
callback) as Promise<Models.EnvironmentsListByResourceGroupResponse>;
|
280
|
+
{ resourceGroupName, options },
|
281
|
+
listByResourceGroupOperationSpec
|
282
|
+
);
|
157
283
|
}
|
158
284
|
|
159
285
|
/**
|
160
286
|
* Lists all the available environments within a subscription, irrespective of the resource groups.
|
161
|
-
* @param
|
162
|
-
* @returns Promise<Models.EnvironmentsListBySubscriptionResponse>
|
287
|
+
* @param options The options parameters.
|
163
288
|
*/
|
164
|
-
listBySubscription(
|
165
|
-
|
166
|
-
|
167
|
-
*/
|
168
|
-
listBySubscription(callback: msRest.ServiceCallback<Models.EnvironmentListResponse>): void;
|
169
|
-
/**
|
170
|
-
* @param options The optional parameters
|
171
|
-
* @param callback The callback
|
172
|
-
*/
|
173
|
-
listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.EnvironmentListResponse>): void;
|
174
|
-
listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.EnvironmentListResponse>, callback?: msRest.ServiceCallback<Models.EnvironmentListResponse>): Promise<Models.EnvironmentsListBySubscriptionResponse> {
|
289
|
+
listBySubscription(
|
290
|
+
options?: EnvironmentsListBySubscriptionOptionalParams
|
291
|
+
): Promise<EnvironmentsListBySubscriptionResponse> {
|
175
292
|
return this.client.sendOperationRequest(
|
176
|
-
{
|
177
|
-
|
178
|
-
|
179
|
-
listBySubscriptionOperationSpec,
|
180
|
-
callback) as Promise<Models.EnvironmentsListBySubscriptionResponse>;
|
181
|
-
}
|
182
|
-
|
183
|
-
/**
|
184
|
-
* Create or update an environment in the specified subscription and resource group.
|
185
|
-
* @param resourceGroupName Name of an Azure Resource group.
|
186
|
-
* @param environmentName Name of the environment
|
187
|
-
* @param parameters Parameters for creating an environment resource.
|
188
|
-
* @param [options] The optional parameters
|
189
|
-
* @returns Promise<msRestAzure.LROPoller>
|
190
|
-
*/
|
191
|
-
beginCreateOrUpdate(resourceGroupName: string, environmentName: string, parameters: Models.EnvironmentCreateOrUpdateParameters, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
|
192
|
-
return this.client.sendLRORequest(
|
193
|
-
{
|
194
|
-
resourceGroupName,
|
195
|
-
environmentName,
|
196
|
-
parameters,
|
197
|
-
options
|
198
|
-
},
|
199
|
-
beginCreateOrUpdateOperationSpec,
|
200
|
-
options);
|
201
|
-
}
|
202
|
-
|
203
|
-
/**
|
204
|
-
* Updates the environment with the specified name in the specified subscription and resource
|
205
|
-
* group.
|
206
|
-
* @param resourceGroupName Name of an Azure Resource group.
|
207
|
-
* @param environmentName The name of the Time Series Insights environment associated with the
|
208
|
-
* specified resource group.
|
209
|
-
* @param environmentUpdateParameters Request object that contains the updated information for the
|
210
|
-
* environment.
|
211
|
-
* @param [options] The optional parameters
|
212
|
-
* @returns Promise<msRestAzure.LROPoller>
|
213
|
-
*/
|
214
|
-
beginUpdate(resourceGroupName: string, environmentName: string, environmentUpdateParameters: Models.EnvironmentUpdateParameters, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
|
215
|
-
return this.client.sendLRORequest(
|
216
|
-
{
|
217
|
-
resourceGroupName,
|
218
|
-
environmentName,
|
219
|
-
environmentUpdateParameters,
|
220
|
-
options
|
221
|
-
},
|
222
|
-
beginUpdateOperationSpec,
|
223
|
-
options);
|
293
|
+
{ options },
|
294
|
+
listBySubscriptionOperationSpec
|
295
|
+
);
|
224
296
|
}
|
225
297
|
}
|
226
|
-
|
227
298
|
// Operation Specifications
|
228
|
-
const serializer =
|
229
|
-
|
230
|
-
|
231
|
-
path:
|
232
|
-
|
233
|
-
|
234
|
-
Parameters.resourceGroupName,
|
235
|
-
Parameters.environmentName1
|
236
|
-
],
|
237
|
-
queryParameters: [
|
238
|
-
Parameters.expand,
|
239
|
-
Parameters.apiVersion
|
240
|
-
],
|
241
|
-
headerParameters: [
|
242
|
-
Parameters.acceptLanguage
|
243
|
-
],
|
299
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
300
|
+
|
301
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
302
|
+
path:
|
303
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
304
|
+
httpMethod: "PUT",
|
244
305
|
responses: {
|
245
306
|
200: {
|
246
307
|
bodyMapper: Mappers.EnvironmentResource
|
247
308
|
},
|
309
|
+
201: {
|
310
|
+
bodyMapper: Mappers.EnvironmentResource
|
311
|
+
},
|
312
|
+
202: {
|
313
|
+
bodyMapper: Mappers.EnvironmentResource
|
314
|
+
},
|
315
|
+
204: {
|
316
|
+
bodyMapper: Mappers.EnvironmentResource
|
317
|
+
},
|
248
318
|
default: {
|
249
319
|
bodyMapper: Mappers.CloudError
|
250
320
|
}
|
251
321
|
},
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
const deleteMethodOperationSpec: msRest.OperationSpec = {
|
256
|
-
httpMethod: "DELETE",
|
257
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
322
|
+
requestBody: Parameters.parameters,
|
323
|
+
queryParameters: [Parameters.apiVersion],
|
258
324
|
urlParameters: [
|
325
|
+
Parameters.$host,
|
259
326
|
Parameters.subscriptionId,
|
260
327
|
Parameters.resourceGroupName,
|
261
|
-
Parameters.
|
262
|
-
],
|
263
|
-
queryParameters: [
|
264
|
-
Parameters.apiVersion
|
265
|
-
],
|
266
|
-
headerParameters: [
|
267
|
-
Parameters.acceptLanguage
|
328
|
+
Parameters.environmentName
|
268
329
|
],
|
330
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
331
|
+
mediaType: "json",
|
332
|
+
serializer
|
333
|
+
};
|
334
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
335
|
+
path:
|
336
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
337
|
+
httpMethod: "GET",
|
269
338
|
responses: {
|
270
|
-
200: {
|
271
|
-
|
339
|
+
200: {
|
340
|
+
bodyMapper: Mappers.EnvironmentResource
|
341
|
+
},
|
272
342
|
default: {
|
273
343
|
bodyMapper: Mappers.CloudError
|
274
344
|
}
|
275
345
|
},
|
276
|
-
|
277
|
-
};
|
278
|
-
|
279
|
-
const listByResourceGroupOperationSpec: msRest.OperationSpec = {
|
280
|
-
httpMethod: "GET",
|
281
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments",
|
346
|
+
queryParameters: [Parameters.apiVersion, Parameters.expand],
|
282
347
|
urlParameters: [
|
348
|
+
Parameters.$host,
|
283
349
|
Parameters.subscriptionId,
|
284
|
-
Parameters.resourceGroupName
|
285
|
-
|
286
|
-
queryParameters: [
|
287
|
-
Parameters.apiVersion
|
288
|
-
],
|
289
|
-
headerParameters: [
|
290
|
-
Parameters.acceptLanguage
|
350
|
+
Parameters.resourceGroupName,
|
351
|
+
Parameters.environmentName1
|
291
352
|
],
|
353
|
+
headerParameters: [Parameters.accept],
|
354
|
+
serializer
|
355
|
+
};
|
356
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
357
|
+
path:
|
358
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
359
|
+
httpMethod: "PATCH",
|
292
360
|
responses: {
|
293
361
|
200: {
|
294
|
-
bodyMapper: Mappers.
|
362
|
+
bodyMapper: Mappers.EnvironmentResource
|
363
|
+
},
|
364
|
+
201: {
|
365
|
+
bodyMapper: Mappers.EnvironmentResource
|
366
|
+
},
|
367
|
+
202: {
|
368
|
+
bodyMapper: Mappers.EnvironmentResource
|
369
|
+
},
|
370
|
+
204: {
|
371
|
+
bodyMapper: Mappers.EnvironmentResource
|
295
372
|
},
|
296
373
|
default: {
|
297
374
|
bodyMapper: Mappers.CloudError
|
298
375
|
}
|
299
376
|
},
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
const listBySubscriptionOperationSpec: msRest.OperationSpec = {
|
304
|
-
httpMethod: "GET",
|
305
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.TimeSeriesInsights/environments",
|
377
|
+
requestBody: Parameters.environmentUpdateParameters,
|
378
|
+
queryParameters: [Parameters.apiVersion],
|
306
379
|
urlParameters: [
|
307
|
-
Parameters
|
308
|
-
|
309
|
-
|
310
|
-
Parameters.
|
311
|
-
],
|
312
|
-
headerParameters: [
|
313
|
-
Parameters.acceptLanguage
|
380
|
+
Parameters.$host,
|
381
|
+
Parameters.subscriptionId,
|
382
|
+
Parameters.resourceGroupName,
|
383
|
+
Parameters.environmentName1
|
314
384
|
],
|
385
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
386
|
+
mediaType: "json",
|
387
|
+
serializer
|
388
|
+
};
|
389
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
390
|
+
path:
|
391
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
392
|
+
httpMethod: "DELETE",
|
315
393
|
responses: {
|
316
|
-
200: {
|
317
|
-
|
318
|
-
},
|
394
|
+
200: {},
|
395
|
+
204: {},
|
319
396
|
default: {
|
320
397
|
bodyMapper: Mappers.CloudError
|
321
398
|
}
|
322
399
|
},
|
323
|
-
|
324
|
-
};
|
325
|
-
|
326
|
-
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
327
|
-
httpMethod: "PUT",
|
328
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
400
|
+
queryParameters: [Parameters.apiVersion],
|
329
401
|
urlParameters: [
|
402
|
+
Parameters.$host,
|
330
403
|
Parameters.subscriptionId,
|
331
404
|
Parameters.resourceGroupName,
|
332
|
-
Parameters.
|
333
|
-
],
|
334
|
-
queryParameters: [
|
335
|
-
Parameters.apiVersion
|
336
|
-
],
|
337
|
-
headerParameters: [
|
338
|
-
Parameters.acceptLanguage
|
405
|
+
Parameters.environmentName1
|
339
406
|
],
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
}
|
346
|
-
|
407
|
+
headerParameters: [Parameters.accept],
|
408
|
+
serializer
|
409
|
+
};
|
410
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
411
|
+
path:
|
412
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments",
|
413
|
+
httpMethod: "GET",
|
347
414
|
responses: {
|
348
415
|
200: {
|
349
|
-
bodyMapper: Mappers.
|
350
|
-
},
|
351
|
-
201: {
|
352
|
-
bodyMapper: Mappers.EnvironmentResource
|
416
|
+
bodyMapper: Mappers.EnvironmentListResponse
|
353
417
|
},
|
354
|
-
404: {},
|
355
418
|
default: {
|
356
419
|
bodyMapper: Mappers.CloudError
|
357
420
|
}
|
358
421
|
},
|
359
|
-
|
360
|
-
};
|
361
|
-
|
362
|
-
const beginUpdateOperationSpec: msRest.OperationSpec = {
|
363
|
-
httpMethod: "PATCH",
|
364
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TimeSeriesInsights/environments/{environmentName}",
|
422
|
+
queryParameters: [Parameters.apiVersion],
|
365
423
|
urlParameters: [
|
424
|
+
Parameters.$host,
|
366
425
|
Parameters.subscriptionId,
|
367
|
-
Parameters.resourceGroupName
|
368
|
-
Parameters.environmentName1
|
369
|
-
],
|
370
|
-
queryParameters: [
|
371
|
-
Parameters.apiVersion
|
372
|
-
],
|
373
|
-
headerParameters: [
|
374
|
-
Parameters.acceptLanguage
|
426
|
+
Parameters.resourceGroupName
|
375
427
|
],
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
}
|
382
|
-
|
428
|
+
headerParameters: [Parameters.accept],
|
429
|
+
serializer
|
430
|
+
};
|
431
|
+
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
432
|
+
path:
|
433
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.TimeSeriesInsights/environments",
|
434
|
+
httpMethod: "GET",
|
383
435
|
responses: {
|
384
436
|
200: {
|
385
|
-
bodyMapper: Mappers.
|
437
|
+
bodyMapper: Mappers.EnvironmentListResponse
|
386
438
|
},
|
387
439
|
default: {
|
388
440
|
bodyMapper: Mappers.CloudError
|
389
441
|
}
|
390
442
|
},
|
443
|
+
queryParameters: [Parameters.apiVersion],
|
444
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
445
|
+
headerParameters: [Parameters.accept],
|
391
446
|
serializer
|
392
447
|
};
|