@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,20 +6,27 @@
|
|
|
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";
|
|
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
|
SqlVirtualMachineGroup,
|
|
19
24
|
SqlVirtualMachineGroupsListByResourceGroupNextOptionalParams,
|
|
20
25
|
SqlVirtualMachineGroupsListByResourceGroupOptionalParams,
|
|
26
|
+
SqlVirtualMachineGroupsListByResourceGroupResponse,
|
|
21
27
|
SqlVirtualMachineGroupsListNextOptionalParams,
|
|
22
28
|
SqlVirtualMachineGroupsListOptionalParams,
|
|
29
|
+
SqlVirtualMachineGroupsListResponse,
|
|
23
30
|
SqlVirtualMachineGroupsGetOptionalParams,
|
|
24
31
|
SqlVirtualMachineGroupsGetResponse,
|
|
25
32
|
SqlVirtualMachineGroupsCreateOrUpdateOptionalParams,
|
|
@@ -28,8 +35,6 @@ import {
|
|
|
28
35
|
SqlVirtualMachineGroupUpdate,
|
|
29
36
|
SqlVirtualMachineGroupsUpdateOptionalParams,
|
|
30
37
|
SqlVirtualMachineGroupsUpdateResponse,
|
|
31
|
-
SqlVirtualMachineGroupsListByResourceGroupResponse,
|
|
32
|
-
SqlVirtualMachineGroupsListResponse,
|
|
33
38
|
SqlVirtualMachineGroupsListByResourceGroupNextResponse,
|
|
34
39
|
SqlVirtualMachineGroupsListNextResponse
|
|
35
40
|
} from "../models";
|
|
@@ -65,19 +70,33 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
65
70
|
[Symbol.asyncIterator]() {
|
|
66
71
|
return this;
|
|
67
72
|
},
|
|
68
|
-
byPage: () => {
|
|
69
|
-
|
|
73
|
+
byPage: (settings?: PageSettings) => {
|
|
74
|
+
if (settings?.maxPageSize) {
|
|
75
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
76
|
+
}
|
|
77
|
+
return this.listByResourceGroupPagingPage(
|
|
78
|
+
resourceGroupName,
|
|
79
|
+
options,
|
|
80
|
+
settings
|
|
81
|
+
);
|
|
70
82
|
}
|
|
71
83
|
};
|
|
72
84
|
}
|
|
73
85
|
|
|
74
86
|
private async *listByResourceGroupPagingPage(
|
|
75
87
|
resourceGroupName: string,
|
|
76
|
-
options?: SqlVirtualMachineGroupsListByResourceGroupOptionalParams
|
|
88
|
+
options?: SqlVirtualMachineGroupsListByResourceGroupOptionalParams,
|
|
89
|
+
settings?: PageSettings
|
|
77
90
|
): AsyncIterableIterator<SqlVirtualMachineGroup[]> {
|
|
78
|
-
let result
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
let result: SqlVirtualMachineGroupsListByResourceGroupResponse;
|
|
92
|
+
let continuationToken = settings?.continuationToken;
|
|
93
|
+
if (!continuationToken) {
|
|
94
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
95
|
+
let page = result.value || [];
|
|
96
|
+
continuationToken = result.nextLink;
|
|
97
|
+
setContinuationToken(page, continuationToken);
|
|
98
|
+
yield page;
|
|
99
|
+
}
|
|
81
100
|
while (continuationToken) {
|
|
82
101
|
result = await this._listByResourceGroupNext(
|
|
83
102
|
resourceGroupName,
|
|
@@ -85,7 +104,9 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
85
104
|
options
|
|
86
105
|
);
|
|
87
106
|
continuationToken = result.nextLink;
|
|
88
|
-
|
|
107
|
+
let page = result.value || [];
|
|
108
|
+
setContinuationToken(page, continuationToken);
|
|
109
|
+
yield page;
|
|
89
110
|
}
|
|
90
111
|
}
|
|
91
112
|
|
|
@@ -116,22 +137,34 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
116
137
|
[Symbol.asyncIterator]() {
|
|
117
138
|
return this;
|
|
118
139
|
},
|
|
119
|
-
byPage: () => {
|
|
120
|
-
|
|
140
|
+
byPage: (settings?: PageSettings) => {
|
|
141
|
+
if (settings?.maxPageSize) {
|
|
142
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
143
|
+
}
|
|
144
|
+
return this.listPagingPage(options, settings);
|
|
121
145
|
}
|
|
122
146
|
};
|
|
123
147
|
}
|
|
124
148
|
|
|
125
149
|
private async *listPagingPage(
|
|
126
|
-
options?: SqlVirtualMachineGroupsListOptionalParams
|
|
150
|
+
options?: SqlVirtualMachineGroupsListOptionalParams,
|
|
151
|
+
settings?: PageSettings
|
|
127
152
|
): AsyncIterableIterator<SqlVirtualMachineGroup[]> {
|
|
128
|
-
let result
|
|
129
|
-
|
|
130
|
-
|
|
153
|
+
let result: SqlVirtualMachineGroupsListResponse;
|
|
154
|
+
let continuationToken = settings?.continuationToken;
|
|
155
|
+
if (!continuationToken) {
|
|
156
|
+
result = await this._list(options);
|
|
157
|
+
let page = result.value || [];
|
|
158
|
+
continuationToken = result.nextLink;
|
|
159
|
+
setContinuationToken(page, continuationToken);
|
|
160
|
+
yield page;
|
|
161
|
+
}
|
|
131
162
|
while (continuationToken) {
|
|
132
163
|
result = await this._listNext(continuationToken, options);
|
|
133
164
|
continuationToken = result.nextLink;
|
|
134
|
-
|
|
165
|
+
let page = result.value || [];
|
|
166
|
+
setContinuationToken(page, continuationToken);
|
|
167
|
+
yield page;
|
|
135
168
|
}
|
|
136
169
|
}
|
|
137
170
|
|
|
@@ -175,8 +208,8 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
175
208
|
parameters: SqlVirtualMachineGroup,
|
|
176
209
|
options?: SqlVirtualMachineGroupsCreateOrUpdateOptionalParams
|
|
177
210
|
): Promise<
|
|
178
|
-
|
|
179
|
-
|
|
211
|
+
SimplePollerLike<
|
|
212
|
+
OperationState<SqlVirtualMachineGroupsCreateOrUpdateResponse>,
|
|
180
213
|
SqlVirtualMachineGroupsCreateOrUpdateResponse
|
|
181
214
|
>
|
|
182
215
|
> {
|
|
@@ -186,7 +219,7 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
186
219
|
): Promise<SqlVirtualMachineGroupsCreateOrUpdateResponse> => {
|
|
187
220
|
return this.client.sendOperationRequest(args, spec);
|
|
188
221
|
};
|
|
189
|
-
const
|
|
222
|
+
const sendOperationFn = async (
|
|
190
223
|
args: coreClient.OperationArguments,
|
|
191
224
|
spec: coreClient.OperationSpec
|
|
192
225
|
) => {
|
|
@@ -219,14 +252,23 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
219
252
|
};
|
|
220
253
|
};
|
|
221
254
|
|
|
222
|
-
const lro =
|
|
223
|
-
|
|
224
|
-
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
255
|
+
const lro = createLroSpec({
|
|
256
|
+
sendOperationFn,
|
|
257
|
+
args: {
|
|
258
|
+
resourceGroupName,
|
|
259
|
+
sqlVirtualMachineGroupName,
|
|
260
|
+
parameters,
|
|
261
|
+
options
|
|
262
|
+
},
|
|
263
|
+
spec: createOrUpdateOperationSpec
|
|
264
|
+
});
|
|
265
|
+
const poller = await createHttpPoller<
|
|
266
|
+
SqlVirtualMachineGroupsCreateOrUpdateResponse,
|
|
267
|
+
OperationState<SqlVirtualMachineGroupsCreateOrUpdateResponse>
|
|
268
|
+
>(lro, {
|
|
269
|
+
restoreFrom: options?.resumeFrom,
|
|
270
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
271
|
+
resourceLocationConfig: "azure-async-operation"
|
|
230
272
|
});
|
|
231
273
|
await poller.poll();
|
|
232
274
|
return poller;
|
|
@@ -266,14 +308,14 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
266
308
|
resourceGroupName: string,
|
|
267
309
|
sqlVirtualMachineGroupName: string,
|
|
268
310
|
options?: SqlVirtualMachineGroupsDeleteOptionalParams
|
|
269
|
-
): Promise<
|
|
311
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
270
312
|
const directSendOperation = async (
|
|
271
313
|
args: coreClient.OperationArguments,
|
|
272
314
|
spec: coreClient.OperationSpec
|
|
273
315
|
): Promise<void> => {
|
|
274
316
|
return this.client.sendOperationRequest(args, spec);
|
|
275
317
|
};
|
|
276
|
-
const
|
|
318
|
+
const sendOperationFn = async (
|
|
277
319
|
args: coreClient.OperationArguments,
|
|
278
320
|
spec: coreClient.OperationSpec
|
|
279
321
|
) => {
|
|
@@ -306,14 +348,15 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
306
348
|
};
|
|
307
349
|
};
|
|
308
350
|
|
|
309
|
-
const lro =
|
|
310
|
-
|
|
311
|
-
{ resourceGroupName, sqlVirtualMachineGroupName, options },
|
|
312
|
-
deleteOperationSpec
|
|
313
|
-
);
|
|
314
|
-
const poller =
|
|
315
|
-
|
|
316
|
-
intervalInMs: options?.updateIntervalInMs
|
|
351
|
+
const lro = createLroSpec({
|
|
352
|
+
sendOperationFn,
|
|
353
|
+
args: { resourceGroupName, sqlVirtualMachineGroupName, options },
|
|
354
|
+
spec: deleteOperationSpec
|
|
355
|
+
});
|
|
356
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
357
|
+
restoreFrom: options?.resumeFrom,
|
|
358
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
359
|
+
resourceLocationConfig: "location"
|
|
317
360
|
});
|
|
318
361
|
await poller.poll();
|
|
319
362
|
return poller;
|
|
@@ -353,8 +396,8 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
353
396
|
parameters: SqlVirtualMachineGroupUpdate,
|
|
354
397
|
options?: SqlVirtualMachineGroupsUpdateOptionalParams
|
|
355
398
|
): Promise<
|
|
356
|
-
|
|
357
|
-
|
|
399
|
+
SimplePollerLike<
|
|
400
|
+
OperationState<SqlVirtualMachineGroupsUpdateResponse>,
|
|
358
401
|
SqlVirtualMachineGroupsUpdateResponse
|
|
359
402
|
>
|
|
360
403
|
> {
|
|
@@ -364,7 +407,7 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
364
407
|
): Promise<SqlVirtualMachineGroupsUpdateResponse> => {
|
|
365
408
|
return this.client.sendOperationRequest(args, spec);
|
|
366
409
|
};
|
|
367
|
-
const
|
|
410
|
+
const sendOperationFn = async (
|
|
368
411
|
args: coreClient.OperationArguments,
|
|
369
412
|
spec: coreClient.OperationSpec
|
|
370
413
|
) => {
|
|
@@ -397,14 +440,23 @@ export class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups {
|
|
|
397
440
|
};
|
|
398
441
|
};
|
|
399
442
|
|
|
400
|
-
const lro =
|
|
401
|
-
|
|
402
|
-
{
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
443
|
+
const lro = createLroSpec({
|
|
444
|
+
sendOperationFn,
|
|
445
|
+
args: {
|
|
446
|
+
resourceGroupName,
|
|
447
|
+
sqlVirtualMachineGroupName,
|
|
448
|
+
parameters,
|
|
449
|
+
options
|
|
450
|
+
},
|
|
451
|
+
spec: updateOperationSpec
|
|
452
|
+
});
|
|
453
|
+
const poller = await createHttpPoller<
|
|
454
|
+
SqlVirtualMachineGroupsUpdateResponse,
|
|
455
|
+
OperationState<SqlVirtualMachineGroupsUpdateResponse>
|
|
456
|
+
>(lro, {
|
|
457
|
+
restoreFrom: options?.resumeFrom,
|
|
458
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
459
|
+
resourceLocationConfig: "azure-async-operation"
|
|
408
460
|
});
|
|
409
461
|
await poller.poll();
|
|
410
462
|
return poller;
|
|
@@ -503,7 +555,9 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|
|
503
555
|
200: {
|
|
504
556
|
bodyMapper: Mappers.SqlVirtualMachineGroup
|
|
505
557
|
},
|
|
506
|
-
default: {
|
|
558
|
+
default: {
|
|
559
|
+
bodyMapper: Mappers.ErrorResponse
|
|
560
|
+
}
|
|
507
561
|
},
|
|
508
562
|
queryParameters: [Parameters.apiVersion],
|
|
509
563
|
urlParameters: [
|
|
@@ -532,7 +586,9 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
|
532
586
|
204: {
|
|
533
587
|
bodyMapper: Mappers.SqlVirtualMachineGroup
|
|
534
588
|
},
|
|
535
|
-
default: {
|
|
589
|
+
default: {
|
|
590
|
+
bodyMapper: Mappers.ErrorResponse
|
|
591
|
+
}
|
|
536
592
|
},
|
|
537
593
|
requestBody: Parameters.parameters1,
|
|
538
594
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -550,7 +606,15 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
|
550
606
|
path:
|
|
551
607
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}",
|
|
552
608
|
httpMethod: "DELETE",
|
|
553
|
-
responses: {
|
|
609
|
+
responses: {
|
|
610
|
+
200: {},
|
|
611
|
+
201: {},
|
|
612
|
+
202: {},
|
|
613
|
+
204: {},
|
|
614
|
+
default: {
|
|
615
|
+
bodyMapper: Mappers.ErrorResponse
|
|
616
|
+
}
|
|
617
|
+
},
|
|
554
618
|
queryParameters: [Parameters.apiVersion],
|
|
555
619
|
urlParameters: [
|
|
556
620
|
Parameters.$host,
|
|
@@ -558,6 +622,7 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
|
558
622
|
Parameters.sqlVirtualMachineGroupName,
|
|
559
623
|
Parameters.subscriptionId
|
|
560
624
|
],
|
|
625
|
+
headerParameters: [Parameters.accept],
|
|
561
626
|
serializer
|
|
562
627
|
};
|
|
563
628
|
const updateOperationSpec: coreClient.OperationSpec = {
|
|
@@ -577,7 +642,9 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
577
642
|
204: {
|
|
578
643
|
bodyMapper: Mappers.SqlVirtualMachineGroup
|
|
579
644
|
},
|
|
580
|
-
default: {
|
|
645
|
+
default: {
|
|
646
|
+
bodyMapper: Mappers.ErrorResponse
|
|
647
|
+
}
|
|
581
648
|
},
|
|
582
649
|
requestBody: Parameters.parameters2,
|
|
583
650
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -599,7 +666,9 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
|
599
666
|
200: {
|
|
600
667
|
bodyMapper: Mappers.SqlVirtualMachineGroupListResult
|
|
601
668
|
},
|
|
602
|
-
default: {
|
|
669
|
+
default: {
|
|
670
|
+
bodyMapper: Mappers.ErrorResponse
|
|
671
|
+
}
|
|
603
672
|
},
|
|
604
673
|
queryParameters: [Parameters.apiVersion],
|
|
605
674
|
urlParameters: [
|
|
@@ -618,7 +687,9 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
618
687
|
200: {
|
|
619
688
|
bodyMapper: Mappers.SqlVirtualMachineGroupListResult
|
|
620
689
|
},
|
|
621
|
-
default: {
|
|
690
|
+
default: {
|
|
691
|
+
bodyMapper: Mappers.ErrorResponse
|
|
692
|
+
}
|
|
622
693
|
},
|
|
623
694
|
queryParameters: [Parameters.apiVersion],
|
|
624
695
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
@@ -632,9 +703,10 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
632
703
|
200: {
|
|
633
704
|
bodyMapper: Mappers.SqlVirtualMachineGroupListResult
|
|
634
705
|
},
|
|
635
|
-
default: {
|
|
706
|
+
default: {
|
|
707
|
+
bodyMapper: Mappers.ErrorResponse
|
|
708
|
+
}
|
|
636
709
|
},
|
|
637
|
-
queryParameters: [Parameters.apiVersion],
|
|
638
710
|
urlParameters: [
|
|
639
711
|
Parameters.$host,
|
|
640
712
|
Parameters.resourceGroupName,
|
|
@@ -651,9 +723,10 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
651
723
|
200: {
|
|
652
724
|
bodyMapper: Mappers.SqlVirtualMachineGroupListResult
|
|
653
725
|
},
|
|
654
|
-
default: {
|
|
726
|
+
default: {
|
|
727
|
+
bodyMapper: Mappers.ErrorResponse
|
|
728
|
+
}
|
|
655
729
|
},
|
|
656
|
-
queryParameters: [Parameters.apiVersion],
|
|
657
730
|
urlParameters: [
|
|
658
731
|
Parameters.$host,
|
|
659
732
|
Parameters.subscriptionId,
|
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
import { SqlVirtualMachineTroubleshoot } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
import { SqlVirtualMachineManagementClient } from "../sqlVirtualMachineManagementClient";
|
|
14
|
+
import {
|
|
15
|
+
SimplePollerLike,
|
|
16
|
+
OperationState,
|
|
17
|
+
createHttpPoller
|
|
18
|
+
} from "@azure/core-lro";
|
|
19
|
+
import { createLroSpec } from "../lroImpl";
|
|
20
|
+
import {
|
|
21
|
+
SqlVmTroubleshooting,
|
|
22
|
+
SqlVirtualMachineTroubleshootTroubleshootOptionalParams,
|
|
23
|
+
SqlVirtualMachineTroubleshootTroubleshootResponse
|
|
24
|
+
} from "../models";
|
|
25
|
+
|
|
26
|
+
/** Class containing SqlVirtualMachineTroubleshoot operations. */
|
|
27
|
+
export class SqlVirtualMachineTroubleshootImpl
|
|
28
|
+
implements SqlVirtualMachineTroubleshoot {
|
|
29
|
+
private readonly client: SqlVirtualMachineManagementClient;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Initialize a new instance of the class SqlVirtualMachineTroubleshoot class.
|
|
33
|
+
* @param client Reference to the service client
|
|
34
|
+
*/
|
|
35
|
+
constructor(client: SqlVirtualMachineManagementClient) {
|
|
36
|
+
this.client = client;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Starts SQL virtual machine troubleshooting.
|
|
41
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
42
|
+
* value from the Azure Resource Manager API or the portal.
|
|
43
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
44
|
+
* @param parameters The SQL virtual machine troubleshooting entity.
|
|
45
|
+
* @param options The options parameters.
|
|
46
|
+
*/
|
|
47
|
+
async beginTroubleshoot(
|
|
48
|
+
resourceGroupName: string,
|
|
49
|
+
sqlVirtualMachineName: string,
|
|
50
|
+
parameters: SqlVmTroubleshooting,
|
|
51
|
+
options?: SqlVirtualMachineTroubleshootTroubleshootOptionalParams
|
|
52
|
+
): Promise<
|
|
53
|
+
SimplePollerLike<
|
|
54
|
+
OperationState<SqlVirtualMachineTroubleshootTroubleshootResponse>,
|
|
55
|
+
SqlVirtualMachineTroubleshootTroubleshootResponse
|
|
56
|
+
>
|
|
57
|
+
> {
|
|
58
|
+
const directSendOperation = async (
|
|
59
|
+
args: coreClient.OperationArguments,
|
|
60
|
+
spec: coreClient.OperationSpec
|
|
61
|
+
): Promise<SqlVirtualMachineTroubleshootTroubleshootResponse> => {
|
|
62
|
+
return this.client.sendOperationRequest(args, spec);
|
|
63
|
+
};
|
|
64
|
+
const sendOperationFn = async (
|
|
65
|
+
args: coreClient.OperationArguments,
|
|
66
|
+
spec: coreClient.OperationSpec
|
|
67
|
+
) => {
|
|
68
|
+
let currentRawResponse:
|
|
69
|
+
| coreClient.FullOperationResponse
|
|
70
|
+
| undefined = undefined;
|
|
71
|
+
const providedCallback = args.options?.onResponse;
|
|
72
|
+
const callback: coreClient.RawResponseCallback = (
|
|
73
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
74
|
+
flatResponse: unknown
|
|
75
|
+
) => {
|
|
76
|
+
currentRawResponse = rawResponse;
|
|
77
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
78
|
+
};
|
|
79
|
+
const updatedArgs = {
|
|
80
|
+
...args,
|
|
81
|
+
options: {
|
|
82
|
+
...args.options,
|
|
83
|
+
onResponse: callback
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
87
|
+
return {
|
|
88
|
+
flatResponse,
|
|
89
|
+
rawResponse: {
|
|
90
|
+
statusCode: currentRawResponse!.status,
|
|
91
|
+
body: currentRawResponse!.parsedBody,
|
|
92
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const lro = createLroSpec({
|
|
98
|
+
sendOperationFn,
|
|
99
|
+
args: { resourceGroupName, sqlVirtualMachineName, parameters, options },
|
|
100
|
+
spec: troubleshootOperationSpec
|
|
101
|
+
});
|
|
102
|
+
const poller = await createHttpPoller<
|
|
103
|
+
SqlVirtualMachineTroubleshootTroubleshootResponse,
|
|
104
|
+
OperationState<SqlVirtualMachineTroubleshootTroubleshootResponse>
|
|
105
|
+
>(lro, {
|
|
106
|
+
restoreFrom: options?.resumeFrom,
|
|
107
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
108
|
+
resourceLocationConfig: "location"
|
|
109
|
+
});
|
|
110
|
+
await poller.poll();
|
|
111
|
+
return poller;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Starts SQL virtual machine troubleshooting.
|
|
116
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
117
|
+
* value from the Azure Resource Manager API or the portal.
|
|
118
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
119
|
+
* @param parameters The SQL virtual machine troubleshooting entity.
|
|
120
|
+
* @param options The options parameters.
|
|
121
|
+
*/
|
|
122
|
+
async beginTroubleshootAndWait(
|
|
123
|
+
resourceGroupName: string,
|
|
124
|
+
sqlVirtualMachineName: string,
|
|
125
|
+
parameters: SqlVmTroubleshooting,
|
|
126
|
+
options?: SqlVirtualMachineTroubleshootTroubleshootOptionalParams
|
|
127
|
+
): Promise<SqlVirtualMachineTroubleshootTroubleshootResponse> {
|
|
128
|
+
const poller = await this.beginTroubleshoot(
|
|
129
|
+
resourceGroupName,
|
|
130
|
+
sqlVirtualMachineName,
|
|
131
|
+
parameters,
|
|
132
|
+
options
|
|
133
|
+
);
|
|
134
|
+
return poller.pollUntilDone();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// Operation Specifications
|
|
138
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
139
|
+
|
|
140
|
+
const troubleshootOperationSpec: coreClient.OperationSpec = {
|
|
141
|
+
path:
|
|
142
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot",
|
|
143
|
+
httpMethod: "POST",
|
|
144
|
+
responses: {
|
|
145
|
+
200: {
|
|
146
|
+
bodyMapper: Mappers.SqlVmTroubleshooting
|
|
147
|
+
},
|
|
148
|
+
201: {
|
|
149
|
+
bodyMapper: Mappers.SqlVmTroubleshooting
|
|
150
|
+
},
|
|
151
|
+
202: {
|
|
152
|
+
bodyMapper: Mappers.SqlVmTroubleshooting
|
|
153
|
+
},
|
|
154
|
+
204: {
|
|
155
|
+
bodyMapper: Mappers.SqlVmTroubleshooting
|
|
156
|
+
},
|
|
157
|
+
default: {
|
|
158
|
+
bodyMapper: Mappers.ErrorResponse
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
requestBody: Parameters.parameters5,
|
|
162
|
+
queryParameters: [Parameters.apiVersion],
|
|
163
|
+
urlParameters: [
|
|
164
|
+
Parameters.$host,
|
|
165
|
+
Parameters.resourceGroupName,
|
|
166
|
+
Parameters.subscriptionId,
|
|
167
|
+
Parameters.sqlVirtualMachineName
|
|
168
|
+
],
|
|
169
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
170
|
+
mediaType: "json",
|
|
171
|
+
serializer
|
|
172
|
+
};
|