@azure/arm-managedapplications 1.1.0 → 2.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 +16 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +63 -80
- package/dist/index.js +2896 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/esm/applicationClient.d.ts +50 -0
- package/esm/applicationClient.d.ts.map +1 -0
- package/esm/applicationClient.js +190 -0
- package/esm/applicationClient.js.map +1 -0
- package/esm/applicationClientContext.d.ts +16 -0
- package/esm/applicationClientContext.d.ts.map +1 -0
- package/esm/applicationClientContext.js +49 -0
- package/esm/applicationClientContext.js.map +1 -0
- package/esm/coreClientLro.d.ts +26 -0
- package/esm/coreClientLro.d.ts.map +1 -0
- package/esm/coreClientLro.js +186 -0
- package/esm/coreClientLro.js.map +1 -0
- package/esm/index.d.ts +770 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +13 -0
- package/esm/index.js.map +1 -0
- package/esm/lro/azureAsyncPolling.d.ts +3 -0
- package/esm/lro/azureAsyncPolling.d.ts.map +1 -0
- package/esm/lro/azureAsyncPolling.js +67 -0
- package/esm/lro/azureAsyncPolling.js.map +1 -0
- package/esm/lro/bodyPolling.d.ts +8 -0
- package/esm/lro/bodyPolling.d.ts.map +1 -0
- package/esm/lro/bodyPolling.js +37 -0
- package/esm/lro/bodyPolling.js.map +1 -0
- package/esm/lro/index.d.ts +4 -0
- package/esm/lro/index.d.ts.map +1 -0
- package/esm/lro/index.js +12 -0
- package/esm/lro/index.js.map +1 -0
- package/esm/lro/locationPolling.d.ts +3 -0
- package/esm/lro/locationPolling.d.ts.map +1 -0
- package/esm/lro/locationPolling.js +19 -0
- package/esm/lro/locationPolling.js.map +1 -0
- package/esm/lro/lroEngine.d.ts +14 -0
- package/esm/lro/lroEngine.d.ts.map +1 -0
- package/esm/lro/lroEngine.js +41 -0
- package/esm/lro/lroEngine.js.map +1 -0
- package/esm/lro/models.d.ts +138 -0
- package/esm/lro/models.d.ts.map +1 -0
- package/esm/lro/models.js +14 -0
- package/esm/lro/models.js.map +1 -0
- package/esm/lro/operation.d.ts +36 -0
- package/esm/lro/operation.d.ts.map +1 -0
- package/esm/lro/operation.js +82 -0
- package/esm/lro/operation.js.map +1 -0
- package/esm/lro/passthrough.d.ts +3 -0
- package/esm/lro/passthrough.d.ts.map +1 -0
- package/esm/lro/passthrough.js +15 -0
- package/esm/lro/passthrough.js.map +1 -0
- package/esm/lro/requestUtils.d.ts +16 -0
- package/esm/lro/requestUtils.d.ts.map +1 -0
- package/esm/lro/requestUtils.js +73 -0
- package/esm/lro/requestUtils.js.map +1 -0
- package/esm/lro/stateMachine.d.ts +18 -0
- package/esm/lro/stateMachine.d.ts.map +1 -0
- package/esm/lro/stateMachine.js +84 -0
- package/esm/lro/stateMachine.js.map +1 -0
- package/esm/models/index.d.ts +360 -762
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +17 -2
- package/esm/models/index.js.map +1 -1
- package/esm/models/mappers.d.ts +18 -20
- package/esm/models/mappers.d.ts.map +1 -1
- package/esm/models/mappers.js +296 -318
- package/esm/models/mappers.js.map +1 -1
- package/esm/models/parameters.d.ts +15 -10
- package/esm/models/parameters.d.ts.map +1 -1
- package/esm/models/parameters.js +77 -49
- package/esm/models/parameters.js.map +1 -1
- package/esm/operations/applicationDefinitions.d.ts +128 -0
- package/esm/operations/applicationDefinitions.d.ts.map +1 -0
- package/esm/operations/applicationDefinitions.js +574 -0
- package/esm/operations/applicationDefinitions.js.map +1 -0
- package/esm/operations/applications.d.ts +182 -0
- package/esm/operations/applications.d.ts.map +1 -0
- package/esm/operations/applications.js +802 -0
- package/esm/operations/applications.js.map +1 -0
- package/esm/operations/index.d.ts +2 -2
- package/esm/operations/index.d.ts.map +1 -1
- package/esm/operations/index.js +5 -7
- package/esm/operations/index.js.map +1 -1
- package/esm/operationsInterfaces/applicationDefinitions.d.ts +95 -0
- package/esm/operationsInterfaces/applicationDefinitions.d.ts.map +1 -0
- package/esm/operationsInterfaces/applicationDefinitions.js +9 -0
- package/esm/operationsInterfaces/applicationDefinitions.js.map +1 -0
- package/esm/operationsInterfaces/applications.d.ts +128 -0
- package/esm/operationsInterfaces/applications.d.ts.map +1 -0
- package/esm/operationsInterfaces/applications.js +9 -0
- package/esm/operationsInterfaces/applications.js.map +1 -0
- package/esm/operationsInterfaces/index.d.ts +3 -0
- package/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/esm/operationsInterfaces/index.js +10 -0
- package/esm/operationsInterfaces/index.js.map +1 -0
- package/package.json +55 -16
- package/review/arm-managedapplications.api.md +443 -0
- package/rollup.config.js +181 -30
- package/src/applicationClient.ts +222 -0
- package/src/applicationClientContext.ts +70 -0
- package/src/coreClientLro.ts +323 -0
- package/src/index.ts +13 -0
- package/src/lro/azureAsyncPolling.ts +96 -0
- package/src/lro/bodyPolling.ts +54 -0
- package/src/lro/index.ts +26 -0
- package/src/lro/locationPolling.ts +30 -0
- package/src/lro/lroEngine.ts +61 -0
- package/src/lro/models.ts +173 -0
- package/src/lro/operation.ts +120 -0
- package/src/lro/passthrough.ts +23 -0
- package/src/lro/requestUtils.ts +105 -0
- package/src/lro/stateMachine.ts +138 -0
- package/src/models/index.ts +402 -794
- package/src/models/mappers.ts +290 -311
- package/src/models/parameters.ts +99 -50
- package/src/operations/applicationDefinitions.ts +810 -0
- package/src/operations/applications.ts +1069 -0
- package/src/operations/index.ts +5 -7
- package/src/operationsInterfaces/applicationDefinitions.ts +179 -0
- package/src/operationsInterfaces/applications.ts +225 -0
- package/src/operationsInterfaces/index.ts +10 -0
- package/tsconfig.json +3 -2
- package/dist/arm-managedapplications.js +0 -1865
- package/dist/arm-managedapplications.js.map +0 -1
- package/dist/arm-managedapplications.min.js +0 -1
- package/dist/arm-managedapplications.min.js.map +0 -1
- package/esm/managedApplicationClient.d.ts +0 -58
- package/esm/managedApplicationClient.d.ts.map +0 -1
- package/esm/managedApplicationClient.js +0 -92
- package/esm/managedApplicationClient.js.map +0 -1
- package/esm/managedApplicationClientContext.d.ts +0 -22
- package/esm/managedApplicationClientContext.d.ts.map +0 -1
- package/esm/managedApplicationClientContext.js +0 -61
- package/esm/managedApplicationClientContext.js.map +0 -1
- package/esm/models/applianceDefinitionsMappers.d.ts +0 -2
- package/esm/models/applianceDefinitionsMappers.d.ts.map +0 -1
- package/esm/models/applianceDefinitionsMappers.js +0 -9
- package/esm/models/applianceDefinitionsMappers.js.map +0 -1
- package/esm/models/appliancesMappers.d.ts +0 -2
- package/esm/models/appliancesMappers.d.ts.map +0 -1
- package/esm/models/appliancesMappers.js +0 -9
- package/esm/models/appliancesMappers.js.map +0 -1
- package/esm/operations/applianceDefinitions.d.ts +0 -167
- package/esm/operations/applianceDefinitions.d.ts.map +0 -1
- package/esm/operations/applianceDefinitions.js +0 -358
- package/esm/operations/applianceDefinitions.js.map +0 -1
- package/esm/operations/appliances.d.ts +0 -247
- package/esm/operations/appliances.d.ts.map +0 -1
- package/esm/operations/appliances.js +0 -482
- package/esm/operations/appliances.js.map +0 -1
- package/src/managedApplicationClient.ts +0 -144
- package/src/managedApplicationClientContext.ts +0 -68
- package/src/models/applianceDefinitionsMappers.ts +0 -24
- package/src/models/appliancesMappers.ts +0 -24
- package/src/operations/applianceDefinitions.ts +0 -492
- package/src/operations/appliances.ts +0 -716
package/dist/index.js
ADDED
|
@@ -0,0 +1,2896 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
require('@azure/core-paging');
|
|
8
|
+
var coreLro = require('@azure/core-lro');
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright (c) Microsoft Corporation.
|
|
12
|
+
* Licensed under the MIT License.
|
|
13
|
+
*
|
|
14
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
15
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
16
|
+
*/
|
|
17
|
+
(function (KnownProvisioningState) {
|
|
18
|
+
KnownProvisioningState["Accepted"] = "Accepted";
|
|
19
|
+
KnownProvisioningState["Running"] = "Running";
|
|
20
|
+
KnownProvisioningState["Ready"] = "Ready";
|
|
21
|
+
KnownProvisioningState["Creating"] = "Creating";
|
|
22
|
+
KnownProvisioningState["Created"] = "Created";
|
|
23
|
+
KnownProvisioningState["Deleting"] = "Deleting";
|
|
24
|
+
KnownProvisioningState["Deleted"] = "Deleted";
|
|
25
|
+
KnownProvisioningState["Canceled"] = "Canceled";
|
|
26
|
+
KnownProvisioningState["Failed"] = "Failed";
|
|
27
|
+
KnownProvisioningState["Succeeded"] = "Succeeded";
|
|
28
|
+
KnownProvisioningState["Updating"] = "Updating";
|
|
29
|
+
})(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*
|
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
37
|
+
*/
|
|
38
|
+
const OperationListResult = {
|
|
39
|
+
type: {
|
|
40
|
+
name: "Composite",
|
|
41
|
+
className: "OperationListResult",
|
|
42
|
+
modelProperties: {
|
|
43
|
+
value: {
|
|
44
|
+
serializedName: "value",
|
|
45
|
+
type: {
|
|
46
|
+
name: "Sequence",
|
|
47
|
+
element: {
|
|
48
|
+
type: {
|
|
49
|
+
name: "Composite",
|
|
50
|
+
className: "Operation"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
nextLink: {
|
|
56
|
+
serializedName: "nextLink",
|
|
57
|
+
type: {
|
|
58
|
+
name: "String"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
const Operation = {
|
|
65
|
+
type: {
|
|
66
|
+
name: "Composite",
|
|
67
|
+
className: "Operation",
|
|
68
|
+
modelProperties: {
|
|
69
|
+
name: {
|
|
70
|
+
serializedName: "name",
|
|
71
|
+
type: {
|
|
72
|
+
name: "String"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
display: {
|
|
76
|
+
serializedName: "display",
|
|
77
|
+
type: {
|
|
78
|
+
name: "Composite",
|
|
79
|
+
className: "OperationDisplay"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const OperationDisplay = {
|
|
86
|
+
type: {
|
|
87
|
+
name: "Composite",
|
|
88
|
+
className: "OperationDisplay",
|
|
89
|
+
modelProperties: {
|
|
90
|
+
provider: {
|
|
91
|
+
serializedName: "provider",
|
|
92
|
+
type: {
|
|
93
|
+
name: "String"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
resource: {
|
|
97
|
+
serializedName: "resource",
|
|
98
|
+
type: {
|
|
99
|
+
name: "String"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
operation: {
|
|
103
|
+
serializedName: "operation",
|
|
104
|
+
type: {
|
|
105
|
+
name: "String"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const Resource = {
|
|
112
|
+
type: {
|
|
113
|
+
name: "Composite",
|
|
114
|
+
className: "Resource",
|
|
115
|
+
modelProperties: {
|
|
116
|
+
id: {
|
|
117
|
+
serializedName: "id",
|
|
118
|
+
readOnly: true,
|
|
119
|
+
type: {
|
|
120
|
+
name: "String"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
name: {
|
|
124
|
+
serializedName: "name",
|
|
125
|
+
readOnly: true,
|
|
126
|
+
type: {
|
|
127
|
+
name: "String"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
type: {
|
|
131
|
+
serializedName: "type",
|
|
132
|
+
readOnly: true,
|
|
133
|
+
type: {
|
|
134
|
+
name: "String"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
location: {
|
|
138
|
+
serializedName: "location",
|
|
139
|
+
type: {
|
|
140
|
+
name: "String"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
tags: {
|
|
144
|
+
serializedName: "tags",
|
|
145
|
+
type: {
|
|
146
|
+
name: "Dictionary",
|
|
147
|
+
value: { type: { name: "String" } }
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const Sku = {
|
|
154
|
+
type: {
|
|
155
|
+
name: "Composite",
|
|
156
|
+
className: "Sku",
|
|
157
|
+
modelProperties: {
|
|
158
|
+
name: {
|
|
159
|
+
serializedName: "name",
|
|
160
|
+
required: true,
|
|
161
|
+
type: {
|
|
162
|
+
name: "String"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
tier: {
|
|
166
|
+
serializedName: "tier",
|
|
167
|
+
type: {
|
|
168
|
+
name: "String"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
size: {
|
|
172
|
+
serializedName: "size",
|
|
173
|
+
type: {
|
|
174
|
+
name: "String"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
family: {
|
|
178
|
+
serializedName: "family",
|
|
179
|
+
type: {
|
|
180
|
+
name: "String"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
model: {
|
|
184
|
+
serializedName: "model",
|
|
185
|
+
type: {
|
|
186
|
+
name: "String"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
capacity: {
|
|
190
|
+
serializedName: "capacity",
|
|
191
|
+
type: {
|
|
192
|
+
name: "Number"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
const Identity = {
|
|
199
|
+
type: {
|
|
200
|
+
name: "Composite",
|
|
201
|
+
className: "Identity",
|
|
202
|
+
modelProperties: {
|
|
203
|
+
principalId: {
|
|
204
|
+
serializedName: "principalId",
|
|
205
|
+
readOnly: true,
|
|
206
|
+
type: {
|
|
207
|
+
name: "String"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
tenantId: {
|
|
211
|
+
serializedName: "tenantId",
|
|
212
|
+
readOnly: true,
|
|
213
|
+
type: {
|
|
214
|
+
name: "String"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
type: {
|
|
218
|
+
defaultValue: "SystemAssigned",
|
|
219
|
+
isConstant: true,
|
|
220
|
+
serializedName: "type",
|
|
221
|
+
type: {
|
|
222
|
+
name: "String"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const Plan = {
|
|
229
|
+
type: {
|
|
230
|
+
name: "Composite",
|
|
231
|
+
className: "Plan",
|
|
232
|
+
modelProperties: {
|
|
233
|
+
name: {
|
|
234
|
+
serializedName: "name",
|
|
235
|
+
required: true,
|
|
236
|
+
type: {
|
|
237
|
+
name: "String"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
publisher: {
|
|
241
|
+
serializedName: "publisher",
|
|
242
|
+
required: true,
|
|
243
|
+
type: {
|
|
244
|
+
name: "String"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
product: {
|
|
248
|
+
serializedName: "product",
|
|
249
|
+
required: true,
|
|
250
|
+
type: {
|
|
251
|
+
name: "String"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
promotionCode: {
|
|
255
|
+
serializedName: "promotionCode",
|
|
256
|
+
type: {
|
|
257
|
+
name: "String"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
version: {
|
|
261
|
+
serializedName: "version",
|
|
262
|
+
required: true,
|
|
263
|
+
type: {
|
|
264
|
+
name: "String"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
const ErrorResponse = {
|
|
271
|
+
type: {
|
|
272
|
+
name: "Composite",
|
|
273
|
+
className: "ErrorResponse",
|
|
274
|
+
modelProperties: {
|
|
275
|
+
httpStatus: {
|
|
276
|
+
serializedName: "httpStatus",
|
|
277
|
+
type: {
|
|
278
|
+
name: "String"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
errorCode: {
|
|
282
|
+
serializedName: "errorCode",
|
|
283
|
+
type: {
|
|
284
|
+
name: "String"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
errorMessage: {
|
|
288
|
+
serializedName: "errorMessage",
|
|
289
|
+
type: {
|
|
290
|
+
name: "String"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
const PlanPatchable = {
|
|
297
|
+
type: {
|
|
298
|
+
name: "Composite",
|
|
299
|
+
className: "PlanPatchable",
|
|
300
|
+
modelProperties: {
|
|
301
|
+
name: {
|
|
302
|
+
serializedName: "name",
|
|
303
|
+
type: {
|
|
304
|
+
name: "String"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
publisher: {
|
|
308
|
+
serializedName: "publisher",
|
|
309
|
+
type: {
|
|
310
|
+
name: "String"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
product: {
|
|
314
|
+
serializedName: "product",
|
|
315
|
+
type: {
|
|
316
|
+
name: "String"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
promotionCode: {
|
|
320
|
+
serializedName: "promotionCode",
|
|
321
|
+
type: {
|
|
322
|
+
name: "String"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
version: {
|
|
326
|
+
serializedName: "version",
|
|
327
|
+
type: {
|
|
328
|
+
name: "String"
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
const ApplicationProviderAuthorization = {
|
|
335
|
+
type: {
|
|
336
|
+
name: "Composite",
|
|
337
|
+
className: "ApplicationProviderAuthorization",
|
|
338
|
+
modelProperties: {
|
|
339
|
+
principalId: {
|
|
340
|
+
serializedName: "principalId",
|
|
341
|
+
required: true,
|
|
342
|
+
type: {
|
|
343
|
+
name: "String"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
roleDefinitionId: {
|
|
347
|
+
serializedName: "roleDefinitionId",
|
|
348
|
+
required: true,
|
|
349
|
+
type: {
|
|
350
|
+
name: "String"
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
const ApplicationArtifact = {
|
|
357
|
+
type: {
|
|
358
|
+
name: "Composite",
|
|
359
|
+
className: "ApplicationArtifact",
|
|
360
|
+
modelProperties: {
|
|
361
|
+
name: {
|
|
362
|
+
serializedName: "name",
|
|
363
|
+
type: {
|
|
364
|
+
name: "String"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
uri: {
|
|
368
|
+
serializedName: "uri",
|
|
369
|
+
type: {
|
|
370
|
+
name: "String"
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
type: {
|
|
374
|
+
serializedName: "type",
|
|
375
|
+
type: {
|
|
376
|
+
name: "Enum",
|
|
377
|
+
allowedValues: ["Template", "Custom"]
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
const ApplicationDefinitionListResult = {
|
|
384
|
+
type: {
|
|
385
|
+
name: "Composite",
|
|
386
|
+
className: "ApplicationDefinitionListResult",
|
|
387
|
+
modelProperties: {
|
|
388
|
+
value: {
|
|
389
|
+
serializedName: "value",
|
|
390
|
+
type: {
|
|
391
|
+
name: "Sequence",
|
|
392
|
+
element: {
|
|
393
|
+
type: {
|
|
394
|
+
name: "Composite",
|
|
395
|
+
className: "ApplicationDefinition"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
nextLink: {
|
|
401
|
+
serializedName: "nextLink",
|
|
402
|
+
type: {
|
|
403
|
+
name: "String"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
const ApplicationListResult = {
|
|
410
|
+
type: {
|
|
411
|
+
name: "Composite",
|
|
412
|
+
className: "ApplicationListResult",
|
|
413
|
+
modelProperties: {
|
|
414
|
+
value: {
|
|
415
|
+
serializedName: "value",
|
|
416
|
+
type: {
|
|
417
|
+
name: "Sequence",
|
|
418
|
+
element: {
|
|
419
|
+
type: {
|
|
420
|
+
name: "Composite",
|
|
421
|
+
className: "Application"
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
nextLink: {
|
|
427
|
+
serializedName: "nextLink",
|
|
428
|
+
type: {
|
|
429
|
+
name: "String"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
const GenericResource = {
|
|
436
|
+
type: {
|
|
437
|
+
name: "Composite",
|
|
438
|
+
className: "GenericResource",
|
|
439
|
+
modelProperties: Object.assign(Object.assign({}, Resource.type.modelProperties), { managedBy: {
|
|
440
|
+
serializedName: "managedBy",
|
|
441
|
+
type: {
|
|
442
|
+
name: "String"
|
|
443
|
+
}
|
|
444
|
+
}, sku: {
|
|
445
|
+
serializedName: "sku",
|
|
446
|
+
type: {
|
|
447
|
+
name: "Composite",
|
|
448
|
+
className: "Sku"
|
|
449
|
+
}
|
|
450
|
+
}, identity: {
|
|
451
|
+
serializedName: "identity",
|
|
452
|
+
type: {
|
|
453
|
+
name: "Composite",
|
|
454
|
+
className: "Identity"
|
|
455
|
+
}
|
|
456
|
+
} })
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
const Application = {
|
|
460
|
+
type: {
|
|
461
|
+
name: "Composite",
|
|
462
|
+
className: "Application",
|
|
463
|
+
modelProperties: Object.assign(Object.assign({}, GenericResource.type.modelProperties), { plan: {
|
|
464
|
+
serializedName: "plan",
|
|
465
|
+
type: {
|
|
466
|
+
name: "Composite",
|
|
467
|
+
className: "Plan"
|
|
468
|
+
}
|
|
469
|
+
}, kind: {
|
|
470
|
+
constraints: {
|
|
471
|
+
Pattern: new RegExp("^[-\\w\\._,\\(\\)]+$")
|
|
472
|
+
},
|
|
473
|
+
serializedName: "kind",
|
|
474
|
+
required: true,
|
|
475
|
+
type: {
|
|
476
|
+
name: "String"
|
|
477
|
+
}
|
|
478
|
+
}, managedResourceGroupId: {
|
|
479
|
+
serializedName: "properties.managedResourceGroupId",
|
|
480
|
+
required: true,
|
|
481
|
+
type: {
|
|
482
|
+
name: "String"
|
|
483
|
+
}
|
|
484
|
+
}, applicationDefinitionId: {
|
|
485
|
+
serializedName: "properties.applicationDefinitionId",
|
|
486
|
+
type: {
|
|
487
|
+
name: "String"
|
|
488
|
+
}
|
|
489
|
+
}, parameters: {
|
|
490
|
+
serializedName: "properties.parameters",
|
|
491
|
+
type: {
|
|
492
|
+
name: "Dictionary",
|
|
493
|
+
value: { type: { name: "any" } }
|
|
494
|
+
}
|
|
495
|
+
}, outputs: {
|
|
496
|
+
serializedName: "properties.outputs",
|
|
497
|
+
readOnly: true,
|
|
498
|
+
type: {
|
|
499
|
+
name: "Dictionary",
|
|
500
|
+
value: { type: { name: "any" } }
|
|
501
|
+
}
|
|
502
|
+
}, provisioningState: {
|
|
503
|
+
serializedName: "properties.provisioningState",
|
|
504
|
+
readOnly: true,
|
|
505
|
+
type: {
|
|
506
|
+
name: "String"
|
|
507
|
+
}
|
|
508
|
+
} })
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
const ApplicationPatchable = {
|
|
512
|
+
type: {
|
|
513
|
+
name: "Composite",
|
|
514
|
+
className: "ApplicationPatchable",
|
|
515
|
+
modelProperties: Object.assign(Object.assign({}, GenericResource.type.modelProperties), { plan: {
|
|
516
|
+
serializedName: "plan",
|
|
517
|
+
type: {
|
|
518
|
+
name: "Composite",
|
|
519
|
+
className: "PlanPatchable"
|
|
520
|
+
}
|
|
521
|
+
}, kind: {
|
|
522
|
+
constraints: {
|
|
523
|
+
Pattern: new RegExp("^[-\\w\\._,\\(\\)]+$")
|
|
524
|
+
},
|
|
525
|
+
serializedName: "kind",
|
|
526
|
+
type: {
|
|
527
|
+
name: "String"
|
|
528
|
+
}
|
|
529
|
+
}, managedResourceGroupId: {
|
|
530
|
+
serializedName: "properties.managedResourceGroupId",
|
|
531
|
+
type: {
|
|
532
|
+
name: "String"
|
|
533
|
+
}
|
|
534
|
+
}, applicationDefinitionId: {
|
|
535
|
+
serializedName: "properties.applicationDefinitionId",
|
|
536
|
+
type: {
|
|
537
|
+
name: "String"
|
|
538
|
+
}
|
|
539
|
+
}, parameters: {
|
|
540
|
+
serializedName: "properties.parameters",
|
|
541
|
+
type: {
|
|
542
|
+
name: "Dictionary",
|
|
543
|
+
value: { type: { name: "any" } }
|
|
544
|
+
}
|
|
545
|
+
}, outputs: {
|
|
546
|
+
serializedName: "properties.outputs",
|
|
547
|
+
readOnly: true,
|
|
548
|
+
type: {
|
|
549
|
+
name: "Dictionary",
|
|
550
|
+
value: { type: { name: "any" } }
|
|
551
|
+
}
|
|
552
|
+
}, provisioningState: {
|
|
553
|
+
serializedName: "properties.provisioningState",
|
|
554
|
+
readOnly: true,
|
|
555
|
+
type: {
|
|
556
|
+
name: "String"
|
|
557
|
+
}
|
|
558
|
+
} })
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
const ApplicationDefinition = {
|
|
562
|
+
type: {
|
|
563
|
+
name: "Composite",
|
|
564
|
+
className: "ApplicationDefinition",
|
|
565
|
+
modelProperties: Object.assign(Object.assign({}, GenericResource.type.modelProperties), { lockLevel: {
|
|
566
|
+
serializedName: "properties.lockLevel",
|
|
567
|
+
required: true,
|
|
568
|
+
type: {
|
|
569
|
+
name: "Enum",
|
|
570
|
+
allowedValues: ["CanNotDelete", "ReadOnly", "None"]
|
|
571
|
+
}
|
|
572
|
+
}, displayName: {
|
|
573
|
+
serializedName: "properties.displayName",
|
|
574
|
+
type: {
|
|
575
|
+
name: "String"
|
|
576
|
+
}
|
|
577
|
+
}, isEnabled: {
|
|
578
|
+
serializedName: "properties.isEnabled",
|
|
579
|
+
type: {
|
|
580
|
+
name: "String"
|
|
581
|
+
}
|
|
582
|
+
}, authorizations: {
|
|
583
|
+
serializedName: "properties.authorizations",
|
|
584
|
+
required: true,
|
|
585
|
+
type: {
|
|
586
|
+
name: "Sequence",
|
|
587
|
+
element: {
|
|
588
|
+
type: {
|
|
589
|
+
name: "Composite",
|
|
590
|
+
className: "ApplicationProviderAuthorization"
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}, artifacts: {
|
|
595
|
+
serializedName: "properties.artifacts",
|
|
596
|
+
type: {
|
|
597
|
+
name: "Sequence",
|
|
598
|
+
element: {
|
|
599
|
+
type: {
|
|
600
|
+
name: "Composite",
|
|
601
|
+
className: "ApplicationArtifact"
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}, description: {
|
|
606
|
+
serializedName: "properties.description",
|
|
607
|
+
type: {
|
|
608
|
+
name: "String"
|
|
609
|
+
}
|
|
610
|
+
}, packageFileUri: {
|
|
611
|
+
serializedName: "properties.packageFileUri",
|
|
612
|
+
type: {
|
|
613
|
+
name: "String"
|
|
614
|
+
}
|
|
615
|
+
}, mainTemplate: {
|
|
616
|
+
serializedName: "properties.mainTemplate",
|
|
617
|
+
type: {
|
|
618
|
+
name: "Dictionary",
|
|
619
|
+
value: { type: { name: "any" } }
|
|
620
|
+
}
|
|
621
|
+
}, createUiDefinition: {
|
|
622
|
+
serializedName: "properties.createUiDefinition",
|
|
623
|
+
type: {
|
|
624
|
+
name: "Dictionary",
|
|
625
|
+
value: { type: { name: "any" } }
|
|
626
|
+
}
|
|
627
|
+
} })
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
632
|
+
__proto__: null,
|
|
633
|
+
OperationListResult: OperationListResult,
|
|
634
|
+
Operation: Operation,
|
|
635
|
+
OperationDisplay: OperationDisplay,
|
|
636
|
+
Resource: Resource,
|
|
637
|
+
Sku: Sku,
|
|
638
|
+
Identity: Identity,
|
|
639
|
+
Plan: Plan,
|
|
640
|
+
ErrorResponse: ErrorResponse,
|
|
641
|
+
PlanPatchable: PlanPatchable,
|
|
642
|
+
ApplicationProviderAuthorization: ApplicationProviderAuthorization,
|
|
643
|
+
ApplicationArtifact: ApplicationArtifact,
|
|
644
|
+
ApplicationDefinitionListResult: ApplicationDefinitionListResult,
|
|
645
|
+
ApplicationListResult: ApplicationListResult,
|
|
646
|
+
GenericResource: GenericResource,
|
|
647
|
+
Application: Application,
|
|
648
|
+
ApplicationPatchable: ApplicationPatchable,
|
|
649
|
+
ApplicationDefinition: ApplicationDefinition
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
/*
|
|
653
|
+
* Copyright (c) Microsoft Corporation.
|
|
654
|
+
* Licensed under the MIT License.
|
|
655
|
+
*
|
|
656
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
657
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
658
|
+
*/
|
|
659
|
+
const accept = {
|
|
660
|
+
parameterPath: "accept",
|
|
661
|
+
mapper: {
|
|
662
|
+
defaultValue: "application/json",
|
|
663
|
+
isConstant: true,
|
|
664
|
+
serializedName: "Accept",
|
|
665
|
+
type: {
|
|
666
|
+
name: "String"
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
const $host = {
|
|
671
|
+
parameterPath: "$host",
|
|
672
|
+
mapper: {
|
|
673
|
+
serializedName: "$host",
|
|
674
|
+
required: true,
|
|
675
|
+
type: {
|
|
676
|
+
name: "String"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
skipEncoding: true
|
|
680
|
+
};
|
|
681
|
+
const apiVersion = {
|
|
682
|
+
parameterPath: "apiVersion",
|
|
683
|
+
mapper: {
|
|
684
|
+
defaultValue: "2018-06-01",
|
|
685
|
+
isConstant: true,
|
|
686
|
+
serializedName: "api-version",
|
|
687
|
+
type: {
|
|
688
|
+
name: "String"
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
const nextLink = {
|
|
693
|
+
parameterPath: "nextLink",
|
|
694
|
+
mapper: {
|
|
695
|
+
serializedName: "nextLink",
|
|
696
|
+
required: true,
|
|
697
|
+
type: {
|
|
698
|
+
name: "String"
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
skipEncoding: true
|
|
702
|
+
};
|
|
703
|
+
const resourceGroupName = {
|
|
704
|
+
parameterPath: "resourceGroupName",
|
|
705
|
+
mapper: {
|
|
706
|
+
constraints: {
|
|
707
|
+
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
|
|
708
|
+
MaxLength: 90,
|
|
709
|
+
MinLength: 1
|
|
710
|
+
},
|
|
711
|
+
serializedName: "resourceGroupName",
|
|
712
|
+
required: true,
|
|
713
|
+
type: {
|
|
714
|
+
name: "String"
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
const applicationName = {
|
|
719
|
+
parameterPath: "applicationName",
|
|
720
|
+
mapper: {
|
|
721
|
+
constraints: {
|
|
722
|
+
MaxLength: 64,
|
|
723
|
+
MinLength: 3
|
|
724
|
+
},
|
|
725
|
+
serializedName: "applicationName",
|
|
726
|
+
required: true,
|
|
727
|
+
type: {
|
|
728
|
+
name: "String"
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
const subscriptionId = {
|
|
733
|
+
parameterPath: "subscriptionId",
|
|
734
|
+
mapper: {
|
|
735
|
+
serializedName: "subscriptionId",
|
|
736
|
+
required: true,
|
|
737
|
+
type: {
|
|
738
|
+
name: "String"
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
};
|
|
742
|
+
const contentType = {
|
|
743
|
+
parameterPath: ["options", "contentType"],
|
|
744
|
+
mapper: {
|
|
745
|
+
defaultValue: "application/json",
|
|
746
|
+
isConstant: true,
|
|
747
|
+
serializedName: "Content-Type",
|
|
748
|
+
type: {
|
|
749
|
+
name: "String"
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
const parameters = {
|
|
754
|
+
parameterPath: "parameters",
|
|
755
|
+
mapper: Application
|
|
756
|
+
};
|
|
757
|
+
const parameters1 = {
|
|
758
|
+
parameterPath: ["options", "parameters"],
|
|
759
|
+
mapper: ApplicationPatchable
|
|
760
|
+
};
|
|
761
|
+
const applicationId = {
|
|
762
|
+
parameterPath: "applicationId",
|
|
763
|
+
mapper: {
|
|
764
|
+
serializedName: "applicationId",
|
|
765
|
+
required: true,
|
|
766
|
+
type: {
|
|
767
|
+
name: "String"
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
skipEncoding: true
|
|
771
|
+
};
|
|
772
|
+
const parameters2 = {
|
|
773
|
+
parameterPath: ["options", "parameters"],
|
|
774
|
+
mapper: Application
|
|
775
|
+
};
|
|
776
|
+
const applicationDefinitionName = {
|
|
777
|
+
parameterPath: "applicationDefinitionName",
|
|
778
|
+
mapper: {
|
|
779
|
+
constraints: {
|
|
780
|
+
MaxLength: 64,
|
|
781
|
+
MinLength: 3
|
|
782
|
+
},
|
|
783
|
+
serializedName: "applicationDefinitionName",
|
|
784
|
+
required: true,
|
|
785
|
+
type: {
|
|
786
|
+
name: "String"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
const parameters3 = {
|
|
791
|
+
parameterPath: "parameters",
|
|
792
|
+
mapper: ApplicationDefinition
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
/*
|
|
796
|
+
* Copyright (c) Microsoft Corporation.
|
|
797
|
+
* Licensed under the MIT License.
|
|
798
|
+
*
|
|
799
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
800
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
801
|
+
*/
|
|
802
|
+
/**
|
|
803
|
+
* Detects where the continuation token is and returns it. Notice that azure-asyncoperation
|
|
804
|
+
* must be checked first before the other location headers because there are scenarios
|
|
805
|
+
* where both azure-asyncoperation and location could be present in the same response but
|
|
806
|
+
* azure-asyncoperation should be the one to use for polling.
|
|
807
|
+
*/
|
|
808
|
+
function getPollingUrl(rawResponse, defaultPath) {
|
|
809
|
+
var _a, _b, _c;
|
|
810
|
+
return ((_c = (_b = (_a = getAzureAsyncOperation(rawResponse)) !== null && _a !== void 0 ? _a : getLocation(rawResponse)) !== null && _b !== void 0 ? _b : getOperationLocation(rawResponse)) !== null && _c !== void 0 ? _c : defaultPath);
|
|
811
|
+
}
|
|
812
|
+
function getLocation(rawResponse) {
|
|
813
|
+
return rawResponse.headers["location"];
|
|
814
|
+
}
|
|
815
|
+
function getOperationLocation(rawResponse) {
|
|
816
|
+
return rawResponse.headers["operation-location"];
|
|
817
|
+
}
|
|
818
|
+
function getAzureAsyncOperation(rawResponse) {
|
|
819
|
+
return rawResponse.headers["azure-asyncoperation"];
|
|
820
|
+
}
|
|
821
|
+
function inferLroMode(requestPath, requestMethod, rawResponse) {
|
|
822
|
+
if (getAzureAsyncOperation(rawResponse) !== undefined) {
|
|
823
|
+
return {
|
|
824
|
+
mode: "AzureAsync",
|
|
825
|
+
resourceLocation: requestMethod === "PUT"
|
|
826
|
+
? requestPath
|
|
827
|
+
: requestMethod === "POST"
|
|
828
|
+
? getLocation(rawResponse)
|
|
829
|
+
: undefined
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
else if (getLocation(rawResponse) !== undefined ||
|
|
833
|
+
getOperationLocation(rawResponse) !== undefined) {
|
|
834
|
+
return {
|
|
835
|
+
mode: "Location"
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
else if (["PUT", "PATCH"].includes(requestMethod)) {
|
|
839
|
+
return {
|
|
840
|
+
mode: "Body"
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
return {};
|
|
844
|
+
}
|
|
845
|
+
class RestError extends Error {
|
|
846
|
+
constructor(message, statusCode) {
|
|
847
|
+
super(message);
|
|
848
|
+
this.name = "RestError";
|
|
849
|
+
this.statusCode = statusCode;
|
|
850
|
+
Object.setPrototypeOf(this, RestError.prototype);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
function isUnexpectedInitialResponse(rawResponse) {
|
|
854
|
+
const code = rawResponse.statusCode;
|
|
855
|
+
if (![203, 204, 202, 201, 200, 500].includes(code)) {
|
|
856
|
+
throw new RestError(`Received unexpected HTTP status code ${code} in the initial response. This may indicate a server issue.`, code);
|
|
857
|
+
}
|
|
858
|
+
return false;
|
|
859
|
+
}
|
|
860
|
+
function isUnexpectedPollingResponse(rawResponse) {
|
|
861
|
+
const code = rawResponse.statusCode;
|
|
862
|
+
if (![202, 201, 200, 500].includes(code)) {
|
|
863
|
+
throw new RestError(`Received unexpected HTTP status code ${code} while polling. This may indicate a server issue.`, code);
|
|
864
|
+
}
|
|
865
|
+
return false;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/*
|
|
869
|
+
* Copyright (c) Microsoft Corporation.
|
|
870
|
+
* Licensed under the MIT License.
|
|
871
|
+
*
|
|
872
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
873
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
874
|
+
*/
|
|
875
|
+
const successStates = ["succeeded"];
|
|
876
|
+
const failureStates = ["failed", "canceled", "cancelled"];
|
|
877
|
+
|
|
878
|
+
/*
|
|
879
|
+
* Copyright (c) Microsoft Corporation.
|
|
880
|
+
* Licensed under the MIT License.
|
|
881
|
+
*
|
|
882
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
883
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
884
|
+
*/
|
|
885
|
+
function getResponseStatus(rawResponse) {
|
|
886
|
+
var _a, _b;
|
|
887
|
+
const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
|
888
|
+
return (_b = status === null || status === void 0 ? void 0 : status.toLowerCase()) !== null && _b !== void 0 ? _b : "succeeded";
|
|
889
|
+
}
|
|
890
|
+
function isAzureAsyncPollingDone(rawResponse) {
|
|
891
|
+
const state = getResponseStatus(rawResponse);
|
|
892
|
+
if (isUnexpectedPollingResponse(rawResponse) ||
|
|
893
|
+
failureStates.includes(state)) {
|
|
894
|
+
throw new Error(`Operation status: ${state}`);
|
|
895
|
+
}
|
|
896
|
+
return successStates.includes(state);
|
|
897
|
+
}
|
|
898
|
+
function sendFinalRequest(lro, lroResourceLocationConfig, resourceLocation) {
|
|
899
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
900
|
+
switch (lroResourceLocationConfig) {
|
|
901
|
+
case "original-uri":
|
|
902
|
+
return lro.retrieveAzureAsyncResource();
|
|
903
|
+
case "azure-async-operation":
|
|
904
|
+
return Promise.resolve(undefined);
|
|
905
|
+
case "location":
|
|
906
|
+
default:
|
|
907
|
+
return lro.retrieveAzureAsyncResource(resourceLocation);
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
|
|
912
|
+
return (rawResponse, flatResponse) => {
|
|
913
|
+
if (isAzureAsyncPollingDone(rawResponse)) {
|
|
914
|
+
if (resourceLocation === undefined) {
|
|
915
|
+
return { rawResponse, flatResponse, done: true };
|
|
916
|
+
}
|
|
917
|
+
else {
|
|
918
|
+
return {
|
|
919
|
+
rawResponse,
|
|
920
|
+
flatResponse,
|
|
921
|
+
done: false,
|
|
922
|
+
next: () => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
923
|
+
const finalResponse = yield sendFinalRequest(lro, lroResourceLocationConfig, resourceLocation);
|
|
924
|
+
return Object.assign(Object.assign({}, (finalResponse !== null && finalResponse !== void 0 ? finalResponse : {
|
|
925
|
+
rawResponse,
|
|
926
|
+
flatResponse
|
|
927
|
+
})), { done: true });
|
|
928
|
+
})
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
return {
|
|
933
|
+
rawResponse,
|
|
934
|
+
flatResponse,
|
|
935
|
+
done: false
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/*
|
|
941
|
+
* Copyright (c) Microsoft Corporation.
|
|
942
|
+
* Licensed under the MIT License.
|
|
943
|
+
*
|
|
944
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
945
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
946
|
+
*/
|
|
947
|
+
function getProvisioningState(rawResponse) {
|
|
948
|
+
var _a, _b, _c;
|
|
949
|
+
const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
|
|
950
|
+
const state = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;
|
|
951
|
+
return (_c = state === null || state === void 0 ? void 0 : state.toLowerCase()) !== null && _c !== void 0 ? _c : "succeeded";
|
|
952
|
+
}
|
|
953
|
+
function isBodyPollingDone(rawResponse) {
|
|
954
|
+
const state = getProvisioningState(rawResponse);
|
|
955
|
+
if (isUnexpectedPollingResponse(rawResponse) ||
|
|
956
|
+
failureStates.includes(state)) {
|
|
957
|
+
throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
|
|
958
|
+
}
|
|
959
|
+
return successStates.includes(state);
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Creates a polling strategy based on BodyPolling which uses the provisioning state
|
|
963
|
+
* from the result to determine the current operation state
|
|
964
|
+
*/
|
|
965
|
+
function processBodyPollingOperationResult(rawResponse, flatResponse) {
|
|
966
|
+
return {
|
|
967
|
+
rawResponse,
|
|
968
|
+
flatResponse,
|
|
969
|
+
done: isBodyPollingDone(rawResponse)
|
|
970
|
+
};
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/*
|
|
974
|
+
* Copyright (c) Microsoft Corporation.
|
|
975
|
+
* Licensed under the MIT License.
|
|
976
|
+
*
|
|
977
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
978
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
979
|
+
*/
|
|
980
|
+
function isLocationPollingDone(rawResponse) {
|
|
981
|
+
return (!isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202);
|
|
982
|
+
}
|
|
983
|
+
function processLocationPollingOperationResult(rawResponse, flatResponse) {
|
|
984
|
+
return {
|
|
985
|
+
rawResponse,
|
|
986
|
+
flatResponse,
|
|
987
|
+
done: isLocationPollingDone(rawResponse)
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/*
|
|
992
|
+
* Copyright (c) Microsoft Corporation.
|
|
993
|
+
* Licensed under the MIT License.
|
|
994
|
+
*
|
|
995
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
996
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
997
|
+
*/
|
|
998
|
+
function processPassthroughOperationResult(rawResponse, flatResponse) {
|
|
999
|
+
return {
|
|
1000
|
+
rawResponse,
|
|
1001
|
+
flatResponse,
|
|
1002
|
+
done: true
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
/*
|
|
1007
|
+
* Copyright (c) Microsoft Corporation.
|
|
1008
|
+
* Licensed under the MIT License.
|
|
1009
|
+
*
|
|
1010
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1011
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1012
|
+
*/
|
|
1013
|
+
/**
|
|
1014
|
+
* creates a stepping function that maps an LRO state to another.
|
|
1015
|
+
*/
|
|
1016
|
+
function createGetLroStatusFromResponse(lroPrimitives, config, lroResourceLocationConfig) {
|
|
1017
|
+
switch (config.mode) {
|
|
1018
|
+
case "AzureAsync": {
|
|
1019
|
+
return processAzureAsyncOperationResult(lroPrimitives, config.resourceLocation, lroResourceLocationConfig);
|
|
1020
|
+
}
|
|
1021
|
+
case "Location": {
|
|
1022
|
+
return processLocationPollingOperationResult;
|
|
1023
|
+
}
|
|
1024
|
+
case "Body": {
|
|
1025
|
+
return processBodyPollingOperationResult;
|
|
1026
|
+
}
|
|
1027
|
+
default: {
|
|
1028
|
+
return processPassthroughOperationResult;
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Creates a polling operation that returns a LRO state.
|
|
1034
|
+
*/
|
|
1035
|
+
function createPollForLROStatus(lroPrimitives, config) {
|
|
1036
|
+
return (path, pollerConfig) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1037
|
+
const response = yield lroPrimitives.sendPollRequest(config, path);
|
|
1038
|
+
const retryAfter = response.rawResponse.headers["retry-after"];
|
|
1039
|
+
if (retryAfter !== undefined) {
|
|
1040
|
+
const retryAfterInMs = parseInt(retryAfter);
|
|
1041
|
+
pollerConfig.intervalInMs = isNaN(retryAfterInMs)
|
|
1042
|
+
? calculatePollingIntervalFromDate(new Date(retryAfter), pollerConfig.intervalInMs)
|
|
1043
|
+
: retryAfterInMs;
|
|
1044
|
+
}
|
|
1045
|
+
return response;
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
function calculatePollingIntervalFromDate(retryAfterDate, defaultIntervalInMs) {
|
|
1049
|
+
const timeNow = Math.floor(new Date().getTime());
|
|
1050
|
+
const retryAfterTime = retryAfterDate.getTime();
|
|
1051
|
+
if (timeNow < retryAfterTime) {
|
|
1052
|
+
return retryAfterTime - timeNow;
|
|
1053
|
+
}
|
|
1054
|
+
return defaultIntervalInMs;
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Creates a callback to be used to initialize the polling operation state.
|
|
1058
|
+
* @param state - of the polling operation
|
|
1059
|
+
* @param operationSpec - of the LRO
|
|
1060
|
+
* @param callback - callback to be called when the operation is done
|
|
1061
|
+
* @returns callback that initializes the state of the polling operation
|
|
1062
|
+
*/
|
|
1063
|
+
function createInitializeState(state, requestPath, requestMethod) {
|
|
1064
|
+
return (rawResponse, flatResponse) => {
|
|
1065
|
+
if (isUnexpectedInitialResponse(rawResponse))
|
|
1066
|
+
;
|
|
1067
|
+
state.initialRawResponse = rawResponse;
|
|
1068
|
+
state.isStarted = true;
|
|
1069
|
+
state.pollingURL = getPollingUrl(state.initialRawResponse, requestPath);
|
|
1070
|
+
state.config = inferLroMode(requestPath, requestMethod, state.initialRawResponse);
|
|
1071
|
+
/** short circuit polling if body polling is done in the initial request */
|
|
1072
|
+
if (state.config.mode === undefined ||
|
|
1073
|
+
(state.config.mode === "Body" &&
|
|
1074
|
+
isBodyPollingDone(state.initialRawResponse))) {
|
|
1075
|
+
state.result = flatResponse;
|
|
1076
|
+
state.isCompleted = true;
|
|
1077
|
+
}
|
|
1078
|
+
return Boolean(state.isCompleted);
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/*
|
|
1083
|
+
* Copyright (c) Microsoft Corporation.
|
|
1084
|
+
* Licensed under the MIT License.
|
|
1085
|
+
*
|
|
1086
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1087
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1088
|
+
*/
|
|
1089
|
+
class GenericPollOperation {
|
|
1090
|
+
constructor(state, lro) {
|
|
1091
|
+
this.state = state;
|
|
1092
|
+
this.lro = lro;
|
|
1093
|
+
}
|
|
1094
|
+
setPollerConfig(pollerConfig) {
|
|
1095
|
+
this.pollerConfig = pollerConfig;
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* General update function for LROPoller, the general process is as follows
|
|
1099
|
+
* 1. Check initial operation result to determine the strategy to use
|
|
1100
|
+
* - Strategies: Location, Azure-AsyncOperation, Original Uri
|
|
1101
|
+
* 2. Check if the operation result has a terminal state
|
|
1102
|
+
* - Terminal state will be determined by each strategy
|
|
1103
|
+
* 2.1 If it is terminal state Check if a final GET request is required, if so
|
|
1104
|
+
* send final GET request and return result from operation. If no final GET
|
|
1105
|
+
* is required, just return the result from operation.
|
|
1106
|
+
* - Determining what to call for final request is responsibility of each strategy
|
|
1107
|
+
* 2.2 If it is not terminal state, call the polling operation and go to step 1
|
|
1108
|
+
* - Determining what to call for polling is responsibility of each strategy
|
|
1109
|
+
* - Strategies will always use the latest URI for polling if provided otherwise
|
|
1110
|
+
* the last known one
|
|
1111
|
+
*/
|
|
1112
|
+
update(options) {
|
|
1113
|
+
var _a, _b;
|
|
1114
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1115
|
+
const state = this.state;
|
|
1116
|
+
if (!state.isStarted) {
|
|
1117
|
+
const initializeState = createInitializeState(state, this.lro.requestPath, this.lro.requestMethod);
|
|
1118
|
+
yield this.lro.sendInitialRequest(initializeState);
|
|
1119
|
+
}
|
|
1120
|
+
if (!state.isCompleted) {
|
|
1121
|
+
if (this.getLROStatusFromResponse === undefined) {
|
|
1122
|
+
if (state.config === undefined) {
|
|
1123
|
+
throw new Error("Bad state: LRO mode is undefined. Please check if the serialized state is well-formed.");
|
|
1124
|
+
}
|
|
1125
|
+
this.getLROStatusFromResponse = createPollForLROStatus(this.lro, state.config);
|
|
1126
|
+
}
|
|
1127
|
+
if (state.pollingURL === undefined) {
|
|
1128
|
+
throw new Error("Bad state: polling URL is undefined. Please check if the serialized state is well-formed.");
|
|
1129
|
+
}
|
|
1130
|
+
const currentState = yield this.getLROStatusFromResponse(state.pollingURL, this.pollerConfig);
|
|
1131
|
+
if (currentState.done) {
|
|
1132
|
+
state.result = currentState.flatResponse;
|
|
1133
|
+
state.isCompleted = true;
|
|
1134
|
+
}
|
|
1135
|
+
else {
|
|
1136
|
+
this.getLROStatusFromResponse =
|
|
1137
|
+
(_a = currentState.next) !== null && _a !== void 0 ? _a : this.getLROStatusFromResponse;
|
|
1138
|
+
state.pollingURL = getPollingUrl(currentState.rawResponse, state.pollingURL);
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
(_b = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _b === void 0 ? void 0 : _b.call(options, state);
|
|
1142
|
+
return this;
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
cancel() {
|
|
1146
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1147
|
+
this.state.isCancelled = true;
|
|
1148
|
+
return this;
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Serializes the Poller operation.
|
|
1153
|
+
*/
|
|
1154
|
+
toString() {
|
|
1155
|
+
return JSON.stringify({
|
|
1156
|
+
state: this.state
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/*
|
|
1162
|
+
* Copyright (c) Microsoft Corporation.
|
|
1163
|
+
* Licensed under the MIT License.
|
|
1164
|
+
*
|
|
1165
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1166
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1167
|
+
*/
|
|
1168
|
+
/**
|
|
1169
|
+
* The LRO Engine, a class that performs polling.
|
|
1170
|
+
*/
|
|
1171
|
+
class LroEngine extends coreLro.Poller {
|
|
1172
|
+
constructor(lro, options) {
|
|
1173
|
+
const { intervalInMs = 2000, resumeFrom } = options || {};
|
|
1174
|
+
function deserializeState(resumeFrom) {
|
|
1175
|
+
try {
|
|
1176
|
+
return JSON.parse(resumeFrom).state;
|
|
1177
|
+
}
|
|
1178
|
+
catch (e) {
|
|
1179
|
+
throw new Error(`LroEngine: Unable to deserialize state: ${resumeFrom}`);
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
const state = resumeFrom
|
|
1183
|
+
? deserializeState(resumeFrom)
|
|
1184
|
+
: {};
|
|
1185
|
+
const operation = new GenericPollOperation(state, lro);
|
|
1186
|
+
super(operation);
|
|
1187
|
+
this.intervalInMs = intervalInMs;
|
|
1188
|
+
operation.setPollerConfig(this);
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* The method used by the poller to wait before attempting to update its operation.
|
|
1192
|
+
*/
|
|
1193
|
+
delay() {
|
|
1194
|
+
return new Promise((resolve) => setTimeout(() => resolve(), this.intervalInMs));
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/*
|
|
1199
|
+
* Copyright (c) Microsoft Corporation.
|
|
1200
|
+
* Licensed under the MIT License.
|
|
1201
|
+
*
|
|
1202
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1203
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1204
|
+
*/
|
|
1205
|
+
function createPollingMethod(sendOperationFn, GetLroStatusFromResponse, args, spec, mode) {
|
|
1206
|
+
var _a;
|
|
1207
|
+
/**
|
|
1208
|
+
* Polling calls will always return a status object i.e. {"status": "success"}
|
|
1209
|
+
* these intermediate responses are not described in the swagger so we need to
|
|
1210
|
+
* pass custom mappers at runtime.
|
|
1211
|
+
* This function replaces all the existing mappers to be able to deserialize a status object
|
|
1212
|
+
* @param responses Original set of responses defined in the operation
|
|
1213
|
+
*/
|
|
1214
|
+
function getCompositeMappers(responses) {
|
|
1215
|
+
return Object.keys(responses).reduce((acc, statusCode) => {
|
|
1216
|
+
return Object.assign(Object.assign({}, acc), { [statusCode]: Object.assign(Object.assign({}, responses[statusCode]), { bodyMapper: {
|
|
1217
|
+
type: {
|
|
1218
|
+
name: "Composite",
|
|
1219
|
+
modelProperties: {
|
|
1220
|
+
status: {
|
|
1221
|
+
serializedName: "status",
|
|
1222
|
+
type: {
|
|
1223
|
+
name: "String"
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
} }) });
|
|
1229
|
+
}, {});
|
|
1230
|
+
}
|
|
1231
|
+
let response = undefined;
|
|
1232
|
+
const customerCallback = (_a = args === null || args === void 0 ? void 0 : args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1233
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: (rawResponse, flatResponse) => {
|
|
1234
|
+
response = GetLroStatusFromResponse({
|
|
1235
|
+
statusCode: rawResponse.status,
|
|
1236
|
+
body: rawResponse.parsedBody,
|
|
1237
|
+
headers: rawResponse.headers.toJSON()
|
|
1238
|
+
}, flatResponse);
|
|
1239
|
+
if (response.done) {
|
|
1240
|
+
customerCallback === null || customerCallback === void 0 ? void 0 : customerCallback(rawResponse, flatResponse);
|
|
1241
|
+
}
|
|
1242
|
+
} }) });
|
|
1243
|
+
// Make sure we don't send any body to the get request
|
|
1244
|
+
const { requestBody, responses } = spec, restSpec = tslib.__rest(spec, ["requestBody", "responses"]);
|
|
1245
|
+
if (mode === "AzureAsync") {
|
|
1246
|
+
return (path) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1247
|
+
yield sendOperationFn(updatedArgs, Object.assign(Object.assign(Object.assign({}, restSpec), { responses: getCompositeMappers(responses), httpMethod: "GET" }), (path && { path })));
|
|
1248
|
+
return response;
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
return (path) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1252
|
+
yield sendOperationFn(updatedArgs, Object.assign(Object.assign(Object.assign({}, restSpec), { responses: responses, httpMethod: "GET" }), (path && { path })));
|
|
1253
|
+
return response;
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
class CoreClientLro {
|
|
1257
|
+
constructor(sendOperationFn, args, spec, lroResourceLocationConfig, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
1258
|
+
this.sendOperationFn = sendOperationFn;
|
|
1259
|
+
this.args = args;
|
|
1260
|
+
this.spec = spec;
|
|
1261
|
+
this.lroResourceLocationConfig = lroResourceLocationConfig;
|
|
1262
|
+
this.requestPath = requestPath;
|
|
1263
|
+
this.requestMethod = requestMethod;
|
|
1264
|
+
}
|
|
1265
|
+
sendInitialRequest(initializeState) {
|
|
1266
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1267
|
+
const _a = this.args.options || {}, { onResponse } = _a, restOptions = tslib.__rest(_a, ["onResponse"]);
|
|
1268
|
+
return this.sendOperationFn(Object.assign(Object.assign({}, this.args), { options: Object.assign(Object.assign({}, restOptions), { onResponse: (rawResponse, flatResponse) => {
|
|
1269
|
+
const isCompleted = initializeState({
|
|
1270
|
+
statusCode: rawResponse.status,
|
|
1271
|
+
body: rawResponse.parsedBody,
|
|
1272
|
+
headers: rawResponse.headers.toJSON()
|
|
1273
|
+
}, flatResponse);
|
|
1274
|
+
if (isCompleted) {
|
|
1275
|
+
onResponse === null || onResponse === void 0 ? void 0 : onResponse(rawResponse, flatResponse);
|
|
1276
|
+
}
|
|
1277
|
+
} }) }), this.spec);
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
sendPollRequest(config, path) {
|
|
1281
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1282
|
+
const getLroStatusFromResponse = createGetLroStatusFromResponse(this, config, this.lroResourceLocationConfig);
|
|
1283
|
+
return createPollingMethod(this.sendOperationFn, getLroStatusFromResponse, this.args, this.spec, config.mode)(path);
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
retrieveAzureAsyncResource(path) {
|
|
1287
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1288
|
+
const updatedArgs = Object.assign({}, this.args);
|
|
1289
|
+
if (updatedArgs.options) {
|
|
1290
|
+
updatedArgs.options.shouldDeserialize = true;
|
|
1291
|
+
}
|
|
1292
|
+
return createPollingMethod(this.sendOperationFn, (rawResponse, flatResponse) => ({
|
|
1293
|
+
rawResponse,
|
|
1294
|
+
flatResponse,
|
|
1295
|
+
done: true
|
|
1296
|
+
}), updatedArgs, this.spec)(path);
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
/*
|
|
1302
|
+
* Copyright (c) Microsoft Corporation.
|
|
1303
|
+
* Licensed under the MIT License.
|
|
1304
|
+
*
|
|
1305
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1306
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1307
|
+
*/
|
|
1308
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1309
|
+
/** Class representing a Applications. */
|
|
1310
|
+
class ApplicationsImpl {
|
|
1311
|
+
/**
|
|
1312
|
+
* Initialize a new instance of the class Applications class.
|
|
1313
|
+
* @param client Reference to the service client
|
|
1314
|
+
*/
|
|
1315
|
+
constructor(client) {
|
|
1316
|
+
this.client = client;
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Gets all the applications within a resource group.
|
|
1320
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1321
|
+
* @param options The options parameters.
|
|
1322
|
+
*/
|
|
1323
|
+
listByResourceGroup(resourceGroupName, options) {
|
|
1324
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
1325
|
+
return {
|
|
1326
|
+
next() {
|
|
1327
|
+
return iter.next();
|
|
1328
|
+
},
|
|
1329
|
+
[Symbol.asyncIterator]() {
|
|
1330
|
+
return this;
|
|
1331
|
+
},
|
|
1332
|
+
byPage: () => {
|
|
1333
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
1338
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1339
|
+
let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1340
|
+
yield yield tslib.__await(result.value || []);
|
|
1341
|
+
let continuationToken = result.nextLink;
|
|
1342
|
+
while (continuationToken) {
|
|
1343
|
+
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1344
|
+
continuationToken = result.nextLink;
|
|
1345
|
+
yield yield tslib.__await(result.value || []);
|
|
1346
|
+
}
|
|
1347
|
+
});
|
|
1348
|
+
}
|
|
1349
|
+
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
1350
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
1351
|
+
var e_1, _a;
|
|
1352
|
+
try {
|
|
1353
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1354
|
+
const page = _c.value;
|
|
1355
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1359
|
+
finally {
|
|
1360
|
+
try {
|
|
1361
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1362
|
+
}
|
|
1363
|
+
finally { if (e_1) throw e_1.error; }
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* Gets all the applications within a subscription.
|
|
1369
|
+
* @param options The options parameters.
|
|
1370
|
+
*/
|
|
1371
|
+
listBySubscription(options) {
|
|
1372
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
1373
|
+
return {
|
|
1374
|
+
next() {
|
|
1375
|
+
return iter.next();
|
|
1376
|
+
},
|
|
1377
|
+
[Symbol.asyncIterator]() {
|
|
1378
|
+
return this;
|
|
1379
|
+
},
|
|
1380
|
+
byPage: () => {
|
|
1381
|
+
return this.listBySubscriptionPagingPage(options);
|
|
1382
|
+
}
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
listBySubscriptionPagingPage(options) {
|
|
1386
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
|
|
1387
|
+
let result = yield tslib.__await(this._listBySubscription(options));
|
|
1388
|
+
yield yield tslib.__await(result.value || []);
|
|
1389
|
+
let continuationToken = result.nextLink;
|
|
1390
|
+
while (continuationToken) {
|
|
1391
|
+
result = yield tslib.__await(this._listBySubscriptionNext(continuationToken, options));
|
|
1392
|
+
continuationToken = result.nextLink;
|
|
1393
|
+
yield yield tslib.__await(result.value || []);
|
|
1394
|
+
}
|
|
1395
|
+
});
|
|
1396
|
+
}
|
|
1397
|
+
listBySubscriptionPagingAll(options) {
|
|
1398
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
|
|
1399
|
+
var e_2, _a;
|
|
1400
|
+
try {
|
|
1401
|
+
for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1402
|
+
const page = _c.value;
|
|
1403
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1407
|
+
finally {
|
|
1408
|
+
try {
|
|
1409
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1410
|
+
}
|
|
1411
|
+
finally { if (e_2) throw e_2.error; }
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* ListByResourceGroupNext
|
|
1417
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1418
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
1419
|
+
* @param options The options parameters.
|
|
1420
|
+
*/
|
|
1421
|
+
listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
1422
|
+
const iter = this.listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options);
|
|
1423
|
+
return {
|
|
1424
|
+
next() {
|
|
1425
|
+
return iter.next();
|
|
1426
|
+
},
|
|
1427
|
+
[Symbol.asyncIterator]() {
|
|
1428
|
+
return this;
|
|
1429
|
+
},
|
|
1430
|
+
byPage: () => {
|
|
1431
|
+
return this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options);
|
|
1432
|
+
}
|
|
1433
|
+
};
|
|
1434
|
+
}
|
|
1435
|
+
listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options) {
|
|
1436
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupNextPagingPage_1() {
|
|
1437
|
+
let result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, nextLink, options));
|
|
1438
|
+
yield yield tslib.__await(result.value || []);
|
|
1439
|
+
let continuationToken = result.nextLink;
|
|
1440
|
+
while (continuationToken) {
|
|
1441
|
+
result = yield tslib.__await(this._listByResourceGroupNextNext(resourceGroupName, continuationToken, options));
|
|
1442
|
+
continuationToken = result.nextLink;
|
|
1443
|
+
yield yield tslib.__await(result.value || []);
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options) {
|
|
1448
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupNextPagingAll_1() {
|
|
1449
|
+
var e_3, _a;
|
|
1450
|
+
try {
|
|
1451
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1452
|
+
const page = _c.value;
|
|
1453
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1457
|
+
finally {
|
|
1458
|
+
try {
|
|
1459
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1460
|
+
}
|
|
1461
|
+
finally { if (e_3) throw e_3.error; }
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
/**
|
|
1466
|
+
* ListBySubscriptionNext
|
|
1467
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
1468
|
+
* @param options The options parameters.
|
|
1469
|
+
*/
|
|
1470
|
+
listBySubscriptionNext(nextLink, options) {
|
|
1471
|
+
const iter = this.listBySubscriptionNextPagingAll(nextLink, options);
|
|
1472
|
+
return {
|
|
1473
|
+
next() {
|
|
1474
|
+
return iter.next();
|
|
1475
|
+
},
|
|
1476
|
+
[Symbol.asyncIterator]() {
|
|
1477
|
+
return this;
|
|
1478
|
+
},
|
|
1479
|
+
byPage: () => {
|
|
1480
|
+
return this.listBySubscriptionNextPagingPage(nextLink, options);
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
}
|
|
1484
|
+
listBySubscriptionNextPagingPage(nextLink, options) {
|
|
1485
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionNextPagingPage_1() {
|
|
1486
|
+
let result = yield tslib.__await(this._listBySubscriptionNext(nextLink, options));
|
|
1487
|
+
yield yield tslib.__await(result.value || []);
|
|
1488
|
+
let continuationToken = result.nextLink;
|
|
1489
|
+
while (continuationToken) {
|
|
1490
|
+
result = yield tslib.__await(this._listBySubscriptionNextNext(continuationToken, options));
|
|
1491
|
+
continuationToken = result.nextLink;
|
|
1492
|
+
yield yield tslib.__await(result.value || []);
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
listBySubscriptionNextPagingAll(nextLink, options) {
|
|
1497
|
+
return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionNextPagingAll_1() {
|
|
1498
|
+
var e_4, _a;
|
|
1499
|
+
try {
|
|
1500
|
+
for (var _b = tslib.__asyncValues(this.listBySubscriptionNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1501
|
+
const page = _c.value;
|
|
1502
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1506
|
+
finally {
|
|
1507
|
+
try {
|
|
1508
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1509
|
+
}
|
|
1510
|
+
finally { if (e_4) throw e_4.error; }
|
|
1511
|
+
}
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
/**
|
|
1515
|
+
* Gets the managed application.
|
|
1516
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1517
|
+
* @param applicationName The name of the managed application.
|
|
1518
|
+
* @param options The options parameters.
|
|
1519
|
+
*/
|
|
1520
|
+
get(resourceGroupName, applicationName, options) {
|
|
1521
|
+
return this.client.sendOperationRequest({ resourceGroupName, applicationName, options }, getOperationSpec);
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Deletes the managed application.
|
|
1525
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1526
|
+
* @param applicationName The name of the managed application.
|
|
1527
|
+
* @param options The options parameters.
|
|
1528
|
+
*/
|
|
1529
|
+
beginDelete(resourceGroupName, applicationName, options) {
|
|
1530
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1531
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1532
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1533
|
+
});
|
|
1534
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1535
|
+
var _a;
|
|
1536
|
+
let currentRawResponse = undefined;
|
|
1537
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1538
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1539
|
+
currentRawResponse = rawResponse;
|
|
1540
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1541
|
+
};
|
|
1542
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1543
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1544
|
+
return {
|
|
1545
|
+
flatResponse,
|
|
1546
|
+
rawResponse: {
|
|
1547
|
+
statusCode: currentRawResponse.status,
|
|
1548
|
+
body: currentRawResponse.parsedBody,
|
|
1549
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
});
|
|
1553
|
+
const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationName, options }, deleteOperationSpec);
|
|
1554
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
/**
|
|
1558
|
+
* Deletes the managed application.
|
|
1559
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1560
|
+
* @param applicationName The name of the managed application.
|
|
1561
|
+
* @param options The options parameters.
|
|
1562
|
+
*/
|
|
1563
|
+
beginDeleteAndWait(resourceGroupName, applicationName, options) {
|
|
1564
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1565
|
+
const poller = yield this.beginDelete(resourceGroupName, applicationName, options);
|
|
1566
|
+
return poller.pollUntilDone();
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Creates a new managed application.
|
|
1571
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1572
|
+
* @param applicationName The name of the managed application.
|
|
1573
|
+
* @param parameters Parameters supplied to the create or update a managed application.
|
|
1574
|
+
* @param options The options parameters.
|
|
1575
|
+
*/
|
|
1576
|
+
beginCreateOrUpdate(resourceGroupName, applicationName, parameters, options) {
|
|
1577
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1578
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1579
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1580
|
+
});
|
|
1581
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1582
|
+
var _a;
|
|
1583
|
+
let currentRawResponse = undefined;
|
|
1584
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1585
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1586
|
+
currentRawResponse = rawResponse;
|
|
1587
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1588
|
+
};
|
|
1589
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1590
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1591
|
+
return {
|
|
1592
|
+
flatResponse,
|
|
1593
|
+
rawResponse: {
|
|
1594
|
+
statusCode: currentRawResponse.status,
|
|
1595
|
+
body: currentRawResponse.parsedBody,
|
|
1596
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1599
|
+
});
|
|
1600
|
+
const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationName, parameters, options }, createOrUpdateOperationSpec);
|
|
1601
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* Creates a new managed application.
|
|
1606
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1607
|
+
* @param applicationName The name of the managed application.
|
|
1608
|
+
* @param parameters Parameters supplied to the create or update a managed application.
|
|
1609
|
+
* @param options The options parameters.
|
|
1610
|
+
*/
|
|
1611
|
+
beginCreateOrUpdateAndWait(resourceGroupName, applicationName, parameters, options) {
|
|
1612
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1613
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, applicationName, parameters, options);
|
|
1614
|
+
return poller.pollUntilDone();
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
/**
|
|
1618
|
+
* Updates an existing managed application. The only value that can be updated via PATCH currently is
|
|
1619
|
+
* the tags.
|
|
1620
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1621
|
+
* @param applicationName The name of the managed application.
|
|
1622
|
+
* @param options The options parameters.
|
|
1623
|
+
*/
|
|
1624
|
+
update(resourceGroupName, applicationName, options) {
|
|
1625
|
+
return this.client.sendOperationRequest({ resourceGroupName, applicationName, options }, updateOperationSpec);
|
|
1626
|
+
}
|
|
1627
|
+
/**
|
|
1628
|
+
* Gets all the applications within a resource group.
|
|
1629
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1630
|
+
* @param options The options parameters.
|
|
1631
|
+
*/
|
|
1632
|
+
_listByResourceGroup(resourceGroupName, options) {
|
|
1633
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* Gets all the applications within a subscription.
|
|
1637
|
+
* @param options The options parameters.
|
|
1638
|
+
*/
|
|
1639
|
+
_listBySubscription(options) {
|
|
1640
|
+
return this.client.sendOperationRequest({ options }, listBySubscriptionOperationSpec);
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Gets the managed application.
|
|
1644
|
+
* @param applicationId The fully qualified ID of the managed application, including the managed
|
|
1645
|
+
* application name and the managed application resource type. Use the format,
|
|
1646
|
+
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
|
|
1647
|
+
* @param options The options parameters.
|
|
1648
|
+
*/
|
|
1649
|
+
getById(applicationId, options) {
|
|
1650
|
+
return this.client.sendOperationRequest({ applicationId, options }, getByIdOperationSpec);
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Deletes the managed application.
|
|
1654
|
+
* @param applicationId The fully qualified ID of the managed application, including the managed
|
|
1655
|
+
* application name and the managed application resource type. Use the format,
|
|
1656
|
+
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
|
|
1657
|
+
* @param options The options parameters.
|
|
1658
|
+
*/
|
|
1659
|
+
beginDeleteById(applicationId, options) {
|
|
1660
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1661
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1662
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1663
|
+
});
|
|
1664
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1665
|
+
var _a;
|
|
1666
|
+
let currentRawResponse = undefined;
|
|
1667
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1668
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1669
|
+
currentRawResponse = rawResponse;
|
|
1670
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1671
|
+
};
|
|
1672
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1673
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1674
|
+
return {
|
|
1675
|
+
flatResponse,
|
|
1676
|
+
rawResponse: {
|
|
1677
|
+
statusCode: currentRawResponse.status,
|
|
1678
|
+
body: currentRawResponse.parsedBody,
|
|
1679
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1680
|
+
}
|
|
1681
|
+
};
|
|
1682
|
+
});
|
|
1683
|
+
const lro = new CoreClientLro(sendOperation, { applicationId, options }, deleteByIdOperationSpec);
|
|
1684
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* Deletes the managed application.
|
|
1689
|
+
* @param applicationId The fully qualified ID of the managed application, including the managed
|
|
1690
|
+
* application name and the managed application resource type. Use the format,
|
|
1691
|
+
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
|
|
1692
|
+
* @param options The options parameters.
|
|
1693
|
+
*/
|
|
1694
|
+
beginDeleteByIdAndWait(applicationId, options) {
|
|
1695
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1696
|
+
const poller = yield this.beginDeleteById(applicationId, options);
|
|
1697
|
+
return poller.pollUntilDone();
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
/**
|
|
1701
|
+
* Creates a new managed application.
|
|
1702
|
+
* @param applicationId The fully qualified ID of the managed application, including the managed
|
|
1703
|
+
* application name and the managed application resource type. Use the format,
|
|
1704
|
+
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
|
|
1705
|
+
* @param parameters Parameters supplied to the create or update a managed application.
|
|
1706
|
+
* @param options The options parameters.
|
|
1707
|
+
*/
|
|
1708
|
+
beginCreateOrUpdateById(applicationId, parameters, options) {
|
|
1709
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1710
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1711
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1712
|
+
});
|
|
1713
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1714
|
+
var _a;
|
|
1715
|
+
let currentRawResponse = undefined;
|
|
1716
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1717
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1718
|
+
currentRawResponse = rawResponse;
|
|
1719
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1720
|
+
};
|
|
1721
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1722
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1723
|
+
return {
|
|
1724
|
+
flatResponse,
|
|
1725
|
+
rawResponse: {
|
|
1726
|
+
statusCode: currentRawResponse.status,
|
|
1727
|
+
body: currentRawResponse.parsedBody,
|
|
1728
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1729
|
+
}
|
|
1730
|
+
};
|
|
1731
|
+
});
|
|
1732
|
+
const lro = new CoreClientLro(sendOperation, { applicationId, parameters, options }, createOrUpdateByIdOperationSpec);
|
|
1733
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
1734
|
+
});
|
|
1735
|
+
}
|
|
1736
|
+
/**
|
|
1737
|
+
* Creates a new managed application.
|
|
1738
|
+
* @param applicationId The fully qualified ID of the managed application, including the managed
|
|
1739
|
+
* application name and the managed application resource type. Use the format,
|
|
1740
|
+
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
|
|
1741
|
+
* @param parameters Parameters supplied to the create or update a managed application.
|
|
1742
|
+
* @param options The options parameters.
|
|
1743
|
+
*/
|
|
1744
|
+
beginCreateOrUpdateByIdAndWait(applicationId, parameters, options) {
|
|
1745
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1746
|
+
const poller = yield this.beginCreateOrUpdateById(applicationId, parameters, options);
|
|
1747
|
+
return poller.pollUntilDone();
|
|
1748
|
+
});
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Updates an existing managed application. The only value that can be updated via PATCH currently is
|
|
1752
|
+
* the tags.
|
|
1753
|
+
* @param applicationId The fully qualified ID of the managed application, including the managed
|
|
1754
|
+
* application name and the managed application resource type. Use the format,
|
|
1755
|
+
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applications/{application-name}
|
|
1756
|
+
* @param options The options parameters.
|
|
1757
|
+
*/
|
|
1758
|
+
updateById(applicationId, options) {
|
|
1759
|
+
return this.client.sendOperationRequest({ applicationId, options }, updateByIdOperationSpec);
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* ListByResourceGroupNext
|
|
1763
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1764
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
1765
|
+
* @param options The options parameters.
|
|
1766
|
+
*/
|
|
1767
|
+
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
1768
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec);
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* ListBySubscriptionNext
|
|
1772
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
1773
|
+
* @param options The options parameters.
|
|
1774
|
+
*/
|
|
1775
|
+
_listBySubscriptionNext(nextLink, options) {
|
|
1776
|
+
return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextOperationSpec);
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* ListByResourceGroupNextNext
|
|
1780
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
1781
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroupNext
|
|
1782
|
+
* method.
|
|
1783
|
+
* @param options The options parameters.
|
|
1784
|
+
*/
|
|
1785
|
+
_listByResourceGroupNextNext(resourceGroupName, nextLink, options) {
|
|
1786
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextNextOperationSpec);
|
|
1787
|
+
}
|
|
1788
|
+
/**
|
|
1789
|
+
* ListBySubscriptionNextNext
|
|
1790
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscriptionNext method.
|
|
1791
|
+
* @param options The options parameters.
|
|
1792
|
+
*/
|
|
1793
|
+
_listBySubscriptionNextNext(nextLink, options) {
|
|
1794
|
+
return this.client.sendOperationRequest({ nextLink, options }, listBySubscriptionNextNextOperationSpec);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
// Operation Specifications
|
|
1798
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
1799
|
+
const getOperationSpec = {
|
|
1800
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
|
|
1801
|
+
httpMethod: "GET",
|
|
1802
|
+
responses: {
|
|
1803
|
+
200: {
|
|
1804
|
+
bodyMapper: Application
|
|
1805
|
+
},
|
|
1806
|
+
404: {},
|
|
1807
|
+
default: {
|
|
1808
|
+
bodyMapper: ErrorResponse
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1811
|
+
queryParameters: [apiVersion],
|
|
1812
|
+
urlParameters: [
|
|
1813
|
+
$host,
|
|
1814
|
+
resourceGroupName,
|
|
1815
|
+
applicationName,
|
|
1816
|
+
subscriptionId
|
|
1817
|
+
],
|
|
1818
|
+
headerParameters: [accept],
|
|
1819
|
+
serializer
|
|
1820
|
+
};
|
|
1821
|
+
const deleteOperationSpec = {
|
|
1822
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
|
|
1823
|
+
httpMethod: "DELETE",
|
|
1824
|
+
responses: {
|
|
1825
|
+
200: {},
|
|
1826
|
+
201: {},
|
|
1827
|
+
202: {},
|
|
1828
|
+
204: {},
|
|
1829
|
+
default: {
|
|
1830
|
+
bodyMapper: ErrorResponse
|
|
1831
|
+
}
|
|
1832
|
+
},
|
|
1833
|
+
queryParameters: [apiVersion],
|
|
1834
|
+
urlParameters: [
|
|
1835
|
+
$host,
|
|
1836
|
+
resourceGroupName,
|
|
1837
|
+
applicationName,
|
|
1838
|
+
subscriptionId
|
|
1839
|
+
],
|
|
1840
|
+
headerParameters: [accept],
|
|
1841
|
+
serializer
|
|
1842
|
+
};
|
|
1843
|
+
const createOrUpdateOperationSpec = {
|
|
1844
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
|
|
1845
|
+
httpMethod: "PUT",
|
|
1846
|
+
responses: {
|
|
1847
|
+
200: {
|
|
1848
|
+
bodyMapper: Application
|
|
1849
|
+
},
|
|
1850
|
+
201: {
|
|
1851
|
+
bodyMapper: Application
|
|
1852
|
+
},
|
|
1853
|
+
202: {
|
|
1854
|
+
bodyMapper: Application
|
|
1855
|
+
},
|
|
1856
|
+
204: {
|
|
1857
|
+
bodyMapper: Application
|
|
1858
|
+
},
|
|
1859
|
+
default: {
|
|
1860
|
+
bodyMapper: ErrorResponse
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
requestBody: parameters,
|
|
1864
|
+
queryParameters: [apiVersion],
|
|
1865
|
+
urlParameters: [
|
|
1866
|
+
$host,
|
|
1867
|
+
resourceGroupName,
|
|
1868
|
+
applicationName,
|
|
1869
|
+
subscriptionId
|
|
1870
|
+
],
|
|
1871
|
+
headerParameters: [accept, contentType],
|
|
1872
|
+
mediaType: "json",
|
|
1873
|
+
serializer
|
|
1874
|
+
};
|
|
1875
|
+
const updateOperationSpec = {
|
|
1876
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications/{applicationName}",
|
|
1877
|
+
httpMethod: "PATCH",
|
|
1878
|
+
responses: {
|
|
1879
|
+
200: {
|
|
1880
|
+
bodyMapper: Application
|
|
1881
|
+
},
|
|
1882
|
+
default: {
|
|
1883
|
+
bodyMapper: ErrorResponse
|
|
1884
|
+
}
|
|
1885
|
+
},
|
|
1886
|
+
requestBody: parameters1,
|
|
1887
|
+
queryParameters: [apiVersion],
|
|
1888
|
+
urlParameters: [
|
|
1889
|
+
$host,
|
|
1890
|
+
resourceGroupName,
|
|
1891
|
+
applicationName,
|
|
1892
|
+
subscriptionId
|
|
1893
|
+
],
|
|
1894
|
+
headerParameters: [accept, contentType],
|
|
1895
|
+
mediaType: "json",
|
|
1896
|
+
serializer
|
|
1897
|
+
};
|
|
1898
|
+
const listByResourceGroupOperationSpec = {
|
|
1899
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applications",
|
|
1900
|
+
httpMethod: "GET",
|
|
1901
|
+
responses: {
|
|
1902
|
+
200: {
|
|
1903
|
+
bodyMapper: ApplicationListResult
|
|
1904
|
+
},
|
|
1905
|
+
default: {
|
|
1906
|
+
bodyMapper: ErrorResponse
|
|
1907
|
+
}
|
|
1908
|
+
},
|
|
1909
|
+
queryParameters: [apiVersion],
|
|
1910
|
+
urlParameters: [
|
|
1911
|
+
$host,
|
|
1912
|
+
resourceGroupName,
|
|
1913
|
+
subscriptionId
|
|
1914
|
+
],
|
|
1915
|
+
headerParameters: [accept],
|
|
1916
|
+
serializer
|
|
1917
|
+
};
|
|
1918
|
+
const listBySubscriptionOperationSpec = {
|
|
1919
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Solutions/applications",
|
|
1920
|
+
httpMethod: "GET",
|
|
1921
|
+
responses: {
|
|
1922
|
+
200: {
|
|
1923
|
+
bodyMapper: ApplicationListResult
|
|
1924
|
+
},
|
|
1925
|
+
default: {
|
|
1926
|
+
bodyMapper: ErrorResponse
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1929
|
+
queryParameters: [apiVersion],
|
|
1930
|
+
urlParameters: [$host, subscriptionId],
|
|
1931
|
+
headerParameters: [accept],
|
|
1932
|
+
serializer
|
|
1933
|
+
};
|
|
1934
|
+
const getByIdOperationSpec = {
|
|
1935
|
+
path: "/{applicationId}",
|
|
1936
|
+
httpMethod: "GET",
|
|
1937
|
+
responses: {
|
|
1938
|
+
200: {
|
|
1939
|
+
bodyMapper: Application
|
|
1940
|
+
},
|
|
1941
|
+
404: {},
|
|
1942
|
+
default: {
|
|
1943
|
+
bodyMapper: ErrorResponse
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
queryParameters: [apiVersion],
|
|
1947
|
+
urlParameters: [$host, applicationId],
|
|
1948
|
+
headerParameters: [accept],
|
|
1949
|
+
serializer
|
|
1950
|
+
};
|
|
1951
|
+
const deleteByIdOperationSpec = {
|
|
1952
|
+
path: "/{applicationId}",
|
|
1953
|
+
httpMethod: "DELETE",
|
|
1954
|
+
responses: {
|
|
1955
|
+
200: {},
|
|
1956
|
+
201: {},
|
|
1957
|
+
202: {},
|
|
1958
|
+
204: {},
|
|
1959
|
+
default: {
|
|
1960
|
+
bodyMapper: ErrorResponse
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
queryParameters: [apiVersion],
|
|
1964
|
+
urlParameters: [$host, applicationId],
|
|
1965
|
+
headerParameters: [accept],
|
|
1966
|
+
serializer
|
|
1967
|
+
};
|
|
1968
|
+
const createOrUpdateByIdOperationSpec = {
|
|
1969
|
+
path: "/{applicationId}",
|
|
1970
|
+
httpMethod: "PUT",
|
|
1971
|
+
responses: {
|
|
1972
|
+
200: {
|
|
1973
|
+
bodyMapper: Application
|
|
1974
|
+
},
|
|
1975
|
+
201: {
|
|
1976
|
+
bodyMapper: Application
|
|
1977
|
+
},
|
|
1978
|
+
202: {
|
|
1979
|
+
bodyMapper: Application
|
|
1980
|
+
},
|
|
1981
|
+
204: {
|
|
1982
|
+
bodyMapper: Application
|
|
1983
|
+
},
|
|
1984
|
+
default: {
|
|
1985
|
+
bodyMapper: ErrorResponse
|
|
1986
|
+
}
|
|
1987
|
+
},
|
|
1988
|
+
requestBody: parameters,
|
|
1989
|
+
queryParameters: [apiVersion],
|
|
1990
|
+
urlParameters: [$host, applicationId],
|
|
1991
|
+
headerParameters: [accept, contentType],
|
|
1992
|
+
mediaType: "json",
|
|
1993
|
+
serializer
|
|
1994
|
+
};
|
|
1995
|
+
const updateByIdOperationSpec = {
|
|
1996
|
+
path: "/{applicationId}",
|
|
1997
|
+
httpMethod: "PATCH",
|
|
1998
|
+
responses: {
|
|
1999
|
+
200: {
|
|
2000
|
+
bodyMapper: Application
|
|
2001
|
+
},
|
|
2002
|
+
default: {
|
|
2003
|
+
bodyMapper: ErrorResponse
|
|
2004
|
+
}
|
|
2005
|
+
},
|
|
2006
|
+
requestBody: parameters2,
|
|
2007
|
+
queryParameters: [apiVersion],
|
|
2008
|
+
urlParameters: [$host, applicationId],
|
|
2009
|
+
headerParameters: [accept, contentType],
|
|
2010
|
+
mediaType: "json",
|
|
2011
|
+
serializer
|
|
2012
|
+
};
|
|
2013
|
+
const listByResourceGroupNextOperationSpec = {
|
|
2014
|
+
path: "{nextLink}",
|
|
2015
|
+
httpMethod: "GET",
|
|
2016
|
+
responses: {
|
|
2017
|
+
200: {
|
|
2018
|
+
bodyMapper: ApplicationListResult
|
|
2019
|
+
},
|
|
2020
|
+
default: {
|
|
2021
|
+
bodyMapper: ErrorResponse
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
queryParameters: [apiVersion],
|
|
2025
|
+
urlParameters: [
|
|
2026
|
+
$host,
|
|
2027
|
+
nextLink,
|
|
2028
|
+
resourceGroupName,
|
|
2029
|
+
subscriptionId
|
|
2030
|
+
],
|
|
2031
|
+
headerParameters: [accept],
|
|
2032
|
+
serializer
|
|
2033
|
+
};
|
|
2034
|
+
const listBySubscriptionNextOperationSpec = {
|
|
2035
|
+
path: "{nextLink}",
|
|
2036
|
+
httpMethod: "GET",
|
|
2037
|
+
responses: {
|
|
2038
|
+
200: {
|
|
2039
|
+
bodyMapper: ApplicationListResult
|
|
2040
|
+
},
|
|
2041
|
+
default: {
|
|
2042
|
+
bodyMapper: ErrorResponse
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
queryParameters: [apiVersion],
|
|
2046
|
+
urlParameters: [
|
|
2047
|
+
$host,
|
|
2048
|
+
nextLink,
|
|
2049
|
+
subscriptionId
|
|
2050
|
+
],
|
|
2051
|
+
headerParameters: [accept],
|
|
2052
|
+
serializer
|
|
2053
|
+
};
|
|
2054
|
+
const listByResourceGroupNextNextOperationSpec = {
|
|
2055
|
+
path: "{nextLink}",
|
|
2056
|
+
httpMethod: "GET",
|
|
2057
|
+
responses: {
|
|
2058
|
+
200: {
|
|
2059
|
+
bodyMapper: ApplicationListResult
|
|
2060
|
+
},
|
|
2061
|
+
default: {
|
|
2062
|
+
bodyMapper: ErrorResponse
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
queryParameters: [apiVersion],
|
|
2066
|
+
urlParameters: [
|
|
2067
|
+
$host,
|
|
2068
|
+
nextLink,
|
|
2069
|
+
resourceGroupName,
|
|
2070
|
+
subscriptionId
|
|
2071
|
+
],
|
|
2072
|
+
headerParameters: [accept],
|
|
2073
|
+
serializer
|
|
2074
|
+
};
|
|
2075
|
+
const listBySubscriptionNextNextOperationSpec = {
|
|
2076
|
+
path: "{nextLink}",
|
|
2077
|
+
httpMethod: "GET",
|
|
2078
|
+
responses: {
|
|
2079
|
+
200: {
|
|
2080
|
+
bodyMapper: ApplicationListResult
|
|
2081
|
+
},
|
|
2082
|
+
default: {
|
|
2083
|
+
bodyMapper: ErrorResponse
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
queryParameters: [apiVersion],
|
|
2087
|
+
urlParameters: [
|
|
2088
|
+
$host,
|
|
2089
|
+
nextLink,
|
|
2090
|
+
subscriptionId
|
|
2091
|
+
],
|
|
2092
|
+
headerParameters: [accept],
|
|
2093
|
+
serializer
|
|
2094
|
+
};
|
|
2095
|
+
|
|
2096
|
+
/*
|
|
2097
|
+
* Copyright (c) Microsoft Corporation.
|
|
2098
|
+
* Licensed under the MIT License.
|
|
2099
|
+
*
|
|
2100
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2101
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2102
|
+
*/
|
|
2103
|
+
/// <reference lib="esnext.asynciterable" />
|
|
2104
|
+
/** Class representing a ApplicationDefinitions. */
|
|
2105
|
+
class ApplicationDefinitionsImpl {
|
|
2106
|
+
/**
|
|
2107
|
+
* Initialize a new instance of the class ApplicationDefinitions class.
|
|
2108
|
+
* @param client Reference to the service client
|
|
2109
|
+
*/
|
|
2110
|
+
constructor(client) {
|
|
2111
|
+
this.client = client;
|
|
2112
|
+
}
|
|
2113
|
+
/**
|
|
2114
|
+
* Lists the managed application definitions in a resource group.
|
|
2115
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2116
|
+
* @param options The options parameters.
|
|
2117
|
+
*/
|
|
2118
|
+
listByResourceGroup(resourceGroupName, options) {
|
|
2119
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
2120
|
+
return {
|
|
2121
|
+
next() {
|
|
2122
|
+
return iter.next();
|
|
2123
|
+
},
|
|
2124
|
+
[Symbol.asyncIterator]() {
|
|
2125
|
+
return this;
|
|
2126
|
+
},
|
|
2127
|
+
byPage: () => {
|
|
2128
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
2129
|
+
}
|
|
2130
|
+
};
|
|
2131
|
+
}
|
|
2132
|
+
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
2133
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
2134
|
+
let result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
2135
|
+
yield yield tslib.__await(result.value || []);
|
|
2136
|
+
let continuationToken = result.nextLink;
|
|
2137
|
+
while (continuationToken) {
|
|
2138
|
+
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
2139
|
+
continuationToken = result.nextLink;
|
|
2140
|
+
yield yield tslib.__await(result.value || []);
|
|
2141
|
+
}
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
2145
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
|
|
2146
|
+
var e_1, _a;
|
|
2147
|
+
try {
|
|
2148
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
2149
|
+
const page = _c.value;
|
|
2150
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2151
|
+
}
|
|
2152
|
+
}
|
|
2153
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2154
|
+
finally {
|
|
2155
|
+
try {
|
|
2156
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
2157
|
+
}
|
|
2158
|
+
finally { if (e_1) throw e_1.error; }
|
|
2159
|
+
}
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
/**
|
|
2163
|
+
* ListByResourceGroupNext
|
|
2164
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2165
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
2166
|
+
* @param options The options parameters.
|
|
2167
|
+
*/
|
|
2168
|
+
listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
2169
|
+
const iter = this.listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options);
|
|
2170
|
+
return {
|
|
2171
|
+
next() {
|
|
2172
|
+
return iter.next();
|
|
2173
|
+
},
|
|
2174
|
+
[Symbol.asyncIterator]() {
|
|
2175
|
+
return this;
|
|
2176
|
+
},
|
|
2177
|
+
byPage: () => {
|
|
2178
|
+
return this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options);
|
|
2179
|
+
}
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options) {
|
|
2183
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupNextPagingPage_1() {
|
|
2184
|
+
let result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, nextLink, options));
|
|
2185
|
+
yield yield tslib.__await(result.value || []);
|
|
2186
|
+
let continuationToken = result.nextLink;
|
|
2187
|
+
while (continuationToken) {
|
|
2188
|
+
result = yield tslib.__await(this._listByResourceGroupNextNext(resourceGroupName, continuationToken, options));
|
|
2189
|
+
continuationToken = result.nextLink;
|
|
2190
|
+
yield yield tslib.__await(result.value || []);
|
|
2191
|
+
}
|
|
2192
|
+
});
|
|
2193
|
+
}
|
|
2194
|
+
listByResourceGroupNextPagingAll(resourceGroupName, nextLink, options) {
|
|
2195
|
+
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupNextPagingAll_1() {
|
|
2196
|
+
var e_2, _a;
|
|
2197
|
+
try {
|
|
2198
|
+
for (var _b = tslib.__asyncValues(this.listByResourceGroupNextPagingPage(resourceGroupName, nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
2199
|
+
const page = _c.value;
|
|
2200
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2204
|
+
finally {
|
|
2205
|
+
try {
|
|
2206
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
2207
|
+
}
|
|
2208
|
+
finally { if (e_2) throw e_2.error; }
|
|
2209
|
+
}
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* Gets the managed application definition.
|
|
2214
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2215
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2216
|
+
* @param options The options parameters.
|
|
2217
|
+
*/
|
|
2218
|
+
get(resourceGroupName, applicationDefinitionName, options) {
|
|
2219
|
+
return this.client.sendOperationRequest({ resourceGroupName, applicationDefinitionName, options }, getOperationSpec$1);
|
|
2220
|
+
}
|
|
2221
|
+
/**
|
|
2222
|
+
* Deletes the managed application definition.
|
|
2223
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2224
|
+
* @param applicationDefinitionName The name of the managed application definition to delete.
|
|
2225
|
+
* @param options The options parameters.
|
|
2226
|
+
*/
|
|
2227
|
+
beginDelete(resourceGroupName, applicationDefinitionName, options) {
|
|
2228
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2229
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2230
|
+
return this.client.sendOperationRequest(args, spec);
|
|
2231
|
+
});
|
|
2232
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2233
|
+
var _a;
|
|
2234
|
+
let currentRawResponse = undefined;
|
|
2235
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
2236
|
+
const callback = (rawResponse, flatResponse) => {
|
|
2237
|
+
currentRawResponse = rawResponse;
|
|
2238
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
2239
|
+
};
|
|
2240
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
2241
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
2242
|
+
return {
|
|
2243
|
+
flatResponse,
|
|
2244
|
+
rawResponse: {
|
|
2245
|
+
statusCode: currentRawResponse.status,
|
|
2246
|
+
body: currentRawResponse.parsedBody,
|
|
2247
|
+
headers: currentRawResponse.headers.toJSON()
|
|
2248
|
+
}
|
|
2249
|
+
};
|
|
2250
|
+
});
|
|
2251
|
+
const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationDefinitionName, options }, deleteOperationSpec$1);
|
|
2252
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
2253
|
+
});
|
|
2254
|
+
}
|
|
2255
|
+
/**
|
|
2256
|
+
* Deletes the managed application definition.
|
|
2257
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2258
|
+
* @param applicationDefinitionName The name of the managed application definition to delete.
|
|
2259
|
+
* @param options The options parameters.
|
|
2260
|
+
*/
|
|
2261
|
+
beginDeleteAndWait(resourceGroupName, applicationDefinitionName, options) {
|
|
2262
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2263
|
+
const poller = yield this.beginDelete(resourceGroupName, applicationDefinitionName, options);
|
|
2264
|
+
return poller.pollUntilDone();
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
/**
|
|
2268
|
+
* Creates a new managed application definition.
|
|
2269
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2270
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2271
|
+
* @param parameters Parameters supplied to the create or update an managed application definition.
|
|
2272
|
+
* @param options The options parameters.
|
|
2273
|
+
*/
|
|
2274
|
+
beginCreateOrUpdate(resourceGroupName, applicationDefinitionName, parameters, options) {
|
|
2275
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2276
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2277
|
+
return this.client.sendOperationRequest(args, spec);
|
|
2278
|
+
});
|
|
2279
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2280
|
+
var _a;
|
|
2281
|
+
let currentRawResponse = undefined;
|
|
2282
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
2283
|
+
const callback = (rawResponse, flatResponse) => {
|
|
2284
|
+
currentRawResponse = rawResponse;
|
|
2285
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
2286
|
+
};
|
|
2287
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
2288
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
2289
|
+
return {
|
|
2290
|
+
flatResponse,
|
|
2291
|
+
rawResponse: {
|
|
2292
|
+
statusCode: currentRawResponse.status,
|
|
2293
|
+
body: currentRawResponse.parsedBody,
|
|
2294
|
+
headers: currentRawResponse.headers.toJSON()
|
|
2295
|
+
}
|
|
2296
|
+
};
|
|
2297
|
+
});
|
|
2298
|
+
const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationDefinitionName, parameters, options }, createOrUpdateOperationSpec$1);
|
|
2299
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2302
|
+
/**
|
|
2303
|
+
* Creates a new managed application definition.
|
|
2304
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2305
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2306
|
+
* @param parameters Parameters supplied to the create or update an managed application definition.
|
|
2307
|
+
* @param options The options parameters.
|
|
2308
|
+
*/
|
|
2309
|
+
beginCreateOrUpdateAndWait(resourceGroupName, applicationDefinitionName, parameters, options) {
|
|
2310
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2311
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, applicationDefinitionName, parameters, options);
|
|
2312
|
+
return poller.pollUntilDone();
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
/**
|
|
2316
|
+
* Lists the managed application definitions in a resource group.
|
|
2317
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2318
|
+
* @param options The options parameters.
|
|
2319
|
+
*/
|
|
2320
|
+
_listByResourceGroup(resourceGroupName, options) {
|
|
2321
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec$1);
|
|
2322
|
+
}
|
|
2323
|
+
/**
|
|
2324
|
+
* Gets the managed application definition.
|
|
2325
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2326
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2327
|
+
* @param options The options parameters.
|
|
2328
|
+
*/
|
|
2329
|
+
getById(resourceGroupName, applicationDefinitionName, options) {
|
|
2330
|
+
return this.client.sendOperationRequest({ resourceGroupName, applicationDefinitionName, options }, getByIdOperationSpec$1);
|
|
2331
|
+
}
|
|
2332
|
+
/**
|
|
2333
|
+
* Deletes the managed application definition.
|
|
2334
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2335
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2336
|
+
* @param options The options parameters.
|
|
2337
|
+
*/
|
|
2338
|
+
beginDeleteById(resourceGroupName, applicationDefinitionName, options) {
|
|
2339
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2340
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2341
|
+
return this.client.sendOperationRequest(args, spec);
|
|
2342
|
+
});
|
|
2343
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2344
|
+
var _a;
|
|
2345
|
+
let currentRawResponse = undefined;
|
|
2346
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
2347
|
+
const callback = (rawResponse, flatResponse) => {
|
|
2348
|
+
currentRawResponse = rawResponse;
|
|
2349
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
2350
|
+
};
|
|
2351
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
2352
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
2353
|
+
return {
|
|
2354
|
+
flatResponse,
|
|
2355
|
+
rawResponse: {
|
|
2356
|
+
statusCode: currentRawResponse.status,
|
|
2357
|
+
body: currentRawResponse.parsedBody,
|
|
2358
|
+
headers: currentRawResponse.headers.toJSON()
|
|
2359
|
+
}
|
|
2360
|
+
};
|
|
2361
|
+
});
|
|
2362
|
+
const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationDefinitionName, options }, deleteByIdOperationSpec$1);
|
|
2363
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
2364
|
+
});
|
|
2365
|
+
}
|
|
2366
|
+
/**
|
|
2367
|
+
* Deletes the managed application definition.
|
|
2368
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2369
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2370
|
+
* @param options The options parameters.
|
|
2371
|
+
*/
|
|
2372
|
+
beginDeleteByIdAndWait(resourceGroupName, applicationDefinitionName, options) {
|
|
2373
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2374
|
+
const poller = yield this.beginDeleteById(resourceGroupName, applicationDefinitionName, options);
|
|
2375
|
+
return poller.pollUntilDone();
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
/**
|
|
2379
|
+
* Creates a new managed application definition.
|
|
2380
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2381
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2382
|
+
* @param parameters Parameters supplied to the create or update a managed application definition.
|
|
2383
|
+
* @param options The options parameters.
|
|
2384
|
+
*/
|
|
2385
|
+
beginCreateOrUpdateById(resourceGroupName, applicationDefinitionName, parameters, options) {
|
|
2386
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2387
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2388
|
+
return this.client.sendOperationRequest(args, spec);
|
|
2389
|
+
});
|
|
2390
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2391
|
+
var _a;
|
|
2392
|
+
let currentRawResponse = undefined;
|
|
2393
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
2394
|
+
const callback = (rawResponse, flatResponse) => {
|
|
2395
|
+
currentRawResponse = rawResponse;
|
|
2396
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
2397
|
+
};
|
|
2398
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
2399
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
2400
|
+
return {
|
|
2401
|
+
flatResponse,
|
|
2402
|
+
rawResponse: {
|
|
2403
|
+
statusCode: currentRawResponse.status,
|
|
2404
|
+
body: currentRawResponse.parsedBody,
|
|
2405
|
+
headers: currentRawResponse.headers.toJSON()
|
|
2406
|
+
}
|
|
2407
|
+
};
|
|
2408
|
+
});
|
|
2409
|
+
const lro = new CoreClientLro(sendOperation, { resourceGroupName, applicationDefinitionName, parameters, options }, createOrUpdateByIdOperationSpec$1);
|
|
2410
|
+
return new LroEngine(lro, { intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs });
|
|
2411
|
+
});
|
|
2412
|
+
}
|
|
2413
|
+
/**
|
|
2414
|
+
* Creates a new managed application definition.
|
|
2415
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2416
|
+
* @param applicationDefinitionName The name of the managed application definition.
|
|
2417
|
+
* @param parameters Parameters supplied to the create or update a managed application definition.
|
|
2418
|
+
* @param options The options parameters.
|
|
2419
|
+
*/
|
|
2420
|
+
beginCreateOrUpdateByIdAndWait(resourceGroupName, applicationDefinitionName, parameters, options) {
|
|
2421
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2422
|
+
const poller = yield this.beginCreateOrUpdateById(resourceGroupName, applicationDefinitionName, parameters, options);
|
|
2423
|
+
return poller.pollUntilDone();
|
|
2424
|
+
});
|
|
2425
|
+
}
|
|
2426
|
+
/**
|
|
2427
|
+
* ListByResourceGroupNext
|
|
2428
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2429
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
2430
|
+
* @param options The options parameters.
|
|
2431
|
+
*/
|
|
2432
|
+
_listByResourceGroupNext(resourceGroupName, nextLink, options) {
|
|
2433
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextOperationSpec$1);
|
|
2434
|
+
}
|
|
2435
|
+
/**
|
|
2436
|
+
* ListByResourceGroupNextNext
|
|
2437
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
2438
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroupNext
|
|
2439
|
+
* method.
|
|
2440
|
+
* @param options The options parameters.
|
|
2441
|
+
*/
|
|
2442
|
+
_listByResourceGroupNextNext(resourceGroupName, nextLink, options) {
|
|
2443
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listByResourceGroupNextNextOperationSpec$1);
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
// Operation Specifications
|
|
2447
|
+
const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
2448
|
+
const getOperationSpec$1 = {
|
|
2449
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}",
|
|
2450
|
+
httpMethod: "GET",
|
|
2451
|
+
responses: {
|
|
2452
|
+
200: {
|
|
2453
|
+
bodyMapper: ApplicationDefinition
|
|
2454
|
+
},
|
|
2455
|
+
404: {},
|
|
2456
|
+
default: {
|
|
2457
|
+
bodyMapper: ErrorResponse
|
|
2458
|
+
}
|
|
2459
|
+
},
|
|
2460
|
+
queryParameters: [apiVersion],
|
|
2461
|
+
urlParameters: [
|
|
2462
|
+
$host,
|
|
2463
|
+
resourceGroupName,
|
|
2464
|
+
subscriptionId,
|
|
2465
|
+
applicationDefinitionName
|
|
2466
|
+
],
|
|
2467
|
+
headerParameters: [accept],
|
|
2468
|
+
serializer: serializer$1
|
|
2469
|
+
};
|
|
2470
|
+
const deleteOperationSpec$1 = {
|
|
2471
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}",
|
|
2472
|
+
httpMethod: "DELETE",
|
|
2473
|
+
responses: {
|
|
2474
|
+
200: {},
|
|
2475
|
+
201: {},
|
|
2476
|
+
202: {},
|
|
2477
|
+
204: {},
|
|
2478
|
+
default: {
|
|
2479
|
+
bodyMapper: ErrorResponse
|
|
2480
|
+
}
|
|
2481
|
+
},
|
|
2482
|
+
queryParameters: [apiVersion],
|
|
2483
|
+
urlParameters: [
|
|
2484
|
+
$host,
|
|
2485
|
+
resourceGroupName,
|
|
2486
|
+
subscriptionId,
|
|
2487
|
+
applicationDefinitionName
|
|
2488
|
+
],
|
|
2489
|
+
headerParameters: [accept],
|
|
2490
|
+
serializer: serializer$1
|
|
2491
|
+
};
|
|
2492
|
+
const createOrUpdateOperationSpec$1 = {
|
|
2493
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}",
|
|
2494
|
+
httpMethod: "PUT",
|
|
2495
|
+
responses: {
|
|
2496
|
+
200: {
|
|
2497
|
+
bodyMapper: ApplicationDefinition
|
|
2498
|
+
},
|
|
2499
|
+
201: {
|
|
2500
|
+
bodyMapper: ApplicationDefinition
|
|
2501
|
+
},
|
|
2502
|
+
202: {
|
|
2503
|
+
bodyMapper: ApplicationDefinition
|
|
2504
|
+
},
|
|
2505
|
+
204: {
|
|
2506
|
+
bodyMapper: ApplicationDefinition
|
|
2507
|
+
},
|
|
2508
|
+
default: {
|
|
2509
|
+
bodyMapper: ErrorResponse
|
|
2510
|
+
}
|
|
2511
|
+
},
|
|
2512
|
+
requestBody: parameters3,
|
|
2513
|
+
queryParameters: [apiVersion],
|
|
2514
|
+
urlParameters: [
|
|
2515
|
+
$host,
|
|
2516
|
+
resourceGroupName,
|
|
2517
|
+
subscriptionId,
|
|
2518
|
+
applicationDefinitionName
|
|
2519
|
+
],
|
|
2520
|
+
headerParameters: [accept, contentType],
|
|
2521
|
+
mediaType: "json",
|
|
2522
|
+
serializer: serializer$1
|
|
2523
|
+
};
|
|
2524
|
+
const listByResourceGroupOperationSpec$1 = {
|
|
2525
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions",
|
|
2526
|
+
httpMethod: "GET",
|
|
2527
|
+
responses: {
|
|
2528
|
+
200: {
|
|
2529
|
+
bodyMapper: ApplicationDefinitionListResult
|
|
2530
|
+
},
|
|
2531
|
+
default: {
|
|
2532
|
+
bodyMapper: ErrorResponse
|
|
2533
|
+
}
|
|
2534
|
+
},
|
|
2535
|
+
queryParameters: [apiVersion],
|
|
2536
|
+
urlParameters: [
|
|
2537
|
+
$host,
|
|
2538
|
+
resourceGroupName,
|
|
2539
|
+
subscriptionId
|
|
2540
|
+
],
|
|
2541
|
+
headerParameters: [accept],
|
|
2542
|
+
serializer: serializer$1
|
|
2543
|
+
};
|
|
2544
|
+
const getByIdOperationSpec$1 = {
|
|
2545
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}",
|
|
2546
|
+
httpMethod: "GET",
|
|
2547
|
+
responses: {
|
|
2548
|
+
200: {
|
|
2549
|
+
bodyMapper: ApplicationDefinition
|
|
2550
|
+
},
|
|
2551
|
+
404: {},
|
|
2552
|
+
default: {
|
|
2553
|
+
bodyMapper: ErrorResponse
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
queryParameters: [apiVersion],
|
|
2557
|
+
urlParameters: [
|
|
2558
|
+
$host,
|
|
2559
|
+
resourceGroupName,
|
|
2560
|
+
subscriptionId,
|
|
2561
|
+
applicationDefinitionName
|
|
2562
|
+
],
|
|
2563
|
+
headerParameters: [accept],
|
|
2564
|
+
serializer: serializer$1
|
|
2565
|
+
};
|
|
2566
|
+
const deleteByIdOperationSpec$1 = {
|
|
2567
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}",
|
|
2568
|
+
httpMethod: "DELETE",
|
|
2569
|
+
responses: {
|
|
2570
|
+
200: {},
|
|
2571
|
+
201: {},
|
|
2572
|
+
202: {},
|
|
2573
|
+
204: {},
|
|
2574
|
+
default: {
|
|
2575
|
+
bodyMapper: ErrorResponse
|
|
2576
|
+
}
|
|
2577
|
+
},
|
|
2578
|
+
queryParameters: [apiVersion],
|
|
2579
|
+
urlParameters: [
|
|
2580
|
+
$host,
|
|
2581
|
+
resourceGroupName,
|
|
2582
|
+
subscriptionId,
|
|
2583
|
+
applicationDefinitionName
|
|
2584
|
+
],
|
|
2585
|
+
headerParameters: [accept],
|
|
2586
|
+
serializer: serializer$1
|
|
2587
|
+
};
|
|
2588
|
+
const createOrUpdateByIdOperationSpec$1 = {
|
|
2589
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/applicationDefinitions/{applicationDefinitionName}",
|
|
2590
|
+
httpMethod: "PUT",
|
|
2591
|
+
responses: {
|
|
2592
|
+
200: {
|
|
2593
|
+
bodyMapper: ApplicationDefinition
|
|
2594
|
+
},
|
|
2595
|
+
201: {
|
|
2596
|
+
bodyMapper: ApplicationDefinition
|
|
2597
|
+
},
|
|
2598
|
+
202: {
|
|
2599
|
+
bodyMapper: ApplicationDefinition
|
|
2600
|
+
},
|
|
2601
|
+
204: {
|
|
2602
|
+
bodyMapper: ApplicationDefinition
|
|
2603
|
+
},
|
|
2604
|
+
default: {
|
|
2605
|
+
bodyMapper: ErrorResponse
|
|
2606
|
+
}
|
|
2607
|
+
},
|
|
2608
|
+
requestBody: parameters3,
|
|
2609
|
+
queryParameters: [apiVersion],
|
|
2610
|
+
urlParameters: [
|
|
2611
|
+
$host,
|
|
2612
|
+
resourceGroupName,
|
|
2613
|
+
subscriptionId,
|
|
2614
|
+
applicationDefinitionName
|
|
2615
|
+
],
|
|
2616
|
+
headerParameters: [accept, contentType],
|
|
2617
|
+
mediaType: "json",
|
|
2618
|
+
serializer: serializer$1
|
|
2619
|
+
};
|
|
2620
|
+
const listByResourceGroupNextOperationSpec$1 = {
|
|
2621
|
+
path: "{nextLink}",
|
|
2622
|
+
httpMethod: "GET",
|
|
2623
|
+
responses: {
|
|
2624
|
+
200: {
|
|
2625
|
+
bodyMapper: ApplicationDefinitionListResult
|
|
2626
|
+
},
|
|
2627
|
+
default: {
|
|
2628
|
+
bodyMapper: ErrorResponse
|
|
2629
|
+
}
|
|
2630
|
+
},
|
|
2631
|
+
queryParameters: [apiVersion],
|
|
2632
|
+
urlParameters: [
|
|
2633
|
+
$host,
|
|
2634
|
+
nextLink,
|
|
2635
|
+
resourceGroupName,
|
|
2636
|
+
subscriptionId
|
|
2637
|
+
],
|
|
2638
|
+
headerParameters: [accept],
|
|
2639
|
+
serializer: serializer$1
|
|
2640
|
+
};
|
|
2641
|
+
const listByResourceGroupNextNextOperationSpec$1 = {
|
|
2642
|
+
path: "{nextLink}",
|
|
2643
|
+
httpMethod: "GET",
|
|
2644
|
+
responses: {
|
|
2645
|
+
200: {
|
|
2646
|
+
bodyMapper: ApplicationDefinitionListResult
|
|
2647
|
+
},
|
|
2648
|
+
default: {
|
|
2649
|
+
bodyMapper: ErrorResponse
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
queryParameters: [apiVersion],
|
|
2653
|
+
urlParameters: [
|
|
2654
|
+
$host,
|
|
2655
|
+
nextLink,
|
|
2656
|
+
resourceGroupName,
|
|
2657
|
+
subscriptionId
|
|
2658
|
+
],
|
|
2659
|
+
headerParameters: [accept],
|
|
2660
|
+
serializer: serializer$1
|
|
2661
|
+
};
|
|
2662
|
+
|
|
2663
|
+
/*
|
|
2664
|
+
* Copyright (c) Microsoft Corporation.
|
|
2665
|
+
* Licensed under the MIT License.
|
|
2666
|
+
*
|
|
2667
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2668
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2669
|
+
*/
|
|
2670
|
+
class ApplicationClientContext extends coreClient.ServiceClient {
|
|
2671
|
+
/**
|
|
2672
|
+
* Initializes a new instance of the ApplicationClientContext class.
|
|
2673
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
2674
|
+
* @param subscriptionId The ID of the target subscription.
|
|
2675
|
+
* @param options The parameter options
|
|
2676
|
+
*/
|
|
2677
|
+
constructor(credentials, subscriptionId, options) {
|
|
2678
|
+
if (credentials === undefined) {
|
|
2679
|
+
throw new Error("'credentials' cannot be null");
|
|
2680
|
+
}
|
|
2681
|
+
if (subscriptionId === undefined) {
|
|
2682
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
2683
|
+
}
|
|
2684
|
+
// Initializing default values for options
|
|
2685
|
+
if (!options) {
|
|
2686
|
+
options = {};
|
|
2687
|
+
}
|
|
2688
|
+
const defaults = {
|
|
2689
|
+
requestContentType: "application/json; charset=utf-8",
|
|
2690
|
+
credential: credentials
|
|
2691
|
+
};
|
|
2692
|
+
const packageDetails = `azsdk-js-arm-managedapplications/2.0.0-beta.1`;
|
|
2693
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
2694
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
2695
|
+
: `${packageDetails}`;
|
|
2696
|
+
if (!options.credentialScopes) {
|
|
2697
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
2698
|
+
}
|
|
2699
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
2700
|
+
userAgentPrefix
|
|
2701
|
+
}, baseUri: options.endpoint || "https://management.azure.com" });
|
|
2702
|
+
super(optionsWithDefaults);
|
|
2703
|
+
// Parameter assignments
|
|
2704
|
+
this.subscriptionId = subscriptionId;
|
|
2705
|
+
// Assigning values to Constant parameters
|
|
2706
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
2707
|
+
this.apiVersion = options.apiVersion || "2018-06-01";
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
|
|
2711
|
+
/*
|
|
2712
|
+
* Copyright (c) Microsoft Corporation.
|
|
2713
|
+
* Licensed under the MIT License.
|
|
2714
|
+
*
|
|
2715
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
2716
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
2717
|
+
*/
|
|
2718
|
+
/// <reference lib="esnext.asynciterable" />
|
|
2719
|
+
class ApplicationClient extends ApplicationClientContext {
|
|
2720
|
+
/**
|
|
2721
|
+
* Initializes a new instance of the ApplicationClient class.
|
|
2722
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
2723
|
+
* @param subscriptionId The ID of the target subscription.
|
|
2724
|
+
* @param options The parameter options
|
|
2725
|
+
*/
|
|
2726
|
+
constructor(credentials, subscriptionId, options) {
|
|
2727
|
+
super(credentials, subscriptionId, options);
|
|
2728
|
+
this.applications = new ApplicationsImpl(this);
|
|
2729
|
+
this.applicationDefinitions = new ApplicationDefinitionsImpl(this);
|
|
2730
|
+
}
|
|
2731
|
+
/**
|
|
2732
|
+
* Lists all of the available Microsoft.Solutions REST API operations.
|
|
2733
|
+
* @param options The options parameters.
|
|
2734
|
+
*/
|
|
2735
|
+
listOperations(options) {
|
|
2736
|
+
const iter = this.listOperationsPagingAll(options);
|
|
2737
|
+
return {
|
|
2738
|
+
next() {
|
|
2739
|
+
return iter.next();
|
|
2740
|
+
},
|
|
2741
|
+
[Symbol.asyncIterator]() {
|
|
2742
|
+
return this;
|
|
2743
|
+
},
|
|
2744
|
+
byPage: () => {
|
|
2745
|
+
return this.listOperationsPagingPage(options);
|
|
2746
|
+
}
|
|
2747
|
+
};
|
|
2748
|
+
}
|
|
2749
|
+
listOperationsPagingPage(options) {
|
|
2750
|
+
return tslib.__asyncGenerator(this, arguments, function* listOperationsPagingPage_1() {
|
|
2751
|
+
let result = yield tslib.__await(this._listOperations(options));
|
|
2752
|
+
yield yield tslib.__await(result.value || []);
|
|
2753
|
+
let continuationToken = result.nextLink;
|
|
2754
|
+
while (continuationToken) {
|
|
2755
|
+
result = yield tslib.__await(this._listOperationsNext(continuationToken, options));
|
|
2756
|
+
continuationToken = result.nextLink;
|
|
2757
|
+
yield yield tslib.__await(result.value || []);
|
|
2758
|
+
}
|
|
2759
|
+
});
|
|
2760
|
+
}
|
|
2761
|
+
listOperationsPagingAll(options) {
|
|
2762
|
+
return tslib.__asyncGenerator(this, arguments, function* listOperationsPagingAll_1() {
|
|
2763
|
+
var e_1, _a;
|
|
2764
|
+
try {
|
|
2765
|
+
for (var _b = tslib.__asyncValues(this.listOperationsPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
2766
|
+
const page = _c.value;
|
|
2767
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2771
|
+
finally {
|
|
2772
|
+
try {
|
|
2773
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
2774
|
+
}
|
|
2775
|
+
finally { if (e_1) throw e_1.error; }
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
/**
|
|
2780
|
+
* ListOperationsNext
|
|
2781
|
+
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
|
2782
|
+
* @param options The options parameters.
|
|
2783
|
+
*/
|
|
2784
|
+
listOperationsNext(nextLink, options) {
|
|
2785
|
+
const iter = this.listOperationsNextPagingAll(nextLink, options);
|
|
2786
|
+
return {
|
|
2787
|
+
next() {
|
|
2788
|
+
return iter.next();
|
|
2789
|
+
},
|
|
2790
|
+
[Symbol.asyncIterator]() {
|
|
2791
|
+
return this;
|
|
2792
|
+
},
|
|
2793
|
+
byPage: () => {
|
|
2794
|
+
return this.listOperationsNextPagingPage(nextLink, options);
|
|
2795
|
+
}
|
|
2796
|
+
};
|
|
2797
|
+
}
|
|
2798
|
+
listOperationsNextPagingPage(nextLink, options) {
|
|
2799
|
+
return tslib.__asyncGenerator(this, arguments, function* listOperationsNextPagingPage_1() {
|
|
2800
|
+
let result = yield tslib.__await(this._listOperationsNext(nextLink, options));
|
|
2801
|
+
yield yield tslib.__await(result.value || []);
|
|
2802
|
+
let continuationToken = result.nextLink;
|
|
2803
|
+
while (continuationToken) {
|
|
2804
|
+
result = yield tslib.__await(this._listOperationsNextNext(continuationToken, options));
|
|
2805
|
+
continuationToken = result.nextLink;
|
|
2806
|
+
yield yield tslib.__await(result.value || []);
|
|
2807
|
+
}
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
listOperationsNextPagingAll(nextLink, options) {
|
|
2811
|
+
return tslib.__asyncGenerator(this, arguments, function* listOperationsNextPagingAll_1() {
|
|
2812
|
+
var e_2, _a;
|
|
2813
|
+
try {
|
|
2814
|
+
for (var _b = tslib.__asyncValues(this.listOperationsNextPagingPage(nextLink, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
2815
|
+
const page = _c.value;
|
|
2816
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2820
|
+
finally {
|
|
2821
|
+
try {
|
|
2822
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
2823
|
+
}
|
|
2824
|
+
finally { if (e_2) throw e_2.error; }
|
|
2825
|
+
}
|
|
2826
|
+
});
|
|
2827
|
+
}
|
|
2828
|
+
/**
|
|
2829
|
+
* Lists all of the available Microsoft.Solutions REST API operations.
|
|
2830
|
+
* @param options The options parameters.
|
|
2831
|
+
*/
|
|
2832
|
+
_listOperations(options) {
|
|
2833
|
+
return this.sendOperationRequest({ options }, listOperationsOperationSpec);
|
|
2834
|
+
}
|
|
2835
|
+
/**
|
|
2836
|
+
* ListOperationsNext
|
|
2837
|
+
* @param nextLink The nextLink from the previous successful call to the ListOperations method.
|
|
2838
|
+
* @param options The options parameters.
|
|
2839
|
+
*/
|
|
2840
|
+
_listOperationsNext(nextLink, options) {
|
|
2841
|
+
return this.sendOperationRequest({ nextLink, options }, listOperationsNextOperationSpec);
|
|
2842
|
+
}
|
|
2843
|
+
/**
|
|
2844
|
+
* ListOperationsNextNext
|
|
2845
|
+
* @param nextLink The nextLink from the previous successful call to the ListOperationsNext method.
|
|
2846
|
+
* @param options The options parameters.
|
|
2847
|
+
*/
|
|
2848
|
+
_listOperationsNextNext(nextLink, options) {
|
|
2849
|
+
return this.sendOperationRequest({ nextLink, options }, listOperationsNextNextOperationSpec);
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
// Operation Specifications
|
|
2853
|
+
const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
2854
|
+
const listOperationsOperationSpec = {
|
|
2855
|
+
path: "/providers/Microsoft.Solutions/operations",
|
|
2856
|
+
httpMethod: "GET",
|
|
2857
|
+
responses: {
|
|
2858
|
+
200: {
|
|
2859
|
+
bodyMapper: OperationListResult
|
|
2860
|
+
}
|
|
2861
|
+
},
|
|
2862
|
+
queryParameters: [apiVersion],
|
|
2863
|
+
urlParameters: [$host],
|
|
2864
|
+
headerParameters: [accept],
|
|
2865
|
+
serializer: serializer$2
|
|
2866
|
+
};
|
|
2867
|
+
const listOperationsNextOperationSpec = {
|
|
2868
|
+
path: "{nextLink}",
|
|
2869
|
+
httpMethod: "GET",
|
|
2870
|
+
responses: {
|
|
2871
|
+
200: {
|
|
2872
|
+
bodyMapper: OperationListResult
|
|
2873
|
+
}
|
|
2874
|
+
},
|
|
2875
|
+
queryParameters: [apiVersion],
|
|
2876
|
+
urlParameters: [$host, nextLink],
|
|
2877
|
+
headerParameters: [accept],
|
|
2878
|
+
serializer: serializer$2
|
|
2879
|
+
};
|
|
2880
|
+
const listOperationsNextNextOperationSpec = {
|
|
2881
|
+
path: "{nextLink}",
|
|
2882
|
+
httpMethod: "GET",
|
|
2883
|
+
responses: {
|
|
2884
|
+
200: {
|
|
2885
|
+
bodyMapper: OperationListResult
|
|
2886
|
+
}
|
|
2887
|
+
},
|
|
2888
|
+
queryParameters: [apiVersion],
|
|
2889
|
+
urlParameters: [$host, nextLink],
|
|
2890
|
+
headerParameters: [accept],
|
|
2891
|
+
serializer: serializer$2
|
|
2892
|
+
};
|
|
2893
|
+
|
|
2894
|
+
exports.ApplicationClient = ApplicationClient;
|
|
2895
|
+
exports.ApplicationClientContext = ApplicationClientContext;
|
|
2896
|
+
//# sourceMappingURL=index.js.map
|