@azure/arm-sqlvirtualmachine 5.0.0-beta.6 → 5.0.0-beta.7
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +163 -63
- 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/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js +98 -0
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js +40 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js +40 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js +53 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +51 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js +55 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js +39 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js +39 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js +52 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js +51 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js +40 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js +287 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js +39 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js +39 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js +52 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js +53 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js +51 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js +39 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js +39 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js +40 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js.map +1 -0
- 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/operations/availabilityGroupListeners.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityGroupListeners.js +19 -8
- package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +19 -8
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachineGroups.js +37 -16
- package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.js +55 -24
- package/dist-esm/src/operations/sqlVirtualMachines.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/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.js +4 -7
- package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
- package/package.json +16 -6
- package/review/arm-sqlvirtualmachine.api.md +3 -0
- package/src/index.ts +1 -0
- package/src/operations/availabilityGroupListeners.ts +27 -14
- package/src/operations/operations.ts +21 -9
- package/src/operations/sqlVirtualMachineGroups.ts +46 -19
- package/src/operations/sqlVirtualMachines.ts +71 -32
- package/src/pagingHelper.ts +39 -0
- package/src/sqlVirtualMachineManagementClient.ts +5 -6
- package/tsconfig.json +8 -2
- package/types/arm-sqlvirtualmachine.d.ts +9 -0
- package/types/tsdoc-metadata.json +1 -1
|
@@ -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 { Operations } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -48,22 +49,34 @@ export class OperationsImpl implements Operations {
|
|
|
48
49
|
[Symbol.asyncIterator]() {
|
|
49
50
|
return this;
|
|
50
51
|
},
|
|
51
|
-
byPage: () => {
|
|
52
|
-
|
|
52
|
+
byPage: (settings?: PageSettings) => {
|
|
53
|
+
if (settings?.maxPageSize) {
|
|
54
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
55
|
+
}
|
|
56
|
+
return this.listPagingPage(options, settings);
|
|
53
57
|
}
|
|
54
58
|
};
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
private async *listPagingPage(
|
|
58
|
-
options?: OperationsListOptionalParams
|
|
62
|
+
options?: OperationsListOptionalParams,
|
|
63
|
+
settings?: PageSettings
|
|
59
64
|
): AsyncIterableIterator<Operation[]> {
|
|
60
|
-
let result
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
let result: OperationsListResponse;
|
|
66
|
+
let continuationToken = settings?.continuationToken;
|
|
67
|
+
if (!continuationToken) {
|
|
68
|
+
result = await this._list(options);
|
|
69
|
+
let page = result.value || [];
|
|
70
|
+
continuationToken = result.nextLink;
|
|
71
|
+
setContinuationToken(page, continuationToken);
|
|
72
|
+
yield page;
|
|
73
|
+
}
|
|
63
74
|
while (continuationToken) {
|
|
64
75
|
result = await this._listNext(continuationToken, options);
|
|
65
76
|
continuationToken = result.nextLink;
|
|
66
|
-
|
|
77
|
+
let page = result.value || [];
|
|
78
|
+
setContinuationToken(page, continuationToken);
|
|
79
|
+
yield page;
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -126,7 +139,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
126
139
|
},
|
|
127
140
|
default: {}
|
|
128
141
|
},
|
|
129
|
-
queryParameters: [Parameters.apiVersion],
|
|
130
142
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
131
143
|
headerParameters: [Parameters.accept],
|
|
132
144
|
serializer
|
|
@@ -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 { SqlVirtualMachineGroups } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,8 +19,10 @@ import {
|
|
|
18
19
|
SqlVirtualMachineGroup,
|
|
19
20
|
SqlVirtualMachineGroupsListByResourceGroupNextOptionalParams,
|
|
20
21
|
SqlVirtualMachineGroupsListByResourceGroupOptionalParams,
|
|
22
|
+
SqlVirtualMachineGroupsListByResourceGroupResponse,
|
|
21
23
|
SqlVirtualMachineGroupsListNextOptionalParams,
|
|
22
24
|
SqlVirtualMachineGroupsListOptionalParams,
|
|
25
|
+
SqlVirtualMachineGroupsListResponse,
|
|
23
26
|
SqlVirtualMachineGroupsGetOptionalParams,
|
|
24
27
|
SqlVirtualMachineGroupsGetResponse,
|
|
25
28
|
SqlVirtualMachineGroupsCreateOrUpdateOptionalParams,
|
|
@@ -28,8 +31,6 @@ import {
|
|
|
28
31
|
SqlVirtualMachineGroupUpdate,
|
|
29
32
|
SqlVirtualMachineGroupsUpdateOptionalParams,
|
|
30
33
|
SqlVirtualMachineGroupsUpdateResponse,
|
|
31
|
-
SqlVirtualMachineGroupsListByResourceGroupResponse,
|
|
32
|
-
SqlVirtualMachineGroupsListResponse,
|
|
33
34
|
SqlVirtualMachineGroupsListByResourceGroupNextResponse,
|
|
34
35
|
SqlVirtualMachineGroupsListNextResponse
|
|
35
36
|
} from "../models";
|
|
@@ -65,19 +66,33 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
65
66
|
[Symbol.asyncIterator]() {
|
|
66
67
|
return this;
|
|
67
68
|
},
|
|
68
|
-
byPage: () => {
|
|
69
|
-
|
|
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
|
+
);
|
|
70
78
|
}
|
|
71
79
|
};
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
private async *listByResourceGroupPagingPage(
|
|
75
83
|
resourceGroupName: string,
|
|
76
|
-
options?: SqlVirtualMachineGroupsListByResourceGroupOptionalParams
|
|
84
|
+
options?: SqlVirtualMachineGroupsListByResourceGroupOptionalParams,
|
|
85
|
+
settings?: PageSettings
|
|
77
86
|
): AsyncIterableIterator<SqlVirtualMachineGroup[]> {
|
|
78
|
-
let result
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
let result: SqlVirtualMachineGroupsListByResourceGroupResponse;
|
|
88
|
+
let continuationToken = settings?.continuationToken;
|
|
89
|
+
if (!continuationToken) {
|
|
90
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
91
|
+
let page = result.value || [];
|
|
92
|
+
continuationToken = result.nextLink;
|
|
93
|
+
setContinuationToken(page, continuationToken);
|
|
94
|
+
yield page;
|
|
95
|
+
}
|
|
81
96
|
while (continuationToken) {
|
|
82
97
|
result = await this._listByResourceGroupNext(
|
|
83
98
|
resourceGroupName,
|
|
@@ -85,7 +100,9 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
85
100
|
options
|
|
86
101
|
);
|
|
87
102
|
continuationToken = result.nextLink;
|
|
88
|
-
|
|
103
|
+
let page = result.value || [];
|
|
104
|
+
setContinuationToken(page, continuationToken);
|
|
105
|
+
yield page;
|
|
89
106
|
}
|
|
90
107
|
}
|
|
91
108
|
|
|
@@ -116,22 +133,34 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
116
133
|
[Symbol.asyncIterator]() {
|
|
117
134
|
return this;
|
|
118
135
|
},
|
|
119
|
-
byPage: () => {
|
|
120
|
-
|
|
136
|
+
byPage: (settings?: PageSettings) => {
|
|
137
|
+
if (settings?.maxPageSize) {
|
|
138
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
139
|
+
}
|
|
140
|
+
return this.listPagingPage(options, settings);
|
|
121
141
|
}
|
|
122
142
|
};
|
|
123
143
|
}
|
|
124
144
|
|
|
125
145
|
private async *listPagingPage(
|
|
126
|
-
options?: SqlVirtualMachineGroupsListOptionalParams
|
|
146
|
+
options?: SqlVirtualMachineGroupsListOptionalParams,
|
|
147
|
+
settings?: PageSettings
|
|
127
148
|
): AsyncIterableIterator<SqlVirtualMachineGroup[]> {
|
|
128
|
-
let result
|
|
129
|
-
|
|
130
|
-
|
|
149
|
+
let result: SqlVirtualMachineGroupsListResponse;
|
|
150
|
+
let continuationToken = settings?.continuationToken;
|
|
151
|
+
if (!continuationToken) {
|
|
152
|
+
result = await this._list(options);
|
|
153
|
+
let page = result.value || [];
|
|
154
|
+
continuationToken = result.nextLink;
|
|
155
|
+
setContinuationToken(page, continuationToken);
|
|
156
|
+
yield page;
|
|
157
|
+
}
|
|
131
158
|
while (continuationToken) {
|
|
132
159
|
result = await this._listNext(continuationToken, options);
|
|
133
160
|
continuationToken = result.nextLink;
|
|
134
|
-
|
|
161
|
+
let page = result.value || [];
|
|
162
|
+
setContinuationToken(page, continuationToken);
|
|
163
|
+
yield page;
|
|
135
164
|
}
|
|
136
165
|
}
|
|
137
166
|
|
|
@@ -634,7 +663,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
634
663
|
},
|
|
635
664
|
default: {}
|
|
636
665
|
},
|
|
637
|
-
queryParameters: [Parameters.apiVersion],
|
|
638
666
|
urlParameters: [
|
|
639
667
|
Parameters.$host,
|
|
640
668
|
Parameters.resourceGroupName,
|
|
@@ -653,7 +681,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
653
681
|
},
|
|
654
682
|
default: {}
|
|
655
683
|
},
|
|
656
|
-
queryParameters: [Parameters.apiVersion],
|
|
657
684
|
urlParameters: [
|
|
658
685
|
Parameters.$host,
|
|
659
686
|
Parameters.subscriptionId,
|
|
@@ -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 { SqlVirtualMachines } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -18,12 +19,13 @@ import {
|
|
|
18
19
|
SqlVirtualMachine,
|
|
19
20
|
SqlVirtualMachinesListBySqlVmGroupNextOptionalParams,
|
|
20
21
|
SqlVirtualMachinesListBySqlVmGroupOptionalParams,
|
|
22
|
+
SqlVirtualMachinesListBySqlVmGroupResponse,
|
|
21
23
|
SqlVirtualMachinesListNextOptionalParams,
|
|
22
24
|
SqlVirtualMachinesListOptionalParams,
|
|
25
|
+
SqlVirtualMachinesListResponse,
|
|
23
26
|
SqlVirtualMachinesListByResourceGroupNextOptionalParams,
|
|
24
27
|
SqlVirtualMachinesListByResourceGroupOptionalParams,
|
|
25
|
-
|
|
26
|
-
SqlVirtualMachinesListResponse,
|
|
28
|
+
SqlVirtualMachinesListByResourceGroupResponse,
|
|
27
29
|
SqlVirtualMachinesStartAssessmentOptionalParams,
|
|
28
30
|
SqlVirtualMachinesRedeployOptionalParams,
|
|
29
31
|
SqlVirtualMachinesGetOptionalParams,
|
|
@@ -34,7 +36,6 @@ import {
|
|
|
34
36
|
SqlVirtualMachineUpdate,
|
|
35
37
|
SqlVirtualMachinesUpdateOptionalParams,
|
|
36
38
|
SqlVirtualMachinesUpdateResponse,
|
|
37
|
-
SqlVirtualMachinesListByResourceGroupResponse,
|
|
38
39
|
SqlVirtualMachinesListBySqlVmGroupNextResponse,
|
|
39
40
|
SqlVirtualMachinesListNextResponse,
|
|
40
41
|
SqlVirtualMachinesListByResourceGroupNextResponse
|
|
@@ -77,11 +78,15 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
77
78
|
[Symbol.asyncIterator]() {
|
|
78
79
|
return this;
|
|
79
80
|
},
|
|
80
|
-
byPage: () => {
|
|
81
|
+
byPage: (settings?: PageSettings) => {
|
|
82
|
+
if (settings?.maxPageSize) {
|
|
83
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
84
|
+
}
|
|
81
85
|
return this.listBySqlVmGroupPagingPage(
|
|
82
86
|
resourceGroupName,
|
|
83
87
|
sqlVirtualMachineGroupName,
|
|
84
|
-
options
|
|
88
|
+
options,
|
|
89
|
+
settings
|
|
85
90
|
);
|
|
86
91
|
}
|
|
87
92
|
};
|
|
@@ -90,15 +95,22 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
90
95
|
private async *listBySqlVmGroupPagingPage(
|
|
91
96
|
resourceGroupName: string,
|
|
92
97
|
sqlVirtualMachineGroupName: string,
|
|
93
|
-
options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams
|
|
98
|
+
options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams,
|
|
99
|
+
settings?: PageSettings
|
|
94
100
|
): AsyncIterableIterator<SqlVirtualMachine[]> {
|
|
95
|
-
let result
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
let result: SqlVirtualMachinesListBySqlVmGroupResponse;
|
|
102
|
+
let continuationToken = settings?.continuationToken;
|
|
103
|
+
if (!continuationToken) {
|
|
104
|
+
result = await this._listBySqlVmGroup(
|
|
105
|
+
resourceGroupName,
|
|
106
|
+
sqlVirtualMachineGroupName,
|
|
107
|
+
options
|
|
108
|
+
);
|
|
109
|
+
let page = result.value || [];
|
|
110
|
+
continuationToken = result.nextLink;
|
|
111
|
+
setContinuationToken(page, continuationToken);
|
|
112
|
+
yield page;
|
|
113
|
+
}
|
|
102
114
|
while (continuationToken) {
|
|
103
115
|
result = await this._listBySqlVmGroupNext(
|
|
104
116
|
resourceGroupName,
|
|
@@ -107,7 +119,9 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
107
119
|
options
|
|
108
120
|
);
|
|
109
121
|
continuationToken = result.nextLink;
|
|
110
|
-
|
|
122
|
+
let page = result.value || [];
|
|
123
|
+
setContinuationToken(page, continuationToken);
|
|
124
|
+
yield page;
|
|
111
125
|
}
|
|
112
126
|
}
|
|
113
127
|
|
|
@@ -140,22 +154,34 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
140
154
|
[Symbol.asyncIterator]() {
|
|
141
155
|
return this;
|
|
142
156
|
},
|
|
143
|
-
byPage: () => {
|
|
144
|
-
|
|
157
|
+
byPage: (settings?: PageSettings) => {
|
|
158
|
+
if (settings?.maxPageSize) {
|
|
159
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
160
|
+
}
|
|
161
|
+
return this.listPagingPage(options, settings);
|
|
145
162
|
}
|
|
146
163
|
};
|
|
147
164
|
}
|
|
148
165
|
|
|
149
166
|
private async *listPagingPage(
|
|
150
|
-
options?: SqlVirtualMachinesListOptionalParams
|
|
167
|
+
options?: SqlVirtualMachinesListOptionalParams,
|
|
168
|
+
settings?: PageSettings
|
|
151
169
|
): AsyncIterableIterator<SqlVirtualMachine[]> {
|
|
152
|
-
let result
|
|
153
|
-
|
|
154
|
-
|
|
170
|
+
let result: SqlVirtualMachinesListResponse;
|
|
171
|
+
let continuationToken = settings?.continuationToken;
|
|
172
|
+
if (!continuationToken) {
|
|
173
|
+
result = await this._list(options);
|
|
174
|
+
let page = result.value || [];
|
|
175
|
+
continuationToken = result.nextLink;
|
|
176
|
+
setContinuationToken(page, continuationToken);
|
|
177
|
+
yield page;
|
|
178
|
+
}
|
|
155
179
|
while (continuationToken) {
|
|
156
180
|
result = await this._listNext(continuationToken, options);
|
|
157
181
|
continuationToken = result.nextLink;
|
|
158
|
-
|
|
182
|
+
let page = result.value || [];
|
|
183
|
+
setContinuationToken(page, continuationToken);
|
|
184
|
+
yield page;
|
|
159
185
|
}
|
|
160
186
|
}
|
|
161
187
|
|
|
@@ -185,19 +211,33 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
185
211
|
[Symbol.asyncIterator]() {
|
|
186
212
|
return this;
|
|
187
213
|
},
|
|
188
|
-
byPage: () => {
|
|
189
|
-
|
|
214
|
+
byPage: (settings?: PageSettings) => {
|
|
215
|
+
if (settings?.maxPageSize) {
|
|
216
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
217
|
+
}
|
|
218
|
+
return this.listByResourceGroupPagingPage(
|
|
219
|
+
resourceGroupName,
|
|
220
|
+
options,
|
|
221
|
+
settings
|
|
222
|
+
);
|
|
190
223
|
}
|
|
191
224
|
};
|
|
192
225
|
}
|
|
193
226
|
|
|
194
227
|
private async *listByResourceGroupPagingPage(
|
|
195
228
|
resourceGroupName: string,
|
|
196
|
-
options?: SqlVirtualMachinesListByResourceGroupOptionalParams
|
|
229
|
+
options?: SqlVirtualMachinesListByResourceGroupOptionalParams,
|
|
230
|
+
settings?: PageSettings
|
|
197
231
|
): AsyncIterableIterator<SqlVirtualMachine[]> {
|
|
198
|
-
let result
|
|
199
|
-
|
|
200
|
-
|
|
232
|
+
let result: SqlVirtualMachinesListByResourceGroupResponse;
|
|
233
|
+
let continuationToken = settings?.continuationToken;
|
|
234
|
+
if (!continuationToken) {
|
|
235
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
236
|
+
let page = result.value || [];
|
|
237
|
+
continuationToken = result.nextLink;
|
|
238
|
+
setContinuationToken(page, continuationToken);
|
|
239
|
+
yield page;
|
|
240
|
+
}
|
|
201
241
|
while (continuationToken) {
|
|
202
242
|
result = await this._listByResourceGroupNext(
|
|
203
243
|
resourceGroupName,
|
|
@@ -205,7 +245,9 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
205
245
|
options
|
|
206
246
|
);
|
|
207
247
|
continuationToken = result.nextLink;
|
|
208
|
-
|
|
248
|
+
let page = result.value || [];
|
|
249
|
+
setContinuationToken(page, continuationToken);
|
|
250
|
+
yield page;
|
|
209
251
|
}
|
|
210
252
|
}
|
|
211
253
|
|
|
@@ -966,7 +1008,6 @@ const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
966
1008
|
},
|
|
967
1009
|
default: {}
|
|
968
1010
|
},
|
|
969
|
-
queryParameters: [Parameters.apiVersion],
|
|
970
1011
|
urlParameters: [
|
|
971
1012
|
Parameters.$host,
|
|
972
1013
|
Parameters.resourceGroupName,
|
|
@@ -986,7 +1027,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
986
1027
|
},
|
|
987
1028
|
default: {}
|
|
988
1029
|
},
|
|
989
|
-
queryParameters: [Parameters.apiVersion],
|
|
990
1030
|
urlParameters: [
|
|
991
1031
|
Parameters.$host,
|
|
992
1032
|
Parameters.subscriptionId,
|
|
@@ -1004,7 +1044,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
1004
1044
|
},
|
|
1005
1045
|
default: {}
|
|
1006
1046
|
},
|
|
1007
|
-
queryParameters: [Parameters.apiVersion],
|
|
1008
1047
|
urlParameters: [
|
|
1009
1048
|
Parameters.$host,
|
|
1010
1049
|
Parameters.resourceGroupName,
|
|
@@ -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 the last `.value` produced by the `byPage` iterator,
|
|
17
|
+
* returns a continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
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
|
+
}
|
|
@@ -60,22 +60,19 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
|
|
|
60
60
|
credential: credentials
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.
|
|
63
|
+
const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.7`;
|
|
64
64
|
const userAgentPrefix =
|
|
65
65
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
66
66
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
67
67
|
: `${packageDetails}`;
|
|
68
68
|
|
|
69
|
-
if (!options.credentialScopes) {
|
|
70
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
71
|
-
}
|
|
72
69
|
const optionsWithDefaults = {
|
|
73
70
|
...defaults,
|
|
74
71
|
...options,
|
|
75
72
|
userAgentOptions: {
|
|
76
73
|
userAgentPrefix
|
|
77
74
|
},
|
|
78
|
-
|
|
75
|
+
endpoint:
|
|
79
76
|
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
80
77
|
};
|
|
81
78
|
super(optionsWithDefaults);
|
|
@@ -101,7 +98,9 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
|
|
|
101
98
|
this.pipeline.addPolicy(
|
|
102
99
|
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
103
100
|
credential: credentials,
|
|
104
|
-
scopes:
|
|
101
|
+
scopes:
|
|
102
|
+
optionsWithDefaults.credentialScopes ??
|
|
103
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
105
104
|
challengeCallbacks: {
|
|
106
105
|
authorizeRequestOnChallenge:
|
|
107
106
|
coreClient.authorizeRequestOnClaimChallenge
|
package/tsconfig.json
CHANGED
|
@@ -15,11 +15,17 @@
|
|
|
15
15
|
],
|
|
16
16
|
"declaration": true,
|
|
17
17
|
"outDir": "./dist-esm",
|
|
18
|
-
"importHelpers": true
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"paths": {
|
|
20
|
+
"@azure/arm-sqlvirtualmachine": [
|
|
21
|
+
"./src/index"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
19
24
|
},
|
|
20
25
|
"include": [
|
|
21
26
|
"./src/**/*.ts",
|
|
22
|
-
"./test/**/*.ts"
|
|
27
|
+
"./test/**/*.ts",
|
|
28
|
+
"samples-dev/**/*.ts"
|
|
23
29
|
],
|
|
24
30
|
"exclude": [
|
|
25
31
|
"node_modules"
|
|
@@ -348,6 +348,15 @@ export declare type Failover = string;
|
|
|
348
348
|
*/
|
|
349
349
|
export declare type FullBackupFrequencyType = string;
|
|
350
350
|
|
|
351
|
+
/**
|
|
352
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
353
|
+
* returns a continuation token that can be used to begin paging from
|
|
354
|
+
* that point later.
|
|
355
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
356
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
357
|
+
*/
|
|
358
|
+
export declare function getContinuationToken(page: unknown): string | undefined;
|
|
359
|
+
|
|
351
360
|
/**
|
|
352
361
|
* Defines values for IdentityType. \
|
|
353
362
|
* {@link KnownIdentityType} can be used interchangeably with IdentityType,
|