@azure/arm-mysql-flexible 2.0.0 → 3.0.1-alpha.20220427.2

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/index.js +61 -145
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/serversCreateSample.js +0 -44
  7. package/dist-esm/samples-dev/serversCreateSample.js.map +1 -1
  8. package/dist-esm/samples-dev/serversUpdateSample.js +0 -33
  9. package/dist-esm/samples-dev/serversUpdateSample.js.map +1 -1
  10. package/dist-esm/src/models/index.d.ts +0 -55
  11. package/dist-esm/src/models/index.d.ts.map +1 -1
  12. package/dist-esm/src/models/index.js.map +1 -1
  13. package/dist-esm/src/models/mappers.d.ts +0 -3
  14. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  15. package/dist-esm/src/models/mappers.js +1 -127
  16. package/dist-esm/src/models/mappers.js.map +1 -1
  17. package/dist-esm/src/mySQLManagementFlexibleServerClient.d.ts.map +1 -1
  18. package/dist-esm/src/mySQLManagementFlexibleServerClient.js +20 -2
  19. package/dist-esm/src/mySQLManagementFlexibleServerClient.js.map +1 -1
  20. package/dist-esm/src/operations/configurations.d.ts.map +1 -1
  21. package/dist-esm/src/operations/configurations.js +6 -2
  22. package/dist-esm/src/operations/configurations.js.map +1 -1
  23. package/dist-esm/src/operations/databases.d.ts.map +1 -1
  24. package/dist-esm/src/operations/databases.js +6 -2
  25. package/dist-esm/src/operations/databases.js.map +1 -1
  26. package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
  27. package/dist-esm/src/operations/firewallRules.js +6 -2
  28. package/dist-esm/src/operations/firewallRules.js.map +1 -1
  29. package/dist-esm/src/operations/servers.d.ts.map +1 -1
  30. package/dist-esm/src/operations/servers.js +21 -7
  31. package/dist-esm/src/operations/servers.js.map +1 -1
  32. package/package.json +4 -4
  33. package/review/arm-mysql-flexible.api.md +0 -32
  34. package/src/models/index.ts +0 -56
  35. package/src/models/mappers.ts +0 -131
  36. package/src/mySQLManagementFlexibleServerClient.ts +27 -2
  37. package/src/operations/configurations.ts +6 -2
  38. package/src/operations/databases.ts +6 -2
  39. package/src/operations/firewallRules.ts +6 -2
  40. package/src/operations/servers.ts +21 -7
  41. package/types/arm-mysql-flexible.d.ts +0 -59
  42. package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,24 @@
1
1
  # Release History
2
+
3
+ ## 3.0.1 (Unreleased)
4
+
5
+ ### Features Added
6
+
7
+ ### Breaking Changes
8
+
9
+ ### Bugs Fixed
10
+
11
+ ### Other Changes
12
+
13
+ ## 3.0.0 (2022-04-25)
14
+
15
+ **Breaking Changes**
16
+
17
+ - Interface ServerForUpdate no longer has parameter dataEncryption
18
+ - Interface ServerForUpdate no longer has parameter identity
19
+ - Type Alias Server no longer has parameter identity
20
+ - Type Alias Server no longer has parameter dataEncryption
21
+
2
22
 
3
23
  ## 2.0.0 (2022-03-07)
4
24
 
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var coreClient = require('@azure/core-client');
6
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
6
7
  var tslib = require('tslib');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
25
26
  }
26
27
 
27
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
28
30
 
29
31
  /*
30
32
  * Copyright (c) Microsoft Corporation.
@@ -134,45 +136,6 @@ exports.KnownIsDynamicConfig = void 0;
134
136
  * Code generated by Microsoft (R) AutoRest Code Generator.
135
137
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
136
138
  */
137
- const Identity = {
138
- type: {
139
- name: "Composite",
140
- className: "Identity",
141
- modelProperties: {
142
- principalId: {
143
- serializedName: "principalId",
144
- readOnly: true,
145
- type: {
146
- name: "String"
147
- }
148
- },
149
- tenantId: {
150
- serializedName: "tenantId",
151
- readOnly: true,
152
- type: {
153
- name: "String"
154
- }
155
- },
156
- type: {
157
- defaultValue: "UserAssigned",
158
- isConstant: true,
159
- serializedName: "type",
160
- type: {
161
- name: "String"
162
- }
163
- },
164
- userAssignedIdentities: {
165
- serializedName: "userAssignedIdentities",
166
- type: {
167
- name: "Dictionary",
168
- value: {
169
- type: { name: "Dictionary", value: { type: { name: "any" } } }
170
- }
171
- }
172
- }
173
- }
174
- }
175
- };
176
139
  const Sku = {
177
140
  type: {
178
141
  name: "Composite",
@@ -195,45 +158,6 @@ const Sku = {
195
158
  }
196
159
  }
197
160
  };
