@azure/arm-sqlvirtualmachine 5.0.0-beta.4 → 5.0.0-beta.6
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 +2 -2
- package/dist/index.js +276 -94
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +146 -34
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +81 -11
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +1 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +79 -1
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts +17 -17
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.js +66 -66
- package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +17 -17
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts +2 -0
- package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.js +48 -14
- package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +12 -9
- package/review/arm-sqlvirtualmachine.api.md +83 -103
- package/src/models/index.ts +159 -35
- package/src/models/mappers.ts +84 -1
- package/src/models/parameters.ts +1 -1
- package/src/operations/sqlVirtualMachines.ts +99 -99
- package/src/operationsInterfaces/sqlVirtualMachines.ts +26 -26
- package/src/sqlVirtualMachineManagementClient.ts +58 -17
- package/types/arm-sqlvirtualmachine.d.ts +184 -64
- package/types/tsdoc-metadata.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var tslib = require('tslib');
|
|
5
6
|
var coreClient = require('@azure/core-client');
|
|
6
7
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
|
-
var tslib = require('tslib');
|
|
8
8
|
var coreLro = require('@azure/core-lro');
|
|
9
9
|
|
|
10
10
|
function _interopNamespace(e) {
|
|
@@ -38,141 +38,211 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
|
|
|
38
38
|
/** Known values of {@link Role} that the service accepts. */
|
|
39
39
|
exports.KnownRole = void 0;
|
|
40
40
|
(function (KnownRole) {
|
|
41
|
+
/** Primary */
|
|
41
42
|
KnownRole["Primary"] = "PRIMARY";
|
|
43
|
+
/** Secondary */
|
|
42
44
|
KnownRole["Secondary"] = "SECONDARY";
|
|
43
45
|
})(exports.KnownRole || (exports.KnownRole = {}));
|
|
44
46
|
/** Known values of {@link Commit} that the service accepts. */
|
|
45
47
|
exports.KnownCommit = void 0;
|
|
46
48
|
(function (KnownCommit) {
|
|
49
|
+
/** SynchronousCommit */
|
|
47
50
|
KnownCommit["SynchronousCommit"] = "SYNCHRONOUS_COMMIT";
|
|
51
|
+
/** AsynchronousCommit */
|
|
48
52
|
KnownCommit["AsynchronousCommit"] = "ASYNCHRONOUS_COMMIT";
|
|
49
53
|
})(exports.KnownCommit || (exports.KnownCommit = {}));
|
|
50
54
|
/** Known values of {@link Failover} that the service accepts. */
|
|
51
55
|
exports.KnownFailover = void 0;
|
|
52
56
|
(function (KnownFailover) {
|
|
57
|
+
/** Automatic */
|
|
53
58
|
KnownFailover["Automatic"] = "AUTOMATIC";
|
|
59
|
+
/** Manual */
|
|
54
60
|
KnownFailover["Manual"] = "MANUAL";
|
|
55
61
|
})(exports.KnownFailover || (exports.KnownFailover = {}));
|
|
56
62
|
/** Known values of {@link ReadableSecondary} that the service accepts. */
|
|
57
63
|
exports.KnownReadableSecondary = void 0;
|
|
58
64
|
(function (KnownReadableSecondary) {
|
|
65
|
+
/** NO */
|
|
59
66
|
KnownReadableSecondary["NO"] = "NO";
|
|
67
|
+
/** ALL */
|
|
60
68
|
KnownReadableSecondary["ALL"] = "ALL";
|
|
69
|
+
/** ReadOnly */
|
|
61
70
|
KnownReadableSecondary["ReadOnly"] = "READ_ONLY";
|
|
62
71
|
})(exports.KnownReadableSecondary || (exports.KnownReadableSecondary = {}));
|
|
63
72
|
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
64
73
|
exports.KnownCreatedByType = void 0;
|
|
65
74
|
(function (KnownCreatedByType) {
|
|
75
|
+
/** User */
|
|
66
76
|
KnownCreatedByType["User"] = "User";
|
|
77
|
+
/** Application */
|
|
67
78
|
KnownCreatedByType["Application"] = "Application";
|
|
79
|
+
/** ManagedIdentity */
|
|
68
80
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
81
|
+
/** Key */
|
|
69
82
|
KnownCreatedByType["Key"] = "Key";
|
|
70
83
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
71
84
|
/** Known values of {@link OperationOrigin} that the service accepts. */
|
|
72
85
|
exports.KnownOperationOrigin = void 0;
|
|
73
86
|
(function (KnownOperationOrigin) {
|
|
87
|
+
/** User */
|
|
74
88
|
KnownOperationOrigin["User"] = "user";
|
|
89
|
+
/** System */
|
|
75
90
|
KnownOperationOrigin["System"] = "system";
|
|
76
91
|
})(exports.KnownOperationOrigin || (exports.KnownOperationOrigin = {}));
|
|
77
92
|
/** Known values of {@link SqlVmGroupImageSku} that the service accepts. */
|
|
78
93
|
exports.KnownSqlVmGroupImageSku = void 0;
|
|
79
94
|
(function (KnownSqlVmGroupImageSku) {
|
|
95
|
+
/** Developer */
|
|
80
96
|
KnownSqlVmGroupImageSku["Developer"] = "Developer";
|
|
97
|
+
/** Enterprise */
|
|
81
98
|
KnownSqlVmGroupImageSku["Enterprise"] = "Enterprise";
|
|
82
99
|
})(exports.KnownSqlVmGroupImageSku || (exports.KnownSqlVmGroupImageSku = {}));
|
|
83
100
|
/** Known values of {@link ScaleType} that the service accepts. */
|
|
84
101
|
exports.KnownScaleType = void 0;
|
|
85
102
|
(function (KnownScaleType) {
|
|
103
|
+
/** HA */
|
|
86
104
|
KnownScaleType["HA"] = "HA";
|
|
87
105
|
})(exports.KnownScaleType || (exports.KnownScaleType = {}));
|
|
88
106
|
/** Known values of {@link ClusterManagerType} that the service accepts. */
|
|
89
107
|
exports.KnownClusterManagerType = void 0;
|
|
90
108
|
(function (KnownClusterManagerType) {
|
|
109
|
+
/** Wsfc */
|
|
91
110
|
KnownClusterManagerType["Wsfc"] = "WSFC";
|
|
92
111
|
})(exports.KnownClusterManagerType || (exports.KnownClusterManagerType = {}));
|
|
93
112
|
/** Known values of {@link ClusterConfiguration} that the service accepts. */
|
|
94
113
|
exports.KnownClusterConfiguration = void 0;
|
|
95
114
|
(function (KnownClusterConfiguration) {
|
|
115
|
+
/** Domainful */
|
|
96
116
|
KnownClusterConfiguration["Domainful"] = "Domainful";
|
|
97
117
|
})(exports.KnownClusterConfiguration || (exports.KnownClusterConfiguration = {}));
|
|
118
|
+
/** Known values of {@link ClusterSubnetType} that the service accepts. */
|
|
119
|
+
exports.KnownClusterSubnetType = void 0;
|
|
120
|
+
(function (KnownClusterSubnetType) {
|
|
121
|
+
/** SingleSubnet */
|
|
122
|
+
KnownClusterSubnetType["SingleSubnet"] = "SingleSubnet";
|
|
123
|
+
/** MultiSubnet */
|
|
124
|
+
KnownClusterSubnetType["MultiSubnet"] = "MultiSubnet";
|
|
125
|
+
})(exports.KnownClusterSubnetType || (exports.KnownClusterSubnetType = {}));
|
|
98
126
|
/** Known values of {@link IdentityType} that the service accepts. */
|
|
99
127
|
exports.KnownIdentityType = void 0;
|
|
100
128
|
(function (KnownIdentityType) {
|
|
129
|
+
/** None */
|
|
101
130
|
KnownIdentityType["None"] = "None";
|
|
131
|
+
/** SystemAssigned */
|
|
102
132
|
KnownIdentityType["SystemAssigned"] = "SystemAssigned";
|
|
103
133
|
})(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
|
|
104
134
|
/** Known values of {@link SqlServerLicenseType} that the service accepts. */
|
|
105
135
|
exports.KnownSqlServerLicenseType = void 0;
|
|
106
136
|
(function (KnownSqlServerLicenseType) {
|
|
137
|
+
/** Payg */
|
|
107
138
|
KnownSqlServerLicenseType["Payg"] = "PAYG";
|
|
139
|
+
/** Ahub */
|
|
108
140
|
KnownSqlServerLicenseType["Ahub"] = "AHUB";
|
|
141
|
+
/** DR */
|
|
109
142
|
KnownSqlServerLicenseType["DR"] = "DR";
|
|
110
143
|
})(exports.KnownSqlServerLicenseType || (exports.KnownSqlServerLicenseType = {}));
|
|
111
144
|
/** Known values of {@link SqlManagementMode} that the service accepts. */
|
|
112
145
|
exports.KnownSqlManagementMode = void 0;
|
|
113
146
|
(function (KnownSqlManagementMode) {
|
|
147
|
+
/** Full */
|
|
114
148
|
KnownSqlManagementMode["Full"] = "Full";
|
|
149
|
+
/** LightWeight */
|
|
115
150
|
KnownSqlManagementMode["LightWeight"] = "LightWeight";
|
|
151
|
+
/** NoAgent */
|
|
116
152
|
KnownSqlManagementMode["NoAgent"] = "NoAgent";
|
|
117
153
|
})(exports.KnownSqlManagementMode || (exports.KnownSqlManagementMode = {}));
|
|
154
|
+
/** Known values of {@link LeastPrivilegeMode} that the service accepts. */
|
|
155
|
+
exports.KnownLeastPrivilegeMode = void 0;
|
|
156
|
+
(function (KnownLeastPrivilegeMode) {
|
|
157
|
+
/** Enabled */
|
|
158
|
+
KnownLeastPrivilegeMode["Enabled"] = "Enabled";
|
|
159
|
+
})(exports.KnownLeastPrivilegeMode || (exports.KnownLeastPrivilegeMode = {}));
|
|
118
160
|
/** Known values of {@link SqlImageSku} that the service accepts. */
|
|
119
161
|
exports.KnownSqlImageSku = void 0;
|
|
120
162
|
(function (KnownSqlImageSku) {
|
|
163
|
+
/** Developer */
|
|
121
164
|
KnownSqlImageSku["Developer"] = "Developer";
|
|
165
|
+
/** Express */
|
|
122
166
|
KnownSqlImageSku["Express"] = "Express";
|
|
167
|
+
/** Standard */
|
|
123
168
|
KnownSqlImageSku["Standard"] = "Standard";
|
|
169
|
+
/** Enterprise */
|
|
124
170
|
KnownSqlImageSku["Enterprise"] = "Enterprise";
|
|
171
|
+
/** Web */
|
|
125
172
|
KnownSqlImageSku["Web"] = "Web";
|
|
126
173
|
})(exports.KnownSqlImageSku || (exports.KnownSqlImageSku = {}));
|
|
127
174
|
/** Known values of {@link BackupScheduleType} that the service accepts. */
|
|
128
175
|
exports.KnownBackupScheduleType = void 0;
|
|
129
176
|
(function (KnownBackupScheduleType) {
|
|
177
|
+
/** Manual */
|
|
130
178
|
KnownBackupScheduleType["Manual"] = "Manual";
|
|
179
|
+
/** Automated */
|
|
131
180
|
KnownBackupScheduleType["Automated"] = "Automated";
|
|
132
181
|
})(exports.KnownBackupScheduleType || (exports.KnownBackupScheduleType = {}));
|
|
133
182
|
/** Known values of {@link FullBackupFrequencyType} that the service accepts. */
|
|
134
183
|
exports.KnownFullBackupFrequencyType = void 0;
|
|
135
184
|
(function (KnownFullBackupFrequencyType) {
|
|
185
|
+
/** Daily */
|
|
136
186
|
KnownFullBackupFrequencyType["Daily"] = "Daily";
|
|
187
|
+
/** Weekly */
|
|
137
188
|
KnownFullBackupFrequencyType["Weekly"] = "Weekly";
|
|
138
189
|
})(exports.KnownFullBackupFrequencyType || (exports.KnownFullBackupFrequencyType = {}));
|
|
139
|
-
/** Known values of {@link
|
|
140
|
-
exports.
|
|
141
|
-
(function (
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
190
|
+
/** Known values of {@link AutoBackupDaysOfWeek} that the service accepts. */
|
|
191
|
+
exports.KnownAutoBackupDaysOfWeek = void 0;
|
|
192
|
+
(function (KnownAutoBackupDaysOfWeek) {
|
|
193
|
+
/** Monday */
|
|
194
|
+
KnownAutoBackupDaysOfWeek["Monday"] = "Monday";
|
|
195
|
+
/** Tuesday */
|
|
196
|
+
KnownAutoBackupDaysOfWeek["Tuesday"] = "Tuesday";
|
|
197
|
+
/** Wednesday */
|
|
198
|
+
KnownAutoBackupDaysOfWeek["Wednesday"] = "Wednesday";
|
|
199
|
+
/** Thursday */
|
|
200
|
+
KnownAutoBackupDaysOfWeek["Thursday"] = "Thursday";
|
|
201
|
+
/** Friday */
|
|
202
|
+
KnownAutoBackupDaysOfWeek["Friday"] = "Friday";
|
|
203
|
+
/** Saturday */
|
|
204
|
+
KnownAutoBackupDaysOfWeek["Saturday"] = "Saturday";
|
|
205
|
+
/** Sunday */
|
|
206
|
+
KnownAutoBackupDaysOfWeek["Sunday"] = "Sunday";
|
|
207
|
+
})(exports.KnownAutoBackupDaysOfWeek || (exports.KnownAutoBackupDaysOfWeek = {}));
|
|
150
208
|
/** Known values of {@link ConnectivityType} that the service accepts. */
|
|
151
209
|
exports.KnownConnectivityType = void 0;
|
|
152
210
|
(function (KnownConnectivityType) {
|
|
211
|
+
/** Local */
|
|
153
212
|
KnownConnectivityType["Local"] = "LOCAL";
|
|
213
|
+
/** Private */
|
|
154
214
|
KnownConnectivityType["Private"] = "PRIVATE";
|
|
215
|
+
/** Public */
|
|
155
216
|
KnownConnectivityType["Public"] = "PUBLIC";
|
|
156
217
|
})(exports.KnownConnectivityType || (exports.KnownConnectivityType = {}));
|
|
157
218
|
/** Known values of {@link SqlWorkloadType} that the service accepts. */
|
|
158
219
|
exports.KnownSqlWorkloadType = void 0;
|
|
159
220
|
(function (KnownSqlWorkloadType) {
|
|
221
|
+
/** General */
|
|
160
222
|
KnownSqlWorkloadType["General"] = "GENERAL";
|
|
223
|
+
/** Oltp */
|
|
161
224
|
KnownSqlWorkloadType["Oltp"] = "OLTP";
|
|
225
|
+
/** DW */
|
|
162
226
|
KnownSqlWorkloadType["DW"] = "DW";
|
|
163
227
|
})(exports.KnownSqlWorkloadType || (exports.KnownSqlWorkloadType = {}));
|
|
164
228
|
/** Known values of {@link DiskConfigurationType} that the service accepts. */
|
|
165
229
|
exports.KnownDiskConfigurationType = void 0;
|
|
166
230
|
(function (KnownDiskConfigurationType) {
|
|
231
|
+
/** NEW */
|
|
167
232
|
KnownDiskConfigurationType["NEW"] = "NEW";
|
|
233
|
+
/** Extend */
|
|
168
234
|
KnownDiskConfigurationType["Extend"] = "EXTEND";
|
|
235
|
+
/** ADD */
|
|
169
236
|
KnownDiskConfigurationType["ADD"] = "ADD";
|
|
170
237
|
})(exports.KnownDiskConfigurationType || (exports.KnownDiskConfigurationType = {}));
|
|
171
238
|
/** Known values of {@link StorageWorkloadType} that the service accepts. */
|
|
172
239
|
exports.KnownStorageWorkloadType = void 0;
|
|
173
240
|
(function (KnownStorageWorkloadType) {
|
|
241
|
+
/** General */
|
|
174
242
|
KnownStorageWorkloadType["General"] = "GENERAL";
|
|
243
|
+
/** Oltp */
|
|
175
244
|
KnownStorageWorkloadType["Oltp"] = "OLTP";
|
|
245
|
+
/** DW */
|
|
176
246
|
KnownStorageWorkloadType["DW"] = "DW";
|
|
177
247
|
})(exports.KnownStorageWorkloadType || (exports.KnownStorageWorkloadType = {}));
|
|
178
248
|
|
|
@@ -247,6 +317,28 @@ const PrivateIPAddress = {
|
|
|
247
317
|
}
|
|
248
318
|
}
|
|
249
319
|
};
|
|
320
|
+
const MultiSubnetIpConfiguration = {
|
|
321
|
+
type: {
|
|
322
|
+
name: "Composite",
|
|
323
|
+
className: "MultiSubnetIpConfiguration",
|
|
324
|
+
modelProperties: {
|
|
325
|
+
privateIpAddress: {
|
|
326
|
+
serializedName: "privateIpAddress",
|
|
327
|
+
type: {
|
|
328
|
+
name: "Composite",
|
|
329
|
+
className: "PrivateIPAddress"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
sqlVirtualMachineInstance: {
|
|
333
|
+
serializedName: "sqlVirtualMachineInstance",
|
|
334
|
+
required: true,
|
|
335
|
+
type: {
|
|
336
|
+
name: "String"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
};
|
|
250
342
|
const AgConfiguration = {
|
|
251
343
|
type: {
|
|
252
344
|
name: "Composite",
|
|
@@ -254,7 +346,6 @@ const AgConfiguration = {
|
|
|
254
346
|
modelProperties: {
|
|
255
347
|
replicas: {
|
|
256
348
|
serializedName: "replicas",
|
|
257
|
-
readOnly: true,
|
|
258
349
|
type: {
|
|
259
350
|
name: "Sequence",
|
|
260
351
|
element: {
|
|
@@ -562,6 +653,12 @@ const WsfcDomainProfile = {
|
|
|
562
653
|
type: {
|
|
563
654
|
name: "String"
|
|
564
655
|
}
|
|
656
|
+
},
|
|
657
|
+
clusterSubnetType: {
|
|
658
|
+
serializedName: "clusterSubnetType",
|
|
659
|
+
type: {
|
|
660
|
+
name: "String"
|
|
661
|
+
}
|
|
565
662
|
}
|
|
566
663
|
}
|
|
567
664
|
}
|
|
@@ -707,6 +804,7 @@ const AutoPatchingSettings = {
|
|
|
707
804
|
type: {
|
|
708
805
|
name: "Enum",
|
|
709
806
|
allowedValues: [
|
|
807
|
+
"Everyday",
|
|
710
808
|
"Monday",
|
|
711
809
|
"Tuesday",
|
|
712
810
|
"Wednesday",
|
|
@@ -1030,6 +1128,18 @@ const SQLInstanceSettings = {
|
|
|
1030
1128
|
type: {
|
|
1031
1129
|
name: "Number"
|
|
1032
1130
|
}
|
|
1131
|
+
},
|
|
1132
|
+
isLpimEnabled: {
|
|
1133
|
+
serializedName: "isLpimEnabled",
|
|
1134
|
+
type: {
|
|
1135
|
+
name: "Boolean"
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
isIfiEnabled: {
|
|
1139
|
+
serializedName: "isIfiEnabled",
|
|
1140
|
+
type: {
|
|
1141
|
+
name: "Boolean"
|
|
1142
|
+
}
|
|
1033
1143
|
}
|
|
1034
1144
|
}
|
|
1035
1145
|
}
|
|
@@ -1141,6 +1251,18 @@ const SQLTempDbSettings = {
|
|
|
1141
1251
|
name: "Number"
|
|
1142
1252
|
}
|
|
1143
1253
|
},
|
|
1254
|
+
persistFolder: {
|
|
1255
|
+
serializedName: "persistFolder",
|
|
1256
|
+
type: {
|
|
1257
|
+
name: "Boolean"
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
persistFolderPath: {
|
|
1261
|
+
serializedName: "persistFolderPath",
|
|
1262
|
+
type: {
|
|
1263
|
+
name: "String"
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1144
1266
|
luns: {
|
|
1145
1267
|
serializedName: "luns",
|
|
1146
1268
|
type: {
|
|
@@ -1308,6 +1430,17 @@ const AvailabilityGroupListener = {
|
|
|
1308
1430
|
}
|
|
1309
1431
|
}
|
|
1310
1432
|
}
|
|
1433
|
+
}, multiSubnetIpConfigurations: {
|
|
1434
|
+
serializedName: "properties.multiSubnetIpConfigurations",
|
|
1435
|
+
type: {
|
|
1436
|
+
name: "Sequence",
|
|
1437
|
+
element: {
|
|
1438
|
+
type: {
|
|
1439
|
+
name: "Composite",
|
|
1440
|
+
className: "MultiSubnetIpConfiguration"
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1311
1444
|
}, createDefaultAvailabilityGroupIfNotExist: {
|
|
1312
1445
|
serializedName: "properties.createDefaultAvailabilityGroupIfNotExist",
|
|
1313
1446
|
type: {
|
|
@@ -1422,6 +1555,11 @@ const SqlVirtualMachine = {
|
|
|
1422
1555
|
type: {
|
|
1423
1556
|
name: "String"
|
|
1424
1557
|
}
|
|
1558
|
+
}, leastPrivilegeMode: {
|
|
1559
|
+
serializedName: "properties.leastPrivilegeMode",
|
|
1560
|
+
type: {
|
|
1561
|
+
name: "String"
|
|
1562
|
+
}
|
|
1425
1563
|
}, sqlImageSku: {
|
|
1426
1564
|
serializedName: "properties.sqlImageSku",
|
|
1427
1565
|
type: {
|
|
@@ -1438,6 +1576,11 @@ const SqlVirtualMachine = {
|
|
|
1438
1576
|
name: "Composite",
|
|
1439
1577
|
className: "WsfcDomainCredentials"
|
|
1440
1578
|
}
|
|
1579
|
+
}, wsfcStaticIp: {
|
|
1580
|
+
serializedName: "properties.wsfcStaticIp",
|
|
1581
|
+
type: {
|
|
1582
|
+
name: "String"
|
|
1583
|
+
}
|
|
1441
1584
|
}, autoPatchingSettings: {
|
|
1442
1585
|
serializedName: "properties.autoPatchingSettings",
|
|
1443
1586
|
type: {
|
|
@@ -1474,6 +1617,11 @@ const SqlVirtualMachine = {
|
|
|
1474
1617
|
name: "Composite",
|
|
1475
1618
|
className: "AssessmentSettings"
|
|
1476
1619
|
}
|
|
1620
|
+
}, enableAutomaticUpgrade: {
|
|
1621
|
+
serializedName: "properties.enableAutomaticUpgrade",
|
|
1622
|
+
type: {
|
|
1623
|
+
name: "Boolean"
|
|
1624
|
+
}
|
|
1477
1625
|
} })
|
|
1478
1626
|
}
|
|
1479
1627
|
};
|
|
@@ -1482,6 +1630,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
|
|
|
1482
1630
|
__proto__: null,
|
|
1483
1631
|
LoadBalancerConfiguration: LoadBalancerConfiguration,
|
|
1484
1632
|
PrivateIPAddress: PrivateIPAddress,
|
|
1633
|
+
MultiSubnetIpConfiguration: MultiSubnetIpConfiguration,
|
|
1485
1634
|
AgConfiguration: AgConfiguration,
|
|
1486
1635
|
AgReplica: AgReplica,
|
|
1487
1636
|
SystemData: SystemData,
|
|
@@ -1599,7 +1748,7 @@ const subscriptionId = {
|
|
|
1599
1748
|
const apiVersion = {
|
|
1600
1749
|
parameterPath: "apiVersion",
|
|
1601
1750
|
mapper: {
|
|
1602
|
-
defaultValue: "
|
|
1751
|
+
defaultValue: "2022-07-01-preview",
|
|
1603
1752
|
isConstant: true,
|
|
1604
1753
|
serializedName: "api-version",
|
|
1605
1754
|
type: {
|
|
@@ -2807,13 +2956,13 @@ class SqlVirtualMachinesImpl {
|
|
|
2807
2956
|
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
2808
2957
|
}
|
|
2809
2958
|
/**
|
|
2810
|
-
*
|
|
2959
|
+
* Starts Assessment on SQL virtual machine.
|
|
2811
2960
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2812
2961
|
* value from the Azure Resource Manager API or the portal.
|
|
2813
2962
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2814
2963
|
* @param options The options parameters.
|
|
2815
2964
|
*/
|
|
2816
|
-
|
|
2965
|
+
beginStartAssessment(resourceGroupName, sqlVirtualMachineName, options) {
|
|
2817
2966
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2818
2967
|
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2819
2968
|
return this.client.sendOperationRequest(args, spec);
|
|
@@ -2837,7 +2986,7 @@ class SqlVirtualMachinesImpl {
|
|
|
2837
2986
|
}
|
|
2838
2987
|
};
|
|
2839
2988
|
});
|
|
2840
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options },
|
|
2989
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, startAssessmentOperationSpec);
|
|
2841
2990
|
const poller = new coreLro.LroEngine(lro, {
|
|
2842
2991
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2843
2992
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
@@ -2847,37 +2996,26 @@ class SqlVirtualMachinesImpl {
|
|
|
2847
2996
|
});
|
|
2848
2997
|
}
|
|
2849
2998
|
/**
|
|
2850
|
-
*
|
|
2999
|
+
* Starts Assessment on SQL virtual machine.
|
|
2851
3000
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2852
3001
|
* value from the Azure Resource Manager API or the portal.
|
|
2853
3002
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2854
3003
|
* @param options The options parameters.
|
|
2855
3004
|
*/
|
|
2856
|
-
|
|
3005
|
+
beginStartAssessmentAndWait(resourceGroupName, sqlVirtualMachineName, options) {
|
|
2857
3006
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2858
|
-
const poller = yield this.
|
|
3007
|
+
const poller = yield this.beginStartAssessment(resourceGroupName, sqlVirtualMachineName, options);
|
|
2859
3008
|
return poller.pollUntilDone();
|
|
2860
3009
|
});
|
|
2861
3010
|
}
|
|
2862
3011
|
/**
|
|
2863
|
-
*
|
|
2864
|
-
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2865
|
-
* value from the Azure Resource Manager API or the portal.
|
|
2866
|
-
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2867
|
-
* @param options The options parameters.
|
|
2868
|
-
*/
|
|
2869
|
-
get(resourceGroupName, sqlVirtualMachineName, options) {
|
|
2870
|
-
return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineName, options }, getOperationSpec);
|
|
2871
|
-
}
|
|
2872
|
-
/**
|
|
2873
|
-
* Creates or updates a SQL virtual machine.
|
|
3012
|
+
* Uninstalls and reinstalls the SQL Iaas Extension.
|
|
2874
3013
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2875
3014
|
* value from the Azure Resource Manager API or the portal.
|
|
2876
3015
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2877
|
-
* @param parameters The SQL virtual machine.
|
|
2878
3016
|
* @param options The options parameters.
|
|
2879
3017
|
*/
|
|
2880
|
-
|
|
3018
|
+
beginRedeploy(resourceGroupName, sqlVirtualMachineName, options) {
|
|
2881
3019
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2882
3020
|
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2883
3021
|
return this.client.sendOperationRequest(args, spec);
|
|
@@ -2901,7 +3039,7 @@ class SqlVirtualMachinesImpl {
|
|
|
2901
3039
|
}
|
|
2902
3040
|
};
|
|
2903
3041
|
});
|
|
2904
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName,
|
|
3042
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, redeployOperationSpec);
|
|
2905
3043
|
const poller = new coreLro.LroEngine(lro, {
|
|
2906
3044
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2907
3045
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
@@ -2911,27 +3049,37 @@ class SqlVirtualMachinesImpl {
|
|
|
2911
3049
|
});
|
|
2912
3050
|
}
|
|
2913
3051
|
/**
|
|
2914
|
-
*
|
|
3052
|
+
* Uninstalls and reinstalls the SQL Iaas Extension.
|
|
2915
3053
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2916
3054
|
* value from the Azure Resource Manager API or the portal.
|
|
2917
3055
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2918
|
-
* @param parameters The SQL virtual machine.
|
|
2919
3056
|
* @param options The options parameters.
|
|
2920
3057
|
*/
|
|
2921
|
-
|
|
3058
|
+
beginRedeployAndWait(resourceGroupName, sqlVirtualMachineName, options) {
|
|
2922
3059
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2923
|
-
const poller = yield this.
|
|
3060
|
+
const poller = yield this.beginRedeploy(resourceGroupName, sqlVirtualMachineName, options);
|
|
2924
3061
|
return poller.pollUntilDone();
|
|
2925
3062
|
});
|
|
2926
3063
|
}
|
|
2927
3064
|
/**
|
|
2928
|
-
*
|
|
3065
|
+
* Gets a SQL virtual machine.
|
|
2929
3066
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2930
3067
|
* value from the Azure Resource Manager API or the portal.
|
|
2931
3068
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2932
3069
|
* @param options The options parameters.
|
|
2933
3070
|
*/
|
|
2934
|
-
|
|
3071
|
+
get(resourceGroupName, sqlVirtualMachineName, options) {
|
|
3072
|
+
return this.client.sendOperationRequest({ resourceGroupName, sqlVirtualMachineName, options }, getOperationSpec);
|
|
3073
|
+
}
|
|
3074
|
+
/**
|
|
3075
|
+
* Creates or updates a SQL virtual machine.
|
|
3076
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
3077
|
+
* value from the Azure Resource Manager API or the portal.
|
|
3078
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
3079
|
+
* @param parameters The SQL virtual machine.
|
|
3080
|
+
* @param options The options parameters.
|
|
3081
|
+
*/
|
|
3082
|
+
beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options) {
|
|
2935
3083
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2936
3084
|
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2937
3085
|
return this.client.sendOperationRequest(args, spec);
|
|
@@ -2955,7 +3103,7 @@ class SqlVirtualMachinesImpl {
|
|
|
2955
3103
|
}
|
|
2956
3104
|
};
|
|
2957
3105
|
});
|
|
2958
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options },
|
|
3106
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, createOrUpdateOperationSpec);
|
|
2959
3107
|
const poller = new coreLro.LroEngine(lro, {
|
|
2960
3108
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2961
3109
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
@@ -2965,27 +3113,27 @@ class SqlVirtualMachinesImpl {
|
|
|
2965
3113
|
});
|
|
2966
3114
|
}
|
|
2967
3115
|
/**
|
|
2968
|
-
*
|
|
3116
|
+
* Creates or updates a SQL virtual machine.
|
|
2969
3117
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2970
3118
|
* value from the Azure Resource Manager API or the portal.
|
|
2971
3119
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
3120
|
+
* @param parameters The SQL virtual machine.
|
|
2972
3121
|
* @param options The options parameters.
|
|
2973
3122
|
*/
|
|
2974
|
-
|
|
3123
|
+
beginCreateOrUpdateAndWait(resourceGroupName, sqlVirtualMachineName, parameters, options) {
|
|
2975
3124
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2976
|
-
const poller = yield this.
|
|
3125
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options);
|
|
2977
3126
|
return poller.pollUntilDone();
|
|
2978
3127
|
});
|
|
2979
3128
|
}
|
|
2980
3129
|
/**
|
|
2981
|
-
*
|
|
3130
|
+
* Deletes a SQL virtual machine.
|
|
2982
3131
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
2983
3132
|
* value from the Azure Resource Manager API or the portal.
|
|
2984
3133
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
2985
|
-
* @param parameters The SQL virtual machine.
|
|
2986
3134
|
* @param options The options parameters.
|
|
2987
3135
|
*/
|
|
2988
|
-
|
|
3136
|
+
beginDelete(resourceGroupName, sqlVirtualMachineName, options) {
|
|
2989
3137
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2990
3138
|
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
2991
3139
|
return this.client.sendOperationRequest(args, spec);
|
|
@@ -3009,7 +3157,7 @@ class SqlVirtualMachinesImpl {
|
|
|
3009
3157
|
}
|
|
3010
3158
|
};
|
|
3011
3159
|
});
|
|
3012
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName,
|
|
3160
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, deleteOperationSpec);
|
|
3013
3161
|
const poller = new coreLro.LroEngine(lro, {
|
|
3014
3162
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
3015
3163
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
@@ -3019,36 +3167,27 @@ class SqlVirtualMachinesImpl {
|
|
|
3019
3167
|
});
|
|
3020
3168
|
}
|
|
3021
3169
|
/**
|
|
3022
|
-
*
|
|
3170
|
+
* Deletes a SQL virtual machine.
|
|
3023
3171
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
3024
3172
|
* value from the Azure Resource Manager API or the portal.
|
|
3025
3173
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
3026
|
-
* @param parameters The SQL virtual machine.
|
|
3027
3174
|
* @param options The options parameters.
|
|
3028
3175
|
*/
|
|
3029
|
-
|
|
3176
|
+
beginDeleteAndWait(resourceGroupName, sqlVirtualMachineName, options) {
|
|
3030
3177
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3031
|
-
const poller = yield this.
|
|
3178
|
+
const poller = yield this.beginDelete(resourceGroupName, sqlVirtualMachineName, options);
|
|
3032
3179
|
return poller.pollUntilDone();
|
|
3033
3180
|
});
|
|
3034
3181
|
}
|
|
3035
3182
|
/**
|
|
3036
|
-
*
|
|
3037
|
-
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
3038
|
-
* value from the Azure Resource Manager API or the portal.
|
|
3039
|
-
* @param options The options parameters.
|
|
3040
|
-
*/
|
|
3041
|
-
_listByResourceGroup(resourceGroupName, options) {
|
|
3042
|
-
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
|
3043
|
-
}
|
|
3044
|
-
/**
|
|
3045
|
-
* Starts Assessment on SQL virtual machine.
|
|
3183
|
+
* Updates a SQL virtual machine.
|
|
3046
3184
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
3047
3185
|
* value from the Azure Resource Manager API or the portal.
|
|
3048
3186
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
3187
|
+
* @param parameters The SQL virtual machine.
|
|
3049
3188
|
* @param options The options parameters.
|
|
3050
3189
|
*/
|
|
3051
|
-
|
|
3190
|
+
beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options) {
|
|
3052
3191
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3053
3192
|
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3054
3193
|
return this.client.sendOperationRequest(args, spec);
|
|
@@ -3072,7 +3211,7 @@ class SqlVirtualMachinesImpl {
|
|
|
3072
3211
|
}
|
|
3073
3212
|
};
|
|
3074
3213
|
});
|
|
3075
|
-
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options },
|
|
3214
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, parameters, options }, updateOperationSpec);
|
|
3076
3215
|
const poller = new coreLro.LroEngine(lro, {
|
|
3077
3216
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
3078
3217
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
@@ -3082,18 +3221,28 @@ class SqlVirtualMachinesImpl {
|
|
|
3082
3221
|
});
|
|
3083
3222
|
}
|
|
3084
3223
|
/**
|
|
3085
|
-
*
|
|
3224
|
+
* Updates a SQL virtual machine.
|
|
3086
3225
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
3087
3226
|
* value from the Azure Resource Manager API or the portal.
|
|
3088
3227
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
3228
|
+
* @param parameters The SQL virtual machine.
|
|
3089
3229
|
* @param options The options parameters.
|
|
3090
3230
|
*/
|
|
3091
|
-
|
|
3231
|
+
beginUpdateAndWait(resourceGroupName, sqlVirtualMachineName, parameters, options) {
|
|
3092
3232
|
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3093
|
-
const poller = yield this.
|
|
3233
|
+
const poller = yield this.beginUpdate(resourceGroupName, sqlVirtualMachineName, parameters, options);
|
|
3094
3234
|
return poller.pollUntilDone();
|
|
3095
3235
|
});
|
|
3096
3236
|
}
|
|
3237
|
+
/**
|
|
3238
|
+
* Gets all SQL virtual machines in a resource group.
|
|
3239
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
3240
|
+
* value from the Azure Resource Manager API or the portal.
|
|
3241
|
+
* @param options The options parameters.
|
|
3242
|
+
*/
|
|
3243
|
+
_listByResourceGroup(resourceGroupName, options) {
|
|
3244
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
|
|
3245
|
+
}
|
|
3097
3246
|
/**
|
|
3098
3247
|
* ListBySqlVmGroupNext
|
|
3099
3248
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
@@ -3159,6 +3308,19 @@ const listOperationSpec = {
|
|
|
3159
3308
|
headerParameters: [accept],
|
|
3160
3309
|
serializer
|
|
3161
3310
|
};
|
|
3311
|
+
const startAssessmentOperationSpec = {
|
|
3312
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
|
|
3313
|
+
httpMethod: "POST",
|
|
3314
|
+
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
3315
|
+
queryParameters: [apiVersion],
|
|
3316
|
+
urlParameters: [
|
|
3317
|
+
$host,
|
|
3318
|
+
resourceGroupName,
|
|
3319
|
+
subscriptionId,
|
|
3320
|
+
sqlVirtualMachineName
|
|
3321
|
+
],
|
|
3322
|
+
serializer
|
|
3323
|
+
};
|
|
3162
3324
|
const redeployOperationSpec = {
|
|
3163
3325
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
|
|
3164
3326
|
httpMethod: "POST",
|
|
@@ -3282,19 +3444,6 @@ const listByResourceGroupOperationSpec = {
|
|
|
3282
3444
|
headerParameters: [accept],
|
|
3283
3445
|
serializer
|
|
3284
3446
|
};
|
|
3285
|
-
const startAssessmentOperationSpec = {
|
|
3286
|
-
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
|
|
3287
|
-
httpMethod: "POST",
|
|
3288
|
-
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
3289
|
-
queryParameters: [apiVersion],
|
|
3290
|
-
urlParameters: [
|
|
3291
|
-
$host,
|
|
3292
|
-
resourceGroupName,
|
|
3293
|
-
subscriptionId,
|
|
3294
|
-
sqlVirtualMachineName
|
|
3295
|
-
],
|
|
3296
|
-
serializer
|
|
3297
|
-
};
|
|
3298
3447
|
const listBySqlVmGroupNextOperationSpec = {
|
|
3299
3448
|
path: "{nextLink}",
|
|
3300
3449
|
httpMethod: "GET",
|
|
@@ -3383,7 +3532,7 @@ class SqlVirtualMachineManagementClient extends coreClient__namespace.ServiceCli
|
|
|
3383
3532
|
requestContentType: "application/json; charset=utf-8",
|
|
3384
3533
|
credential: credentials
|
|
3385
3534
|
};
|
|
3386
|
-
const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.
|
|
3535
|
+
const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.6`;
|
|
3387
3536
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
3388
3537
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
3389
3538
|
: `${packageDetails}`;
|
|
@@ -3394,31 +3543,64 @@ class SqlVirtualMachineManagementClient extends coreClient__namespace.ServiceCli
|
|
|
3394
3543
|
userAgentPrefix
|
|
3395
3544
|
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
3396
3545
|
super(optionsWithDefaults);
|
|
3546
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
3397
3547
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
3398
3548
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
3399
|
-
|
|
3549
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
3400
3550
|
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3551
|
+
}
|
|
3552
|
+
if (!options ||
|
|
3553
|
+
!options.pipeline ||
|
|
3554
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
3555
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
3556
|
+
this.pipeline.removePolicy({
|
|
3557
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
3558
|
+
});
|
|
3559
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
3560
|
+
credential: credentials,
|
|
3561
|
+
scopes: `${optionsWithDefaults.credentialScopes}`,
|
|
3562
|
+
challengeCallbacks: {
|
|
3563
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
3564
|
+
}
|
|
3565
|
+
}));
|
|
3412
3566
|
}
|
|
3413
3567
|
// Parameter assignments
|
|
3414
3568
|
this.subscriptionId = subscriptionId;
|
|
3415
3569
|
// Assigning values to Constant parameters
|
|
3416
3570
|
this.$host = options.$host || "https://management.azure.com";
|
|
3417
|
-
this.apiVersion = options.apiVersion || "
|
|
3571
|
+
this.apiVersion = options.apiVersion || "2022-07-01-preview";
|
|
3418
3572
|
this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
|
|
3419
3573
|
this.operations = new OperationsImpl(this);
|
|
3420
3574
|
this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
|
|
3421
3575
|
this.sqlVirtualMachines = new SqlVirtualMachinesImpl(this);
|
|
3576
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
3577
|
+
}
|
|
3578
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
3579
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
3580
|
+
if (!apiVersion) {
|
|
3581
|
+
return;
|
|
3582
|
+
}
|
|
3583
|
+
const apiVersionPolicy = {
|
|
3584
|
+
name: "CustomApiVersionPolicy",
|
|
3585
|
+
sendRequest(request, next) {
|
|
3586
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3587
|
+
const param = request.url.split("?");
|
|
3588
|
+
if (param.length > 1) {
|
|
3589
|
+
const newParams = param[1].split("&").map((item) => {
|
|
3590
|
+
if (item.indexOf("api-version") > -1) {
|
|
3591
|
+
return "api-version=" + apiVersion;
|
|
3592
|
+
}
|
|
3593
|
+
else {
|
|
3594
|
+
return item;
|
|
3595
|
+
}
|
|
3596
|
+
});
|
|
3597
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
3598
|
+
}
|
|
3599
|
+
return next(request);
|
|
3600
|
+
});
|
|
3601
|
+
}
|
|
3602
|
+
};
|
|
3603
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
3422
3604
|
}
|
|
3423
3605
|
}
|
|
3424
3606
|
|