@azure/arm-mysql 5.0.2-alpha.20221101.1 → 5.1.0
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 +28 -10
- package/dist/index.js +378 -135
- 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/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +93 -45
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +47 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/mySQLManagementClient.d.ts.map +1 -1
- package/dist-esm/src/mySQLManagementClient.js +20 -18
- package/dist-esm/src/mySQLManagementClient.js.map +1 -1
- package/dist-esm/src/operations/advisors.d.ts.map +1 -1
- package/dist-esm/src/operations/advisors.js +19 -7
- package/dist-esm/src/operations/advisors.js.map +1 -1
- package/dist-esm/src/operations/configurations.d.ts.map +1 -1
- package/dist-esm/src/operations/configurations.js +8 -4
- package/dist-esm/src/operations/configurations.js.map +1 -1
- package/dist-esm/src/operations/databases.d.ts.map +1 -1
- package/dist-esm/src/operations/databases.js +8 -4
- package/dist-esm/src/operations/databases.js.map +1 -1
- package/dist-esm/src/operations/firewallRules.d.ts.map +1 -1
- package/dist-esm/src/operations/firewallRules.js +8 -4
- package/dist-esm/src/operations/firewallRules.js.map +1 -1
- package/dist-esm/src/operations/locationBasedPerformanceTier.d.ts.map +1 -1
- package/dist-esm/src/operations/locationBasedPerformanceTier.js +8 -4
- package/dist-esm/src/operations/locationBasedPerformanceTier.js.map +1 -1
- package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.d.ts.map +1 -1
- package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.js +19 -7
- package/dist-esm/src/operations/locationBasedRecommendedActionSessionsResult.js.map +1 -1
- package/dist-esm/src/operations/logFiles.d.ts.map +1 -1
- package/dist-esm/src/operations/logFiles.js +8 -4
- package/dist-esm/src/operations/logFiles.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +19 -7
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.js +19 -7
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/queryTexts.d.ts.map +1 -1
- package/dist-esm/src/operations/queryTexts.js +19 -7
- package/dist-esm/src/operations/queryTexts.js.map +1 -1
- package/dist-esm/src/operations/recommendedActions.d.ts.map +1 -1
- package/dist-esm/src/operations/recommendedActions.js +19 -7
- package/dist-esm/src/operations/recommendedActions.js.map +1 -1
- package/dist-esm/src/operations/replicas.d.ts.map +1 -1
- package/dist-esm/src/operations/replicas.js +8 -4
- package/dist-esm/src/operations/replicas.js.map +1 -1
- package/dist-esm/src/operations/serverAdministrators.d.ts.map +1 -1
- package/dist-esm/src/operations/serverAdministrators.js +8 -4
- package/dist-esm/src/operations/serverAdministrators.js.map +1 -1
- package/dist-esm/src/operations/serverBasedPerformanceTier.d.ts.map +1 -1
- package/dist-esm/src/operations/serverBasedPerformanceTier.js +8 -4
- package/dist-esm/src/operations/serverBasedPerformanceTier.js.map +1 -1
- package/dist-esm/src/operations/serverKeys.d.ts.map +1 -1
- package/dist-esm/src/operations/serverKeys.js +19 -7
- package/dist-esm/src/operations/serverKeys.js.map +1 -1
- package/dist-esm/src/operations/serverSecurityAlertPolicies.d.ts.map +1 -1
- package/dist-esm/src/operations/serverSecurityAlertPolicies.js +19 -7
- package/dist-esm/src/operations/serverSecurityAlertPolicies.js.map +1 -1
- package/dist-esm/src/operations/servers.d.ts.map +1 -1
- package/dist-esm/src/operations/servers.js +16 -8
- package/dist-esm/src/operations/servers.js.map +1 -1
- package/dist-esm/src/operations/topQueryStatistics.d.ts.map +1 -1
- package/dist-esm/src/operations/topQueryStatistics.js +19 -7
- package/dist-esm/src/operations/topQueryStatistics.js.map +1 -1
- package/dist-esm/src/operations/virtualNetworkRules.d.ts.map +1 -1
- package/dist-esm/src/operations/virtualNetworkRules.js +19 -7
- package/dist-esm/src/operations/virtualNetworkRules.js.map +1 -1
- package/dist-esm/src/operations/waitStatistics.d.ts.map +1 -1
- package/dist-esm/src/operations/waitStatistics.js +19 -7
- package/dist-esm/src/operations/waitStatistics.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +13 -9
- package/review/arm-mysql.api.md +92 -135
- package/src/index.ts +1 -0
- package/src/models/index.ts +94 -45
- package/src/mySQLManagementClient.ts +26 -20
- package/src/operations/advisors.ts +23 -13
- package/src/operations/configurations.ts +13 -11
- package/src/operations/databases.ts +13 -11
- package/src/operations/firewallRules.ts +13 -11
- package/src/operations/locationBasedPerformanceTier.ts +10 -5
- package/src/operations/locationBasedRecommendedActionSessionsResult.ts +26 -8
- package/src/operations/logFiles.ts +11 -9
- package/src/operations/privateEndpointConnections.ts +23 -13
- package/src/operations/privateLinkResources.ts +22 -12
- package/src/operations/queryTexts.ts +28 -14
- package/src/operations/recommendedActions.ts +28 -14
- package/src/operations/replicas.ts +11 -9
- package/src/operations/serverAdministrators.ts +17 -7
- package/src/operations/serverBasedPerformanceTier.ts +15 -5
- package/src/operations/serverKeys.ts +26 -8
- package/src/operations/serverSecurityAlertPolicies.ts +23 -13
- package/src/operations/servers.ts +25 -11
- package/src/operations/topQueryStatistics.ts +28 -14
- package/src/operations/virtualNetworkRules.ts +23 -13
- package/src/operations/waitStatistics.ts +28 -14
- package/src/pagingHelper.ts +39 -0
- package/types/arm-mysql.d.ts +102 -45
- package/types/tsdoc-metadata.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
10
|
import { ServerBasedPerformanceTier } from "../operationsInterfaces";
|
|
11
11
|
import * as coreClient from "@azure/core-client";
|
|
12
12
|
import * as Mappers from "../models/mappers";
|
|
@@ -51,8 +51,16 @@ export class ServerBasedPerformanceTierImpl
|
|
|
51
51
|
[Symbol.asyncIterator]() {
|
|
52
52
|
return this;
|
|
53
53
|
},
|
|
54
|
-
byPage: () => {
|
|
55
|
-
|
|
54
|
+
byPage: (settings?: PageSettings) => {
|
|
55
|
+
if (settings?.maxPageSize) {
|
|
56
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
57
|
+
}
|
|
58
|
+
return this.listPagingPage(
|
|
59
|
+
resourceGroupName,
|
|
60
|
+
serverName,
|
|
61
|
+
options,
|
|
62
|
+
settings
|
|
63
|
+
);
|
|
56
64
|
}
|
|
57
65
|
};
|
|
58
66
|
}
|
|
@@ -60,9 +68,11 @@ export class ServerBasedPerformanceTierImpl
|
|
|
60
68
|
private async *listPagingPage(
|
|
61
69
|
resourceGroupName: string,
|
|
62
70
|
serverName: string,
|
|
63
|
-
options?: ServerBasedPerformanceTierListOptionalParams
|
|
71
|
+
options?: ServerBasedPerformanceTierListOptionalParams,
|
|
72
|
+
_settings?: PageSettings
|
|
64
73
|
): AsyncIterableIterator<PerformanceTierProperties[]> {
|
|
65
|
-
let result
|
|
74
|
+
let result: ServerBasedPerformanceTierListResponse;
|
|
75
|
+
result = await this._list(resourceGroupName, serverName, options);
|
|
66
76
|
yield result.value || [];
|
|
67
77
|
}
|
|
68
78
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { ServerKeys } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -59,8 +60,16 @@ export class ServerKeysImpl implements ServerKeys {
|
|
|
59
60
|
[Symbol.asyncIterator]() {
|
|
60
61
|
return this;
|
|
61
62
|
},
|
|
62
|
-
byPage: () => {
|
|
63
|
-
|
|
63
|
+
byPage: (settings?: PageSettings) => {
|
|
64
|
+
if (settings?.maxPageSize) {
|
|
65
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
66
|
+
}
|
|
67
|
+
return this.listPagingPage(
|
|
68
|
+
resourceGroupName,
|
|
69
|
+
serverName,
|
|
70
|
+
options,
|
|
71
|
+
settings
|
|
72
|
+
);
|
|
64
73
|
}
|
|
65
74
|
};
|
|
66
75
|
}
|
|
@@ -68,11 +77,18 @@ export class ServerKeysImpl implements ServerKeys {
|
|
|
68
77
|
private async *listPagingPage(
|
|
69
78
|
resourceGroupName: string,
|
|
70
79
|
serverName: string,
|
|
71
|
-
options?: ServerKeysListOptionalParams
|
|
80
|
+
options?: ServerKeysListOptionalParams,
|
|
81
|
+
settings?: PageSettings
|
|
72
82
|
): AsyncIterableIterator<ServerKey[]> {
|
|
73
|
-
let result
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
let result: ServerKeysListResponse;
|
|
84
|
+
let continuationToken = settings?.continuationToken;
|
|
85
|
+
if (!continuationToken) {
|
|
86
|
+
result = await this._list(resourceGroupName, serverName, options);
|
|
87
|
+
let page = result.value || [];
|
|
88
|
+
continuationToken = result.nextLink;
|
|
89
|
+
setContinuationToken(page, continuationToken);
|
|
90
|
+
yield page;
|
|
91
|
+
}
|
|
76
92
|
while (continuationToken) {
|
|
77
93
|
result = await this._listNext(
|
|
78
94
|
resourceGroupName,
|
|
@@ -81,7 +97,9 @@ export class ServerKeysImpl implements ServerKeys {
|
|
|
81
97
|
options
|
|
82
98
|
);
|
|
83
99
|
continuationToken = result.nextLink;
|
|
84
|
-
|
|
100
|
+
let page = result.value || [];
|
|
101
|
+
setContinuationToken(page, continuationToken);
|
|
102
|
+
yield page;
|
|
85
103
|
}
|
|
86
104
|
}
|
|
87
105
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { ServerSecurityAlertPolicies } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,12 +19,12 @@ import {
|
|
|
18
19
|
ServerSecurityAlertPolicy,
|
|
19
20
|
ServerSecurityAlertPoliciesListByServerNextOptionalParams,
|
|
20
21
|
ServerSecurityAlertPoliciesListByServerOptionalParams,
|
|
22
|
+
ServerSecurityAlertPoliciesListByServerResponse,
|
|
21
23
|
SecurityAlertPolicyName,
|
|
22
24
|
ServerSecurityAlertPoliciesGetOptionalParams,
|
|
23
25
|
ServerSecurityAlertPoliciesGetResponse,
|
|
24
26
|
ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams,
|
|
25
27
|
ServerSecurityAlertPoliciesCreateOrUpdateResponse,
|
|
26
|
-
ServerSecurityAlertPoliciesListByServerResponse,
|
|
27
28
|
ServerSecurityAlertPoliciesListByServerNextResponse
|
|
28
29
|
} from "../models";
|
|
29
30
|
|
|
@@ -64,11 +65,15 @@ export class ServerSecurityAlertPoliciesImpl
|
|
|
64
65
|
[Symbol.asyncIterator]() {
|
|
65
66
|
return this;
|
|
66
67
|
},
|
|
67
|
-
byPage: () => {
|
|
68
|
+
byPage: (settings?: PageSettings) => {
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
70
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
71
|
+
}
|
|
68
72
|
return this.listByServerPagingPage(
|
|
69
73
|
resourceGroupName,
|
|
70
74
|
serverName,
|
|
71
|
-
options
|
|
75
|
+
options,
|
|
76
|
+
settings
|
|
72
77
|
);
|
|
73
78
|
}
|
|
74
79
|
};
|
|
@@ -77,15 +82,18 @@ export class ServerSecurityAlertPoliciesImpl
|
|
|
77
82
|
private async *listByServerPagingPage(
|
|
78
83
|
resourceGroupName: string,
|
|
79
84
|
serverName: string,
|
|
80
|
-
options?: ServerSecurityAlertPoliciesListByServerOptionalParams
|
|
85
|
+
options?: ServerSecurityAlertPoliciesListByServerOptionalParams,
|
|
86
|
+
settings?: PageSettings
|
|
81
87
|
): AsyncIterableIterator<ServerSecurityAlertPolicy[]> {
|
|
82
|
-
let result
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
options
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
let result: ServerSecurityAlertPoliciesListByServerResponse;
|
|
89
|
+
let continuationToken = settings?.continuationToken;
|
|
90
|
+
if (!continuationToken) {
|
|
91
|
+
result = await this._listByServer(resourceGroupName, serverName, options);
|
|
92
|
+
let page = result.value || [];
|
|
93
|
+
continuationToken = result.nextLink;
|
|
94
|
+
setContinuationToken(page, continuationToken);
|
|
95
|
+
yield page;
|
|
96
|
+
}
|
|
89
97
|
while (continuationToken) {
|
|
90
98
|
result = await this._listByServerNext(
|
|
91
99
|
resourceGroupName,
|
|
@@ -94,7 +102,9 @@ export class ServerSecurityAlertPoliciesImpl
|
|
|
94
102
|
options
|
|
95
103
|
);
|
|
96
104
|
continuationToken = result.nextLink;
|
|
97
|
-
|
|
105
|
+
let page = result.value || [];
|
|
106
|
+
setContinuationToken(page, continuationToken);
|
|
107
|
+
yield page;
|
|
98
108
|
}
|
|
99
109
|
}
|
|
100
110
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
10
|
import { Servers } from "../operationsInterfaces";
|
|
11
11
|
import * as coreClient from "@azure/core-client";
|
|
12
12
|
import * as Mappers from "../models/mappers";
|
|
@@ -17,7 +17,9 @@ import { LroImpl } from "../lroImpl";
|
|
|
17
17
|
import {
|
|
18
18
|
Server,
|
|
19
19
|
ServersListByResourceGroupOptionalParams,
|
|
20
|
+
ServersListByResourceGroupResponse,
|
|
20
21
|
ServersListOptionalParams,
|
|
22
|
+
ServersListResponse,
|
|
21
23
|
ServerForCreate,
|
|
22
24
|
ServersCreateOptionalParams,
|
|
23
25
|
ServersCreateResponse,
|
|
@@ -27,8 +29,6 @@ import {
|
|
|
27
29
|
ServersDeleteOptionalParams,
|
|
28
30
|
ServersGetOptionalParams,
|
|
29
31
|
ServersGetResponse,
|
|
30
|
-
ServersListByResourceGroupResponse,
|
|
31
|
-
ServersListResponse,
|
|
32
32
|
ServersRestartOptionalParams,
|
|
33
33
|
ServersStartOptionalParams,
|
|
34
34
|
ServersStopOptionalParams,
|
|
@@ -66,17 +66,26 @@ export class ServersImpl implements Servers {
|
|
|
66
66
|
[Symbol.asyncIterator]() {
|
|
67
67
|
return this;
|
|
68
68
|
},
|
|
69
|
-
byPage: () => {
|
|
70
|
-
|
|
69
|
+
byPage: (settings?: PageSettings) => {
|
|
70
|
+
if (settings?.maxPageSize) {
|
|
71
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
72
|
+
}
|
|
73
|
+
return this.listByResourceGroupPagingPage(
|
|
74
|
+
resourceGroupName,
|
|
75
|
+
options,
|
|
76
|
+
settings
|
|
77
|
+
);
|
|
71
78
|
}
|
|
72
79
|
};
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
private async *listByResourceGroupPagingPage(
|
|
76
83
|
resourceGroupName: string,
|
|
77
|
-
options?: ServersListByResourceGroupOptionalParams
|
|
84
|
+
options?: ServersListByResourceGroupOptionalParams,
|
|
85
|
+
_settings?: PageSettings
|
|
78
86
|
): AsyncIterableIterator<Server[]> {
|
|
79
|
-
let result
|
|
87
|
+
let result: ServersListByResourceGroupResponse;
|
|
88
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
80
89
|
yield result.value || [];
|
|
81
90
|
}
|
|
82
91
|
|
|
@@ -107,16 +116,21 @@ export class ServersImpl implements Servers {
|
|
|
107
116
|
[Symbol.asyncIterator]() {
|
|
108
117
|
return this;
|
|
109
118
|
},
|
|
110
|
-
byPage: () => {
|
|
111
|
-
|
|
119
|
+
byPage: (settings?: PageSettings) => {
|
|
120
|
+
if (settings?.maxPageSize) {
|
|
121
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
122
|
+
}
|
|
123
|
+
return this.listPagingPage(options, settings);
|
|
112
124
|
}
|
|
113
125
|
};
|
|
114
126
|
}
|
|
115
127
|
|
|
116
128
|
private async *listPagingPage(
|
|
117
|
-
options?: ServersListOptionalParams
|
|
129
|
+
options?: ServersListOptionalParams,
|
|
130
|
+
_settings?: PageSettings
|
|
118
131
|
): AsyncIterableIterator<Server[]> {
|
|
119
|
-
let result
|
|
132
|
+
let result: ServersListResponse;
|
|
133
|
+
result = await this._list(options);
|
|
120
134
|
yield result.value || [];
|
|
121
135
|
}
|
|
122
136
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { TopQueryStatistics } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -17,9 +18,9 @@ import {
|
|
|
17
18
|
TopQueryStatisticsInput,
|
|
18
19
|
TopQueryStatisticsListByServerNextOptionalParams,
|
|
19
20
|
TopQueryStatisticsListByServerOptionalParams,
|
|
21
|
+
TopQueryStatisticsListByServerResponse,
|
|
20
22
|
TopQueryStatisticsGetOptionalParams,
|
|
21
23
|
TopQueryStatisticsGetResponse,
|
|
22
|
-
TopQueryStatisticsListByServerResponse,
|
|
23
24
|
TopQueryStatisticsListByServerNextResponse
|
|
24
25
|
} from "../models";
|
|
25
26
|
|
|
@@ -62,12 +63,16 @@ export class TopQueryStatisticsImpl implements TopQueryStatistics {
|
|
|
62
63
|
[Symbol.asyncIterator]() {
|
|
63
64
|
return this;
|
|
64
65
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
+
byPage: (settings?: PageSettings) => {
|
|
67
|
+
if (settings?.maxPageSize) {
|
|
68
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
69
|
+
}
|
|
66
70
|
return this.listByServerPagingPage(
|
|
67
71
|
resourceGroupName,
|
|
68
72
|
serverName,
|
|
69
73
|
parameters,
|
|
70
|
-
options
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
71
76
|
);
|
|
72
77
|
}
|
|
73
78
|
};
|
|
@@ -77,16 +82,23 @@ export class TopQueryStatisticsImpl implements TopQueryStatistics {
|
|
|
77
82
|
resourceGroupName: string,
|
|
78
83
|
serverName: string,
|
|
79
84
|
parameters: TopQueryStatisticsInput,
|
|
80
|
-
options?: TopQueryStatisticsListByServerOptionalParams
|
|
85
|
+
options?: TopQueryStatisticsListByServerOptionalParams,
|
|
86
|
+
settings?: PageSettings
|
|
81
87
|
): AsyncIterableIterator<QueryStatistic[]> {
|
|
82
|
-
let result
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
let result: TopQueryStatisticsListByServerResponse;
|
|
89
|
+
let continuationToken = settings?.continuationToken;
|
|
90
|
+
if (!continuationToken) {
|
|
91
|
+
result = await this._listByServer(
|
|
92
|
+
resourceGroupName,
|
|
93
|
+
serverName,
|
|
94
|
+
parameters,
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
let page = result.value || [];
|
|
98
|
+
continuationToken = result.nextLink;
|
|
99
|
+
setContinuationToken(page, continuationToken);
|
|
100
|
+
yield page;
|
|
101
|
+
}
|
|
90
102
|
while (continuationToken) {
|
|
91
103
|
result = await this._listByServerNext(
|
|
92
104
|
resourceGroupName,
|
|
@@ -96,7 +108,9 @@ export class TopQueryStatisticsImpl implements TopQueryStatistics {
|
|
|
96
108
|
options
|
|
97
109
|
);
|
|
98
110
|
continuationToken = result.nextLink;
|
|
99
|
-
|
|
111
|
+
let page = result.value || [];
|
|
112
|
+
setContinuationToken(page, continuationToken);
|
|
113
|
+
yield page;
|
|
100
114
|
}
|
|
101
115
|
}
|
|
102
116
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { VirtualNetworkRules } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,12 +19,12 @@ import {
|
|
|
18
19
|
VirtualNetworkRule,
|
|
19
20
|
VirtualNetworkRulesListByServerNextOptionalParams,
|
|
20
21
|
VirtualNetworkRulesListByServerOptionalParams,
|
|
22
|
+
VirtualNetworkRulesListByServerResponse,
|
|
21
23
|
VirtualNetworkRulesGetOptionalParams,
|
|
22
24
|
VirtualNetworkRulesGetResponse,
|
|
23
25
|
VirtualNetworkRulesCreateOrUpdateOptionalParams,
|
|
24
26
|
VirtualNetworkRulesCreateOrUpdateResponse,
|
|
25
27
|
VirtualNetworkRulesDeleteOptionalParams,
|
|
26
|
-
VirtualNetworkRulesListByServerResponse,
|
|
27
28
|
VirtualNetworkRulesListByServerNextResponse
|
|
28
29
|
} from "../models";
|
|
29
30
|
|
|
@@ -63,11 +64,15 @@ export class VirtualNetworkRulesImpl implements VirtualNetworkRules {
|
|
|
63
64
|
[Symbol.asyncIterator]() {
|
|
64
65
|
return this;
|
|
65
66
|
},
|
|
66
|
-
byPage: () => {
|
|
67
|
+
byPage: (settings?: PageSettings) => {
|
|
68
|
+
if (settings?.maxPageSize) {
|
|
69
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
70
|
+
}
|
|
67
71
|
return this.listByServerPagingPage(
|
|
68
72
|
resourceGroupName,
|
|
69
73
|
serverName,
|
|
70
|
-
options
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
71
76
|
);
|
|
72
77
|
}
|
|
73
78
|
};
|
|
@@ -76,15 +81,18 @@ export class VirtualNetworkRulesImpl implements VirtualNetworkRules {
|
|
|
76
81
|
private async *listByServerPagingPage(
|
|
77
82
|
resourceGroupName: string,
|
|
78
83
|
serverName: string,
|
|
79
|
-
options?: VirtualNetworkRulesListByServerOptionalParams
|
|
84
|
+
options?: VirtualNetworkRulesListByServerOptionalParams,
|
|
85
|
+
settings?: PageSettings
|
|
80
86
|
): AsyncIterableIterator<VirtualNetworkRule[]> {
|
|
81
|
-
let result
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
options
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
let result: VirtualNetworkRulesListByServerResponse;
|
|
88
|
+
let continuationToken = settings?.continuationToken;
|
|
89
|
+
if (!continuationToken) {
|
|
90
|
+
result = await this._listByServer(resourceGroupName, serverName, options);
|
|
91
|
+
let page = result.value || [];
|
|
92
|
+
continuationToken = result.nextLink;
|
|
93
|
+
setContinuationToken(page, continuationToken);
|
|
94
|
+
yield page;
|
|
95
|
+
}
|
|
88
96
|
while (continuationToken) {
|
|
89
97
|
result = await this._listByServerNext(
|
|
90
98
|
resourceGroupName,
|
|
@@ -93,7 +101,9 @@ export class VirtualNetworkRulesImpl implements VirtualNetworkRules {
|
|
|
93
101
|
options
|
|
94
102
|
);
|
|
95
103
|
continuationToken = result.nextLink;
|
|
96
|
-
|
|
104
|
+
let page = result.value || [];
|
|
105
|
+
setContinuationToken(page, continuationToken);
|
|
106
|
+
yield page;
|
|
97
107
|
}
|
|
98
108
|
}
|
|
99
109
|
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { WaitStatistics } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -17,9 +18,9 @@ import {
|
|
|
17
18
|
WaitStatisticsInput,
|
|
18
19
|
WaitStatisticsListByServerNextOptionalParams,
|
|
19
20
|
WaitStatisticsListByServerOptionalParams,
|
|
21
|
+
WaitStatisticsListByServerResponse,
|
|
20
22
|
WaitStatisticsGetOptionalParams,
|
|
21
23
|
WaitStatisticsGetResponse,
|
|
22
|
-
WaitStatisticsListByServerResponse,
|
|
23
24
|
WaitStatisticsListByServerNextResponse
|
|
24
25
|
} from "../models";
|
|
25
26
|
|
|
@@ -62,12 +63,16 @@ export class WaitStatisticsImpl implements WaitStatistics {
|
|
|
62
63
|
[Symbol.asyncIterator]() {
|
|
63
64
|
return this;
|
|
64
65
|
},
|
|
65
|
-
byPage: () => {
|
|
66
|
+
byPage: (settings?: PageSettings) => {
|
|
67
|
+
if (settings?.maxPageSize) {
|
|
68
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
69
|
+
}
|
|
66
70
|
return this.listByServerPagingPage(
|
|
67
71
|
resourceGroupName,
|
|
68
72
|
serverName,
|
|
69
73
|
parameters,
|
|
70
|
-
options
|
|
74
|
+
options,
|
|
75
|
+
settings
|
|
71
76
|
);
|
|
72
77
|
}
|
|
73
78
|
};
|
|
@@ -77,16 +82,23 @@ export class WaitStatisticsImpl implements WaitStatistics {
|
|
|
77
82
|
resourceGroupName: string,
|
|
78
83
|
serverName: string,
|
|
79
84
|
parameters: WaitStatisticsInput,
|
|
80
|
-
options?: WaitStatisticsListByServerOptionalParams
|
|
85
|
+
options?: WaitStatisticsListByServerOptionalParams,
|
|
86
|
+
settings?: PageSettings
|
|
81
87
|
): AsyncIterableIterator<WaitStatistic[]> {
|
|
82
|
-
let result
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
let result: WaitStatisticsListByServerResponse;
|
|
89
|
+
let continuationToken = settings?.continuationToken;
|
|
90
|
+
if (!continuationToken) {
|
|
91
|
+
result = await this._listByServer(
|
|
92
|
+
resourceGroupName,
|
|
93
|
+
serverName,
|
|
94
|
+
parameters,
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
let page = result.value || [];
|
|
98
|
+
continuationToken = result.nextLink;
|
|
99
|
+
setContinuationToken(page, continuationToken);
|
|
100
|
+
yield page;
|
|
101
|
+
}
|
|
90
102
|
while (continuationToken) {
|
|
91
103
|
result = await this._listByServerNext(
|
|
92
104
|
resourceGroupName,
|
|
@@ -96,7 +108,9 @@ export class WaitStatisticsImpl implements WaitStatistics {
|
|
|
96
108
|
options
|
|
97
109
|
);
|
|
98
110
|
continuationToken = result.nextLink;
|
|
99
|
-
|
|
111
|
+
let page = result.value || [];
|
|
112
|
+
setContinuationToken(page, continuationToken);
|
|
113
|
+
yield page;
|
|
100
114
|
}
|
|
101
115
|
}
|
|
102
116
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface PageInfo {
|
|
10
|
+
continuationToken?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Given a result page from a pageable operation, returns a
|
|
17
|
+
* continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page A result object from calling .byPage() on a paged operation.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage().
|
|
21
|
+
*/
|
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
+
if (typeof page !== "object" || page === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function setContinuationToken(
|
|
30
|
+
page: unknown,
|
|
31
|
+
continuationToken: string | undefined
|
|
32
|
+
): void {
|
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
|
38
|
+
pageMap.set(page, pageInfo);
|
|
39
|
+
}
|