@azure/arm-databricks 3.0.0-beta.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -3
- package/LICENSE +1 -1
- package/README.md +3 -3
- package/dist/index.js +1271 -273
- 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/accessConnectorsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.js +58 -0
- package/dist-esm/samples-dev/accessConnectorsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/accessConnectorsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsDeleteSample.js +38 -0
- package/dist-esm/samples-dev/accessConnectorsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/accessConnectorsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsGetSample.js +38 -0
- package/dist-esm/samples-dev/accessConnectorsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.js +53 -0
- package/dist-esm/samples-dev/accessConnectorsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.js +52 -0
- package/dist-esm/samples-dev/accessConnectorsListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/accessConnectorsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/accessConnectorsUpdateSample.js +39 -0
- package/dist-esm/samples-dev/accessConnectorsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +17 -7
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/outboundNetworkDependenciesEndpointsListSample.js +14 -6
- package/dist-esm/samples-dev/outboundNetworkDependenciesEndpointsListSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js +12 -4
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +12 -4
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +12 -4
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +18 -8
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +12 -4
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListSample.js +18 -8
- package/dist-esm/samples-dev/privateLinkResourcesListSample.js.map +1 -1
- package/dist-esm/samples-dev/vNetPeeringCreateOrUpdateSample.js +11 -4
- package/dist-esm/samples-dev/vNetPeeringCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/vNetPeeringDeleteSample.js +11 -4
- package/dist-esm/samples-dev/vNetPeeringDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/vNetPeeringGetSample.js +11 -4
- package/dist-esm/samples-dev/vNetPeeringGetSample.js.map +1 -1
- package/dist-esm/samples-dev/vNetPeeringListByWorkspaceSample.js +17 -8
- package/dist-esm/samples-dev/vNetPeeringListByWorkspaceSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js +98 -20
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesDeleteSample.js +11 -4
- package/dist-esm/samples-dev/workspacesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesGetSample.js +33 -8
- package/dist-esm/samples-dev/workspacesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +17 -8
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +16 -7
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesUpdateSample.js +11 -4
- package/dist-esm/samples-dev/workspacesUpdateSample.js.map +1 -1
- package/dist-esm/src/azureDatabricksManagementClient.d.ts +2 -2
- package/dist-esm/src/azureDatabricksManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureDatabricksManagementClient.js +22 -20
- package/dist-esm/src/azureDatabricksManagementClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/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 +252 -42
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +54 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +8 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +243 -2
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +4 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +35 -2
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/accessConnectors.d.ts +107 -0
- package/dist-esm/src/operations/accessConnectors.d.ts.map +1 -0
- package/dist-esm/src/operations/accessConnectors.js +543 -0
- package/dist-esm/src/operations/accessConnectors.js.map +1 -0
- 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 +25 -12
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts +1 -1
- package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +54 -33
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.js +25 -12
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/vNetPeering.d.ts +3 -3
- package/dist-esm/src/operations/vNetPeering.d.ts.map +1 -1
- package/dist-esm/src/operations/vNetPeering.js +49 -28
- package/dist-esm/src/operations/vNetPeering.js.map +1 -1
- package/dist-esm/src/operations/workspaces.d.ts +4 -4
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaces.js +75 -38
- package/dist-esm/src/operations/workspaces.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/accessConnectors.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/accessConnectors.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/accessConnectors.js +9 -0
- package/dist-esm/src/operationsInterfaces/accessConnectors.js.map +1 -0
- 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/outboundNetworkDependenciesEndpoints.d.ts +1 -1
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts +3 -3
- package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +4 -4
- package/dist-esm/src/operationsInterfaces/workspaces.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/test/databricks_examples.d.ts.map +1 -1
- package/dist-esm/test/databricks_examples.js +22 -22
- package/dist-esm/test/databricks_examples.js.map +1 -1
- package/package.json +27 -26
- package/review/arm-databricks.api.md +175 -71
- package/src/azureDatabricksManagementClient.ts +32 -24
- package/src/index.ts +1 -0
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +244 -10
- package/src/models/mappers.ts +258 -2
- package/src/models/parameters.ts +41 -2
- package/src/operations/accessConnectors.ts +717 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/operations.ts +21 -9
- package/src/operations/outboundNetworkDependenciesEndpoints.ts +1 -1
- package/src/operations/privateEndpointConnections.ts +54 -30
- package/src/operations/privateLinkResources.ts +26 -9
- package/src/operations/vNetPeering.ts +55 -35
- package/src/operations/workspaces.ts +87 -50
- package/src/operationsInterfaces/accessConnectors.ts +139 -0
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +1 -1
- package/src/operationsInterfaces/privateEndpointConnections.ts +4 -4
- package/src/operationsInterfaces/vNetPeering.ts +4 -4
- package/src/operationsInterfaces/workspaces.ts +6 -6
- package/src/pagingHelper.ts +39 -0
- package/types/arm-databricks.d.ts +333 -21
- package/types/tsdoc-metadata.json +1 -1
- package/rollup.config.js +0 -122
|
@@ -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
|
|
|
@@ -130,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
130
143
|
bodyMapper: Mappers.ErrorResponse
|
|
131
144
|
}
|
|
132
145
|
},
|
|
133
|
-
queryParameters: [Parameters.apiVersion],
|
|
134
146
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
147
|
headerParameters: [Parameters.accept],
|
|
136
148
|
serializer
|
|
@@ -32,7 +32,7 @@ export class OutboundNetworkDependenciesEndpointsImpl
|
|
|
32
32
|
/**
|
|
33
33
|
* Gets the list of endpoints that VNET Injected Workspace calls Azure Databricks Control Plane. You
|
|
34
34
|
* must configure outbound access with these endpoints. For more information, see
|
|
35
|
-
* https://docs.microsoft.com/
|
|
35
|
+
* https://docs.microsoft.com/azure/databricks/administration-guide/cloud-configurations/azure/udr
|
|
36
36
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
37
37
|
* @param workspaceName The name of the workspace.
|
|
38
38
|
* @param options The options parameters.
|
|
@@ -6,14 +6,19 @@
|
|
|
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 { PrivateEndpointConnections } 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 { AzureDatabricksManagementClient } from "../azureDatabricksManagementClient";
|
|
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
|
PrivateEndpointConnection,
|
|
19
24
|
PrivateEndpointConnectionsListNextOptionalParams,
|
|
@@ -60,8 +65,16 @@ export class PrivateEndpointConnectionsImpl
|
|
|
60
65
|
[Symbol.asyncIterator]() {
|
|
61
66
|
return this;
|
|
62
67
|
},
|
|
63
|
-
byPage: () => {
|
|
64
|
-
|
|
68
|
+
byPage: (settings?: PageSettings) => {
|
|
69
|
+
if (settings?.maxPageSize) {
|
|
70
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
71
|
+
}
|
|
72
|
+
return this.listPagingPage(
|
|
73
|
+
resourceGroupName,
|
|
74
|
+
workspaceName,
|
|
75
|
+
options,
|
|
76
|
+
settings
|
|
77
|
+
);
|
|
65
78
|
}
|
|
66
79
|
};
|
|
67
80
|
}
|
|
@@ -69,11 +82,18 @@ export class PrivateEndpointConnectionsImpl
|
|
|
69
82
|
private async *listPagingPage(
|
|
70
83
|
resourceGroupName: string,
|
|
71
84
|
workspaceName: string,
|
|
72
|
-
options?: PrivateEndpointConnectionsListOptionalParams
|
|
85
|
+
options?: PrivateEndpointConnectionsListOptionalParams,
|
|
86
|
+
settings?: PageSettings
|
|
73
87
|
): AsyncIterableIterator<PrivateEndpointConnection[]> {
|
|
74
|
-
let result
|
|
75
|
-
|
|
76
|
-
|
|
88
|
+
let result: PrivateEndpointConnectionsListResponse;
|
|
89
|
+
let continuationToken = settings?.continuationToken;
|
|
90
|
+
if (!continuationToken) {
|
|
91
|
+
result = await this._list(resourceGroupName, workspaceName, options);
|
|
92
|
+
let page = result.value || [];
|
|
93
|
+
continuationToken = result.nextLink;
|
|
94
|
+
setContinuationToken(page, continuationToken);
|
|
95
|
+
yield page;
|
|
96
|
+
}
|
|
77
97
|
while (continuationToken) {
|
|
78
98
|
result = await this._listNext(
|
|
79
99
|
resourceGroupName,
|
|
@@ -82,7 +102,9 @@ export class PrivateEndpointConnectionsImpl
|
|
|
82
102
|
options
|
|
83
103
|
);
|
|
84
104
|
continuationToken = result.nextLink;
|
|
85
|
-
|
|
105
|
+
let page = result.value || [];
|
|
106
|
+
setContinuationToken(page, continuationToken);
|
|
107
|
+
yield page;
|
|
86
108
|
}
|
|
87
109
|
}
|
|
88
110
|
|
|
@@ -156,8 +178,8 @@ export class PrivateEndpointConnectionsImpl
|
|
|
156
178
|
privateEndpointConnection: PrivateEndpointConnection,
|
|
157
179
|
options?: PrivateEndpointConnectionsCreateOptionalParams
|
|
158
180
|
): Promise<
|
|
159
|
-
|
|
160
|
-
|
|
181
|
+
SimplePollerLike<
|
|
182
|
+
OperationState<PrivateEndpointConnectionsCreateResponse>,
|
|
161
183
|
PrivateEndpointConnectionsCreateResponse
|
|
162
184
|
>
|
|
163
185
|
> {
|
|
@@ -167,7 +189,7 @@ export class PrivateEndpointConnectionsImpl
|
|
|
167
189
|
): Promise<PrivateEndpointConnectionsCreateResponse> => {
|
|
168
190
|
return this.client.sendOperationRequest(args, spec);
|
|
169
191
|
};
|
|
170
|
-
const
|
|
192
|
+
const sendOperationFn = async (
|
|
171
193
|
args: coreClient.OperationArguments,
|
|
172
194
|
spec: coreClient.OperationSpec
|
|
173
195
|
) => {
|
|
@@ -200,19 +222,22 @@ export class PrivateEndpointConnectionsImpl
|
|
|
200
222
|
};
|
|
201
223
|
};
|
|
202
224
|
|
|
203
|
-
const lro =
|
|
204
|
-
|
|
205
|
-
{
|
|
225
|
+
const lro = createLroSpec({
|
|
226
|
+
sendOperationFn,
|
|
227
|
+
args: {
|
|
206
228
|
resourceGroupName,
|
|
207
229
|
workspaceName,
|
|
208
230
|
privateEndpointConnectionName,
|
|
209
231
|
privateEndpointConnection,
|
|
210
232
|
options
|
|
211
233
|
},
|
|
212
|
-
createOperationSpec
|
|
213
|
-
);
|
|
214
|
-
const poller =
|
|
215
|
-
|
|
234
|
+
spec: createOperationSpec
|
|
235
|
+
});
|
|
236
|
+
const poller = await createHttpPoller<
|
|
237
|
+
PrivateEndpointConnectionsCreateResponse,
|
|
238
|
+
OperationState<PrivateEndpointConnectionsCreateResponse>
|
|
239
|
+
>(lro, {
|
|
240
|
+
restoreFrom: options?.resumeFrom,
|
|
216
241
|
intervalInMs: options?.updateIntervalInMs
|
|
217
242
|
});
|
|
218
243
|
await poller.poll();
|
|
@@ -256,14 +281,14 @@ export class PrivateEndpointConnectionsImpl
|
|
|
256
281
|
workspaceName: string,
|
|
257
282
|
privateEndpointConnectionName: string,
|
|
258
283
|
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
|
259
|
-
): Promise<
|
|
284
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
260
285
|
const directSendOperation = async (
|
|
261
286
|
args: coreClient.OperationArguments,
|
|
262
287
|
spec: coreClient.OperationSpec
|
|
263
288
|
): Promise<void> => {
|
|
264
289
|
return this.client.sendOperationRequest(args, spec);
|
|
265
290
|
};
|
|
266
|
-
const
|
|
291
|
+
const sendOperationFn = async (
|
|
267
292
|
args: coreClient.OperationArguments,
|
|
268
293
|
spec: coreClient.OperationSpec
|
|
269
294
|
) => {
|
|
@@ -296,18 +321,18 @@ export class PrivateEndpointConnectionsImpl
|
|
|
296
321
|
};
|
|
297
322
|
};
|
|
298
323
|
|
|
299
|
-
const lro =
|
|
300
|
-
|
|
301
|
-
{
|
|
324
|
+
const lro = createLroSpec({
|
|
325
|
+
sendOperationFn,
|
|
326
|
+
args: {
|
|
302
327
|
resourceGroupName,
|
|
303
328
|
workspaceName,
|
|
304
329
|
privateEndpointConnectionName,
|
|
305
330
|
options
|
|
306
331
|
},
|
|
307
|
-
deleteOperationSpec
|
|
308
|
-
);
|
|
309
|
-
const poller =
|
|
310
|
-
|
|
332
|
+
spec: deleteOperationSpec
|
|
333
|
+
});
|
|
334
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
335
|
+
restoreFrom: options?.resumeFrom,
|
|
311
336
|
intervalInMs: options?.updateIntervalInMs
|
|
312
337
|
});
|
|
313
338
|
await poller.poll();
|
|
@@ -472,7 +497,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
472
497
|
bodyMapper: Mappers.ErrorResponse
|
|
473
498
|
}
|
|
474
499
|
},
|
|
475
|
-
queryParameters: [Parameters.apiVersion],
|
|
476
500
|
urlParameters: [
|
|
477
501
|
Parameters.$host,
|
|
478
502
|
Parameters.resourceGroupName,
|
|
@@ -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 { PrivateLinkResources } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
@@ -54,8 +55,16 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
|
|
|
54
55
|
[Symbol.asyncIterator]() {
|
|
55
56
|
return this;
|
|
56
57
|
},
|
|
57
|
-
byPage: () => {
|
|
58
|
-
|
|
58
|
+
byPage: (settings?: PageSettings) => {
|
|
59
|
+
if (settings?.maxPageSize) {
|
|
60
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
61
|
+
}
|
|
62
|
+
return this.listPagingPage(
|
|
63
|
+
resourceGroupName,
|
|
64
|
+
workspaceName,
|
|
65
|
+
options,
|
|
66
|
+
settings
|
|
67
|
+
);
|
|
59
68
|
}
|
|
60
69
|
};
|
|
61
70
|
}
|
|
@@ -63,11 +72,18 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
|
|
|
63
72
|
private async *listPagingPage(
|
|
64
73
|
resourceGroupName: string,
|
|
65
74
|
workspaceName: string,
|
|
66
|
-
options?: PrivateLinkResourcesListOptionalParams
|
|
75
|
+
options?: PrivateLinkResourcesListOptionalParams,
|
|
76
|
+
settings?: PageSettings
|
|
67
77
|
): AsyncIterableIterator<GroupIdInformation[]> {
|
|
68
|
-
let result
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
let result: PrivateLinkResourcesListResponse;
|
|
79
|
+
let continuationToken = settings?.continuationToken;
|
|
80
|
+
if (!continuationToken) {
|
|
81
|
+
result = await this._list(resourceGroupName, workspaceName, options);
|
|
82
|
+
let page = result.value || [];
|
|
83
|
+
continuationToken = result.nextLink;
|
|
84
|
+
setContinuationToken(page, continuationToken);
|
|
85
|
+
yield page;
|
|
86
|
+
}
|
|
71
87
|
while (continuationToken) {
|
|
72
88
|
result = await this._listNext(
|
|
73
89
|
resourceGroupName,
|
|
@@ -76,7 +92,9 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources {
|
|
|
76
92
|
options
|
|
77
93
|
);
|
|
78
94
|
continuationToken = result.nextLink;
|
|
79
|
-
|
|
95
|
+
let page = result.value || [];
|
|
96
|
+
setContinuationToken(page, continuationToken);
|
|
97
|
+
yield page;
|
|
80
98
|
}
|
|
81
99
|
}
|
|
82
100
|
|
|
@@ -208,7 +226,6 @@ const listNextOperationSpec: coreClient.OperationSpec = {
|
|
|
208
226
|
bodyMapper: Mappers.ErrorResponse
|
|
209
227
|
}
|
|
210
228
|
},
|
|
211
|
-
queryParameters: [Parameters.apiVersion],
|
|
212
229
|
urlParameters: [
|
|
213
230
|
Parameters.$host,
|
|
214
231
|
Parameters.resourceGroupName,
|
|
@@ -6,24 +6,29 @@
|
|
|
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 { VNetPeering } 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 { AzureDatabricksManagementClient } from "../azureDatabricksManagementClient";
|
|
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
|
VirtualNetworkPeering,
|
|
19
24
|
VNetPeeringListByWorkspaceNextOptionalParams,
|
|
20
25
|
VNetPeeringListByWorkspaceOptionalParams,
|
|
26
|
+
VNetPeeringListByWorkspaceResponse,
|
|
21
27
|
VNetPeeringGetOptionalParams,
|
|
22
28
|
VNetPeeringGetResponse,
|
|
23
29
|
VNetPeeringDeleteOptionalParams,
|
|
24
30
|
VNetPeeringCreateOrUpdateOptionalParams,
|
|
25
31
|
VNetPeeringCreateOrUpdateResponse,
|
|
26
|
-
VNetPeeringListByWorkspaceResponse,
|
|
27
32
|
VNetPeeringListByWorkspaceNextResponse
|
|
28
33
|
} from "../models";
|
|
29
34
|
|
|
@@ -63,11 +68,15 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
63
68
|
[Symbol.asyncIterator]() {
|
|
64
69
|
return this;
|
|
65
70
|
},
|
|
66
|
-
byPage: () => {
|
|
71
|
+
byPage: (settings?: PageSettings) => {
|
|
72
|
+
if (settings?.maxPageSize) {
|
|
73
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
74
|
+
}
|
|
67
75
|
return this.listByWorkspacePagingPage(
|
|
68
76
|
resourceGroupName,
|
|
69
77
|
workspaceName,
|
|
70
|
-
options
|
|
78
|
+
options,
|
|
79
|
+
settings
|
|
71
80
|
);
|
|
72
81
|
}
|
|
73
82
|
};
|
|
@@ -76,15 +85,22 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
76
85
|
private async *listByWorkspacePagingPage(
|
|
77
86
|
resourceGroupName: string,
|
|
78
87
|
workspaceName: string,
|
|
79
|
-
options?: VNetPeeringListByWorkspaceOptionalParams
|
|
88
|
+
options?: VNetPeeringListByWorkspaceOptionalParams,
|
|
89
|
+
settings?: PageSettings
|
|
80
90
|
): AsyncIterableIterator<VirtualNetworkPeering[]> {
|
|
81
|
-
let result
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
let result: VNetPeeringListByWorkspaceResponse;
|
|
92
|
+
let continuationToken = settings?.continuationToken;
|
|
93
|
+
if (!continuationToken) {
|
|
94
|
+
result = await this._listByWorkspace(
|
|
95
|
+
resourceGroupName,
|
|
96
|
+
workspaceName,
|
|
97
|
+
options
|
|
98
|
+
);
|
|
99
|
+
let page = result.value || [];
|
|
100
|
+
continuationToken = result.nextLink;
|
|
101
|
+
setContinuationToken(page, continuationToken);
|
|
102
|
+
yield page;
|
|
103
|
+
}
|
|
88
104
|
while (continuationToken) {
|
|
89
105
|
result = await this._listByWorkspaceNext(
|
|
90
106
|
resourceGroupName,
|
|
@@ -93,7 +109,9 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
93
109
|
options
|
|
94
110
|
);
|
|
95
111
|
continuationToken = result.nextLink;
|
|
96
|
-
|
|
112
|
+
let page = result.value || [];
|
|
113
|
+
setContinuationToken(page, continuationToken);
|
|
114
|
+
yield page;
|
|
97
115
|
}
|
|
98
116
|
}
|
|
99
117
|
|
|
@@ -142,14 +160,14 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
142
160
|
workspaceName: string,
|
|
143
161
|
peeringName: string,
|
|
144
162
|
options?: VNetPeeringDeleteOptionalParams
|
|
145
|
-
): Promise<
|
|
163
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
146
164
|
const directSendOperation = async (
|
|
147
165
|
args: coreClient.OperationArguments,
|
|
148
166
|
spec: coreClient.OperationSpec
|
|
149
167
|
): Promise<void> => {
|
|
150
168
|
return this.client.sendOperationRequest(args, spec);
|
|
151
169
|
};
|
|
152
|
-
const
|
|
170
|
+
const sendOperationFn = async (
|
|
153
171
|
args: coreClient.OperationArguments,
|
|
154
172
|
spec: coreClient.OperationSpec
|
|
155
173
|
) => {
|
|
@@ -182,13 +200,13 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
182
200
|
};
|
|
183
201
|
};
|
|
184
202
|
|
|
185
|
-
const lro =
|
|
186
|
-
|
|
187
|
-
{ resourceGroupName, workspaceName, peeringName, options },
|
|
188
|
-
deleteOperationSpec
|
|
189
|
-
);
|
|
190
|
-
const poller =
|
|
191
|
-
|
|
203
|
+
const lro = createLroSpec({
|
|
204
|
+
sendOperationFn,
|
|
205
|
+
args: { resourceGroupName, workspaceName, peeringName, options },
|
|
206
|
+
spec: deleteOperationSpec
|
|
207
|
+
});
|
|
208
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
209
|
+
restoreFrom: options?.resumeFrom,
|
|
192
210
|
intervalInMs: options?.updateIntervalInMs
|
|
193
211
|
});
|
|
194
212
|
await poller.poll();
|
|
@@ -232,8 +250,8 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
232
250
|
virtualNetworkPeeringParameters: VirtualNetworkPeering,
|
|
233
251
|
options?: VNetPeeringCreateOrUpdateOptionalParams
|
|
234
252
|
): Promise<
|
|
235
|
-
|
|
236
|
-
|
|
253
|
+
SimplePollerLike<
|
|
254
|
+
OperationState<VNetPeeringCreateOrUpdateResponse>,
|
|
237
255
|
VNetPeeringCreateOrUpdateResponse
|
|
238
256
|
>
|
|
239
257
|
> {
|
|
@@ -243,7 +261,7 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
243
261
|
): Promise<VNetPeeringCreateOrUpdateResponse> => {
|
|
244
262
|
return this.client.sendOperationRequest(args, spec);
|
|
245
263
|
};
|
|
246
|
-
const
|
|
264
|
+
const sendOperationFn = async (
|
|
247
265
|
args: coreClient.OperationArguments,
|
|
248
266
|
spec: coreClient.OperationSpec
|
|
249
267
|
) => {
|
|
@@ -276,19 +294,22 @@ export class VNetPeeringImpl implements VNetPeering {
|
|
|
276
294
|
};
|
|
277
295
|
};
|
|
278
296
|
|
|
279
|
-
const lro =
|
|
280
|
-
|
|
281
|
-
{
|
|
297
|
+
const lro = createLroSpec({
|
|
298
|
+
sendOperationFn,
|
|
299
|
+
args: {
|
|
282
300
|
resourceGroupName,
|
|
283
301
|
workspaceName,
|
|
284
302
|
peeringName,
|
|
285
303
|
virtualNetworkPeeringParameters,
|
|
286
304
|
options
|
|
287
305
|
},
|
|
288
|
-
createOrUpdateOperationSpec
|
|
289
|
-
);
|
|
290
|
-
const poller =
|
|
291
|
-
|
|
306
|
+
spec: createOrUpdateOperationSpec
|
|
307
|
+
});
|
|
308
|
+
const poller = await createHttpPoller<
|
|
309
|
+
VNetPeeringCreateOrUpdateResponse,
|
|
310
|
+
OperationState<VNetPeeringCreateOrUpdateResponse>
|
|
311
|
+
>(lro, {
|
|
312
|
+
restoreFrom: options?.resumeFrom,
|
|
292
313
|
intervalInMs: options?.updateIntervalInMs
|
|
293
314
|
});
|
|
294
315
|
await poller.poll();
|
|
@@ -474,7 +495,6 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {
|
|
|
474
495
|
bodyMapper: Mappers.ErrorResponse
|
|
475
496
|
}
|
|
476
497
|
},
|
|
477
|
-
queryParameters: [Parameters.apiVersion],
|
|
478
498
|
urlParameters: [
|
|
479
499
|
Parameters.$host,
|
|
480
500
|
Parameters.resourceGroupName,
|