198
- const DataEncryption = {
199
- type: {
200
- name: "Composite",
201
- className: "DataEncryption",
202
- modelProperties: {
203
- primaryUserAssignedIdentityId: {
204
- serializedName: "primaryUserAssignedIdentityId",
205
- type: {
206
- name: "String"
207
- }
208
- },
209
- primaryKeyUri: {
210
- serializedName: "primaryKeyUri",
211
- type: {
212
- name: "String"
213
- }
214
- },
215
- geoBackupUserAssignedIdentityId: {
216
- serializedName: "geoBackupUserAssignedIdentityId",
217
- type: {
218
- name: "String"
219
- }
220
- },
221
- geoBackupKeyUri: {
222
- serializedName: "geoBackupKeyUri",
223
- type: {
224
- name: "String"
225
- }
226
- },
227
- type: {
228
- serializedName: "type",
229
- type: {
230
- name: "Enum",
231
- allowedValues: ["AzureKeyVault", "SystemManaged"]
232
- }
233
- }
234
- }
235
- }
236
- };
237
161
  const Storage = {
238
162
  type: {
239
163
  name: "Composite",
@@ -551,13 +475,6 @@ const ServerForUpdate = {
551
475
  name: "Composite",
552
476
  className: "ServerForUpdate",
553
477
  modelProperties: {
554
- identity: {
555
- serializedName: "identity",
556
- type: {
557
- name: "Composite",
558
- className: "Identity"
559
- }
560
- },
561
478
  sku: {
562
479
  serializedName: "sku",
563
480
  type: {
@@ -611,13 +528,6 @@ const ServerForUpdate = {
611
528
  type: {
612
529
  name: "String"
613
530
  }
614
- },
615
- dataEncryption: {
616
- serializedName: "properties.dataEncryption",
617
- type: {
618
- name: "Composite",
619
- className: "DataEncryption"
620
- }
621
531
  }
622
532
  }
623
533
  }
@@ -1258,28 +1168,6 @@ const OperationDisplay = {
1258
1168
  }
1259
1169
  }
1260
1170
  };
1261
- const UserAssignedIdentity = {
1262
- type: {
1263
- name: "Composite",
1264
- className: "UserAssignedIdentity",
1265
- modelProperties: {
1266
- principalId: {
1267
- serializedName: "principalId",
1268
- readOnly: true,
1269
- type: {
1270
- name: "String"
1271
- }
1272
- },
1273
- clientId: {
1274
- serializedName: "clientId",
1275
- readOnly: true,
1276
- type: {
1277
- name: "String"
1278
- }
1279
- }
1280
- }
1281
- }
1282
- };
1283
1171
  const TrackedResource = {
1284
1172
  type: {
1285
1173
  name: "Composite",
@@ -1310,13 +1198,7 @@ const Server = {
1310
1198
  type: {
1311
1199
  name: "Composite",
1312
1200
  className: "Server",
1313
- modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { identity: {
1314
- serializedName: "identity",
1315
- type: {
1316
- name: "Composite",
1317
- className: "Identity"
1318
- }
1319
- }, sku: {
1201
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { sku: {
1320
1202
  serializedName: "sku",
1321
1203
  type: {
1322
1204
  name: "Composite",
@@ -1377,12 +1259,6 @@ const Server = {
1377
1259
  type: {
1378
1260
  name: "Number"
1379
1261
  }
1380
- }, dataEncryption: {
1381
- serializedName: "properties.dataEncryption",
1382
- type: {
1383
- name: "Composite",
1384
- className: "DataEncryption"
1385
- }
1386
1262
  }, state: {
1387
1263
  serializedName: "properties.state",
1388
1264
  readOnly: true,
@@ -1578,9 +1454,7 @@ const Configuration = {
1578
1454
 
1579
1455
  var Mappers = /*#__PURE__*/Object.freeze({
1580
1456
  __proto__: null,
1581
- Identity: Identity,
1582
1457
  Sku: Sku,
1583
- DataEncryption: DataEncryption,
1584
1458
  Storage: Storage,
1585
1459
  Backup: Backup,
1586
1460
  HighAvailability: HighAvailability,
@@ -1615,7 +1489,6 @@ var Mappers = /*#__PURE__*/Object.freeze({
1615
1489
  OperationListResult: OperationListResult,
1616
1490
  Operation: Operation,
1617
1491
  OperationDisplay: OperationDisplay,
1618
- UserAssignedIdentity: UserAssignedIdentity,
1619
1492
  TrackedResource: TrackedResource,
1620
1493
  ProxyResource: ProxyResource,
1621
1494
  Server: Server,
@@ -1986,10 +1859,12 @@ class ServersImpl {
1986
1859
  };
1987
1860
  });
1988
1861
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, createOperationSpec);
1989
- return new coreLro.LroEngine(lro, {
1862
+ const poller = new coreLro.LroEngine(lro, {
1990
1863
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1991
1864
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
1992
1865
  });
1866
+ yield poller.poll();
1867
+ return poller;
1993
1868
  });
1994
1869
  }
1995
1870
  /**
@@ -2039,10 +1914,12 @@ class ServersImpl {
2039
1914
  };
2040
1915
  });
2041
1916
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, updateOperationSpec$1);
2042
- return new coreLro.LroEngine(lro, {
1917
+ const poller = new coreLro.LroEngine(lro, {
2043
1918
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2044
1919
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2045
1920
  });
1921
+ yield poller.poll();
1922
+ return poller;
2046
1923
  });
2047
1924
  }
2048
1925
  /**
@@ -2090,10 +1967,12 @@ class ServersImpl {
2090
1967
  };
2091
1968
  });
2092
1969
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, deleteOperationSpec$2);
2093
- return new coreLro.LroEngine(lro, {
1970
+ const poller = new coreLro.LroEngine(lro, {
2094
1971
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2095
1972
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2096
1973
  });
1974
+ yield poller.poll();
1975
+ return poller;
2097
1976
  });
2098
1977
  }
2099
1978
  /**
@@ -2163,10 +2042,12 @@ class ServersImpl {
2163
2042
  };
2164
2043
  });
2165
2044
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, failoverOperationSpec);
2166
- return new coreLro.LroEngine(lro, {
2045
+ const poller = new coreLro.LroEngine(lro, {
2167
2046
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2168
2047
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2169
2048
  });
2049
+ yield poller.poll();
2050
+ return poller;
2170
2051
  });
2171
2052
  }
2172
2053
  /**
@@ -2213,10 +2094,12 @@ class ServersImpl {
2213
2094
  };
2214
2095
  });
2215
2096
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, restartOperationSpec);
2216
- return new coreLro.LroEngine(lro, {
2097
+ const poller = new coreLro.LroEngine(lro, {
2217
2098
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2218
2099
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2219
2100
  });
2101
+ yield poller.poll();
2102
+ return poller;
2220
2103
  });
2221
2104
  }
2222
2105
  /**
@@ -2263,10 +2146,12 @@ class ServersImpl {
2263
2146
  };
2264
2147
  });
2265
2148
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, startOperationSpec);
2266
- return new coreLro.LroEngine(lro, {
2149
+ const poller = new coreLro.LroEngine(lro, {
2267
2150
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2268
2151
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2269
2152
  });
2153
+ yield poller.poll();
2154
+ return poller;
2270
2155
  });
2271
2156
  }
2272
2157
  /**
@@ -2312,10 +2197,12 @@ class ServersImpl {
2312
2197
  };
2313
2198
  });
2314
2199
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, options }, stopOperationSpec);
2315
- return new coreLro.LroEngine(lro, {
2200
+ const poller = new coreLro.LroEngine(lro, {
2316
2201
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2317
2202
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2318
2203
  });
2204
+ yield poller.poll();
2205
+ return poller;
2319
2206
  });
2320
2207
  }
2321
2208
  /**
@@ -3023,10 +2910,12 @@ class FirewallRulesImpl {
3023
2910
  };
3024
2911
  });
3025
2912
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, firewallRuleName, parameters, options }, createOrUpdateOperationSpec$1);
3026
- return new coreLro.LroEngine(lro, {
2913
+ const poller = new coreLro.LroEngine(lro, {
3027
2914
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3028
2915
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3029
2916
  });
2917
+ yield poller.poll();
2918
+ return poller;
3030
2919
  });
3031
2920
  }
3032
2921
  /**
@@ -3075,10 +2964,12 @@ class FirewallRulesImpl {
3075
2964
  };
3076
2965
  });
3077
2966
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, firewallRuleName, options }, deleteOperationSpec$1);
3078
- return new coreLro.LroEngine(lro, {
2967
+ const poller = new coreLro.LroEngine(lro, {
3079
2968
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3080
2969
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3081
2970
  });
2971
+ yield poller.poll();
2972
+ return poller;
3082
2973
  });
3083
2974
  }
3084
2975
  /**
@@ -3348,10 +3239,12 @@ class DatabasesImpl {
3348
3239
  };
3349
3240
  });
3350
3241
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, databaseName, parameters, options }, createOrUpdateOperationSpec);
3351
- return new coreLro.LroEngine(lro, {
3242
+ const poller = new coreLro.LroEngine(lro, {
3352
3243
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3353
3244
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3354
3245
  });
3246
+ yield poller.poll();
3247
+ return poller;
3355
3248
  });
3356
3249
  }
3357
3250
  /**
@@ -3400,10 +3293,12 @@ class DatabasesImpl {
3400
3293
  };
3401
3294
  });
3402
3295
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, databaseName, options }, deleteOperationSpec);
3403
- return new coreLro.LroEngine(lro, {
3296
+ const poller = new coreLro.LroEngine(lro, {
3404
3297
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3405
3298
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3406
3299
  });
3300
+ yield poller.poll();
3301
+ return poller;
3407
3302
  });
3408
3303
  }
3409
3304
  /**
@@ -3673,10 +3568,12 @@ class ConfigurationsImpl {
3673
3568
  };
3674
3569
  });
3675
3570
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, configurationName, parameters, options }, updateOperationSpec);
3676
- return new coreLro.LroEngine(lro, {
3571
+ const poller = new coreLro.LroEngine(lro, {
3677
3572
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3678
3573
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3679
3574
  });
3575
+ yield poller.poll();
3576
+ return poller;
3680
3577
  });
3681
3578
  }
3682
3579
  /**
@@ -3735,11 +3632,13 @@ class ConfigurationsImpl {
3735
3632
  };
3736
3633
  });
3737
3634
  const lro = new LroImpl(sendOperation, { resourceGroupName, serverName, parameters, options }, batchUpdateOperationSpec);
3738
- return new coreLro.LroEngine(lro, {
3635
+ const poller = new coreLro.LroEngine(lro, {
3739
3636
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3740
3637
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
3741
3638
  lroResourceLocationConfig: "azure-async-operation"
3742
3639
  });
3640
+ yield poller.poll();
3641
+ return poller;
3743
3642
  });
3744
3643
  }
3745
3644
  /**
@@ -4312,6 +4211,7 @@ class MySQLManagementFlexibleServerClient extends coreClient__namespace.ServiceC
4312
4211
  * @param options The parameter options
4313
4212
  */
4314
4213
  constructor(credentials, subscriptionId, options) {
4214
+ var _a, _b;
4315
4215
  if (credentials === undefined) {
4316
4216
  throw new Error("'credentials' cannot be null");
4317
4217
  }
@@ -4326,7 +4226,7 @@ class MySQLManagementFlexibleServerClient extends coreClient__namespace.ServiceC
4326
4226
  requestContentType: "application/json; charset=utf-8",
4327
4227
  credential: credentials
4328
4228
  };
4329
- const packageDetails = `azsdk-js-arm-mysql-flexible/2.0.0`;
4229
+ const packageDetails = `azsdk-js-arm-mysql-flexible/3.0.1`;
4330
4230
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
4331
4231
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
4332
4232
  : `${packageDetails}`;
@@ -4335,8 +4235,24 @@ class MySQLManagementFlexibleServerClient extends coreClient__namespace.ServiceC
4335
4235
  }
4336
4236
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
4337
4237
  userAgentPrefix
4338
- }, baseUri: options.endpoint || "https://management.azure.com" });
4238
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
4339
4239
  super(optionsWithDefaults);
4240
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
4241
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
4242
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
4243
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
4244
+ if (!bearerTokenAuthenticationPolicyFound) {
4245
+ this.pipeline.removePolicy({
4246
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
4247
+ });
4248
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
4249
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
4250
+ challengeCallbacks: {
4251
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
4252
+ }
4253
+ }));
4254
+ }
4255
+ }
4340
4256
  // Parameter assignments
4341
4257
  this.subscriptionId = subscriptionId;
4342
4258
  // Assigning values to Constant parameters