@azure/arm-sqlvirtualmachine 5.0.0-beta.6 → 5.0.0-beta.8
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 +1065 -306
- 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 +60 -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 +58 -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 +59 -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 +58 -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/sqlVirtualMachineTroubleshootSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.js +45 -0
- package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.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 +290 -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 +59 -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 +60 -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 +58 -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/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +234 -68
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +8 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +14 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +325 -0
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +1 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +11 -2
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/availabilityGroupListeners.d.ts +3 -3
- package/dist-esm/src/operations/availabilityGroupListeners.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityGroupListeners.js +86 -41
- package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts.map +1 -1
- package/dist-esm/src/operations/operations.js +37 -15
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts +4 -4
- package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachineGroups.js +134 -51
- package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.d.ts +32 -0
- package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.d.ts.map +1 -0
- package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.js +118 -0
- package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.js.map +1 -0
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts +29 -29
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.js +270 -148
- package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.d.ts +24 -0
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.js +9 -0
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +26 -26
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.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 +2 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.js +7 -9
- package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
- package/dist-esm/test/sqlvirtualmachine_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/sqlvirtualmachine_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/sqlvirtualmachine_operations_test.spec.js +78 -0
- package/dist-esm/test/sqlvirtualmachine_operations_test.spec.js.map +1 -0
- package/package.json +22 -12
- package/review/arm-sqlvirtualmachine.api.md +134 -13
- package/src/index.ts +1 -0
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +210 -25
- package/src/models/mappers.ts +340 -0
- package/src/models/parameters.ts +15 -2
- package/src/operations/availabilityGroupListeners.ts +81 -42
- package/src/operations/index.ts +1 -0
- package/src/operations/operations.ts +27 -11
- package/src/operations/sqlVirtualMachineGroups.ts +134 -61
- package/src/operations/sqlVirtualMachineTroubleshoot.ts +172 -0
- package/src/operations/sqlVirtualMachines.ts +312 -213
- package/src/operationsInterfaces/availabilityGroupListeners.ts +4 -4
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/sqlVirtualMachineGroups.ts +6 -6
- package/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.ts +51 -0
- package/src/operationsInterfaces/sqlVirtualMachines.ts +57 -57
- package/src/pagingHelper.ts +39 -0
- package/src/sqlVirtualMachineManagementClient.ts +14 -9
- package/tsconfig.json +8 -2
- package/types/arm-sqlvirtualmachine.d.ts +254 -38
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -6,26 +6,30 @@
|
|
|
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";
|
|
13
14
|
import * as Parameters from "../models/parameters";
|
|
14
15
|
import { SqlVirtualMachineManagementClient } from "../sqlVirtualMachineManagementClient";
|
|
15
|
-
import {
|
|
16
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
17
22
|
import {
|
|
18
23
|
SqlVirtualMachine,
|
|
19
24
|
SqlVirtualMachinesListBySqlVmGroupNextOptionalParams,
|
|
20
25
|
SqlVirtualMachinesListBySqlVmGroupOptionalParams,
|
|
26
|
+
SqlVirtualMachinesListBySqlVmGroupResponse,
|
|
21
27
|
SqlVirtualMachinesListNextOptionalParams,
|
|
22
28
|
SqlVirtualMachinesListOptionalParams,
|
|
29
|
+
SqlVirtualMachinesListResponse,
|
|
23
30
|
SqlVirtualMachinesListByResourceGroupNextOptionalParams,
|
|
24
31
|
SqlVirtualMachinesListByResourceGroupOptionalParams,
|
|
25
|
-
|
|
26
|
-
SqlVirtualMachinesListResponse,
|
|
27
|
-
SqlVirtualMachinesStartAssessmentOptionalParams,
|
|
28
|
-
SqlVirtualMachinesRedeployOptionalParams,
|
|
32
|
+
SqlVirtualMachinesListByResourceGroupResponse,
|
|
29
33
|
SqlVirtualMachinesGetOptionalParams,
|
|
30
34
|
SqlVirtualMachinesGetResponse,
|
|
31
35
|
SqlVirtualMachinesCreateOrUpdateOptionalParams,
|
|
@@ -34,7 +38,8 @@ import {
|
|
|
34
38
|
SqlVirtualMachineUpdate,
|
|
35
39
|
SqlVirtualMachinesUpdateOptionalParams,
|
|
36
40
|
SqlVirtualMachinesUpdateResponse,
|
|
37
|
-
|
|
41
|
+
SqlVirtualMachinesStartAssessmentOptionalParams,
|
|
42
|
+
SqlVirtualMachinesRedeployOptionalParams,
|
|
38
43
|
SqlVirtualMachinesListBySqlVmGroupNextResponse,
|
|
39
44
|
SqlVirtualMachinesListNextResponse,
|
|
40
45
|
SqlVirtualMachinesListByResourceGroupNextResponse
|
|
@@ -77,11 +82,15 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
77
82
|
[Symbol.asyncIterator]() {
|
|
78
83
|
return this;
|
|
79
84
|
},
|
|
80
|
-
byPage: () => {
|
|
85
|
+
byPage: (settings?: PageSettings) => {
|
|
86
|
+
if (settings?.maxPageSize) {
|
|
87
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
88
|
+
}
|
|
81
89
|
return this.listBySqlVmGroupPagingPage(
|
|
82
90
|
resourceGroupName,
|
|
83
91
|
sqlVirtualMachineGroupName,
|
|
84
|
-
options
|
|
92
|
+
options,
|
|
93
|
+
settings
|
|
85
94
|
);
|
|
86
95
|
}
|
|
87
96
|
};
|
|
@@ -90,15 +99,22 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
90
99
|
private async *listBySqlVmGroupPagingPage(
|
|
91
100
|
resourceGroupName: string,
|
|
92
101
|
sqlVirtualMachineGroupName: string,
|
|
93
|
-
options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams
|
|
102
|
+
options?: SqlVirtualMachinesListBySqlVmGroupOptionalParams,
|
|
103
|
+
settings?: PageSettings
|
|
94
104
|
): AsyncIterableIterator<SqlVirtualMachine[]> {
|
|
95
|
-
let result
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
105
|
+
let result: SqlVirtualMachinesListBySqlVmGroupResponse;
|
|
106
|
+
let continuationToken = settings?.continuationToken;
|
|
107
|
+
if (!continuationToken) {
|
|
108
|
+
result = await this._listBySqlVmGroup(
|
|
109
|
+
resourceGroupName,
|
|
110
|
+
sqlVirtualMachineGroupName,
|
|
111
|
+
options
|
|
112
|
+
);
|
|
113
|
+
let page = result.value || [];
|
|
114
|
+
continuationToken = result.nextLink;
|
|
115
|
+
setContinuationToken(page, continuationToken);
|
|
116
|
+
yield page;
|
|
117
|
+
}
|
|
102
118
|
while (continuationToken) {
|
|
103
119
|
result = await this._listBySqlVmGroupNext(
|
|
104
120
|
resourceGroupName,
|
|
@@ -107,7 +123,9 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
107
123
|
options
|
|
108
124
|
);
|
|
109
125
|
continuationToken = result.nextLink;
|
|
110
|
-
|
|
126
|
+
let page = result.value || [];
|
|
127
|
+
setContinuationToken(page, continuationToken);
|
|
128
|
+
yield page;
|
|
111
129
|
}
|
|
112
130
|
}
|
|
113
131
|
|
|
@@ -140,22 +158,34 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
140
158
|
[Symbol.asyncIterator]() {
|
|
141
159
|
return this;
|
|
142
160
|
},
|
|
143
|
-
byPage: () => {
|
|
144
|
-
|
|
161
|
+
byPage: (settings?: PageSettings) => {
|
|
162
|
+
if (settings?.maxPageSize) {
|
|
163
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
164
|
+
}
|
|
165
|
+
return this.listPagingPage(options, settings);
|
|
145
166
|
}
|
|
146
167
|
};
|
|
147
168
|
}
|
|
148
169
|
|
|
149
170
|
private async *listPagingPage(
|
|
150
|
-
options?: SqlVirtualMachinesListOptionalParams
|
|
171
|
+
options?: SqlVirtualMachinesListOptionalParams,
|
|
172
|
+
settings?: PageSettings
|
|
151
173
|
): AsyncIterableIterator<SqlVirtualMachine[]> {
|
|
152
|
-
let result
|
|
153
|
-
|
|
154
|
-
|
|
174
|
+
let result: SqlVirtualMachinesListResponse;
|
|
175
|
+
let continuationToken = settings?.continuationToken;
|
|
176
|
+
if (!continuationToken) {
|
|
177
|
+
result = await this._list(options);
|
|
178
|
+
let page = result.value || [];
|
|
179
|
+
continuationToken = result.nextLink;
|
|
180
|
+
setContinuationToken(page, continuationToken);
|
|
181
|
+
yield page;
|
|
182
|
+
}
|
|
155
183
|
while (continuationToken) {
|
|
156
184
|
result = await this._listNext(continuationToken, options);
|
|
157
185
|
continuationToken = result.nextLink;
|
|
158
|
-
|
|
186
|
+
let page = result.value || [];
|
|
187
|
+
setContinuationToken(page, continuationToken);
|
|
188
|
+
yield page;
|
|
159
189
|
}
|
|
160
190
|
}
|
|
161
191
|
|
|
@@ -185,19 +215,33 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
185
215
|
[Symbol.asyncIterator]() {
|
|
186
216
|
return this;
|
|
187
217
|
},
|
|
188
|
-
byPage: () => {
|
|
189
|
-
|
|
218
|
+
byPage: (settings?: PageSettings) => {
|
|
219
|
+
if (settings?.maxPageSize) {
|
|
220
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
221
|
+
}
|
|
222
|
+
return this.listByResourceGroupPagingPage(
|
|
223
|
+
resourceGroupName,
|
|
224
|
+
options,
|
|
225
|
+
settings
|
|
226
|
+
);
|
|
190
227
|
}
|
|
191
228
|
};
|
|
192
229
|
}
|
|
193
230
|
|
|
194
231
|
private async *listByResourceGroupPagingPage(
|
|
195
232
|
resourceGroupName: string,
|
|
196
|
-
options?: SqlVirtualMachinesListByResourceGroupOptionalParams
|
|
233
|
+
options?: SqlVirtualMachinesListByResourceGroupOptionalParams,
|
|
234
|
+
settings?: PageSettings
|
|
197
235
|
): AsyncIterableIterator<SqlVirtualMachine[]> {
|
|
198
|
-
let result
|
|
199
|
-
|
|
200
|
-
|
|
236
|
+
let result: SqlVirtualMachinesListByResourceGroupResponse;
|
|
237
|
+
let continuationToken = settings?.continuationToken;
|
|
238
|
+
if (!continuationToken) {
|
|
239
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
240
|
+
let page = result.value || [];
|
|
241
|
+
continuationToken = result.nextLink;
|
|
242
|
+
setContinuationToken(page, continuationToken);
|
|
243
|
+
yield page;
|
|
244
|
+
}
|
|
201
245
|
while (continuationToken) {
|
|
202
246
|
result = await this._listByResourceGroupNext(
|
|
203
247
|
resourceGroupName,
|
|
@@ -205,7 +249,9 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
205
249
|
options
|
|
206
250
|
);
|
|
207
251
|
continuationToken = result.nextLink;
|
|
208
|
-
|
|
252
|
+
let page = result.value || [];
|
|
253
|
+
setContinuationToken(page, continuationToken);
|
|
254
|
+
yield page;
|
|
209
255
|
}
|
|
210
256
|
}
|
|
211
257
|
|
|
@@ -250,24 +296,49 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
250
296
|
}
|
|
251
297
|
|
|
252
298
|
/**
|
|
253
|
-
*
|
|
299
|
+
* Gets a SQL virtual machine.
|
|
254
300
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
255
301
|
* value from the Azure Resource Manager API or the portal.
|
|
256
302
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
257
303
|
* @param options The options parameters.
|
|
258
304
|
*/
|
|
259
|
-
|
|
305
|
+
get(
|
|
260
306
|
resourceGroupName: string,
|
|
261
307
|
sqlVirtualMachineName: string,
|
|
262
|
-
options?:
|
|
263
|
-
): Promise<
|
|
308
|
+
options?: SqlVirtualMachinesGetOptionalParams
|
|
309
|
+
): Promise<SqlVirtualMachinesGetResponse> {
|
|
310
|
+
return this.client.sendOperationRequest(
|
|
311
|
+
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
312
|
+
getOperationSpec
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Creates or updates a SQL virtual machine.
|
|
318
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
319
|
+
* value from the Azure Resource Manager API or the portal.
|
|
320
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
321
|
+
* @param parameters The SQL virtual machine.
|
|
322
|
+
* @param options The options parameters.
|
|
323
|
+
*/
|
|
324
|
+
async beginCreateOrUpdate(
|
|
325
|
+
resourceGroupName: string,
|
|
326
|
+
sqlVirtualMachineName: string,
|
|
327
|
+
parameters: SqlVirtualMachine,
|
|
328
|
+
options?: SqlVirtualMachinesCreateOrUpdateOptionalParams
|
|
329
|
+
): Promise<
|
|
330
|
+
SimplePollerLike<
|
|
331
|
+
OperationState<SqlVirtualMachinesCreateOrUpdateResponse>,
|
|
332
|
+
SqlVirtualMachinesCreateOrUpdateResponse
|
|
333
|
+
>
|
|
334
|
+
> {
|
|
264
335
|
const directSendOperation = async (
|
|
265
336
|
args: coreClient.OperationArguments,
|
|
266
337
|
spec: coreClient.OperationSpec
|
|
267
|
-
): Promise<
|
|
338
|
+
): Promise<SqlVirtualMachinesCreateOrUpdateResponse> => {
|
|
268
339
|
return this.client.sendOperationRequest(args, spec);
|
|
269
340
|
};
|
|
270
|
-
const
|
|
341
|
+
const sendOperationFn = async (
|
|
271
342
|
args: coreClient.OperationArguments,
|
|
272
343
|
spec: coreClient.OperationSpec
|
|
273
344
|
) => {
|
|
@@ -300,58 +371,65 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
300
371
|
};
|
|
301
372
|
};
|
|
302
373
|
|
|
303
|
-
const lro =
|
|
304
|
-
|
|
305
|
-
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
306
|
-
|
|
307
|
-
);
|
|
308
|
-
const poller =
|
|
309
|
-
|
|
310
|
-
|
|
374
|
+
const lro = createLroSpec({
|
|
375
|
+
sendOperationFn,
|
|
376
|
+
args: { resourceGroupName, sqlVirtualMachineName, parameters, options },
|
|
377
|
+
spec: createOrUpdateOperationSpec
|
|
378
|
+
});
|
|
379
|
+
const poller = await createHttpPoller<
|
|
380
|
+
SqlVirtualMachinesCreateOrUpdateResponse,
|
|
381
|
+
OperationState<SqlVirtualMachinesCreateOrUpdateResponse>
|
|
382
|
+
>(lro, {
|
|
383
|
+
restoreFrom: options?.resumeFrom,
|
|
384
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
385
|
+
resourceLocationConfig: "azure-async-operation"
|
|
311
386
|
});
|
|
312
387
|
await poller.poll();
|
|
313
388
|
return poller;
|
|
314
389
|
}
|
|
315
390
|
|
|
316
391
|
/**
|
|
317
|
-
*
|
|
392
|
+
* Creates or updates a SQL virtual machine.
|
|
318
393
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
319
394
|
* value from the Azure Resource Manager API or the portal.
|
|
320
395
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
396
|
+
* @param parameters The SQL virtual machine.
|
|
321
397
|
* @param options The options parameters.
|
|
322
398
|
*/
|
|
323
|
-
async
|
|
399
|
+
async beginCreateOrUpdateAndWait(
|
|
324
400
|
resourceGroupName: string,
|
|
325
401
|
sqlVirtualMachineName: string,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
402
|
+
parameters: SqlVirtualMachine,
|
|
403
|
+
options?: SqlVirtualMachinesCreateOrUpdateOptionalParams
|
|
404
|
+
): Promise<SqlVirtualMachinesCreateOrUpdateResponse> {
|
|
405
|
+
const poller = await this.beginCreateOrUpdate(
|
|
329
406
|
resourceGroupName,
|
|
330
407
|
sqlVirtualMachineName,
|
|
408
|
+
parameters,
|
|
331
409
|
options
|
|
332
410
|
);
|
|
333
411
|
return poller.pollUntilDone();
|
|
334
412
|
}
|
|
335
413
|
|
|
336
414
|
/**
|
|
337
|
-
*
|
|
415
|
+
* Deletes a SQL virtual machine.
|
|
338
416
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
339
417
|
* value from the Azure Resource Manager API or the portal.
|
|
340
418
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
341
419
|
* @param options The options parameters.
|
|
342
420
|
*/
|
|
343
|
-
async
|
|
421
|
+
async beginDelete(
|
|
344
422
|
resourceGroupName: string,
|
|
345
423
|
sqlVirtualMachineName: string,
|
|
346
|
-
options?:
|
|
347
|
-
): Promise<
|
|
424
|
+
options?: SqlVirtualMachinesDeleteOptionalParams
|
|
425
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
348
426
|
const directSendOperation = async (
|
|
349
427
|
args: coreClient.OperationArguments,
|
|
350
428
|
spec: coreClient.OperationSpec
|
|
351
429
|
): Promise<void> => {
|
|
352
430
|
return this.client.sendOperationRequest(args, spec);
|
|
353
431
|
};
|
|
354
|
-
const
|
|
432
|
+
const sendOperationFn = async (
|
|
355
433
|
args: coreClient.OperationArguments,
|
|
356
434
|
spec: coreClient.OperationSpec
|
|
357
435
|
) => {
|
|
@@ -384,32 +462,33 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
384
462
|
};
|
|
385
463
|
};
|
|
386
464
|
|
|
387
|
-
const lro =
|
|
388
|
-
|
|
389
|
-
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
390
|
-
|
|
391
|
-
);
|
|
392
|
-
const poller =
|
|
393
|
-
|
|
394
|
-
intervalInMs: options?.updateIntervalInMs
|
|
465
|
+
const lro = createLroSpec({
|
|
466
|
+
sendOperationFn,
|
|
467
|
+
args: { resourceGroupName, sqlVirtualMachineName, options },
|
|
468
|
+
spec: deleteOperationSpec
|
|
469
|
+
});
|
|
470
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
471
|
+
restoreFrom: options?.resumeFrom,
|
|
472
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
473
|
+
resourceLocationConfig: "location"
|
|
395
474
|
});
|
|
396
475
|
await poller.poll();
|
|
397
476
|
return poller;
|
|
398
477
|
}
|
|
399
478
|
|
|
400
479
|
/**
|
|
401
|
-
*
|
|
480
|
+
* Deletes a SQL virtual machine.
|
|
402
481
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
403
482
|
* value from the Azure Resource Manager API or the portal.
|
|
404
483
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
405
484
|
* @param options The options parameters.
|
|
406
485
|
*/
|
|
407
|
-
async
|
|
486
|
+
async beginDeleteAndWait(
|
|
408
487
|
resourceGroupName: string,
|
|
409
488
|
sqlVirtualMachineName: string,
|
|
410
|
-
options?:
|
|
489
|
+
options?: SqlVirtualMachinesDeleteOptionalParams
|
|
411
490
|
): Promise<void> {
|
|
412
|
-
const poller = await this.
|
|
491
|
+
const poller = await this.beginDelete(
|
|
413
492
|
resourceGroupName,
|
|
414
493
|
sqlVirtualMachineName,
|
|
415
494
|
options
|
|
@@ -418,49 +497,31 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
418
497
|
}
|
|
419
498
|
|
|
420
499
|
/**
|
|
421
|
-
*
|
|
422
|
-
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
423
|
-
* value from the Azure Resource Manager API or the portal.
|
|
424
|
-
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
425
|
-
* @param options The options parameters.
|
|
426
|
-
*/
|
|
427
|
-
get(
|
|
428
|
-
resourceGroupName: string,
|
|
429
|
-
sqlVirtualMachineName: string,
|
|
430
|
-
options?: SqlVirtualMachinesGetOptionalParams
|
|
431
|
-
): Promise<SqlVirtualMachinesGetResponse> {
|
|
432
|
-
return this.client.sendOperationRequest(
|
|
433
|
-
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
434
|
-
getOperationSpec
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
* Creates or updates a SQL virtual machine.
|
|
500
|
+
* Updates a SQL virtual machine.
|
|
440
501
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
441
502
|
* value from the Azure Resource Manager API or the portal.
|
|
442
503
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
443
504
|
* @param parameters The SQL virtual machine.
|
|
444
505
|
* @param options The options parameters.
|
|
445
506
|
*/
|
|
446
|
-
async
|
|
507
|
+
async beginUpdate(
|
|
447
508
|
resourceGroupName: string,
|
|
448
509
|
sqlVirtualMachineName: string,
|
|
449
|
-
parameters:
|
|
450
|
-
options?:
|
|
510
|
+
parameters: SqlVirtualMachineUpdate,
|
|
511
|
+
options?: SqlVirtualMachinesUpdateOptionalParams
|
|
451
512
|
): Promise<
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
513
|
+
SimplePollerLike<
|
|
514
|
+
OperationState<SqlVirtualMachinesUpdateResponse>,
|
|
515
|
+
SqlVirtualMachinesUpdateResponse
|
|
455
516
|
>
|
|
456
517
|
> {
|
|
457
518
|
const directSendOperation = async (
|
|
458
519
|
args: coreClient.OperationArguments,
|
|
459
520
|
spec: coreClient.OperationSpec
|
|
460
|
-
): Promise<
|
|
521
|
+
): Promise<SqlVirtualMachinesUpdateResponse> => {
|
|
461
522
|
return this.client.sendOperationRequest(args, spec);
|
|
462
523
|
};
|
|
463
|
-
const
|
|
524
|
+
const sendOperationFn = async (
|
|
464
525
|
args: coreClient.OperationArguments,
|
|
465
526
|
spec: coreClient.OperationSpec
|
|
466
527
|
) => {
|
|
@@ -493,34 +554,38 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
493
554
|
};
|
|
494
555
|
};
|
|
495
556
|
|
|
496
|
-
const lro =
|
|
497
|
-
|
|
498
|
-
{ resourceGroupName, sqlVirtualMachineName, parameters, options },
|
|
499
|
-
|
|
500
|
-
);
|
|
501
|
-
const poller =
|
|
502
|
-
|
|
503
|
-
|
|
557
|
+
const lro = createLroSpec({
|
|
558
|
+
sendOperationFn,
|
|
559
|
+
args: { resourceGroupName, sqlVirtualMachineName, parameters, options },
|
|
560
|
+
spec: updateOperationSpec
|
|
561
|
+
});
|
|
562
|
+
const poller = await createHttpPoller<
|
|
563
|
+
SqlVirtualMachinesUpdateResponse,
|
|
564
|
+
OperationState<SqlVirtualMachinesUpdateResponse>
|
|
565
|
+
>(lro, {
|
|
566
|
+
restoreFrom: options?.resumeFrom,
|
|
567
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
568
|
+
resourceLocationConfig: "azure-async-operation"
|
|
504
569
|
});
|
|
505
570
|
await poller.poll();
|
|
506
571
|
return poller;
|
|
507
572
|
}
|
|
508
573
|
|
|
509
574
|
/**
|
|
510
|
-
*
|
|
575
|
+
* Updates a SQL virtual machine.
|
|
511
576
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
512
577
|
* value from the Azure Resource Manager API or the portal.
|
|
513
578
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
514
579
|
* @param parameters The SQL virtual machine.
|
|
515
580
|
* @param options The options parameters.
|
|
516
581
|
*/
|
|
517
|
-
async
|
|
582
|
+
async beginUpdateAndWait(
|
|
518
583
|
resourceGroupName: string,
|
|
519
584
|
sqlVirtualMachineName: string,
|
|
520
|
-
parameters:
|
|
521
|
-
options?:
|
|
522
|
-
): Promise<
|
|
523
|
-
const poller = await this.
|
|
585
|
+
parameters: SqlVirtualMachineUpdate,
|
|
586
|
+
options?: SqlVirtualMachinesUpdateOptionalParams
|
|
587
|
+
): Promise<SqlVirtualMachinesUpdateResponse> {
|
|
588
|
+
const poller = await this.beginUpdate(
|
|
524
589
|
resourceGroupName,
|
|
525
590
|
sqlVirtualMachineName,
|
|
526
591
|
parameters,
|
|
@@ -530,24 +595,40 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
530
595
|
}
|
|
531
596
|
|
|
532
597
|
/**
|
|
533
|
-
*
|
|
598
|
+
* Gets all SQL virtual machines in a resource group.
|
|
599
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
600
|
+
* value from the Azure Resource Manager API or the portal.
|
|
601
|
+
* @param options The options parameters.
|
|
602
|
+
*/
|
|
603
|
+
private _listByResourceGroup(
|
|
604
|
+
resourceGroupName: string,
|
|
605
|
+
options?: SqlVirtualMachinesListByResourceGroupOptionalParams
|
|
606
|
+
): Promise<SqlVirtualMachinesListByResourceGroupResponse> {
|
|
607
|
+
return this.client.sendOperationRequest(
|
|
608
|
+
{ resourceGroupName, options },
|
|
609
|
+
listByResourceGroupOperationSpec
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Starts SQL best practices Assessment on SQL virtual machine.
|
|
534
615
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
535
616
|
* value from the Azure Resource Manager API or the portal.
|
|
536
617
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
537
618
|
* @param options The options parameters.
|
|
538
619
|
*/
|
|
539
|
-
async
|
|
620
|
+
async beginStartAssessment(
|
|
540
621
|
resourceGroupName: string,
|
|
541
622
|
sqlVirtualMachineName: string,
|
|
542
|
-
options?:
|
|
543
|
-
): Promise<
|
|
623
|
+
options?: SqlVirtualMachinesStartAssessmentOptionalParams
|
|
624
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
544
625
|
const directSendOperation = async (
|
|
545
626
|
args: coreClient.OperationArguments,
|
|
546
627
|
spec: coreClient.OperationSpec
|
|
547
628
|
): Promise<void> => {
|
|
548
629
|
return this.client.sendOperationRequest(args, spec);
|
|
549
630
|
};
|
|
550
|
-
const
|
|
631
|
+
const sendOperationFn = async (
|
|
551
632
|
args: coreClient.OperationArguments,
|
|
552
633
|
spec: coreClient.OperationSpec
|
|
553
634
|
) => {
|
|
@@ -580,32 +661,33 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
580
661
|
};
|
|
581
662
|
};
|
|
582
663
|
|
|
583
|
-
const lro =
|
|
584
|
-
|
|
585
|
-
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
586
|
-
|
|
587
|
-
);
|
|
588
|
-
const poller =
|
|
589
|
-
|
|
590
|
-
intervalInMs: options?.updateIntervalInMs
|
|
664
|
+
const lro = createLroSpec({
|
|
665
|
+
sendOperationFn,
|
|
666
|
+
args: { resourceGroupName, sqlVirtualMachineName, options },
|
|
667
|
+
spec: startAssessmentOperationSpec
|
|
668
|
+
});
|
|
669
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
670
|
+
restoreFrom: options?.resumeFrom,
|
|
671
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
672
|
+
resourceLocationConfig: "location"
|
|
591
673
|
});
|
|
592
674
|
await poller.poll();
|
|
593
675
|
return poller;
|
|
594
676
|
}
|
|
595
677
|
|
|
596
678
|
/**
|
|
597
|
-
*
|
|
679
|
+
* Starts SQL best practices Assessment on SQL virtual machine.
|
|
598
680
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
599
681
|
* value from the Azure Resource Manager API or the portal.
|
|
600
682
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
601
683
|
* @param options The options parameters.
|
|
602
684
|
*/
|
|
603
|
-
async
|
|
685
|
+
async beginStartAssessmentAndWait(
|
|
604
686
|
resourceGroupName: string,
|
|
605
687
|
sqlVirtualMachineName: string,
|
|
606
|
-
options?:
|
|
688
|
+
options?: SqlVirtualMachinesStartAssessmentOptionalParams
|
|
607
689
|
): Promise<void> {
|
|
608
|
-
const poller = await this.
|
|
690
|
+
const poller = await this.beginStartAssessment(
|
|
609
691
|
resourceGroupName,
|
|
610
692
|
sqlVirtualMachineName,
|
|
611
693
|
options
|
|
@@ -614,31 +696,24 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
614
696
|
}
|
|
615
697
|
|
|
616
698
|
/**
|
|
617
|
-
*
|
|
699
|
+
* Uninstalls and reinstalls the SQL IaaS Extension.
|
|
618
700
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
619
701
|
* value from the Azure Resource Manager API or the portal.
|
|
620
702
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
621
|
-
* @param parameters The SQL virtual machine.
|
|
622
703
|
* @param options The options parameters.
|
|
623
704
|
*/
|
|
624
|
-
async
|
|
705
|
+
async beginRedeploy(
|
|
625
706
|
resourceGroupName: string,
|
|
626
707
|
sqlVirtualMachineName: string,
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
): Promise<
|
|
630
|
-
PollerLike<
|
|
631
|
-
PollOperationState<SqlVirtualMachinesUpdateResponse>,
|
|
632
|
-
SqlVirtualMachinesUpdateResponse
|
|
633
|
-
>
|
|
634
|
-
> {
|
|
708
|
+
options?: SqlVirtualMachinesRedeployOptionalParams
|
|
709
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
635
710
|
const directSendOperation = async (
|
|
636
711
|
args: coreClient.OperationArguments,
|
|
637
712
|
spec: coreClient.OperationSpec
|
|
638
|
-
): Promise<
|
|
713
|
+
): Promise<void> => {
|
|
639
714
|
return this.client.sendOperationRequest(args, spec);
|
|
640
715
|
};
|
|
641
|
-
const
|
|
716
|
+
const sendOperationFn = async (
|
|
642
717
|
args: coreClient.OperationArguments,
|
|
643
718
|
spec: coreClient.OperationSpec
|
|
644
719
|
) => {
|
|
@@ -671,58 +746,40 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
671
746
|
};
|
|
672
747
|
};
|
|
673
748
|
|
|
674
|
-
const lro =
|
|
675
|
-
|
|
676
|
-
{ resourceGroupName, sqlVirtualMachineName,
|
|
677
|
-
|
|
678
|
-
);
|
|
679
|
-
const poller =
|
|
680
|
-
|
|
681
|
-
intervalInMs: options?.updateIntervalInMs
|
|
749
|
+
const lro = createLroSpec({
|
|
750
|
+
sendOperationFn,
|
|
751
|
+
args: { resourceGroupName, sqlVirtualMachineName, options },
|
|
752
|
+
spec: redeployOperationSpec
|
|
753
|
+
});
|
|
754
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
755
|
+
restoreFrom: options?.resumeFrom,
|
|
756
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
757
|
+
resourceLocationConfig: "location"
|
|
682
758
|
});
|
|
683
759
|
await poller.poll();
|
|
684
760
|
return poller;
|
|
685
761
|
}
|
|
686
762
|
|
|
687
763
|
/**
|
|
688
|
-
*
|
|
764
|
+
* Uninstalls and reinstalls the SQL IaaS Extension.
|
|
689
765
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
690
766
|
* value from the Azure Resource Manager API or the portal.
|
|
691
767
|
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
692
|
-
* @param parameters The SQL virtual machine.
|
|
693
768
|
* @param options The options parameters.
|
|
694
769
|
*/
|
|
695
|
-
async
|
|
770
|
+
async beginRedeployAndWait(
|
|
696
771
|
resourceGroupName: string,
|
|
697
772
|
sqlVirtualMachineName: string,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
const poller = await this.beginUpdate(
|
|
773
|
+
options?: SqlVirtualMachinesRedeployOptionalParams
|
|
774
|
+
): Promise<void> {
|
|
775
|
+
const poller = await this.beginRedeploy(
|
|
702
776
|
resourceGroupName,
|
|
703
777
|
sqlVirtualMachineName,
|
|
704
|
-
parameters,
|
|
705
778
|
options
|
|
706
779
|
);
|
|
707
780
|
return poller.pollUntilDone();
|
|
708
781
|
}
|
|
709
782
|
|
|
710
|
-
/**
|
|
711
|
-
* Gets all SQL virtual machines in a resource group.
|
|
712
|
-
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
713
|
-
* value from the Azure Resource Manager API or the portal.
|
|
714
|
-
* @param options The options parameters.
|
|
715
|
-
*/
|
|
716
|
-
private _listByResourceGroup(
|
|
717
|
-
resourceGroupName: string,
|
|
718
|
-
options?: SqlVirtualMachinesListByResourceGroupOptionalParams
|
|
719
|
-
): Promise<SqlVirtualMachinesListByResourceGroupResponse> {
|
|
720
|
-
return this.client.sendOperationRequest(
|
|
721
|
-
{ resourceGroupName, options },
|
|
722
|
-
listByResourceGroupOperationSpec
|
|
723
|
-
);
|
|
724
|
-
}
|
|
725
|
-
|
|
726
783
|
/**
|
|
727
784
|
* ListBySqlVmGroupNext
|
|
728
785
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
@@ -787,7 +844,9 @@ const listBySqlVmGroupOperationSpec: coreClient.OperationSpec = {
|
|
|
787
844
|
200: {
|
|
788
845
|
bodyMapper: Mappers.SqlVirtualMachineListResult
|
|
789
846
|
},
|
|
790
|
-
default: {
|
|
847
|
+
default: {
|
|
848
|
+
bodyMapper: Mappers.ErrorResponse
|
|
849
|
+
}
|
|
791
850
|
},
|
|
792
851
|
queryParameters: [Parameters.apiVersion],
|
|
793
852
|
urlParameters: [
|
|
@@ -807,41 +866,15 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
807
866
|
200: {
|
|
808
867
|
bodyMapper: Mappers.SqlVirtualMachineListResult
|
|
809
868
|
},
|
|
810
|
-
default: {
|
|
869
|
+
default: {
|
|
870
|
+
bodyMapper: Mappers.ErrorResponse
|
|
871
|
+
}
|
|
811
872
|
},
|
|
812
873
|
queryParameters: [Parameters.apiVersion],
|
|
813
874
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
814
875
|
headerParameters: [Parameters.accept],
|
|
815
876
|
serializer
|
|
816
877
|
};
|
|
817
|
-
const startAssessmentOperationSpec: coreClient.OperationSpec = {
|
|
818
|
-
path:
|
|
819
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
|
|
820
|
-
httpMethod: "POST",
|
|
821
|
-
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
822
|
-
queryParameters: [Parameters.apiVersion],
|
|
823
|
-
urlParameters: [
|
|
824
|
-
Parameters.$host,
|
|
825
|
-
Parameters.resourceGroupName,
|
|
826
|
-
Parameters.subscriptionId,
|
|
827
|
-
Parameters.sqlVirtualMachineName
|
|
828
|
-
],
|
|
829
|
-
serializer
|
|
830
|
-
};
|
|
831
|
-
const redeployOperationSpec: coreClient.OperationSpec = {
|
|
832
|
-
path:
|
|
833
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
|
|
834
|
-
httpMethod: "POST",
|
|
835
|
-
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
836
|
-
queryParameters: [Parameters.apiVersion],
|
|
837
|
-
urlParameters: [
|
|
838
|
-
Parameters.$host,
|
|
839
|
-
Parameters.resourceGroupName,
|
|
840
|
-
Parameters.subscriptionId,
|
|
841
|
-
Parameters.sqlVirtualMachineName
|
|
842
|
-
],
|
|
843
|
-
serializer
|
|
844
|
-
};
|
|
845
878
|
const getOperationSpec: coreClient.OperationSpec = {
|
|
846
879
|
path:
|
|
847
880
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
|
|
@@ -850,7 +883,9 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|
|
850
883
|
200: {
|
|
851
884
|
bodyMapper: Mappers.SqlVirtualMachine
|
|
852
885
|
},
|
|
853
|
-
default: {
|
|
886
|
+
default: {
|
|
887
|
+
bodyMapper: Mappers.ErrorResponse
|
|
888
|
+
}
|
|
854
889
|
},
|
|
855
890
|
queryParameters: [Parameters.expand, Parameters.apiVersion],
|
|
856
891
|
urlParameters: [
|
|
@@ -879,7 +914,9 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
|
879
914
|
204: {
|
|
880
915
|
bodyMapper: Mappers.SqlVirtualMachine
|
|
881
916
|
},
|
|
882
|
-
default: {
|
|
917
|
+
default: {
|
|
918
|
+
bodyMapper: Mappers.ErrorResponse
|
|
919
|
+
}
|
|
883
920
|
},
|
|
884
921
|
requestBody: Parameters.parameters3,
|
|
885
922
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -897,7 +934,15 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
|
897
934
|
path:
|
|
898
935
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
|
|
899
936
|
httpMethod: "DELETE",
|
|
900
|
-
responses: {
|
|
937
|
+
responses: {
|
|
938
|
+
200: {},
|
|
939
|
+
201: {},
|
|
940
|
+
202: {},
|
|
941
|
+
204: {},
|
|
942
|
+
default: {
|
|
943
|
+
bodyMapper: Mappers.ErrorResponse
|
|
944
|
+
}
|
|
945
|
+
},
|
|
901
946
|
queryParameters: [Parameters.apiVersion],
|
|
902
947
|
urlParameters: [
|
|
903
948
|
Parameters.$host,
|
|
@@ -905,6 +950,7 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
|
905
950
|
Parameters.subscriptionId,
|
|
906
951
|
Parameters.sqlVirtualMachineName
|
|
907
952
|
],
|
|
953
|
+
headerParameters: [Parameters.accept],
|
|
908
954
|
serializer
|
|
909
955
|
};
|
|
910
956
|
const updateOperationSpec: coreClient.OperationSpec = {
|
|
@@ -924,7 +970,9 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
924
970
|
204: {
|
|
925
971
|
bodyMapper: Mappers.SqlVirtualMachine
|
|
926
972
|
},
|
|
927
|
-
default: {
|
|
973
|
+
default: {
|
|
974
|
+
bodyMapper: Mappers.ErrorResponse
|
|
975
|
+
}
|
|
928
976
|
},
|
|
929
977
|
requestBody: Parameters.parameters4,
|
|
930
978
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -946,7 +994,9 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
|
946
994
|
200: {
|
|
947
995
|
bodyMapper: Mappers.SqlVirtualMachineListResult
|
|
948
996
|
},
|
|
949
|
-
default: {
|
|
997
|
+
default: {
|
|
998
|
+
bodyMapper: Mappers.ErrorResponse
|
|
999
|
+
}
|
|
950
1000
|
},
|
|
951
1001
|
queryParameters: [Parameters.apiVersion],
|
|
952
1002
|
urlParameters: [
|
|
@@ -957,6 +1007,52 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
|
957
1007
|
headerParameters: [Parameters.accept],
|
|
958
1008
|
serializer
|
|
959
1009
|
};
|
|
1010
|
+
const startAssessmentOperationSpec: coreClient.OperationSpec = {
|
|
1011
|
+
path:
|
|
1012
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
|
|
1013
|
+
httpMethod: "POST",
|
|
1014
|
+
responses: {
|
|
1015
|
+
200: {},
|
|
1016
|
+
201: {},
|
|
1017
|
+
202: {},
|
|
1018
|
+
204: {},
|
|
1019
|
+
default: {
|
|
1020
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
queryParameters: [Parameters.apiVersion],
|
|
1024
|
+
urlParameters: [
|
|
1025
|
+
Parameters.$host,
|
|
1026
|
+
Parameters.resourceGroupName,
|
|
1027
|
+
Parameters.subscriptionId,
|
|
1028
|
+
Parameters.sqlVirtualMachineName
|
|
1029
|
+
],
|
|
1030
|
+
headerParameters: [Parameters.accept],
|
|
1031
|
+
serializer
|
|
1032
|
+
};
|
|
1033
|
+
const redeployOperationSpec: coreClient.OperationSpec = {
|
|
1034
|
+
path:
|
|
1035
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
|
|
1036
|
+
httpMethod: "POST",
|
|
1037
|
+
responses: {
|
|
1038
|
+
200: {},
|
|
1039
|
+
201: {},
|
|
1040
|
+
202: {},
|
|
1041
|
+
204: {},
|
|
1042
|
+
default: {
|
|
1043
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
queryParameters: [Parameters.apiVersion],
|
|
1047
|
+
urlParameters: [
|
|
1048
|
+
Parameters.$host,
|
|
1049
|
+
Parameters.resourceGroupName,
|
|
1050
|
+
Parameters.subscriptionId,
|
|
1051
|
+
Parameters.sqlVirtualMachineName
|
|
1052
|
+
],
|
|
1053
|
+
headerParameters: [Parameters.accept],
|
|
1054
|
+
serializer
|
|
1055
|
+
};
|
|
960
1056
|
const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
961
1057
|
path: "{nextLink}",
|
|
962
1058
|
httpMethod: "GET",
|
|
@@ -964,9 +1060,10 @@ const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
964
1060
|
200: {
|
|
965
1061
|
bodyMapper: Mappers.SqlVirtualMachineListResult
|
|
966
1062
|
},
|
|
967
|
-
default: {
|
|
1063
|
+
default: {
|
|
1064
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1065
|
+
}
|
|
968
1066
|
},
|
|
969
|
-
queryParameters: [Parameters.apiVersion],
|
|
970
1067
|
urlParameters: [
|
|
971
1068
|
Parameters.$host,
|
|
972
1069
|
Parameters.resourceGroupName,
|
|
@@ -984,9 +1081,10 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
984
1081
|
200: {
|
|
985
1082
|
bodyMapper: Mappers.SqlVirtualMachineListResult
|
|
986
1083
|
},
|
|
987
|
-
default: {
|
|
1084
|
+
default: {
|
|
1085
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1086
|
+
}
|
|
988
1087
|
},
|
|
989
|
-
queryParameters: [Parameters.apiVersion],
|
|
990
1088
|
urlParameters: [
|
|
991
1089
|
Parameters.$host,
|
|
992
1090
|
Parameters.subscriptionId,
|
|
@@ -1002,9 +1100,10 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
1002
1100
|
200: {
|
|
1003
1101
|
bodyMapper: Mappers.SqlVirtualMachineListResult
|
|
1004
1102
|
},
|
|
1005
|
-
default: {
|
|
1103
|
+
default: {
|
|
1104
|
+
bodyMapper: Mappers.ErrorResponse
|
|
1105
|
+
}
|
|
1006
1106
|
},
|
|
1007
|
-
queryParameters: [Parameters.apiVersion],
|
|
1008
1107
|
urlParameters: [
|
|
1009
1108
|
Parameters.$host,
|
|
1010
1109
|
Parameters.resourceGroupName,
|